Commit 3b4c4dd7 authored by Phil Hughes's avatar Phil Hughes

Logged out box

parent 0581df29
...@@ -501,7 +501,6 @@ class @Notes ...@@ -501,7 +501,6 @@ class @Notes
addDiffNote: (e) => addDiffNote: (e) =>
e.preventDefault() e.preventDefault()
link = e.currentTarget link = e.currentTarget
form = $(".js-new-note-form")
row = $(link).closest("tr") row = $(link).closest("tr")
nextRow = row.next() nextRow = row.next()
hasNotes = nextRow.is(".notes_holder") hasNotes = nextRow.is(".notes_holder")
...@@ -533,7 +532,7 @@ class @Notes ...@@ -533,7 +532,7 @@ class @Notes
addForm = true addForm = true
if addForm if addForm
newForm = form.clone() newForm = @formClone.clone()
newForm.appendTo row.next().find(targetContent) newForm.appendTo row.next().find(targetContent)
# show the form # show the form
......
...@@ -195,39 +195,21 @@ ...@@ -195,39 +195,21 @@
line-height: 31px; line-height: 31px;
} }
.disabled-comment-area { .disabled-comment {
padding: 16px 0; margin-left: -$gl-padding-top;
margin-right: -$gl-padding-top;
.disabled-profile { background-color: $gray-light;
width: 40px; border-radius: $border-radius-base;
height: 40px;
background: $border-gray-dark;
border-radius: 20px;
display: inline-block;
margin-right: 10px;
}
.disabled-comment {
background: $gray-light;
display: inline-block;
vertical-align: top;
height: 200px;
border-radius: 4px;
border: 1px solid $border-gray-normal; border: 1px solid $border-gray-normal;
padding-top: 90px;
text-align: center;
right: 20px;
position: absolute;
left: 70px;
margin-bottom: 20px;
span {
color: #b2b2b2; color: #b2b2b2;
line-height: 200px;
a { .disabled-comment-text {
color: $md-link-color; line-height: normal;
}
} }
a {
color: $gl-link-color;
} }
} }
......
.note-edit-form .note-edit-form
= form_for note, url: namespace_project_note_path(@project.namespace, @project, note), method: :put, remote: true, authenticity_token: true, html: { class: 'edit-note js-quick-submit' } do |f| = form_for note, url: namespace_project_note_path(@project.namespace, @project, note), method: :put, remote: true, authenticity_token: true, html: { class: 'edit-note common-note-form js-quick-submit' } do |f|
= note_target_fields(note) = note_target_fields(note)
= render layout: 'projects/md_preview', locals: { preview_class: 'md-preview' } do = render layout: 'projects/md_preview', locals: { preview_class: 'md-preview' } do
= render 'projects/zen', f: f, attr: :note, classes: 'note-textarea js-note-text js-task-list-field' = render 'projects/zen', f: f, attr: :note, classes: 'note-textarea js-note-text js-task-list-field'
...@@ -7,4 +7,5 @@ ...@@ -7,4 +7,5 @@
.note-form-actions.clearfix .note-form-actions.clearfix
= f.submit 'Save Comment', class: 'btn btn-nr btn-save btn-grouped js-comment-button' = f.submit 'Save Comment', class: 'btn btn-nr btn-save btn-grouped js-comment-button'
= link_to 'Cancel', '#', class: 'btn btn-nr btn-cancel note-edit-cancel' %button.btn.btn-nr.btn-cancel.note-edit-cancel{ type: 'button' }
Cancel
...@@ -2,18 +2,15 @@ ...@@ -2,18 +2,15 @@
= render "projects/notes/notes" = render "projects/notes/notes"
%ul.notes.timeline %ul.notes.timeline
%li.timeline-entry %li.timeline-entry
.timeline-icon.hidden-xs.hidden-sm
- if can? current_user, :create_note, @project - if can? current_user, :create_note, @project
.timeline-icon.hidden-xs.hidden-sm
%a.author_link{ href: user_path(current_user) } %a.author_link{ href: user_path(current_user) }
= image_tag avatar_icon(current_user), alt: current_user.to_reference, class: 'avatar s40' = image_tag avatar_icon(current_user), alt: current_user.to_reference, class: 'avatar s40'
.timeline-content.timeline-content-form .timeline-content.timeline-content-form
- if can? current_user, :create_note, @project
= render "projects/notes/form", view: diff_view = render "projects/notes/form", view: diff_view
- else - else
.disabled-comment-area .disabled-comment.text-center
.disabled-profile .disabled-comment-text.inline
.disabled-comment
%span
Please Please
= link_to "register",new_user_session_path = link_to "register",new_user_session_path
or or
......
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