2016-09-13 17:45:13 +05:30
|
|
|
- expanded = discussion.expanded?
|
|
|
|
%li.note.note-discussion.timeline-entry
|
|
|
|
.timeline-entry-inner
|
|
|
|
.timeline-icon
|
|
|
|
= link_to user_path(discussion.author) do
|
|
|
|
= image_tag avatar_icon(discussion.author), class: "avatar s40"
|
|
|
|
.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
|
|
|
|
.discussion-actions
|
2017-08-17 22:00:37 +05:30
|
|
|
%button.note-action-button.discussion-toggle-button.js-toggle-button{ type: "button" }
|
2016-09-13 17:45:13 +05:30
|
|
|
- if expanded
|
|
|
|
= icon("chevron-up")
|
|
|
|
- else
|
|
|
|
= icon("chevron-down")
|
|
|
|
Toggle discussion
|
|
|
|
= link_to_member(@project, discussion.author, avatar: false)
|
|
|
|
|
|
|
|
.inline.discussion-headline-light
|
|
|
|
= discussion.author.to_reference
|
2017-08-17 22:00:37 +05:30
|
|
|
started a discussion
|
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
|
2017-09-10 17:25:29 +05:30
|
|
|
- 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
|
|
|
|
.panel.panel-default
|
|
|
|
= render "discussions/notes", discussion: discussion
|