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 {
.discussion-header,
.note-header {
@extend .cgray;
a:hover {
text-decoration: none;
}
......@@ -74,16 +72,6 @@ ul.notes {
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 {
......@@ -215,23 +203,41 @@ ul.notes {
.note-actions {
float: right;
margin-left: 10px;
}
}
a {
.note-action-button {
display: inline-block;
margin-left: 5px;
color: $gl-gray;
color: #8F8F8F;
line-height: 24px;
i.fa {
.fa {
font-size: 16px;
line-height: 16px;
}
&:hover {
@extend .cgray;
&.danger { @extend .cred; }
}
color: $gl-gray;
&.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 {
right: 0;
top: 0;
......
......@@ -7,17 +7,14 @@
.note-header
- if note_editable?(note)
.note-actions
= link_to '#', title: 'Edit comment', class: 'js-note-edit' do
= 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: 'js-note-delete danger' do
= icon('trash-o')
- unless note.system
- access = note.project.team.human_max_access(note.author.id)
- if access
%span.note-role.label
%span.note-role
= access
= link_to '#', title: 'Edit comment', class: 'note-action-button js-note-edit' do
= 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
= icon('trash-o')
= link_to_member(note.project, note.author, avatar: false)
......
......@@ -2,7 +2,7 @@
.discussion.js-toggle-container{ class: note.discussion_id }
.discussion-header
.discussion-actions
= link_to "#", class: "js-toggle-button" do
= link_to "#", class: "note-action-button js-toggle-button" do
%i.fa.fa-chevron-up
Show/hide discussion
%div
......
......@@ -4,7 +4,7 @@
.discussion.js-toggle-container{ class: note.discussion_id }
.discussion-header
.discussion-actions
= link_to "#", class: "js-toggle-button" do
= link_to "#", class: "note-action-button js-toggle-button" do
%i.fa.fa-chevron-up
Show/hide discussion
%div
......
......@@ -2,7 +2,7 @@
.discussion.js-toggle-container{ class: note.discussion_id }
.discussion-header
.discussion-actions
= link_to "#", class: "js-toggle-button" do
= link_to "#", class: "note-action-button js-toggle-button" do
%i.fa.fa-chevron-down
Show/hide discussion
%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