2015-11-26 14:37:03 +05:30
|
|
|
- unless @project.empty_repo?
|
|
|
|
- if current_user && can?(current_user, :fork_project, @project)
|
|
|
|
- if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2
|
2017-09-10 17:25:29 +05:30
|
|
|
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: _('Go to your fork'), class: 'btn has-tooltip' do
|
2016-08-24 12:49:21 +05:30
|
|
|
= custom_icon('icon_fork')
|
2017-09-10 17:25:29 +05:30
|
|
|
%span= s_('GoToYourFork|Fork')
|
|
|
|
- elsif !current_user.can_create_project?
|
|
|
|
= link_to new_project_fork_path(@project), title: _('You have reached your project limit'), class: 'btn has-tooltip disabled' do
|
|
|
|
= custom_icon('icon_fork')
|
|
|
|
%span= s_('CreateNewFork|Fork')
|
2015-11-26 14:37:03 +05:30
|
|
|
- else
|
2017-09-10 17:25:29 +05:30
|
|
|
= link_to new_project_fork_path(@project), class: 'btn' do
|
2016-08-24 12:49:21 +05:30
|
|
|
= custom_icon('icon_fork')
|
2017-09-10 17:25:29 +05:30
|
|
|
%span= s_('CreateNewFork|Fork')
|
2017-08-17 22:00:37 +05:30
|
|
|
.count-with-arrow
|
2016-09-13 17:45:13 +05:30
|
|
|
%span.arrow
|
2017-09-10 17:25:29 +05:30
|
|
|
= link_to project_forks_path(@project), title: n_('Fork', 'Forks', @project.forks_count), class: 'count' do
|
2016-09-13 17:45:13 +05:30
|
|
|
= @project.forks_count
|