diff options
author | Rubén Dávila <rdavila84@gmail.com> | 2016-01-13 20:10:30 +0300 |
---|---|---|
committer | Rubén Dávila <rdavila84@gmail.com> | 2016-01-20 08:14:58 +0300 |
commit | 5cba592469dcec8c5df2248ca3a1deec83bd3913 (patch) | |
tree | 422ba7922daee61966b72776d8b60ad4070bde42 /app/views/projects/forks | |
parent | b0a5a99e9652d6ad9898cd4bd08363516fb15055 (diff) |
WIP: Add sort dropdown. #2406
Diffstat (limited to 'app/views/projects/forks')
-rw-r--r-- | app/views/projects/forks/index.html.haml | 20 |
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') |