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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
2.6 KiB
Text
Raw Normal View History

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
2021-01-29 00:20:46 +05:30
.discussion.js-toggle-container{ data: { discussion_id: discussion.id, is_expanded: expanded.to_s } }
2022-11-25 23:54:43 +05:30
.discussion-header.gl-display-flex.gl--flex-center
.timeline-icon.gl-flex-shrink-0
2018-12-13 13:39:08 +05:30
= link_to user_path(discussion.author) do
2022-11-25 23:54:43 +05:30
= render Pajamas::AvatarComponent.new(discussion.author, size: 32, class: 'gl-mr-3')
2016-09-13 17:45:13 +05:30
= link_to_member(@project, discussion.author, avatar: false)
2022-11-25 23:54:43 +05:30
.inline.discussion-headline-light.gl-mx-3
2016-09-13 17:45:13 +05:30
= 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
2022-11-25 23:54:43 +05:30
.discussion-actions.gl-ml-auto
%button.note-action-button.discussion-toggle-button.js-toggle-button{ type: "button", class: ("js-toggle-lazy-diff" unless expanded) }
= sprite_icon('chevron-up', css_class: "js-sidebar-collapse #{'hidden' unless expanded}")
= sprite_icon('chevron-down', css_class: "js-sidebar-expand #{'hidden' if expanded}")
%span.js-sidebar-collapse{ class: "#{'hidden' unless expanded}" }= _('Hide thread')
%span.js-sidebar-expand{ class: "#{'hidden' if expanded}" }= _('Show thread')
2016-09-13 17:45:13 +05:30
.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 }