diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-07-08 12:25:34 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-07-08 12:25:34 +0200 |
commit | c2f02fc1a4b88e1c01cb3562168322d0c5debba3 (patch) | |
tree | bcfc20e755dcdb8e07e7aa6600643e3d76585a0b /app/views/projects/buttons/_fork.html.haml | |
parent | 5be6cbac6fd50f6e97c483f78de667ce5628a3ce (diff) | |
download | gitlab-ce-c2f02fc1a4b88e1c01cb3562168322d0c5debba3.tar.gz |
Refactor star and fork buttons
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/projects/buttons/_fork.html.haml')
-rw-r--r-- | app/views/projects/buttons/_fork.html.haml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/views/projects/buttons/_fork.html.haml b/app/views/projects/buttons/_fork.html.haml new file mode 100644 index 00000000000..f0483c79edc --- /dev/null +++ b/app/views/projects/buttons/_fork.html.haml @@ -0,0 +1,13 @@ +- 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' do + = icon('code-fork') + Fork + %span.count + = @project.forks_count + - else + = link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn' do + = icon('code-fork') + Fork + %span.count + = @project.forks_count |