diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-03-09 09:51:59 +0100 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-03-09 09:51:59 +0100 |
commit | c674ffe0e045e46fd0f2754b77b1042444d95388 (patch) | |
tree | ed4f8e01fff7be78054bccc2f10e2cdc342e12ca /app/views/shared | |
parent | e8cd04e831a2db36c4029f2c193fc40d2568c79e (diff) | |
parent | 7a311c23494b26d5212cac98318273fc9d2c69d1 (diff) | |
download | gitlab-ce-c674ffe0e045e46fd0f2754b77b1042444d95388.tar.gz |
Merge branch 'improve-archived-projects'
Diffstat (limited to 'app/views/shared')
-rw-r--r-- | app/views/shared/projects/_dropdown.html.haml | 22 |
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 |