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
Léo-Paul Géneau
gitlab-ce
Commits
a13eae6a
Commit
a13eae6a
authored
Jan 16, 2018
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Further simplify app/views/projects/buttons/_dropdown.html.haml
parent
f17d7a4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
21 deletions
+14
-21
app/views/projects/buttons/_dropdown.html.haml
app/views/projects/buttons/_dropdown.html.haml
+14
-21
No files found.
app/views/projects/buttons/_dropdown.html.haml
View file @
a13eae6a
...
@@ -9,34 +9,27 @@
...
@@ -9,34 +9,27 @@
-
can_create_snippet
=
can?
(
current_user
,
:create_snippet
,
@project
)
-
can_create_snippet
=
can?
(
current_user
,
:create_snippet
,
@project
)
-
if
can_create_issue
-
if
can_create_issue
%li
%li
=
link_to
_
(
'New issue'
),
new_project_issue_path
(
@project
)
=
link_to
_
(
'New issue'
),
new_project_issue_path
(
@project
)
-
if
merge_project
-
if
merge_project
%li
%li
=
link_to
_
(
'New merge request'
),
project_new_merge_request_path
(
merge_project
)
=
link_to
_
(
'New merge request'
),
project_new_merge_request_path
(
merge_project
)
-
if
can_create_snippet
-
if
can_create_snippet
%li
%li
=
link_to
_
(
'New snippet'
),
new_project_snippet_path
(
@project
)
=
link_to
_
(
'New snippet'
),
new_project_snippet_path
(
@project
)
-
if
can_create_issue
||
merge_project
||
can_create_snippet
-
if
can_create_issue
||
merge_project
||
can_create_snippet
%li
.divider
%li
.divider
-
if
can?
(
current_user
,
:push_code
,
@project
)
-
if
can?
(
current_user
,
:push_code
,
@project
)
%li
%li
=
link_to
_
(
'New file'
),
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
)
=
link_to
_
(
'New file'
),
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
)
-
unless
@project
.
empty_repo?
-
unless
@project
.
empty_repo?
%li
%li
=
link_to
_
(
'New branch'
),
new_project_branch_path
(
@project
)
=
link_to
_
(
'New branch'
),
new_project_branch_path
(
@project
)
%li
=
link_to
_
(
'New tag'
),
new_project_tag_path
(
@project
)
%li
=
link_to
_
(
'New tag'
),
new_project_tag_path
(
@project
)
-
elsif
current_user
&&
current_user
.
already_forked?
(
@project
)
-
elsif
current_user
&&
current_user
.
already_forked?
(
@project
)
%li
%li
=
link_to
_
(
'New file'
),
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
)
=
link_to
_
(
'New file'
),
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
)
-
elsif
can?
(
current_user
,
:fork_project
,
@project
)
-
elsif
can?
(
current_user
,
:fork_project
,
@project
)
%li
-
continue_params
=
{
to:
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
),
-
continue_params
=
{
to:
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
),
notice:
edit_in_new_fork_notice
,
notice:
edit_in_new_fork_notice
,
notice_now:
edit_in_new_fork_notice_now
}
notice_now:
edit_in_new_fork_notice_now
}
-
fork_path
=
project_forks_path
(
@project
,
namespace_key:
current_user
.
namespace
.
id
,
continue:
continue_params
)
-
fork_path
=
project_forks_path
(
@project
,
namespace_key:
current_user
.
namespace
.
id
,
%li
=
link_to
_
(
'New file'
),
fork_path
,
method: :post
continue:
continue_params
)
=
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