Don't show fork button if user can't fork the project.
This commit is contained in:
parent
07faf8144a
commit
4d1e82e0bb
1 changed files with 9 additions and 8 deletions
|
@ -29,14 +29,15 @@
|
|||
= link_to page_filter_path(sort: sort_value_oldest_updated, without: excluded_filters) do
|
||||
= sort_title_oldest_updated
|
||||
|
||||
- if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2
|
||||
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'btn btn-new' do
|
||||
= icon('code-fork fw')
|
||||
Fork
|
||||
- else
|
||||
= link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn btn-new' do
|
||||
= icon('code-fork fw')
|
||||
Fork
|
||||
- if current_user && can?(current_user, :fork_project, @project)
|
||||
- if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2
|
||||
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'btn btn-new' do
|
||||
= icon('code-fork fw')
|
||||
Fork
|
||||
- else
|
||||
= link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn btn-new' do
|
||||
= icon('code-fork fw')
|
||||
Fork
|
||||
|
||||
|
||||
.projects-list-holder
|
||||
|
|
Loading…
Reference in a new issue