diff options
author | vanadium23 <chernoffivan@gmail.com> | 2017-06-13 20:58:46 +0300 |
---|---|---|
committer | vanadium23 <chernoffivan@gmail.com> | 2017-06-16 23:56:02 +0300 |
commit | 541950322c6bde9403ea893985abe88700dca669 (patch) | |
tree | 9250cd5dc98c1e3f93cbbcac0395956622cd84df /app/views | |
parent | f2505eb6ce87877f78ee90c8567f879bcd77642b (diff) |
Disable fork button on project limit
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/buttons/_fork.html.haml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/views/projects/buttons/_fork.html.haml b/app/views/projects/buttons/_fork.html.haml index d3d44c45cc7..42f8c75f57b 100644 --- a/app/views/projects/buttons/_fork.html.haml +++ b/app/views/projects/buttons/_fork.html.haml @@ -4,6 +4,10 @@ = link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: _('Go to your fork'), class: 'btn has-tooltip' do = custom_icon('icon_fork') %span= s_('GoToYourFork|Fork') + - elsif !current_user.can_create_project? + = link_to new_namespace_project_fork_path(@project.namespace, @project), title: _('You have reached your project limit'), class: 'btn has-tooltip disabled' do + = custom_icon('icon_fork') + %span= s_('CreateNewFork|Fork') - else = link_to new_namespace_project_fork_path(@project.namespace, @project), class: 'btn' do = custom_icon('icon_fork') |