Commit 3f1bd844 authored by Josh Frye's avatar Josh Frye

Implement changes from MR feedback

parent 74a4ff61
......@@ -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
......@@ -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
......@@ -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
......@@ -7,4 +7,4 @@
= render 'explore/head'
= render 'explore/projects/nav'
= render 'projects', projects: @trending_projects
= render 'projects', projects: @projects
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment