summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-09-21 23:26:18 +0200
committerCiro Santilli <ciro.santilli@gmail.com>2014-09-23 21:16:27 +0200
commitb5c0bdd7c949fa3986200bc8f953c3905b7490b2 (patch)
treec9e5cb3d3b3c710b6ebfc72adf89c06f768c0842 /app/views/projects
parentfda61a047ffb9b04bc4dd38e897088fde17fb3c1 (diff)
downloadgitlab-ce-b5c0bdd7c949fa3986200bc8f953c3905b7490b2.tar.gz
Factor fork button view.
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/_home_panel.html.haml10
1 files changed, 2 insertions, 8 deletions
diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml
index 1627a61d236..2c1ac06fc90 100644
--- a/app/views/projects/_home_panel.html.haml
+++ b/app/views/projects/_home_panel.html.haml
@@ -18,16 +18,10 @@
- if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace
- if current_user.already_forked?(@project)
= link_to project_path(current_user.fork_of(@project)), title: 'Got to my fork' do
- %i.icon-code-fork
- Fork
- %span.count
- = @project.forks_count
+ = link_to_toggle_fork
- else
= link_to fork_project_path(@project), title: "Fork project", method: "POST" do
- %i.icon-code-fork
- Fork
- %span.count
- = @project.forks_count
+ = link_to_toggle_fork
.star-buttons
%span.star.js-toggler-container{class: @show_star ? 'on' : ''}