BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
79a4da90
Commit
79a4da90
authored
Sep 24, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7816 from cirosantilli/factor-fork
Factor fork button view.
parents
f0c0edc2
b5c0bdd7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
projects_helper.rb
app/helpers/projects_helper.rb
+8
-0
_home_panel.html.haml
app/views/projects/_home_panel.html.haml
+2
-8
No files found.
app/helpers/projects_helper.rb
View file @
79a4da90
...
...
@@ -156,6 +156,14 @@ module ProjectsHelper
end
end
def
link_to_toggle_fork
out
=
content_tag
(
:i
,
''
,
class:
'icon-code-fork'
)
out
<<
' Fork'
out
<<
content_tag
(
:span
,
class:
'count'
)
do
@project
.
forks_count
.
to_s
end
end
private
def
get_project_nav_tabs
(
project
,
current_user
)
...
...
app/views/projects/_home_panel.html.haml
View file @
79a4da90
...
...
@@ -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'
:
''
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment