2016-07-20 22:18:18 +00:00
|
|
|
- expanded = discussion.expanded?
|
2018-11-14 03:25:35 +00:00
|
|
|
%li.note.note-discussion.timeline-entry.unstyled-comments
|
2016-07-20 22:18:18 +00:00
|
|
|
.timeline-entry-inner
|
|
|
|
.timeline-content
|
2017-03-31 01:33:45 +00:00
|
|
|
.discussion.js-toggle-container{ data: { discussion_id: discussion.id } }
|
2016-07-20 22:18:18 +00:00
|
|
|
.discussion-header
|
2018-11-14 03:25:35 +00:00
|
|
|
.timeline-icon
|
|
|
|
= link_to user_path(discussion.author) do
|
|
|
|
= image_tag avatar_icon_for_user(discussion.author), class: "avatar s40"
|
2016-07-26 04:49:21 +00:00
|
|
|
.discussion-actions
|
2018-03-13 12:01:36 +00:00
|
|
|
%button.note-action-button.discussion-toggle-button.js-toggle-button{ type: "button", class: ("js-toggle-lazy-diff" unless expanded) }
|
2016-07-26 04:49:21 +00:00
|
|
|
- if expanded
|
|
|
|
= icon("chevron-up")
|
|
|
|
- else
|
|
|
|
= icon("chevron-down")
|
2019-06-13 12:25:11 +00:00
|
|
|
= _('Toggle thread')
|
2016-07-20 22:18:18 +00:00
|
|
|
= link_to_member(@project, discussion.author, avatar: false)
|
|
|
|
|
|
|
|
.inline.discussion-headline-light
|
|
|
|
= discussion.author.to_reference
|
2019-06-14 07:11:31 +00:00
|
|
|
started a thread
|
2016-07-20 22:18:18 +00:00
|
|
|
|
2017-04-30 20:32:09 +00:00
|
|
|
- url = discussion_path(discussion)
|
2017-03-10 01:29:11 +00:00
|
|
|
- if discussion.for_commit? && @noteable != discussion.noteable
|
|
|
|
on
|
2016-07-20 22:18:18 +00:00
|
|
|
- commit = discussion.noteable
|
|
|
|
- if commit
|
|
|
|
commit
|
2017-05-11 15:47:44 +00:00
|
|
|
= link_to commit.short_id, url, class: 'commit-sha'
|
2016-07-20 22:18:18 +00:00
|
|
|
- else
|
|
|
|
a deleted commit
|
2017-04-06 23:18:53 +00:00
|
|
|
- elsif discussion.diff_discussion?
|
2017-04-08 19:58:08 +00:00
|
|
|
on
|
2017-04-01 00:10:53 +00:00
|
|
|
= conditional_link_to url.present?, url do
|
2017-06-29 21:19:09 +00:00
|
|
|
- if discussion.on_merge_request_commit?
|
|
|
|
- unless discussion.active?
|
|
|
|
an outdated change in
|
|
|
|
commit
|
|
|
|
|
2020-07-02 15:09:08 +00:00
|
|
|
%span.commit-sha= truncate_sha(discussion.commit_id)
|
2017-06-29 21:19:09 +00:00
|
|
|
- else
|
|
|
|
- unless discussion.active?
|
|
|
|
an old version of
|
|
|
|
the diff
|
|
|
|
|
2016-07-20 22:18:18 +00:00
|
|
|
|
|
|
|
= time_ago_with_tooltip(discussion.created_at, placement: "bottom", html_class: "note-created-ago")
|
2016-11-22 09:53:15 +00:00
|
|
|
= render "discussions/headline", discussion: discussion
|
2016-07-20 22:18:18 +00:00
|
|
|
|
|
|
|
.discussion-body.js-toggle-content{ class: ("hide" unless expanded) }
|
|
|
|
- if discussion.diff_discussion? && discussion.diff_file
|
|
|
|
= render "discussions/diff_with_notes", discussion: discussion
|
|
|
|
- else
|
2018-04-10 17:11:34 +00:00
|
|
|
.card
|
2017-10-20 10:40:26 +00:00
|
|
|
= render partial: "discussions/notes", locals: { discussion: discussion, disable_collapse_class: true }
|