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

33 lines
2.1 KiB
Text
Raw Normal View History

2022-01-26 12:08:38 +05:30
- sort_value = @sort || sort_value_recently_created
2022-06-21 17:19:12 +05:30
- excluded_filters = [:state, :scope, :label_name, :milestone_id, :assignee_id, :author_id]
- created_at = { value: sort_value_created_date, text: sort_title_created_date, href: page_filter_path(sort: sort_value_recently_created, without: excluded_filters) }
- activity = { value: sort_value_latest_activity, text: sort_title_latest_activity, href: page_filter_path(sort: sort_value_latest_activity, without: excluded_filters) }
2022-01-26 12:08:38 +05:30
2016-04-02 18:10:28 +05:30
.top-area
.nav-text
2019-12-04 20:38:33 +05:30
- full_count_title = "#{@public_forks_count} public, #{@internal_forks_count} internal, 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
2022-01-26 12:08:38 +05:30
.gl-display-flex.gl-sm-flex-direction-column.gl-md-align-items-center
= form_tag request.original_url, method: :get, class: 'project-filter-form gl-display-flex gl-mt-3 gl-md-mt-0', 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 gl-flex-grow-1',
2016-06-02 11:05:42 +05:30
spellcheck: false, data: { 'filter-selector' => 'span.namespace-name' }
2016-04-02 18:10:28 +05:30
2022-01-26 12:08:38 +05:30
.dropdown.gl-display-inline.gl-md-ml-3.issue-sort-dropdown.gl-mt-3.gl-md-mt-0
.btn-group{ role: 'group' }
.btn-group{ role: 'group' }
2022-06-21 17:19:12 +05:30
= gl_redirect_listbox_tag [created_at, activity], @sort
2022-01-26 12:08:38 +05:30
= forks_sort_direction_button(sort_value)
2016-04-02 18:10:28 +05:30
- if current_user && can?(current_user, :fork_project, @project)
2022-03-02 08:16:31 +05:30
- if current_user.already_forked?(@project) && current_user.forkable_namespaces.size < 2
2022-01-26 12:08:38 +05:30
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: _('Go to your fork'), class: 'btn gl-button btn-confirm gl-md-ml-3' do
2018-03-17 18:26:18 +05:30
= sprite_icon('fork', size: 12)
2019-07-31 22:56:46 +05:30
%span= _('Fork')
2016-04-02 18:10:28 +05:30
- else
2022-01-26 12:08:38 +05:30
= link_to new_project_fork_path(@project), title: _("Fork project"), class: 'btn gl-button btn-confirm gl-md-ml-3 gl-mt-3 gl-md-mt-0' do
2018-03-17 18:26:18 +05:30
= sprite_icon('fork', size: 12)
2019-07-31 22:56:46 +05:30
%span= _('Fork')
2016-04-02 18:10:28 +05:30
2016-06-02 11:05:42 +05:30
= render 'projects', projects: @forks