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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
6d5c29dc
Commit
6d5c29dc
authored
Nov 17, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inline diff_notes_reply_button partial
parent
3bc507e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
app/views/notes/_create_diff_note.js.haml
app/views/notes/_create_diff_note.js.haml
+1
-2
app/views/notes/_diff_notes_reply_button.html.haml
app/views/notes/_diff_notes_reply_button.html.haml
+0
-10
app/views/notes/_diff_notes_with_reply.html.haml
app/views/notes/_diff_notes_with_reply.html.haml
+13
-1
No files found.
app/views/notes/_create_diff_note.js.haml
View file @
6d5c29dc
...
...
@@ -11,8 +11,7 @@
// find the commented line ...
var trEl = $(".
#{
note
.
line_code
}
").parent();
// ... and insert the note and the reply button after it
trEl.after("
#{
escape_javascript
(
render
"notes/diff_notes_reply_button"
,
note:
note
)
}
");
trEl.after("
#{
escape_javascript
(
render
"notes/diff_note"
,
note:
note
)
}
");
trEl.after("
#{
escape_javascript
(
render
"notes/diff_notes_with_reply"
,
notes:
[
note
])
}
");
} else {
// instert new note before reply button
trRpl.before("
#{
escape_javascript
(
render
"notes/diff_note"
,
note:
note
)
}
");
...
...
app/views/notes/_diff_notes_reply_button.html.haml
deleted
100644 → 0
View file @
3bc507e5
%tr
.line_notes_row.reply
%td
{
colspan:
3
}
=
link_to
"javascript:;"
,
class:
"line_note_reply_link js-note-add-to-diff-line"
,
data:
{
line_code:
note
.
line_code
,
noteable_type:
note
.
noteable_type
,
noteable_id:
note
.
noteable_id
},
title:
"Add a comment to this line"
do
%i
.icon-comment
Reply
app/views/notes/_diff_notes_with_reply.html.haml
View file @
6d5c29dc
-
notes
.
each
do
|
note
|
=
render
"notes/diff_note"
,
note:
note
=
render
"notes/diff_notes_reply_button"
,
note:
notes
.
first
-# reply button
-
note
=
notes
.
first
# example note
%tr
.line_notes_row.reply
%td
{
colspan:
3
}
=
link_to
"javascript:;"
,
class:
"line_note_reply_link js-note-add-to-diff-line"
,
data:
{
line_code:
note
.
line_code
,
noteable_type:
note
.
noteable_type
,
noteable_id:
note
.
noteable_id
},
title:
"Add a comment to this line"
do
%i
.icon-comment
Reply
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