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

18 lines
958 B
Text
Raw Normal View History

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')
2015-11-26 14:37:03 +05:30
- else
2018-03-17 18:26:18 +05:30
- can_create_fork = current_user.can?(:create_fork)
= link_to new_project_fork_path(@project),
class: "btn btn-default #{'has-tooltip disabled' unless can_create_fork}",
title: (_('You have reached your project limit') unless can_create_fork) 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