summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRubén Dávila <rdavila84@gmail.com>2016-01-13 12:10:30 -0500
committerRubén Dávila <rdavila84@gmail.com>2016-01-20 00:14:58 -0500
commit5cba592469dcec8c5df2248ca3a1deec83bd3913 (patch)
tree422ba7922daee61966b72776d8b60ad4070bde42
parentb0a5a99e9652d6ad9898cd4bd08363516fb15055 (diff)
downloadgitlab-ce-5cba592469dcec8c5df2248ca3a1deec83bd3913.tar.gz
WIP: Add sort dropdown. #2406
-rw-r--r--app/views/projects/forks/index.html.haml20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/views/projects/forks/index.html.haml b/app/views/projects/forks/index.html.haml
index 985924ad052..09406ce9e4b 100644
--- a/app/views/projects/forks/index.html.haml
+++ b/app/views/projects/forks/index.html.haml
@@ -10,6 +10,26 @@
= search_field_tag :filter_projects, nil, placeholder: 'Search forks', class: 'projects-list-filter form-control',
spellcheck: false, data: { 'filter-selector' => 'span.namespace-name' }
+ .dropdown.inline.prepend-left-10
+ %button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
+ %span.light sort:
+ - if @sort.present?
+ = sort_options_hash[@sort]
+ - else
+ = sort_title_recently_created
+ %b.caret
+ %ul.dropdown-menu.dropdown-menu-align-right
+ %li
+ = link_to page_filter_path(sort: sort_value_recently_created) do
+ = sort_title_recently_created
+ = link_to page_filter_path(sort: sort_value_oldest_created) do
+ = sort_title_oldest_created
+ = link_to page_filter_path(sort: sort_value_recently_updated) do
+ = sort_title_recently_updated
+ = link_to page_filter_path(sort: sort_value_oldest_updated) do
+ = sort_title_oldest_updated
+
+ .fork_link.inline
- if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'pull-right btn btn-new' do
= icon('code-fork fw')