summaryrefslogtreecommitdiff
path: root/app/views/projects/notes/discussions/_commit.html.haml
blob: 46f2ba4bbcf2f9e828ac59db79b1cbc326ed21e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
- note = discussion_notes.first
- commit = note.noteable
- commit_description = commit ? 'commit' : 'a deleted commit'
.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 #{commit_description}"
      - if commit
        = link_to(commit.short_id, namespace_project_commit_path(note.project.namespace, note.project, note.noteable), class: 'monospace')
    .discussion-actions
      = link_to "#", class: "note-action-button discussion-toggle-button js-toggle-button" do
        %i.fa.fa-chevron-up
        Show/hide discussion
    .last-update.hide.js-toggle-content
      - last_note = discussion_notes.last
      last updated by
      = link_to_member(@project, last_note.author, avatar: false)
      #{time_ago_with_tooltip(last_note.updated_at, placement: 'bottom', html_class: 'discussion_updated_ago')}
  .discussion-body.js-toggle-content
    - if note.for_diff_line?
      = render "projects/notes/discussions/diff", discussion_notes: discussion_notes, note: note
    - else
      .panel.panel-default
        .notes{ data: { discussion_id: discussion_notes.first.discussion_id } }
          = render discussion_notes
        .discussion-reply-holder
          = link_to_reply_diff(discussion_notes.first)