summaryrefslogtreecommitdiff
path: root/app/views/projects/notes
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-05-12 12:16:34 +0200
committerDouwe Maan <douwe@gitlab.com>2015-05-12 12:16:34 +0200
commitb0af379a22efff12a7561d7b89ce85105169a5cc (patch)
tree1cfd754891e324729e73e60a19324f6a0d78adca /app/views/projects/notes
parentf84e78f3d750776793371940803b7ff781050f09 (diff)
downloadgitlab-ce-b0af379a22efff12a7561d7b89ce85105169a5cc.tar.gz
Show user roles by comments.
Diffstat (limited to 'app/views/projects/notes')
-rw-r--r--app/views/projects/notes/_note.html.haml26
1 files changed, 17 insertions, 9 deletions
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml
index 4d26b52df01..2f3c407d6e9 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -9,22 +9,30 @@
.timeline-content
.note-header
.note-actions
- = link_to "##{dom_id(note)}", name: dom_id(note) do
- = icon('link')
+ = link_to "##{dom_id(note)}", name: dom_id(note), title: "Link here" do
+ = icon('link fw')
Link here
- &nbsp;
+
- if note_editable?(note)
= link_to '#', title: 'Edit comment', class: 'js-note-edit' do
- = icon('pencil-square-o')
+ = icon('pencil-square-o fw')
Edit
- &nbsp;
- = link_to namespace_project_note_path(@project.namespace, @project, note), title: 'Remove comment', method: :delete, data: { confirm: 'Are you sure you want to remove this comment?' }, remote: true, class: 'danger js-note-delete' do
- = icon('trash-o', class: 'cred')
+
+ = link_to namespace_project_note_path(note.project.namespace, note.project, note), title: 'Remove comment', method: :delete, data: { confirm: 'Are you sure you want to remove this comment?' }, remote: true, class: 'danger js-note-delete' do
+ = icon('trash-o fw', class: 'cred')
Remove
+
+ - unless note.system
+ - member = note.project.team.find_member(note.author.id)
+ - if member
+ %span.note-role.label
+ = member.human_access
+
- if note.system
= link_to user_path(note.author) do
= image_tag avatar_icon(note.author_email), class: 'avatar s16', alt: ''
- = link_to_member(@project, note.author, avatar: false)
+
+ = link_to_member(note.project, note.author, avatar: false)
%span.author-username
= '@' + note.author.username
%span.note-last-update
@@ -65,7 +73,7 @@
= link_to note.attachment.url, target: '_blank' do
= icon('paperclip')
= note.attachment_identifier
- = link_to delete_attachment_namespace_project_note_path(@project.namespace, @project, note),
+ = link_to delete_attachment_namespace_project_note_path(note.project.namespace, note.project, note),
title: 'Delete this attachment', method: :delete, remote: true, data: { confirm: 'Are you sure you want to remove the attachment?' }, class: 'danger js-note-attachment-delete' do
= icon('trash-o', class: 'cred')
.clear