2014-09-02 18:07:02 +05:30
|
|
|
- note = discussion_notes.first
|
2016-06-02 11:05:42 +05:30
|
|
|
- expanded = !note.diff_note? || note.active?
|
|
|
|
%li.note.note-discussion.timeline-entry
|
2015-04-26 12:48:37 +05:30
|
|
|
.timeline-entry-inner
|
|
|
|
.timeline-icon
|
|
|
|
= link_to user_path(note.author) do
|
2016-06-02 11:05:42 +05:30
|
|
|
= image_tag avatar_icon(note.author), class: "avatar s40"
|
2015-04-26 12:48:37 +05:30
|
|
|
.timeline-content
|
2016-06-02 11:05:42 +05:30
|
|
|
.discussion.js-toggle-container{ class: note.discussion_id }
|
|
|
|
.discussion-header
|
|
|
|
= link_to_member(@project, note.author, avatar: false)
|
|
|
|
|
|
|
|
.inline.discussion-headline-light
|
|
|
|
= note.author.to_reference
|
|
|
|
started a discussion on
|
|
|
|
|
|
|
|
- if note.for_commit?
|
|
|
|
- commit = note.noteable
|
|
|
|
- if commit
|
|
|
|
commit
|
|
|
|
= link_to commit.short_id, namespace_project_commit_path(note.project.namespace, note.project, note.noteable, anchor: note.line_code), class: 'monospace'
|
|
|
|
- else
|
|
|
|
a deleted commit
|
|
|
|
- else
|
|
|
|
- if note.active?
|
|
|
|
= link_to diffs_namespace_project_merge_request_path(note.project.namespace, note.project, note.noteable, anchor: note.line_code) do
|
|
|
|
the diff
|
|
|
|
- else
|
|
|
|
an outdated diff
|
|
|
|
|
|
|
|
= time_ago_with_tooltip(note.created_at, placement: "bottom", html_class: "note-created-ago")
|
|
|
|
|
|
|
|
.discussion-actions
|
|
|
|
= link_to "#", class: "note-action-button discussion-toggle-button js-toggle-button" do
|
|
|
|
- if expanded
|
|
|
|
= icon("chevron-up")
|
|
|
|
- else
|
|
|
|
= icon("chevron-down")
|
|
|
|
|
|
|
|
Toggle discussion
|
|
|
|
|
|
|
|
.discussion-body.js-toggle-content{ class: ("hide" unless expanded) }
|
|
|
|
- if note.diff_note?
|
|
|
|
= render "projects/notes/discussions/diff_with_notes", discussion_notes: discussion_notes
|
|
|
|
- else
|
|
|
|
= render "projects/notes/discussions/notes", discussion_notes: discussion_notes
|