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
84fba4d1
Commit
84fba4d1
authored
Apr 14, 2016
by
Phil Hughes
Committed by
Jacob Schatz
Apr 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated some if statements
parent
2629ab44
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
43 deletions
+40
-43
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+29
-28
app/views/projects/merge_requests/show/_mr_title.html.haml
app/views/projects/merge_requests/show/_mr_title.html.haml
+11
-15
No files found.
app/views/projects/issues/show.html.haml
View file @
84fba4d1
...
...
@@ -20,33 +20,34 @@
=
confidential_icon
(
@issue
)
=
issuable_meta
(
@issue
,
@project
,
"Issue"
)
.issuable-actions
.clearfix.issue-btn-group.dropdown
%button
.btn.btn-default.pull-left.hidden-md.hidden-lg
{
data:
{
toggle:
"dropdown"
}
}
%span
.caret
Options
.dropdown-menu.dropdown-menu-align-right.hidden-lg
%ul
-
if
can?
(
current_user
,
:create_issue
,
@project
)
%li
=
link_to
'New issue'
,
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
),
title:
'New issue'
,
id:
'new_issue_link'
-
if
can?
(
current_user
,
:update_issue
,
@issue
)
%li
=
link_to
'Reopen issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :reopen
},
status_only:
true
,
format:
'json'
),
data:
{
no_turbolink:
true
},
class:
"btn-reopen
#{
issue_button_visibility
(
@issue
,
false
)
}
"
,
title:
'Reopen issue'
%li
=
link_to
'Close issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :close
},
status_only:
true
,
format:
'json'
),
data:
{
no_turbolink:
true
},
class:
"btn-close
#{
issue_button_visibility
(
@issue
,
true
)
}
"
,
title:
'Close issue'
%li
=
link_to
'Edit'
,
edit_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
)
-
if
can?
(
current_user
,
:create_issue
,
@project
)
=
link_to
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
),
class:
'hidden-xs hidden-sm btn btn-nr btn-grouped new-issue-link btn-success'
,
title:
'New issue'
,
id:
'new_issue_link'
do
=
icon
(
'plus'
)
New issue
-
if
can?
(
current_user
,
:update_issue
,
@issue
)
=
link_to
'Reopen issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :reopen
},
status_only:
true
,
format:
'json'
),
data:
{
no_turbolink:
true
},
class:
"hidden-xs hidden-sm btn btn-nr btn-grouped btn-reopen
#{
issue_button_visibility
(
@issue
,
false
)
}
"
,
title:
'Reopen issue'
=
link_to
'Close issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :close
},
status_only:
true
,
format:
'json'
),
data:
{
no_turbolink:
true
},
class:
"hidden-xs hidden-sm btn btn-nr btn-grouped btn-close
#{
issue_button_visibility
(
@issue
,
true
)
}
"
,
title:
'Close issue'
=
link_to
edit_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
),
class:
'hidden-xs hidden-sm btn btn-nr btn-grouped issuable-edit'
do
=
icon
(
'pencil-square-o'
)
Edit
-
if
can?
(
current_user
,
:create_issue
,
@project
)
||
can?
(
current_user
,
:update_issue
,
@issue
)
.issuable-actions
.clearfix.issue-btn-group.dropdown
%button
.btn.btn-default.pull-left.hidden-md.hidden-lg
{
data:
{
toggle:
"dropdown"
}
}
%span
.caret
Options
.dropdown-menu.dropdown-menu-align-right.hidden-lg
%ul
-
if
can?
(
current_user
,
:create_issue
,
@project
)
%li
=
link_to
'New issue'
,
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
),
title:
'New issue'
,
id:
'new_issue_link'
-
if
can?
(
current_user
,
:update_issue
,
@issue
)
%li
=
link_to
'Reopen issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :reopen
},
status_only:
true
,
format:
'json'
),
data:
{
no_turbolink:
true
},
class:
"btn-reopen
#{
issue_button_visibility
(
@issue
,
false
)
}
"
,
title:
'Reopen issue'
%li
=
link_to
'Close issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :close
},
status_only:
true
,
format:
'json'
),
data:
{
no_turbolink:
true
},
class:
"btn-close
#{
issue_button_visibility
(
@issue
,
true
)
}
"
,
title:
'Close issue'
%li
=
link_to
'Edit'
,
edit_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
)
-
if
can?
(
current_user
,
:create_issue
,
@project
)
=
link_to
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
),
class:
'hidden-xs hidden-sm btn btn-nr btn-grouped new-issue-link btn-success'
,
title:
'New issue'
,
id:
'new_issue_link'
do
=
icon
(
'plus'
)
New issue
-
if
can?
(
current_user
,
:update_issue
,
@issue
)
=
link_to
'Reopen issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :reopen
},
status_only:
true
,
format:
'json'
),
data:
{
no_turbolink:
true
},
class:
"hidden-xs hidden-sm btn btn-nr btn-grouped btn-reopen
#{
issue_button_visibility
(
@issue
,
false
)
}
"
,
title:
'Reopen issue'
=
link_to
'Close issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :close
},
status_only:
true
,
format:
'json'
),
data:
{
no_turbolink:
true
},
class:
"hidden-xs hidden-sm btn btn-nr btn-grouped btn-close
#{
issue_button_visibility
(
@issue
,
true
)
}
"
,
title:
'Close issue'
=
link_to
edit_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
),
class:
'hidden-xs hidden-sm btn btn-nr btn-grouped issuable-edit'
do
=
icon
(
'pencil-square-o'
)
Edit
.issue-details.issuable-details
...
...
@@ -54,7 +55,7 @@
%h2
.title
=
markdown
escape_once
(
@issue
.
title
),
pipeline: :single_line
-
if
@issue
.
description
.
present?
.description
{
class:
can?
(
current_user
,
:update_issue
,
@issue
)
?
'js-task-list-container'
:
''
}
.description
{
class:
can?
(
current_user
,
:update_issue
,
@issue
)
?
'js-task-list-container'
:
''
}
.wiki
=
preserve
do
=
markdown
(
@issue
.
description
,
cache_key:
[
@issue
,
"description"
])
...
...
app/views/projects/merge_requests/show/_mr_title.html.haml
View file @
84fba4d1
...
...
@@ -19,18 +19,14 @@
Options
.dropdown-menu.dropdown-menu-align-right.hidden-lg
%ul
-
if
@merge_request
.
open?
%li
=
link_to
'Close'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
title:
'Close merge request'
%li
=
link_to
'Edit'
,
edit_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
'issuable-edit'
,
id:
'edit_merge_request'
-
if
@merge_request
.
closed?
%li
=
link_to
'Reopen'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
'reopen-mr-link'
,
title:
'Reopen merge request'
-
if
@merge_request
.
open?
=
link_to
'Close'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
class:
'hidden-xs hidden-sm btn btn-nr btn-grouped btn-close'
,
title:
'Close merge request'
=
link_to
edit_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
'hidden-xs hidden-sm btn btn-nr btn-grouped issuable-edit'
,
id:
'edit_merge_request'
do
=
icon
(
'pencil-square-o'
)
Edit
-
if
@merge_request
.
closed?
=
link_to
'Reopen'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
'hidden-xs hidden-sm btn btn-nr btn-grouped btn-reopen reopen-mr-link'
,
title:
'Reopen merge request'
%li
{
class:
issue_button_visibility
(
@merge_request
,
true
)
}
=
link_to
'Close'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
title:
'Close merge request'
%li
{
class:
issue_button_visibility
(
@merge_request
,
false
)
}
=
link_to
'Reopen'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
'reopen-mr-link'
,
title:
'Reopen merge request'
%li
=
link_to
'Edit'
,
edit_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
'issuable-edit'
,
id:
'edit_merge_request'
=
link_to
'Close'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
class:
"hidden-xs hidden-sm btn btn-nr btn-grouped btn-close
#{
issue_button_visibility
(
@merge_request
,
true
)
}
"
,
title:
'Close merge request'
=
link_to
'Reopen'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
"hidden-xs hidden-sm btn btn-nr btn-grouped btn-reopen reopen-mr-link
#{
issue_button_visibility
(
@merge_request
,
false
)
}
"
,
title:
'Reopen merge request'
=
link_to
edit_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
"hidden-xs hidden-sm btn btn-nr btn-grouped issuable-edit"
,
id:
'edit_merge_request'
do
=
icon
(
'pencil-square-o'
)
Edit
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