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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
70eff78d
Commit
70eff78d
authored
Dec 18, 2015
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arrows for buttons
parent
4dfd4e03
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
2 deletions
+72
-2
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+60
-1
app/views/projects/_home_panel.html.haml
app/views/projects/_home_panel.html.haml
+1
-1
app/views/projects/buttons/_fork.html.haml
app/views/projects/buttons/_fork.html.haml
+5
-0
app/views/projects/buttons/_star.html.haml
app/views/projects/buttons/_star.html.haml
+6
-0
No files found.
app/assets/stylesheets/pages/projects.scss
View file @
70eff78d
...
@@ -101,11 +101,70 @@
...
@@ -101,11 +101,70 @@
margin-top
:
12px
;
margin-top
:
12px
;
margin-bottom
:
0px
;
margin-bottom
:
0px
;
.count-buttons
{
display
:
block
;
}
.btn
{
.btn
{
@include
btn-gray
;
@include
btn-gray
;
text-transform
:
none
;
}
.count-with-arrow
{
display
:
inline-block
;
position
:
relative
;
margin-left
:
4px
;
.arrow
{
&
:before
{
content
:
''
;
display
:
inline-block
;
position
:
absolute
;
width
:
0
;
height
:
0
;
border-color
:
transparent
;
border-style
:
solid
;
top
:
50%
;
left
:
0
;
margin-top
:
-6px
;
border-width
:
7px
5px
7px
0
;
border-right-color
:
#dce0e5
;
}
&
:after
{
content
:
''
;
position
:
absolute
;
width
:
0
;
height
:
0
;
border-color
:
transparent
;
border-style
:
solid
;
top
:
50%
;
left
:
1px
;
margin-top
:
-9px
;
border-width
:
10px
7px
10px
0
;
border-right-color
:
#FFF
;
}
}
.count
{
.count
{
@include
btn-gray
;
display
:
inline-block
;
display
:
inline-block
;
background
:
white
;
border-radius
:
2px
;
border-width
:
1px
;
border-style
:
solid
;
font-size
:
13px
;
font-weight
:
600
;
line-height
:
20px
;
padding
:
11px
16px
;
letter-spacing
:
.4px
;
padding
:
10px
;
text-align
:
center
;
vertical-align
:
middle
;
touch-action
:
manipulation
;
cursor
:
pointer
;
background-image
:
none
;
white-space
:
nowrap
;
margin
:
0
11px
0px
4px
;
}
}
}
}
}
}
...
...
app/views/projects/_home_panel.html.haml
View file @
70eff78d
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
=
icon
(
'rss'
)
=
icon
(
'rss'
)
.project-repo-buttons
.project-repo-buttons
.split-one
.split-one
.count-buttons
=
render
'projects/buttons/star'
=
render
'projects/buttons/star'
=
render
'projects/buttons/fork'
=
render
'projects/buttons/fork'
...
...
app/views/projects/buttons/_fork.html.haml
View file @
70eff78d
...
@@ -4,10 +4,15 @@
...
@@ -4,10 +4,15 @@
=
link_to
namespace_project_path
(
current_user
,
current_user
.
fork_of
(
@project
)),
title:
'Go to your fork'
,
class:
'btn has_tooltip'
do
=
link_to
namespace_project_path
(
current_user
,
current_user
.
fork_of
(
@project
)),
title:
'Go to your fork'
,
class:
'btn has_tooltip'
do
=
icon
(
'code-fork fw'
)
=
icon
(
'code-fork fw'
)
Fork
Fork
%div
.count-with-arrow
%span
.arrow
%span
.count
%span
.count
=
@project
.
forks_count
=
@project
.
forks_count
-
else
-
else
=
link_to
new_namespace_project_fork_path
(
@project
.
namespace
,
@project
),
title:
"Fork project"
,
class:
'btn has_tooltip'
do
=
link_to
new_namespace_project_fork_path
(
@project
.
namespace
,
@project
),
title:
"Fork project"
,
class:
'btn has_tooltip'
do
=
icon
(
'code-fork fw'
)
=
icon
(
'code-fork fw'
)
Fork
%div
.count-with-arrow
%span
.arrow
%span
.count
%span
.count
=
@project
.
forks_count
=
@project
.
forks_count
app/views/projects/buttons/_star.html.haml
View file @
70eff78d
-
if
current_user
-
if
current_user
=
link_to
toggle_star_namespace_project_path
(
@project
.
namespace
,
@project
),
class:
'btn star-btn toggle-star has_tooltip'
,
method: :post
,
remote:
true
,
title:
"Star project"
do
=
link_to
toggle_star_namespace_project_path
(
@project
.
namespace
,
@project
),
class:
'btn star-btn toggle-star has_tooltip'
,
method: :post
,
remote:
true
,
title:
"Star project"
do
=
icon
(
'star fw'
)
=
icon
(
'star fw'
)
Star
%div
.count-with-arrow
%span
.arrow
%span
.count
%span
.count
=
@project
.
star_count
=
@project
.
star_count
...
@@ -15,5 +18,8 @@
...
@@ -15,5 +18,8 @@
-
else
-
else
=
link_to
new_user_session_path
,
class:
'btn has_tooltip star-btn'
,
title:
'You must sign in to star a project'
do
=
link_to
new_user_session_path
,
class:
'btn has_tooltip star-btn'
,
title:
'You must sign in to star a project'
do
=
icon
(
'star fw'
)
=
icon
(
'star fw'
)
Star
%div
.count-with-arrow
%span
.arrow
%span
.count
%span
.count
=
@project
.
star_count
=
@project
.
star_count
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