debian-mirror-gitlab/app/views/projects/forks/index.html.haml

43 lines
2.1 KiB
Text
Raw Normal View History

2016-04-02 18:10:28 +05:30
.top-area
.nav-text
- full_count_title = "#{@public_forks_count} public and #{@private_forks_count} private"
2017-08-17 22:00:37 +05:30
#{pluralize(@total_forks_count, 'fork')}: #{full_count_title}
2016-04-02 18:10:28 +05:30
.nav-controls
2016-06-02 11:05:42 +05:30
= form_tag request.original_url, method: :get, class: 'project-filter-form', id: 'project-filter-form' do |f|
= search_field_tag :filter_projects, nil, placeholder: 'Search forks', class: 'projects-list-filter project-filter-form-field form-control input-short',
spellcheck: false, data: { 'filter-selector' => 'span.namespace-name' }
2016-04-02 18:10:28 +05:30
.dropdown
2019-02-13 22:33:31 +05:30
%button.dropdown-menu-toggle{ type: 'button', 'data-toggle' => 'dropdown' }
2016-04-02 18:10:28 +05:30
%span.light sort:
- if @sort.present?
= sort_options_hash[@sort]
- else
= sort_title_recently_created
2017-08-17 22:00:37 +05:30
= icon('chevron-down')
2018-11-08 19:23:39 +05:30
%ul.dropdown-menu.dropdown-menu-right
2016-04-02 18:10:28 +05:30
%li
- excluded_filters = [:state, :scope, :label_name, :milestone_id, :assignee_id, :author_id]
= link_to page_filter_path(sort: sort_value_recently_created, without: excluded_filters) do
= sort_title_recently_created
= link_to page_filter_path(sort: sort_value_oldest_created, without: excluded_filters) do
= sort_title_oldest_created
= link_to page_filter_path(sort: sort_value_recently_updated, without: excluded_filters) do
= sort_title_recently_updated
= link_to page_filter_path(sort: sort_value_oldest_updated, without: excluded_filters) do
= sort_title_oldest_updated
- if current_user && can?(current_user, :fork_project, @project)
- if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2
2018-12-05 23:21:45 +05:30
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'btn btn-success' do
2018-03-17 18:26:18 +05:30
= sprite_icon('fork', size: 12)
2016-09-29 09:46:39 +05:30
%span Fork
2016-04-02 18:10:28 +05:30
- else
2018-12-05 23:21:45 +05:30
= link_to new_project_fork_path(@project), title: "Fork project", class: 'btn btn-success' do
2018-03-17 18:26:18 +05:30
= sprite_icon('fork', size: 12)
2016-09-29 09:46:39 +05:30
%span Fork
2016-04-02 18:10:28 +05:30
2016-06-02 11:05:42 +05:30
= render 'projects', projects: @forks