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
Tatuya Kamada
gitlab-ce
Commits
725ff58b
Commit
725ff58b
authored
9 years ago
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't add js-task-list-container to things the user can't edit
parent
5c7b91e2
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
app/helpers/notes_helper.rb
app/helpers/notes_helper.rb
+4
-0
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+1
-1
app/views/projects/merge_requests/show/_mr_box.html.haml
app/views/projects/merge_requests/show/_mr_box.html.haml
+1
-1
app/views/projects/notes/_note.html.haml
app/views/projects/notes/_note.html.haml
+2
-2
No files found.
app/helpers/notes_helper.rb
View file @
725ff58b
...
...
@@ -9,6 +9,10 @@ module NotesHelper
hidden_field_tag
(
:target_id
,
note
.
noteable
.
id
)
end
def
note_editable?
(
note
)
note
.
editable?
&&
can?
(
current_user
,
:admin_note
,
note
)
end
def
link_to_commit_diff_line_note
(
note
)
if
note
.
for_commit_diff_line?
link_to
(
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/issues/show.html.haml
View file @
725ff58b
...
...
@@ -31,7 +31,7 @@
=
gfm
escape_once
(
@issue
.
title
)
%div
-
if
@issue
.
description
.
present?
.description
.js-task-list-container
.description
{
class:
can?
(
current_user
,
:modify_issue
,
@issue
)
?
'js-task-list-container'
:
''
}
.wiki
=
preserve
do
=
markdown
(
@issue
.
description
)
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/merge_requests/show/_mr_box.html.haml
View file @
725ff58b
...
...
@@ -3,7 +3,7 @@
%div
-
if
@merge_request
.
description
.
present?
.description
.js-task-list-container
.description
{
class:
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
?
'js-task-list-container'
:
''
}
.wiki
=
preserve
do
=
markdown
(
@merge_request
.
description
)
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/notes/_note.html.haml
View file @
725ff58b
...
...
@@ -13,7 +13,7 @@
=
icon
(
'link'
)
Link here
-
if
can?
(
current_user
,
:admin_note
,
note
)
&&
note
.
editable?
-
if
note_editable?
(
note
)
=
link_to
'#'
,
title:
'Edit comment'
,
class:
'js-note-edit'
do
=
icon
(
'pencil-square-o'
)
Edit
...
...
@@ -50,7 +50,7 @@
\-1
.note-body
.js-task-list-container
.note-body
{
class:
note_editable?
(
note
)
?
'js-task-list-container'
:
''
}
.note-text
=
preserve
do
=
markdown
(
note
.
note
,
{
no_header_anchors:
true
})
...
...
This diff is collapsed.
Click to expand it.
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