Commit b0af379a authored by Douwe Maan's avatar Douwe Maan

Show user roles by comments.

parent f84e78f3
...@@ -52,6 +52,7 @@ v 7.11.0 (unreleased) ...@@ -52,6 +52,7 @@ v 7.11.0 (unreleased)
- Add current_sign_in_at to UserFull REST api. - Add current_sign_in_at to UserFull REST api.
- Make Sidekiq MemoryKiller shutdown signal configurable - Make Sidekiq MemoryKiller shutdown signal configurable
- Add "Create Merge Request" buttons to commits and branches pages and push event. - Add "Create Merge Request" buttons to commits and branches pages and push event.
- Show user roles by comments.
v 7.10.2 v 7.10.2
- Fix CI links on MR page - Fix CI links on MR page
......
...@@ -44,6 +44,14 @@ ul.notes { ...@@ -44,6 +44,14 @@ ul.notes {
} }
.author-username { .author-username {
} }
.note-role {
float: right;
margin-top: 2px;
border: 1px solid #bbb;
background-color: transparent;
color: #999;
}
} }
.discussion { .discussion {
...@@ -136,6 +144,7 @@ ul.notes { ...@@ -136,6 +144,7 @@ ul.notes {
.note { .note {
&.note:hover { &.note:hover {
.note-actions { display: block; } .note-actions { display: block; }
.note-actions + .note-role { display: none; }
} }
.discussion-header:hover { .discussion-header:hover {
.discussion-actions { display: block; } .discussion-actions { display: block; }
...@@ -153,6 +162,8 @@ ul.notes { ...@@ -153,6 +162,8 @@ ul.notes {
} }
a { a {
margin-left: 5px;
@extend .cgray; @extend .cgray;
&:hover { &:hover {
......
...@@ -9,22 +9,30 @@ ...@@ -9,22 +9,30 @@
.timeline-content .timeline-content
.note-header .note-header
.note-actions .note-actions
= link_to "##{dom_id(note)}", name: dom_id(note) do = link_to "##{dom_id(note)}", name: dom_id(note), title: "Link here" do
= icon('link') = icon('link fw')
Link here Link here
 
- if note_editable?(note) - if note_editable?(note)
= link_to '#', title: 'Edit comment', class: 'js-note-edit' do = link_to '#', title: 'Edit comment', class: 'js-note-edit' do
= icon('pencil-square-o') = icon('pencil-square-o fw')
Edit Edit
 
= 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 = 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', class: 'cred') = icon('trash-o fw', class: 'cred')
Remove 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 - if note.system
= link_to user_path(note.author) do = link_to user_path(note.author) do
= image_tag avatar_icon(note.author_email), class: 'avatar s16', alt: '' = 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 %span.author-username
= '@' + note.author.username = '@' + note.author.username
%span.note-last-update %span.note-last-update
...@@ -65,7 +73,7 @@ ...@@ -65,7 +73,7 @@
= link_to note.attachment.url, target: '_blank' do = link_to note.attachment.url, target: '_blank' do
= icon('paperclip') = icon('paperclip')
= note.attachment_identifier = 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 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') = icon('trash-o', class: 'cred')
.clear .clear
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment