gitlab-org--gitlab-foss/app/views/discussions/_discussion.html.haml

48 lines
1.9 KiB
Text
Raw Normal View History

- 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"
.timeline-content
2017-03-30 21:33:45 -04:00
.discussion.js-toggle-container{ data: { discussion_id: discussion.id } }
.discussion-header
.discussion-actions
%button.note-action-button.discussion-toggle-button.js-toggle-button{ type: "button" }
- 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
started a discussion
- url = discussion_path(discussion)
- if discussion.for_commit? && @noteable != discussion.noteable
on
- commit = discussion.noteable
- if commit
commit
= link_to commit.short_id, url, class: 'commit-sha'
- 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
- unless discussion.active?
an old version of
the diff
= 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