2016-02-02 19:08:30 -05:00
|
|
|
.top-area
|
|
|
|
.nav-text
|
2016-02-26 19:08:25 -05:00
|
|
|
- full_count_title = "#{@public_forks_count} public and #{@private_forks_count} private"
|
2017-01-15 11:20:13 -05:00
|
|
|
#{pluralize(@total_forks_count, 'fork')}: #{full_count_title}
|
2016-01-11 19:16:29 -05:00
|
|
|
|
2016-02-02 19:08:30 -05:00
|
|
|
.nav-controls
|
2016-03-03 07:09:58 -05:00
|
|
|
= 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-01-11 21:38:31 -05:00
|
|
|
|
2016-02-02 19:50:53 -05:00
|
|
|
.dropdown
|
2016-12-26 05:47:16 -05:00
|
|
|
%button.dropdown-toggle{ type: 'button', 'data-toggle' => 'dropdown' }
|
2016-02-02 19:08:30 -05:00
|
|
|
%span.light sort:
|
|
|
|
- if @sort.present?
|
|
|
|
= sort_options_hash[@sort]
|
|
|
|
- else
|
|
|
|
= sort_title_recently_created
|
2016-11-22 16:28:07 -05:00
|
|
|
= icon('chevron-down')
|
2016-02-02 19:08:30 -05:00
|
|
|
%ul.dropdown-menu.dropdown-menu-align-right
|
|
|
|
%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
|
2016-01-13 12:10:30 -05:00
|
|
|
= sort_title_recently_created
|
2016-02-02 19:08:30 -05:00
|
|
|
= 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
|
2016-01-13 12:10:30 -05:00
|
|
|
|
2016-02-11 19:02:52 -05:00
|
|
|
- if current_user && can?(current_user, :fork_project, @project)
|
|
|
|
- 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: 'btn btn-new' do
|
2016-07-14 11:48:01 -04:00
|
|
|
= custom_icon('icon_fork')
|
2016-08-19 04:39:47 -04:00
|
|
|
%span Fork
|
2016-02-11 19:02:52 -05:00
|
|
|
- else
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to new_project_fork_path(@project), title: "Fork project", class: 'btn btn-new' do
|
2016-07-14 11:48:01 -04:00
|
|
|
= custom_icon('icon_fork')
|
2016-08-19 04:39:47 -04:00
|
|
|
%span Fork
|
2016-01-11 21:38:31 -05:00
|
|
|
|
|
|
|
|
2016-03-03 07:09:58 -05:00
|
|
|
= render 'projects', projects: @forks
|