debian-mirror-gitlab/app/views/discussions/_notes.html.haml

31 lines
1.6 KiB
Text
Raw Normal View History

2018-03-17 18:26:18 +05:30
- disable_collapse_class = local_assigns.fetch(:disable_collapse_class, false)
- collapsed_class = 'collapsed' if discussion.resolved? && !disable_collapse_class
- badge_counter = discussion_counter + 1 if local_assigns[:discussion_counter]
- show_toggle = local_assigns.fetch(:show_toggle, true)
- show_image_comment_badge = local_assigns.fetch(:show_image_comment_badge, false)
.discussion-notes{ class: collapsed_class }
-# Save the first note position data so that we have a reference and can go
-# to the first note position when we click on a badge diff discussion
%ul.notes{ id: "discussion_#{discussion.id}", data: { discussion_id: discussion.id, position: discussion.notes[0].position.to_json } }
- if discussion.try(:on_image?) && show_toggle
2021-01-03 14:25:43 +05:30
%button.gl-button.diff-notes-collapse.js-diff-notes-toggle{ type: 'button' }
2018-03-17 18:26:18 +05:30
= sprite_icon('collapse', css_class: 'collapse-icon')
2021-01-03 14:25:43 +05:30
%button.gl-button.btn-transparent.badge.badge-pill.js-diff-notes-toggle{ type: 'button' }
2018-03-17 18:26:18 +05:30
= badge_counter
= render partial: "shared/notes/note", collection: discussion.notes, as: :note, locals: { badge_counter: badge_counter, show_image_comment_badge: show_image_comment_badge }
2016-09-13 17:45:13 +05:30
2017-09-10 17:25:29 +05:30
.flash-container
.discussion-reply-holder
- if can_create_note?
2021-01-03 14:25:43 +05:30
.discussion-with-resolve-btn
= link_to_reply_discussion(discussion)
2017-09-10 17:25:29 +05:30
- elsif !current_user
.disabled-comment.text-center
Please
= link_to "register", new_session_path(:user, redirect_to_referer: 'yes')
or
= link_to "sign in", new_session_path(:user, redirect_to_referer: 'yes')
to reply