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
093856a7
Commit
093856a7
authored
Jan 16, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '41921-follow-up-fixes' into 'master'
Refactor of buttons _dropdown partial Closes #41921 See merge request gitlab-org/gitlab-ce!16486
parents
b82c4f1b
1704dc97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
_dropdown.html.haml
app/views/projects/buttons/_dropdown.html.haml
+8
-18
No files found.
app/views/projects/buttons/_dropdown.html.haml
View file @
093856a7
...
...
@@ -10,37 +10,28 @@
-
if
can_create_issue
%li
=
link_to
new_project_issue_path
(
@project
)
do
#{
_
(
'New issue'
)
}
=
link_to
_
(
'New issue'
),
new_project_issue_path
(
@project
)
-
if
merge_project
%li
=
link_to
project_new_merge_request_path
(
merge_project
)
do
#{
_
(
'New merge request'
)
}
=
link_to
_
(
'New merge request'
),
project_new_merge_request_path
(
merge_project
)
-
if
can_create_snippet
%li
=
link_to
new_project_snippet_path
(
@project
)
do
#{
_
(
'New snippet'
)
}
=
link_to
_
(
'New snippet'
),
new_project_snippet_path
(
@project
)
-
if
can_create_issue
||
merge_project
||
can_create_snippet
%li
.divider
-
if
can?
(
current_user
,
:push_code
,
@project
)
%li
=
link_to
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
)
do
#{
_
(
'New file'
)
}
=
link_to
_
(
'New file'
),
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
)
-
unless
@project
.
empty_repo?
%li
=
link_to
new_project_branch_path
(
@project
)
do
#{
_
(
'New branch'
)
}
=
link_to
_
(
'New branch'
),
new_project_branch_path
(
@project
)
%li
=
link_to
new_project_tag_path
(
@project
)
do
#{
_
(
'New tag'
)
}
=
link_to
_
(
'New tag'
),
new_project_tag_path
(
@project
)
-
elsif
current_user
&&
current_user
.
already_forked?
(
@project
)
%li
=
link_to
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
)
do
#{
_
(
'New file'
)
}
=
link_to
_
(
'New file'
),
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
)
-
elsif
can?
(
current_user
,
:fork_project
,
@project
)
%li
-
continue_params
=
{
to:
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
),
...
...
@@ -48,5 +39,4 @@
notice_now:
edit_in_new_fork_notice_now
}
-
fork_path
=
project_forks_path
(
@project
,
namespace_key:
current_user
.
namespace
.
id
,
continue:
continue_params
)
=
link_to
fork_path
,
method: :post
do
#{
_
(
'New file'
)
}
=
link_to
_
(
'New file'
),
fork_path
,
method: :post
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