diff options
author | Josh Frye <joshfng@gmail.com> | 2016-02-04 14:02:19 -0500 |
---|---|---|
committer | Josh Frye <joshfng@gmail.com> | 2016-02-04 14:02:19 -0500 |
commit | 3f1bd844f1f645d3d97caec4aa2504fde63b31fd (patch) | |
tree | 655d6aa9745d17dda3d70c4989927f0ff639e669 | |
parent | 74a4ff614335ce82d92a7501227898053f806b6e (diff) | |
download | gitlab-ce-3f1bd844f1f645d3d97caec4aa2504fde63b31fd.tar.gz |
Implement changes from MR feedback
-rw-r--r-- | app/controllers/explore/projects_controller.rb | 12 | ||||
-rw-r--r-- | app/views/dashboard/_projects_head.html.haml | 14 | ||||
-rw-r--r-- | app/views/explore/projects/starred.html.haml | 2 | ||||
-rw-r--r-- | app/views/explore/projects/trending.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/projects/_list.html.haml | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb index a5aeaed66c5..2689bf4f1ec 100644 --- a/app/controllers/explore/projects_controller.rb +++ b/app/controllers/explore/projects_controller.rb @@ -11,14 +11,14 @@ class Explore::ProjectsController < Explore::ApplicationController end def trending - @trending_projects = TrendingProjectsFinder.new.execute(current_user) - @trending_projects = @trending_projects.non_archived - @trending_projects = @trending_projects.page(params[:page]).per(PER_PAGE) + @projects = TrendingProjectsFinder.new.execute(current_user) + @projects = @projects.non_archived + @projects = @projects.page(params[:page]).per(PER_PAGE) end def starred - @starred_projects = ProjectsFinder.new.execute(current_user) - @starred_projects = @starred_projects.reorder('star_count DESC') - @starred_projects = @starred_projects.page(params[:page]).per(PER_PAGE) + @projects = ProjectsFinder.new.execute(current_user) + @projects = @projects.reorder('star_count DESC') + @projects = @projects.page(params[:page]).per(PER_PAGE) end end diff --git a/app/views/dashboard/_projects_head.html.haml b/app/views/dashboard/_projects_head.html.haml index 911f57f69e4..91712ce6fc5 100644 --- a/app/views/dashboard/_projects_head.html.haml +++ b/app/views/dashboard/_projects_head.html.haml @@ -13,10 +13,10 @@ Explore Projects .nav-controls - = form_tag request.original_url, method: :get, class: 'project-filter-form', id: 'project-filter-form' do |f| - .append-right-10.hidden-xs.hidden-sm - = search_field_tag :filter_projects, params[:filter_projects], placeholder: 'Filter by name...', class: 'project-filter-form-field form-control search-text-input', spellcheck: false, id: 'project-filter-form-field' - - if current_user.can_create_project? - = link_to new_project_path, class: 'btn btn-new' do - = icon('plus') - New Project + .pull-right + = form_tag request.original_url, method: :get, class: 'pull-left project-filter-form', id: 'project-filter-form' do |f| + = search_field_tag :filter_projects, params[:filter_projects], placeholder: 'Filter by name...', class: 'pull-left form-control project-filter-form-field form-control', spellcheck: false, id: 'project-filter-form-field' + - if current_user.can_create_project? + = link_to new_project_path, class: 'btn btn-new pull-left' do + = icon('plus') + New Project diff --git a/app/views/explore/projects/starred.html.haml b/app/views/explore/projects/starred.html.haml index 8450a1394c0..1b5269c7b68 100644 --- a/app/views/explore/projects/starred.html.haml +++ b/app/views/explore/projects/starred.html.haml @@ -7,5 +7,5 @@ = render 'explore/head' = render 'explore/projects/nav' -= render 'projects', projects: @starred_projects += render 'projects', projects: @projects = paginate @projects, theme: 'gitlab' if @projects diff --git a/app/views/explore/projects/trending.html.haml b/app/views/explore/projects/trending.html.haml index adcda810061..ec461755103 100644 --- a/app/views/explore/projects/trending.html.haml +++ b/app/views/explore/projects/trending.html.haml @@ -7,4 +7,4 @@ = render 'explore/head' = render 'explore/projects/nav' -= render 'projects', projects: @trending_projects += render 'projects', projects: @projects diff --git a/app/views/shared/projects/_list.html.haml b/app/views/shared/projects/_list.html.haml index 83188e58135..67edb264b7e 100644 --- a/app/views/shared/projects/_list.html.haml +++ b/app/views/shared/projects/_list.html.haml @@ -15,7 +15,7 @@ avatar: avatar, stars: stars, css_class: css_class, ci: ci, use_creator_avatar: use_creator_avatar, forks: forks, show_last_commit_as_description: show_last_commit_as_description - - if projects.size > projects_limit + - if projects.size > projects_limit && projects.kind_of?(Array) %li.bottom.center .light #{projects_limit} of #{pluralize(projects.count, 'project')} displayed. |