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
Jérome Perrin
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 @@
...
@@ -20,33 +20,34 @@
=
confidential_icon
(
@issue
)
=
confidential_icon
(
@issue
)
=
issuable_meta
(
@issue
,
@project
,
"Issue"
)
=
issuable_meta
(
@issue
,
@project
,
"Issue"
)
.issuable-actions
-
if
can?
(
current_user
,
:create_issue
,
@project
)
||
can?
(
current_user
,
:update_issue
,
@issue
)
.clearfix.issue-btn-group.dropdown
.issuable-actions
%button
.btn.btn-default.pull-left.hidden-md.hidden-lg
{
data:
{
toggle:
"dropdown"
}
}
.clearfix.issue-btn-group.dropdown
%span
.caret
%button
.btn.btn-default.pull-left.hidden-md.hidden-lg
{
data:
{
toggle:
"dropdown"
}
}
Options
%span
.caret
.dropdown-menu.dropdown-menu-align-right.hidden-lg
Options
%ul
.dropdown-menu.dropdown-menu-align-right.hidden-lg
-
if
can?
(
current_user
,
:create_issue
,
@project
)
%ul
%li
-
if
can?
(
current_user
,
:create_issue
,
@project
)
=
link_to
'New issue'
,
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
),
title:
'New issue'
,
id:
'new_issue_link'
%li
-
if
can?
(
current_user
,
:update_issue
,
@issue
)
=
link_to
'New issue'
,
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
),
title:
'New issue'
,
id:
'new_issue_link'
%li
-
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:
"btn-reopen
#{
issue_button_visibility
(
@issue
,
false
)
}
"
,
title:
'Reopen issue'
%li
%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'
=
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
%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'
=
link_to
'Edit'
,
edit_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
)
%li
-
if
can?
(
current_user
,
:create_issue
,
@project
)
=
link_to
'Edit'
,
edit_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
)
=
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
-
if
can?
(
current_user
,
:create_issue
,
@project
)
=
icon
(
'plus'
)
=
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
New issue
=
icon
(
'plus'
)
-
if
can?
(
current_user
,
:update_issue
,
@issue
)
New 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'
-
if
can?
(
current_user
,
:update_issue
,
@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
'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
edit_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
),
class:
'hidden-xs hidden-sm btn btn-nr btn-grouped issuable-edit'
do
=
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'
=
icon
(
'pencil-square-o'
)
=
link_to
edit_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
),
class:
'hidden-xs hidden-sm btn btn-nr btn-grouped issuable-edit'
do
Edit
=
icon
(
'pencil-square-o'
)
Edit
.issue-details.issuable-details
.issue-details.issuable-details
...
@@ -54,7 +55,7 @@
...
@@ -54,7 +55,7 @@
%h2
.title
%h2
.title
=
markdown
escape_once
(
@issue
.
title
),
pipeline: :single_line
=
markdown
escape_once
(
@issue
.
title
),
pipeline: :single_line
-
if
@issue
.
description
.
present?
-
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
.wiki
=
preserve
do
=
preserve
do
=
markdown
(
@issue
.
description
,
cache_key:
[
@issue
,
"description"
])
=
markdown
(
@issue
.
description
,
cache_key:
[
@issue
,
"description"
])
...
...
app/views/projects/merge_requests/show/_mr_title.html.haml
View file @
84fba4d1
...
@@ -19,18 +19,14 @@
...
@@ -19,18 +19,14 @@
Options
Options
.dropdown-menu.dropdown-menu-align-right.hidden-lg
.dropdown-menu.dropdown-menu-align-right.hidden-lg
%ul
%ul
-
if
@merge_request
.
open?
%li
{
class:
issue_button_visibility
(
@merge_request
,
true
)
}
%li
=
link_to
'Close'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
title:
'Close merge request'
=
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
)
}
%li
=
link_to
'Reopen'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
'reopen-mr-link'
,
title:
'Reopen merge request'
=
link_to
'Edit'
,
edit_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
'issuable-edit'
,
id:
'edit_merge_request'
%li
-
if
@merge_request
.
closed?
=
link_to
'Edit'
,
edit_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
'issuable-edit'
,
id:
'edit_merge_request'
%li
=
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:
'reopen-mr-link'
,
title:
'Reopen 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'
-
if
@merge_request
.
open?
=
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
=
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'
=
icon
(
'pencil-square-o'
)
=
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
Edit
=
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'
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