Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-06-17 18:41:59 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-06-17 21:13:03 +0300
commitecd4a7b026e5e83c88ae8e84567c8504b5af6a88 (patch)
tree334fbe0baaaeea9c986efe773cd4702f6fd491cf /app/views/projects
parent9bbe5eb85708b674c95d3c3da672af3abf7da264 (diff)
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'