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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
7ba76520
Commit
7ba76520
authored
Jul 31, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak project page buttons.
parent
1e4b3264
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
26 deletions
+38
-26
CHANGELOG
CHANGELOG
+1
-0
app/assets/javascripts/project.js.coffee
app/assets/javascripts/project.js.coffee
+10
-5
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+1
-2
app/views/projects/_home_panel.html.haml
app/views/projects/_home_panel.html.haml
+7
-1
app/views/projects/buttons/_dropdown.html.haml
app/views/projects/buttons/_dropdown.html.haml
+15
-14
app/views/projects/buttons/_fork.html.haml
app/views/projects/buttons/_fork.html.haml
+2
-2
app/views/projects/buttons/_star.html.haml
app/views/projects/buttons/_star.html.haml
+2
-2
No files found.
CHANGELOG
View file @
7ba76520
...
@@ -19,6 +19,7 @@ v 7.14.0 (unreleased)
...
@@ -19,6 +19,7 @@ v 7.14.0 (unreleased)
- Add fetch command to the MR page
- Add fetch command to the MR page
- Fix bug causing Bitbucket importer to crash when OAuth application had been removed.
- Fix bug causing Bitbucket importer to crash when OAuth application had been removed.
- Add fetch command to the MR page.
- Add fetch command to the MR page.
- Tweak project page buttons.
v 7.13.2
v 7.13.2
- Fix randomly failed spec
- Fix randomly failed spec
...
...
app/assets/javascripts/project.js.coffee
View file @
7ba76520
class
@
Project
class
@
Project
constructor
:
->
constructor
:
->
# Git clone panel switcher
# Git clone panel switcher
scope
=
$
'.git-clone-holder'
cloneHolder
=
$
'.git-clone-holder'
if
scope
.
length
>
0
if
cloneHolder
.
length
>
0
$
(
'a, button'
,
scope
).
click
->
$
(
'a, button'
,
cloneHolder
).
click
->
$
(
'a, button'
,
scope
).
removeClass
'active'
$
(
'a, button'
,
cloneHolder
).
removeClass
'active'
$
(
@
).
addClass
'active'
$
(
@
).
addClass
'active'
$
(
'#project_clone'
,
scope
).
val
$
(
@
).
data
'clone'
$
(
'#project_clone'
,
cloneHolder
).
val
$
(
@
).
data
'clone'
$
(
".clone"
).
text
(
""
).
append
$
(
@
).
data
'clone'
$
(
".clone"
).
text
(
""
).
append
$
(
@
).
data
'clone'
# Ref switcher
# Ref switcher
...
@@ -24,3 +24,8 @@ class @Project
...
@@ -24,3 +24,8 @@ class @Project
$
.
cookie
(
'hide_no_password_message'
,
'false'
,
{
path
:
path
})
$
.
cookie
(
'hide_no_password_message'
,
'false'
,
{
path
:
path
})
$
(
@
).
parents
(
'.no-password-message'
).
remove
()
$
(
@
).
parents
(
'.no-password-message'
).
remove
()
e
.
preventDefault
()
e
.
preventDefault
()
$
(
'.js-toggle-clone-holder'
).
on
'click'
,
(
e
)
->
cloneHolder
.
toggle
()
cloneHolder
.
hide
()
app/assets/stylesheets/pages/projects.scss
View file @
7ba76520
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
.project-home-panel
{
.project-home-panel
{
text-align
:
center
;
text-align
:
center
;
margin-bottom
:
20px
;
.project-identicon-holder
{
.project-identicon-holder
{
margin-bottom
:
15px
;
margin-bottom
:
15px
;
...
@@ -39,7 +38,7 @@
...
@@ -39,7 +38,7 @@
.git-clone-holder
{
.git-clone-holder
{
max-width
:
600px
;
max-width
:
600px
;
margin
:
0
auto
;
margin
:
20px
auto
;
}
}
.visibility-level-label
{
.visibility-level-label
{
...
...
app/views/projects/_home_panel.html.haml
View file @
7ba76520
...
@@ -19,9 +19,15 @@
...
@@ -19,9 +19,15 @@
Forked from
Forked from
=
forked_from_project
.
namespace
.
try
(
:name
)
=
forked_from_project
.
namespace
.
try
(
:name
)
-
if
can?
current_user
,
:download_code
,
@project
=
link_to
"#"
,
class:
'btn js-toggle-clone-holder'
do
=
icon
(
'cloud-download fw'
)
Clone
-
if
can?
current_user
,
:download_code
,
@project
-
if
can?
current_user
,
:download_code
,
@project
=
link_to
archive_namespace_project_repository_path
(
@project
.
namespace
,
@project
,
ref:
@ref
,
format:
'zip'
),
class:
'btn'
,
rel:
'nofollow'
do
=
link_to
archive_namespace_project_repository_path
(
@project
.
namespace
,
@project
,
ref:
@ref
,
format:
'zip'
),
class:
'btn'
,
rel:
'nofollow'
do
%i
.fa.fa-download
=
icon
(
'download fw'
)
Download
=
render
'projects/buttons/dropdown'
=
render
'projects/buttons/dropdown'
...
...
app/views/projects/buttons/_dropdown.html.haml
View file @
7ba76520
-
if
current_user
-
if
current_user
%span
.dropdown
%span
.dropdown
%a
.dropdown-toggle.btn.btn-new
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%a
.dropdown-toggle.btn.btn-new
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-plus
=
icon
(
'plus'
)
%ul
.dropdown-menu
%ul
.dropdown-menu
-
if
@project
.
issues_enabled
&&
can?
(
current_user
,
:create_issue
,
@project
)
-
if
can?
(
current_user
,
:create_issue
,
@project
)
%li
%li
=
link_to
url_for_new_issue
,
title:
"New Issue"
do
=
link_to
url_for_new_issue
do
=
icon
(
'exclamation-circle fw'
)
New issue
New issue
-
if
@project
.
merge_requests_enabled
&&
can?
(
current_user
,
:create_merge_request
,
@project
)
-
if
can?
(
current_user
,
:create_merge_request
,
@project
)
%li
%li
=
link_to
new_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
),
title:
"New Merge Request"
do
=
link_to
new_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
)
do
=
icon
(
'tasks fw'
)
New merge request
New merge request
-
if
@project
.
snippets_enabled
&&
can?
(
current_user
,
:create_snippet
,
@project
)
-
if
can?
(
current_user
,
:create_snippet
,
@project
)
%li
%li
=
link_to
new_namespace_project_snippet_path
(
@project
.
namespace
,
@project
),
title:
"New Snippet"
do
=
link_to
new_namespace_project_snippet_path
(
@project
.
namespace
,
@project
)
do
=
icon
(
'file-text-o fw'
)
New snippet
New snippet
-
if
can?
(
current_user
,
:admin_project_member
,
@project
)
-
if
can?
(
current_user
,
:push_code
,
@project
)
%li
=
link_to
namespace_project_project_members_path
(
@project
.
namespace
,
@project
),
title:
"New project member"
do
New project member
-
if
can?
current_user
,
:push_code
,
@project
%li
.divider
%li
.divider
%li
%li
=
link_to
new_namespace_project_branch_path
(
@project
.
namespace
,
@project
)
do
=
link_to
new_namespace_project_branch_path
(
@project
.
namespace
,
@project
)
do
New git branch
=
icon
(
'code-fork fw'
)
New branch
%li
%li
=
link_to
new_namespace_project_tag_path
(
@project
.
namespace
,
@project
)
do
=
link_to
new_namespace_project_tag_path
(
@project
.
namespace
,
@project
)
do
New git tag
=
icon
(
'tags fw'
)
New tag
app/views/projects/buttons/_fork.html.haml
View file @
7ba76520
-
if
current_user
&&
can?
(
current_user
,
:fork_project
,
@project
)
-
if
current_user
&&
can?
(
current_user
,
:fork_project
,
@project
)
-
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'
do
=
link_to
namespace_project_path
(
current_user
,
current_user
.
fork_of
(
@project
)),
title:
'Go to your fork'
,
class:
'btn'
do
=
icon
(
'code-fork'
)
=
icon
(
'code-fork
fw
'
)
Fork
Fork
%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'
do
=
link_to
new_namespace_project_fork_path
(
@project
.
namespace
,
@project
),
title:
"Fork project"
,
class:
'btn'
do
=
icon
(
'code-fork'
)
=
icon
(
'code-fork
fw
'
)
Fork
Fork
%span
.count
%span
.count
=
@project
.
forks_count
=
@project
.
forks_count
app/views/projects/buttons/_star.html.haml
View file @
7ba76520
-
if
current_user
-
if
current_user
=
link_to
toggle_star_namespace_project_path
(
@project
.
namespace
,
@project
),
class:
'btn star-btn toggle-star'
,
method: :post
,
remote:
true
do
=
link_to
toggle_star_namespace_project_path
(
@project
.
namespace
,
@project
),
class:
'btn star-btn toggle-star'
,
method: :post
,
remote:
true
do
=
icon
(
'star'
)
=
icon
(
'star
fw
'
)
-
if
current_user
.
starred?
(
@project
)
-
if
current_user
.
starred?
(
@project
)
Unstar
Unstar
-
else
-
else
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
-
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'
)
=
icon
(
'star
fw
'
)
Star
Star
%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