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
|
2017-03-30 21:33:45 -04:00
|
|
|
.discussion.js-toggle-container{ 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
|
2017-03-09 20:29:11 -05:00
|
|
|
started a discussion
|
2016-07-20 18:18:18 -04:00
|
|
|
|
2017-04-30 16:32:09 -04:00
|
|
|
- url = discussion_path(discussion)
|
2017-03-09 20:29:11 -05:00
|
|
|
- if discussion.for_commit? && @noteable != discussion.noteable
|
|
|
|
on
|
2016-07-20 18:18:18 -04:00
|
|
|
- commit = discussion.noteable
|
|
|
|
- if commit
|
|
|
|
commit
|
2017-05-11 11:47:44 -04:00
|
|
|
= link_to commit.short_id, url, class: 'commit-sha'
|
2016-07-20 18:18:18 -04:00
|
|
|
- else
|
|
|
|
a deleted commit
|
2017-04-06 19:18:53 -04:00
|
|
|
- elsif discussion.diff_discussion?
|
2017-04-08 15:58:08 -04:00
|
|
|
on
|
2017-03-31 20:10:53 -04:00
|
|
|
= conditional_link_to url.present?, url do
|
2017-05-21 16:38:33 -04:00
|
|
|
- unless discussion.active?
|
|
|
|
an old version of
|
|
|
|
the diff
|
2016-07-20 18:18:18 -04:00
|
|
|
|
|
|
|
= 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
|