2016-07-20 18:18:18 -04:00
|
|
|
- expanded = discussion.expanded?
|
|
|
|
%li.note.note-discussion.timeline-entry
|
|
|
|
.timeline-entry-inner
|
2017-01-24 03:41:25 -05:00
|
|
|
.timeline-icon
|
|
|
|
= link_to user_path(discussion.author) do
|
|
|
|
= image_tag avatar_icon(discussion.author), class: "avatar s40"
|
2016-07-20 18:18:18 -04:00
|
|
|
.timeline-content
|
2016-07-28 22:09:50 -04:00
|
|
|
.discussion.js-toggle-container{ class: discussion.id, data: { discussion_id: discussion.id } }
|
2016-07-20 18:18:18 -04:00
|
|
|
.discussion-header
|
2016-07-26 00:49:21 -04:00
|
|
|
.discussion-actions
|
2017-03-14 01:02:30 -04:00
|
|
|
%button.note-action-button.discussion-toggle-button.js-toggle-button{ type: "button" }
|
2016-07-26 00:49:21 -04:00
|
|
|
- if expanded
|
|
|
|
= icon("chevron-up")
|
|
|
|
- else
|
|
|
|
= icon("chevron-down")
|
|
|
|
Toggle discussion
|
2016-07-20 18:18:18 -04:00
|
|
|
= link_to_member(@project, discussion.author, avatar: false)
|
|
|
|
|
|
|
|
.inline.discussion-headline-light
|
|
|
|
= discussion.author.to_reference
|
|
|
|
started a discussion on
|
|
|
|
|
|
|
|
- if discussion.for_commit?
|
|
|
|
- commit = discussion.noteable
|
|
|
|
- if commit
|
|
|
|
commit
|
|
|
|
= link_to commit.short_id, namespace_project_commit_path(discussion.project.namespace, discussion.project, discussion.noteable, anchor: discussion.line_code), class: 'monospace'
|
|
|
|
- else
|
|
|
|
a deleted commit
|
|
|
|
- else
|
|
|
|
- if discussion.active?
|
|
|
|
= link_to diffs_namespace_project_merge_request_path(discussion.project.namespace, discussion.project, discussion.noteable, anchor: discussion.line_code) do
|
|
|
|
the diff
|
|
|
|
- else
|
|
|
|
an outdated diff
|
|
|
|
|
|
|
|
= time_ago_with_tooltip(discussion.created_at, placement: "bottom", html_class: "note-created-ago")
|
2016-11-22 04:53:15 -05:00
|
|
|
= render "discussions/headline", discussion: discussion
|
2016-07-20 18:18:18 -04: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
|
2016-07-28 21:14:00 -04:00
|
|
|
.panel.panel-default
|
|
|
|
= render "discussions/notes", discussion: discussion
|