summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-06-17 15:41:59 +0000
committerRémy Coutable <remy@rymai.me>2016-06-17 15:41:59 +0000
commit802409571d53469a70ea66dcf24b1214ac525044 (patch)
tree7d125b8042ac423caf558f2b8d885d3d5886f783 /app/views/projects
parent9b7fd74805684c09d8de314d4eee67b470cb57eb (diff)
parent7022357c8cd7888e04252b8964882d0e081032df (diff)
downloadgitlab-ce-802409571d53469a70ea66dcf24b1214ac525044.tar.gz
Merge branch '14918-add-filter-dropdown-to-tag-page' into 'master'
Add sorting dropdown to tag page ## What does this MR do? Adds a sorting dropdown to the tags page just like the one on the branches page. ## Are there points in the code the reviewer needs to double check? No ## Why was this MR needed? Clients were asking for this ## What are the relevant issue numbers? Closes #14918 ## Screenshots (if relevant) ![Captura_de_pantalla_2016-06-01_a_las_4.07.58_p.m.](/uploads/4530683ddd91d3bdbdce77748fe63f87/Captura_de_pantalla_2016-06-01_a_las_4.07.58_p.m..png) See merge request !4423
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/tags/index.html.haml15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/views/projects/tags/index.html.haml b/app/views/projects/tags/index.html.haml
index 2779084fe38..4ca1f58ac5c 100644
--- a/app/views/projects/tags/index.html.haml
+++ b/app/views/projects/tags/index.html.haml
@@ -11,12 +11,23 @@
.nav-controls
= link_to new_namespace_project_tag_path(@project.namespace, @project), class: 'btn btn-create new-tag-btn' do
New tag
+ .dropdown.inline
+ %button.dropdown-toggle.btn{ type: 'button', data: { toggle: 'dropdown'} }
+ %span.light= @sort.humanize
+ %b.caret
+ %ul.dropdown-menu.dropdown-menu-align-right
+ %li
+ = link_to namespace_project_tags_path(sort: nil) do
+ Name
+ = link_to namespace_project_tags_path(sort: sort_value_recently_updated) do
+ = sort_title_recently_updated
+ = link_to namespace_project_tags_path(sort: sort_value_oldest_updated) do
+ = sort_title_oldest_updated
.tags
- unless @tags.empty?
%ul.content-list
- - @tags.each do |tag|
- = render 'tag', tag: @repository.find_tag(tag)
+ = render partial: 'tag', collection: @tags
= paginate @tags, theme: 'gitlab'