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
e67ce6cd
Commit
e67ce6cd
authored
Apr 01, 2016
by
Arinde Eniola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix divider in dropdown when not needed
parent
82539cff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
app/views/projects/buttons/_dropdown.html.haml
app/views/projects/buttons/_dropdown.html.haml
+11
-6
No files found.
app/views/projects/buttons/_dropdown.html.haml
View file @
e67ce6cd
...
@@ -3,25 +3,32 @@
...
@@ -3,25 +3,32 @@
%a
.btn.dropdown-toggle
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%a
.btn.dropdown-toggle
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
=
icon
(
'plus'
)
=
icon
(
'plus'
)
%ul
.dropdown-menu.dropdown-menu-right.project-home-dropdown
%ul
.dropdown-menu.dropdown-menu-right.project-home-dropdown
-
if
can?
(
current_user
,
:create_issue
,
@project
)
-
can_create_issue
=
can?
(
current_user
,
:create_issue
,
@project
)
-
merge_project
=
can?
(
current_user
,
:create_merge_request
,
@project
)
?
@project
:
(
current_user
&&
current_user
.
fork_of
(
@project
))
-
can_create_snippet
=
can?
(
current_user
,
:create_snippet
,
@project
)
-
if
can_create_issue
%li
%li
=
link_to
url_for_new_issue
(
@project
,
only_path:
true
)
do
=
link_to
url_for_new_issue
(
@project
,
only_path:
true
)
do
=
icon
(
'exclamation-circle fw'
)
=
icon
(
'exclamation-circle fw'
)
New issue
New issue
-
merge_project
=
can?
(
current_user
,
:create_merge_request
,
@project
)
?
@project
:
(
current_user
&&
current_user
.
fork_of
(
@project
))
-
if
merge_project
-
if
merge_project
%li
%li
=
link_to
new_namespace_project_merge_request_path
(
merge_project
.
namespace
,
merge_project
)
do
=
link_to
new_namespace_project_merge_request_path
(
merge_project
.
namespace
,
merge_project
)
do
=
icon
(
'tasks fw'
)
=
icon
(
'tasks fw'
)
New merge request
New merge request
-
if
can?
(
current_user
,
:create_snippet
,
@project
)
-
if
can_create_snippet
%li
%li
=
link_to
new_namespace_project_snippet_path
(
@project
.
namespace
,
@project
)
do
=
link_to
new_namespace_project_snippet_path
(
@project
.
namespace
,
@project
)
do
=
icon
(
'file-text-o fw'
)
=
icon
(
'file-text-o fw'
)
New snippet
New snippet
-
if
can
?
(
current_user
,
:push_code
,
@project
)
-
if
can
_create_issue
||
merge_project
||
can_create_snippet
%li
.divider
%li
.divider
-
if
can?
(
current_user
,
:push_code
,
@project
)
%li
%li
=
link_to
namespace_project_new_blob_path
(
@project
.
namespace
,
@project
,
@project
.
default_branch
||
'master'
)
do
=
link_to
namespace_project_new_blob_path
(
@project
.
namespace
,
@project
,
@project
.
default_branch
||
'master'
)
do
=
icon
(
'file fw'
)
=
icon
(
'file fw'
)
...
@@ -35,13 +42,11 @@
...
@@ -35,13 +42,11 @@
=
icon
(
'tags fw'
)
=
icon
(
'tags fw'
)
New tag
New tag
-
elsif
current_user
&&
current_user
.
already_forked?
(
@project
)
-
elsif
current_user
&&
current_user
.
already_forked?
(
@project
)
%li
.divider
%li
%li
=
link_to
namespace_project_new_blob_path
(
@project
.
namespace
,
@project
,
@project
.
default_branch
||
'master'
)
do
=
link_to
namespace_project_new_blob_path
(
@project
.
namespace
,
@project
,
@project
.
default_branch
||
'master'
)
do
=
icon
(
'file fw'
)
=
icon
(
'file fw'
)
New file
New file
-
elsif
can?
(
current_user
,
:fork_project
,
@project
)
-
elsif
can?
(
current_user
,
:fork_project
,
@project
)
%li
.divider
%li
%li
-
continue_params
=
{
to:
namespace_project_new_blob_path
(
@project
.
namespace
,
@project
,
@project
.
default_branch
||
'master'
),
-
continue_params
=
{
to:
namespace_project_new_blob_path
(
@project
.
namespace
,
@project
,
@project
.
default_branch
||
'master'
),
notice:
edit_in_new_fork_notice
,
notice:
edit_in_new_fork_notice
,
...
...
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