diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-07-29 04:14:00 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-07-29 04:28:56 +0300 |
commit | 6d9715d8777265737c076abe06362d2a8e9e498d (patch) | |
tree | ad55282043bd84bfbe8b4419568289b895e82d22 /app/views/discussions/_parallel_diff_discussion.html.haml | |
parent | ce1843b7dea3b63cfced7800612098a766c68e13 (diff) |
Show existing discussion when adding new comment on line with a hidden resolved discussion
Diffstat (limited to 'app/views/discussions/_parallel_diff_discussion.html.haml')
-rw-r--r-- | app/views/discussions/_parallel_diff_discussion.html.haml | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/app/views/discussions/_parallel_diff_discussion.html.haml b/app/views/discussions/_parallel_diff_discussion.html.haml index dcab08cd8ed..f1072ce0feb 100644 --- a/app/views/discussions/_parallel_diff_discussion.html.haml +++ b/app/views/discussions/_parallel_diff_discussion.html.haml @@ -1,34 +1,21 @@ -%tr.notes_holder +- expanded = discussion_left.try(:expanded?) || discussion_right.try(:expanded?) +%tr.notes_holder{class: ('hide' unless expanded)} - if discussion_left %td.notes_line.old %td.notes_content.parallel.old - %ul.notes{ data: { discussion_id: discussion_left.id } } - = render partial: "projects/notes/note", collection: discussion_left.notes, as: :note - - .discussion-reply-holder - .btn-group-justified.discussion-with-resolve-btn{ role: "group" } - .btn-group{ role: "group" } - = link_to_reply_discussion(discussion_left, 'old') - .btn-group{ role: "group" } - = render "discussions/resolve_all", discussion: discussion_left - = render "discussions/jump_to_next", discussion: discussion_left + .content{class: ('hide' unless discussion_left.expanded?)} + = render "discussions/notes", discussion: discussion_left, line_type: 'old' - else %td.notes_line.old= "" - %td.notes_content.parallel.old= "" + %td.notes_content.parallel.old + .content - if discussion_right %td.notes_line.new %td.notes_content.parallel.new - %ul.notes{ data: { discussion_id: discussion_right.id } } - = render partial: "projects/notes/note", collection: discussion_right.notes, as: :note - - .discussion-reply-holder - .btn-group-justified.discussion-with-resolve-btn{ role: "group" } - .btn-group{ role: "group" } - = link_to_reply_discussion(discussion_right, 'new') - .btn-group{ role: "group" } - = render "discussions/resolve_all", discussion: discussion_right - = render "discussions/jump_to_next", discussion: discussion_right + .content{class: ('hide' unless discussion_right.expanded?)} + = render "discussions/notes", discussion: discussion_right, line_type: 'new' - else %td.notes_line.new= "" - %td.notes_content.parallel.new= "" + %td.notes_content.parallel.new + .content |