summaryrefslogtreecommitdiff
path: root/app/views/shared
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-09 09:51:59 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-09 09:51:59 +0100
commitc674ffe0e045e46fd0f2754b77b1042444d95388 (patch)
treeed4f8e01fff7be78054bccc2f10e2cdc342e12ca /app/views/shared
parente8cd04e831a2db36c4029f2c193fc40d2568c79e (diff)
parent7a311c23494b26d5212cac98318273fc9d2c69d1 (diff)
downloadgitlab-ce-c674ffe0e045e46fd0f2754b77b1042444d95388.tar.gz
Merge branch 'improve-archived-projects'
Diffstat (limited to 'app/views/shared')
-rw-r--r--app/views/shared/projects/_dropdown.html.haml22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/views/shared/projects/_dropdown.html.haml b/app/views/shared/projects/_dropdown.html.haml
new file mode 100644
index 00000000000..e7e04621ff4
--- /dev/null
+++ b/app/views/shared/projects/_dropdown.html.haml
@@ -0,0 +1,22 @@
+- @sort ||= sort_value_recently_updated
+- archived = params[:archived]
+.dropdown.inline
+ %button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
+ %span.light
+ = projects_sort_options_hash[@sort]
+ %b.caret
+ %ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable
+ %li.dropdown-header
+ Sort by
+ - projects_sort_options_hash.each do |value, title|
+ %li
+ = link_to filter_projects_path(sort: value, archived: archived), class: ("is-active" if @sort == value) do
+ = title
+
+ %li.divider
+ %li
+ = link_to filter_projects_path(sort: @sort, archived: nil), class: ("is-active" unless params[:archived].present?) do
+ Hide archived projects
+ %li
+ = link_to filter_projects_path(sort: @sort, archived: true), class: ("is-active" if params[:archived].present?) do
+ Show archived projects