Commit 9c1ce00a authored by Phil Hughes's avatar Phil Hughes

Moved project access into note actions

Created a class for note action buttons
parent c3875b5f
...@@ -41,8 +41,6 @@ ul.notes { ...@@ -41,8 +41,6 @@ ul.notes {
.discussion-header, .discussion-header,
.note-header { .note-header {
@extend .cgray;
a:hover { a:hover {
text-decoration: none; text-decoration: none;
} }
...@@ -74,16 +72,6 @@ ul.notes { ...@@ -74,16 +72,6 @@ ul.notes {
color: $gl-link-color; color: $gl-link-color;
} }
} }
.author-username {
}
.note-role {
float: right;
margin-top: 1px;
border: 1px solid #bbb;
background-color: transparent;
color: $gl-gray;
}
} }
.discussion-body { .discussion-body {
...@@ -215,23 +203,41 @@ ul.notes { ...@@ -215,23 +203,41 @@ ul.notes {
.note-actions { .note-actions {
float: right; float: right;
margin-left: 10px; margin-left: 10px;
}
}
a { .note-action-button {
margin-left: 5px; display: inline-block;
color: $gl-gray; margin-left: 5px;
color: #8F8F8F;
line-height: 24px;
i.fa { .fa {
font-size: 16px; font-size: 16px;
line-height: 16px; }
}
&:hover { &:hover {
@extend .cgray; color: $gl-gray;
&.danger { @extend .cred; }
} &.danger {
color: $gl-text-red;
} }
} }
} }
.note-role {
position: relative;
top: -2px;
display: inline-block;
padding-left: 4px;
padding-right: 4px;
color: #8F8F8F;
font-size: 12px;
line-height: 20px;
border: 1px solid #bbb;
border-radius: $border-radius-base;
}
.diff-file .note .note-actions { .diff-file .note .note-actions {
right: 0; right: 0;
top: 0; top: 0;
......
...@@ -7,18 +7,15 @@ ...@@ -7,18 +7,15 @@
.note-header .note-header
- if note_editable?(note) - if note_editable?(note)
.note-actions .note-actions
= link_to '#', title: 'Edit comment', class: 'js-note-edit' do - access = note.project.team.human_max_access(note.author.id)
- if access
%span.note-role
= access
= link_to '#', title: 'Edit comment', class: 'note-action-button js-note-edit' do
= icon('pencil-square-o') = icon('pencil-square-o')
= 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: 'note-action-button js-note-delete danger' 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: 'js-note-delete danger' do
= icon('trash-o') = icon('trash-o')
- unless note.system
- access = note.project.team.human_max_access(note.author.id)
- if access
%span.note-role.label
= access
= link_to_member(note.project, note.author, avatar: false) = link_to_member(note.project, note.author, avatar: false)
%span.author-username %span.author-username
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.discussion.js-toggle-container{ class: note.discussion_id } .discussion.js-toggle-container{ class: note.discussion_id }
.discussion-header .discussion-header
.discussion-actions .discussion-actions
= link_to "#", class: "js-toggle-button" do = link_to "#", class: "note-action-button js-toggle-button" do
%i.fa.fa-chevron-up %i.fa.fa-chevron-up
Show/hide discussion Show/hide discussion
%div %div
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.discussion.js-toggle-container{ class: note.discussion_id } .discussion.js-toggle-container{ class: note.discussion_id }
.discussion-header .discussion-header
.discussion-actions .discussion-actions
= link_to "#", class: "js-toggle-button" do = link_to "#", class: "note-action-button js-toggle-button" do
%i.fa.fa-chevron-up %i.fa.fa-chevron-up
Show/hide discussion Show/hide discussion
%div %div
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.discussion.js-toggle-container{ class: note.discussion_id } .discussion.js-toggle-container{ class: note.discussion_id }
.discussion-header .discussion-header
.discussion-actions .discussion-actions
= link_to "#", class: "js-toggle-button" do = link_to "#", class: "note-action-button js-toggle-button" do
%i.fa.fa-chevron-down %i.fa.fa-chevron-down
Show/hide discussion Show/hide discussion
%div %div
......
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