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
a49d45db
Commit
a49d45db
authored
Jun 24, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move reply button to helper from view
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
2d9667df
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
15 deletions
+21
-15
app/helpers/notes_helper.rb
app/helpers/notes_helper.rb
+17
-0
app/views/projects/notes/_diff_notes_with_reply.html.haml
app/views/projects/notes/_diff_notes_with_reply.html.haml
+1
-2
app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml
.../projects/notes/_diff_notes_with_reply_parallel.html.haml
+2
-2
app/views/projects/notes/_discussion.html.haml
app/views/projects/notes/_discussion.html.haml
+1
-1
app/views/projects/notes/_discussion_reply_button.html.haml
app/views/projects/notes/_discussion_reply_button.html.haml
+0
-10
No files found.
app/helpers/notes_helper.rb
View file @
a49d45db
...
...
@@ -61,4 +61,21 @@ module NotesHelper
link_to
""
,
"javascript:;"
,
class:
"add-diff-note js-add-diff-note-button"
,
data:
data
,
title:
"Add a comment to this line"
end
def
link_to_reply_diff
(
note
)
data
=
{
noteable_type:
note
.
noteable_type
,
noteable_id:
note
.
noteable_id
,
commit_id:
note
.
commit_id
,
line_code:
note
.
line_code
,
discussion_id:
note
.
discussion_id
}
link_to
"javascript:;"
,
class:
"btn reply-btn js-discussion-reply-button"
,
data:
data
,
title:
"Add a reply"
do
link_text
=
""
link_text
<
content_tag
(
:i
,
nil
,
class:
'icon-comment'
)
link_text
<<
"Reply"
end
end
end
app/views/projects/notes/_diff_notes_with_reply.html.haml
View file @
a49d45db
...
...
@@ -9,5 +9,4 @@
%td
.notes_content
%ul
.notes
{
rel:
note
.
discussion_id
}
=
render
notes
=
render
"projects/notes/discussion_reply_button"
,
note:
note
=
link_to_reply_diff
(
note
)
app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml
View file @
a49d45db
...
...
@@ -12,7 +12,7 @@
%ul
.notes
{
rel:
note1
.
discussion_id
}
=
render
notes1
=
render
"projects/notes/discussion_reply_button"
,
note:
note1
=
link_to_reply_diff
(
note1
)
-
else
%td
=
""
%td
=
""
...
...
@@ -26,7 +26,7 @@
%ul
.notes
{
rel:
note2
.
discussion_id
}
=
render
notes2
=
render
"projects/notes/discussion_reply_button"
,
note:
note2
=
link_to_reply_diff
(
note2
)
-
else
%td
=
""
%td
=
""
...
...
app/views/projects/notes/_discussion.html.haml
View file @
a49d45db
...
...
@@ -43,4 +43,4 @@
-
else
.notes
{
rel:
discussion_notes
.
first
.
discussion_id
}
=
render
discussion_notes
=
render
"projects/notes/discussion_reply_button"
,
note:
discussion_notes
.
first
=
link_to_reply_diff
(
discussion_notes
.
first
)
app/views/projects/notes/_discussion_reply_button.html.haml
deleted
100644 → 0
View file @
2d9667df
=
link_to
"javascript:;"
,
class:
"btn reply-btn js-discussion-reply-button"
,
data:
{
noteable_type:
note
.
noteable_type
,
noteable_id:
note
.
noteable_id
,
commit_id:
note
.
commit_id
,
line_code:
note
.
line_code
,
discussion_id:
note
.
discussion_id
},
title:
"Add a reply"
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