2012-12-02 20:53:50 +01:00
|
|
|
- note = discussion_notes.first
|
|
|
|
.discussion.js-details-container.js-toggler-container.open{ class: note.discussion_id }
|
|
|
|
.discussion-header
|
|
|
|
.discussion-actions
|
|
|
|
= link_to "javascript:;", class: "js-details-target turn-on js-toggler-target" do
|
|
|
|
%i.icon-eye-close
|
|
|
|
Hide discussion
|
|
|
|
= link_to "javascript:;", class: "js-details-target turn-off js-toggler-target" do
|
|
|
|
%i.icon-eye-open
|
|
|
|
Show discussion
|
|
|
|
= image_tag gravatar_icon(note.author.email), class: "avatar s32"
|
|
|
|
%div
|
2013-01-17 21:35:45 +01:00
|
|
|
= link_to_member(@project, note.author, avatar: false)
|
2012-12-02 20:53:50 +01:00
|
|
|
- if note.for_merge_request?
|
2013-01-15 10:12:17 +01:00
|
|
|
- if note.diff
|
|
|
|
started a discussion on this merge request diff
|
|
|
|
= link_to_merge_request_diff_line_note(note)
|
|
|
|
- else
|
|
|
|
started
|
|
|
|
%strong
|
|
|
|
%i.icon-remove
|
|
|
|
outdated
|
|
|
|
discussion on this merge request diff
|
2012-12-02 20:53:50 +01:00
|
|
|
- elsif note.for_commit?
|
|
|
|
started a discussion on commit
|
|
|
|
#{link_to note.noteable.short_id, project_commit_path(@project, note.noteable)}
|
|
|
|
= link_to_commit_diff_line_note(note) if note.for_diff_line?
|
|
|
|
- else
|
|
|
|
%cite.cgray started a discussion
|
|
|
|
%div
|
2012-12-03 19:33:01 +01:00
|
|
|
- last_note = discussion_notes.last
|
|
|
|
last updated by
|
2013-01-17 21:35:45 +01:00
|
|
|
= link_to_member(@project, last_note.author, avatar: false)
|
2012-12-03 19:33:01 +01:00
|
|
|
%span.discussion-last-update
|
|
|
|
= time_ago_in_words(last_note.updated_at)
|
|
|
|
ago
|
2012-12-02 20:53:50 +01:00
|
|
|
.discussion-body
|
|
|
|
- if note.for_diff_line?
|
2013-01-15 10:12:17 +01:00
|
|
|
- if note.diff
|
|
|
|
.content
|
2012-12-01 13:49:21 +01:00
|
|
|
.file= render "notes/discussion_diff", discussion_notes: discussion_notes, note: note
|
2013-01-15 10:12:17 +01:00
|
|
|
- else
|
|
|
|
= link_to 'show outdated discussion', '#', class: 'js-show-outdated-discussion'
|
|
|
|
%div.hide.outdated-discussion
|
|
|
|
.content
|
|
|
|
.notes{ rel: discussion_notes.first.discussion_id }
|
|
|
|
= render discussion_notes
|
|
|
|
|
|
|
|
|
2012-12-02 20:53:50 +01:00
|
|
|
- else
|
2012-12-02 20:43:39 +01:00
|
|
|
.content
|
|
|
|
.notes{ rel: discussion_notes.first.discussion_id }
|
|
|
|
= render discussion_notes
|
|
|
|
= render "notes/discussion_reply_button", note: discussion_notes.first
|
2012-12-02 20:53:50 +01:00
|
|
|
|
|
|
|
-# will be shown when the other one is hidden
|
|
|
|
.discussion-hidden.content.hide
|
|
|
|
.note
|
|
|
|
%em Hidden discussion.
|
|
|
|
= link_to "javascript:;", class: "js-details-target js-toggler-target" do
|
|
|
|
%i.icon-eye-open
|
|
|
|
Show
|
|
|
|
|