diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-18 09:40:00 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-18 09:40:00 +0300 |
commit | 70edf950fe6baf90bb98c904d9132924e55e50d6 (patch) | |
tree | c09eee0b3ddfef7372ffc36f8c453ba935945ceb /app/views/users/_projects.html.haml | |
parent | d905a431e89423a901ff5cd242c5f2bf90a4f511 (diff) |
Show contributed projects on user page and stars for it
Diffstat (limited to 'app/views/users/_projects.html.haml')
-rw-r--r-- | app/views/users/_projects.html.haml | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/app/views/users/_projects.html.haml b/app/views/users/_projects.html.haml index 1d38f8e8ab8..c925a48f550 100644 --- a/app/views/users/_projects.html.haml +++ b/app/views/users/_projects.html.haml @@ -1,6 +1,21 @@ -.panel.panel-default - .panel-heading Personal projects - %ul.well-list - - projects.each do |project| - %li - = link_to_project project +- if @contributed_projects.present? + .panel.panel-default + .panel-heading Projects contributed to + %ul.well-list + - @contributed_projects.sort_by(&:star_count).reverse.each do |project| + %li + = link_to_project project + %span.pull-right.light + %i.fa.fa-star + = project.star_count + +- if @projects.present? + .panel.panel-default + .panel-heading Personal projects + %ul.well-list + - @projects.sort_by(&:star_count).reverse.each do |project| + %li + = link_to_project project + %span.pull-right.light + %i.fa.fa-star + = project.star_count |