diff options
Diffstat (limited to 'app/views/explore')
-rw-r--r-- | app/views/explore/groups/_groups.html.haml | 6 | ||||
-rw-r--r-- | app/views/explore/groups/_nav.html.haml | 8 | ||||
-rw-r--r-- | app/views/explore/groups/index.html.haml | 42 | ||||
-rw-r--r-- | app/views/explore/projects/_nav.html.haml | 27 | ||||
-rw-r--r-- | app/views/explore/projects/index.html.haml | 7 |
5 files changed, 37 insertions, 53 deletions
diff --git a/app/views/explore/groups/_groups.html.haml b/app/views/explore/groups/_groups.html.haml new file mode 100644 index 00000000000..794c6d1d170 --- /dev/null +++ b/app/views/explore/groups/_groups.html.haml @@ -0,0 +1,6 @@ +.js-groups-list-holder + %ul.content-list + - @groups.each do |group| + = render 'shared/groups/group', group: group + + = paginate @groups, theme: 'gitlab' diff --git a/app/views/explore/groups/_nav.html.haml b/app/views/explore/groups/_nav.html.haml new file mode 100644 index 00000000000..c8d95b52156 --- /dev/null +++ b/app/views/explore/groups/_nav.html.haml @@ -0,0 +1,8 @@ +.top-area + %ul.nav-links + = nav_link(page: explore_groups_path) do + = link_to explore_groups_path do + Explore Groups + .nav-controls + = render 'shared/groups/search_form' + = render 'shared/groups/dropdown' diff --git a/app/views/explore/groups/index.html.haml b/app/views/explore/groups/index.html.haml index 73cf6e87eb4..bb2cd0d44c8 100644 --- a/app/views/explore/groups/index.html.haml +++ b/app/views/explore/groups/index.html.haml @@ -5,41 +5,9 @@ = render 'dashboard/groups_head' - else = render 'explore/head' + = render 'nav' -.row-content-block.clearfix - .pull-left - = form_tag explore_groups_path, method: :get, class: 'form-inline form-tiny' do |f| - = hidden_field_tag :sort, @sort - .form-group - = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "groups_search", spellcheck: false - .form-group - = button_tag 'Search', class: "btn btn-default" - - .pull-right - .dropdown.inline - %button.dropdown-toggle{ type: 'button', 'data-toggle' => 'dropdown' } - %span.light - - if @sort.present? - = sort_options_hash[@sort] - - else - = sort_title_recently_created - = icon('chevron-down') - %ul.dropdown-menu.dropdown-menu-align-right - %li - = link_to explore_groups_path(sort: sort_value_recently_created) do - = sort_title_recently_created - = link_to explore_groups_path(sort: sort_value_oldest_created) do - = sort_title_oldest_created - = link_to explore_groups_path(sort: sort_value_recently_updated) do - = sort_title_recently_updated - = link_to explore_groups_path(sort: sort_value_oldest_updated) do - = sort_title_oldest_updated - -%ul.content-list - - @groups.each do |group| - = render 'shared/groups/group', group: group - - unless @groups.present? - .nothing-here-block No public groups - - -= paginate @groups, theme: "gitlab" +- if @groups.present? + = render 'groups' +- else + .nothing-here-block No public groups diff --git a/app/views/explore/projects/_nav.html.haml b/app/views/explore/projects/_nav.html.haml index 614b5431779..e0a2a1e9c96 100644 --- a/app/views/explore/projects/_nav.html.haml +++ b/app/views/explore/projects/_nav.html.haml @@ -1,10 +1,17 @@ -%ul.nav-links - = nav_link(page: [trending_explore_projects_path, explore_root_path]) do - = link_to trending_explore_projects_path do - Trending - = nav_link(page: starred_explore_projects_path) do - = link_to starred_explore_projects_path do - Most stars - = nav_link(page: explore_projects_path) do - = link_to explore_projects_path do - All +.top-area + %ul.nav-links + = nav_link(page: [trending_explore_projects_path, explore_root_path]) do + = link_to trending_explore_projects_path do + Trending + = nav_link(page: starred_explore_projects_path) do + = link_to starred_explore_projects_path do + Most stars + = nav_link(page: explore_projects_path) do + = link_to explore_projects_path do + All + + .nav-controls + - unless current_user + = render 'shared/projects/search_form' + = render 'shared/projects/dropdown' + = render 'filter' diff --git a/app/views/explore/projects/index.html.haml b/app/views/explore/projects/index.html.haml index 42b50481b9d..ec461755103 100644 --- a/app/views/explore/projects/index.html.haml +++ b/app/views/explore/projects/index.html.haml @@ -6,10 +6,5 @@ - else = render 'explore/head' -.top-area - = render 'explore/projects/nav' - - .nav-controls - = render 'filter' - += render 'explore/projects/nav' = render 'projects', projects: @projects |