gitlab-org--gitlab-foss/app/views/projects/notes/_notes_with_form.html.haml

27 lines
1.1 KiB
Plaintext
Raw Normal View History

%ul#notes-list.notes.main-notes-list.timeline
= render "projects/notes/notes"
= render 'projects/notes/edit_form'
2016-04-18 11:00:20 +00:00
%ul.notes.notes-form.timeline
2016-03-29 17:17:31 +00:00
%li.timeline-entry
.flash-container.timeline-content
2016-03-30 12:54:35 +00:00
- if can? current_user, :create_note, @project
.timeline-icon.hidden-xs.hidden-sm
2016-03-29 17:17:31 +00:00
%a.author_link{ href: user_path(current_user) }
= image_tag avatar_icon(current_user), alt: current_user.to_reference, class: 'avatar s40'
2016-03-30 12:54:35 +00:00
.timeline-content.timeline-content-form
2016-03-30 12:39:41 +00:00
= render "projects/notes/form", view: diff_view
- elsif !current_user
2016-03-30 12:54:35 +00:00
.disabled-comment.text-center
.disabled-comment-text.inline
Please
2016-10-13 15:50:35 +00:00
= link_to "register", new_session_path(:user, redirect_to_referer: 'yes')
2016-03-30 12:54:35 +00:00
or
= link_to "sign in", new_session_path(:user, redirect_to_referer: 'yes')
2016-03-30 12:54:35 +00:00
to post a comment
2011-10-08 21:36:38 +00:00
:javascript
var notes = new Notes("#{namespace_project_noteable_notes_path(namespace_id: @project.namespace, project_id: @project, target_id: @noteable.id, target_type: @noteable.class.name.underscore)}", #{@notes.map(&:id).to_json}, #{Time.now.to_i}, "#{diff_view}")