debian-mirror-gitlab/app/views/projects/buttons/_fork.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
1.2 KiB
Text
Raw Normal View History

2015-11-26 14:37:03 +05:30
- unless @project.empty_repo?
2022-01-26 12:08:38 +05:30
- if current_user
2021-04-17 20:07:23 +05:30
.count-badge.btn-group
2022-03-02 08:16:31 +05:30
- if current_user.already_forked?(@project) && current_user.forkable_namespaces.size < 2
2021-04-17 20:07:23 +05:30
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: s_('ProjectOverview|Go to your fork'), class: 'gl-button btn btn-default btn-sm has-tooltip fork-btn' do
2021-01-03 14:25:43 +05:30
= sprite_icon('fork', css_class: 'icon')
2018-11-20 20:47:30 +05:30
%span= s_('ProjectOverview|Fork')
- else
2022-01-26 12:08:38 +05:30
- disabled_tooltip = fork_button_disabled_tooltip(@project)
- count_class = 'disabled' unless can?(current_user, :download_code, @project)
- button_class = 'disabled' if disabled_tooltip
%span.btn-group{ class: ('has-tooltip' if disabled_tooltip), title: disabled_tooltip }
= link_to new_project_fork_path(@project), class: "gl-button btn btn-default btn-sm fork-btn #{button_class}" do
2021-03-11 19:13:27 +05:30
= sprite_icon('fork', css_class: 'icon')
%span= s_('ProjectOverview|Fork')
2022-11-25 23:54:43 +05:30
= link_to project_forks_path(@project), title: n_(s_('ProjectOverview|Forks'), s_('ProjectOverview|Forks'), @project.forks_count), class: "gl-button btn btn-default btn-sm count has-tooltip fork-count #{count_class}" do
2021-04-17 20:07:23 +05:30
= @project.forks_count