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