2014-08-15 08:14:58 +00:00
|
|
|
%ul#notes-list.notes.main-notes-list.timeline
|
2013-12-25 11:32:43 +00:00
|
|
|
= render "projects/notes/notes"
|
2016-11-14 20:15:41 +00:00
|
|
|
|
|
|
|
= 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
|
2016-06-21 21:10:24 +00:00
|
|
|
.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
|
2017-02-05 18:54:19 +00:00
|
|
|
- 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
|
2016-09-21 09:58:13 +00:00
|
|
|
= link_to "sign in", new_session_path(:user, redirect_to_referer: 'yes')
|
2016-03-30 12:54:35 +00:00
|
|
|
to post a comment
|
2012-02-24 20:19:47 +00:00
|
|
|
|
2011-10-08 21:36:38 +00:00
|
|
|
:javascript
|
2017-02-07 17:02:02 +00:00
|
|
|
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}")
|