Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6920fd3d
Commit
6920fd3d
authored
Mar 29, 2015
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Alignment fixes for repo buttons
parent
7652510c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
11 deletions
+18
-11
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+8
-0
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+1
-1
app/views/projects/_home_panel.html.haml
app/views/projects/_home_panel.html.haml
+8
-8
app/views/projects/show.html.haml
app/views/projects/show.html.haml
+1
-2
No files found.
app/assets/stylesheets/pages/projects.scss
View file @
6920fd3d
...
@@ -48,6 +48,10 @@
...
@@ -48,6 +48,10 @@
.project-home-row
{
.project-home-row
{
@extend
.clearfix
;
@extend
.clearfix
;
margin-bottom
:
15px
;
margin-bottom
:
15px
;
&
.project-home-row-top
{
margin-bottom
:
11px
;
}
.project-home-desc
{
.project-home-desc
{
font-size
:
16px
;
font-size
:
16px
;
...
@@ -71,6 +75,10 @@
...
@@ -71,6 +75,10 @@
color
:
inherit
;
color
:
inherit
;
}
}
}
}
.project-repo-buttons
{
margin-top
:
-5px
;
}
}
}
.project-home-links
{
.project-home-links
{
...
...
app/helpers/projects_helper.rb
View file @
6920fd3d
...
@@ -81,7 +81,7 @@ module ProjectsHelper
...
@@ -81,7 +81,7 @@ module ProjectsHelper
end
end
def
link_to_toggle_star
(
title
,
starred
,
signed_in
)
def
link_to_toggle_star
(
title
,
starred
,
signed_in
)
cls
=
'star-btn btn btn-default'
cls
=
'star-btn btn btn-
sm btn-
default'
cls
<<
' disabled'
unless
signed_in
cls
<<
' disabled'
unless
signed_in
toggle_html
=
content_tag
(
'span'
,
class:
'toggle'
)
do
toggle_html
=
content_tag
(
'span'
,
class:
'toggle'
)
do
...
...
app/views/projects/_home_panel.html.haml
View file @
6920fd3d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
.project-home-panel
{
:class
=>
(
"empty-project"
if
empty_repo
)}
.project-home-panel
{
:class
=>
(
"empty-project"
if
empty_repo
)}
.project-identicon-holder
.project-identicon-holder
=
project_icon
(
@project
,
alt:
''
,
class:
'avatar project-avatar'
)
=
project_icon
(
@project
,
alt:
''
,
class:
'avatar project-avatar'
)
.project-home-row
.project-home-row
.project-home-row-top
.project-home-desc
.project-home-desc
-
if
@project
.
description
.
present?
-
if
@project
.
description
.
present?
=
escaped_autolink
(
@project
.
description
)
=
escaped_autolink
(
@project
.
description
)
...
@@ -14,20 +14,20 @@
...
@@ -14,20 +14,20 @@
–
–
=
link_to
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
@repository
.
root_ref
,
readme
.
name
))
do
=
link_to
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
@repository
.
root_ref
,
readme
.
name
))
do
=
readme
.
name
=
readme
.
name
%span
.star.pull-right.prepend-left-10.js-toggler-container
{
class:
@show_star
?
'on'
:
''
}
.pull-right.prepend-left-10.project-repo-buttons
-
if
current_user
=
link_to_toggle_star
(
'Star this project.'
,
false
,
true
)
=
link_to_toggle_star
(
'Unstar this project.'
,
true
,
true
)
.pull-right.prepend-left-10
-
unless
@project
.
empty_repo?
-
unless
@project
.
empty_repo?
.fork-buttons
.fork-buttons
-
if
current_user
&&
can?
(
current_user
,
:fork_project
,
@project
)
&&
@project
.
namespace
!=
current_user
.
namespace
-
if
current_user
&&
can?
(
current_user
,
:fork_project
,
@project
)
&&
@project
.
namespace
!=
current_user
.
namespace
-
if
current_user
.
already_forked?
(
@project
)
&&
current_user
.
manageable_namespaces
.
size
<
2
-
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-default'
do
=
link_to
namespace_project_path
(
current_user
,
current_user
.
fork_of
(
@project
)),
title:
'Go to your fork'
,
class:
'btn btn-
sm btn-
default'
do
=
link_to_toggle_fork
=
link_to_toggle_fork
-
else
-
else
=
link_to
new_namespace_project_fork_path
(
@project
.
namespace
,
@project
),
title:
"Fork project"
,
class:
'btn btn-default'
do
=
link_to
new_namespace_project_fork_path
(
@project
.
namespace
,
@project
),
title:
"Fork project"
,
class:
'btn btn-
sm btn-
default'
do
=
link_to_toggle_fork
=
link_to_toggle_fork
.star.pull-right.prepend-left-10.project-repo-buttons.js-toggler-container
{
class:
@show_star
?
'on'
:
''
}
-
if
current_user
=
link_to_toggle_star
(
'Star this project.'
,
false
,
true
)
=
link_to_toggle_star
(
'Unstar this project.'
,
true
,
true
)
.project-home-row.hidden-xs
.project-home-row.hidden-xs
-
if
current_user
&&
!
empty_repo
-
if
current_user
&&
!
empty_repo
...
...
app/views/projects/show.html.haml
View file @
6920fd3d
...
@@ -89,8 +89,7 @@
...
@@ -89,8 +89,7 @@
=
link_to
ci_service
.
title
,
ci_service
.
builds_path
,
:'data-no-turbolink'
=>
'data-no-turbolink'
=
link_to
ci_service
.
title
,
ci_service
.
builds_path
,
:'data-no-turbolink'
=>
'data-no-turbolink'
-
unless
@project
.
empty_repo?
-
unless
@project
.
empty_repo?
-
if
can?
current_user
,
:download_code
,
@project
-
if
can?
current_user
,
:download_code
,
@project
.pull-right.prepend-left-10
=
render
'projects/repositories/download_archive'
,
split_button:
true
=
render
'projects/repositories/download_archive'
,
split_button:
true
-
if
readme
-
if
readme
.tab-pane
#tab-readme
.tab-pane
#tab-readme
...
...
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