_notes_with_form.html.haml 996 字节
Newer Older
1
%ul#notes-list.notes.main-notes-list.timeline
2
  = render "shared/notes/notes"
3

4
= render 'shared/notes/edit_form', project: @project
5

P
Phil Hughes 已提交
6
%ul.notes.notes-form.timeline
P
Phil Hughes 已提交
7
  %li.timeline-entry
8 9
    .flash-container.timeline-content

10
    - if  can_create_note?
P
Phil Hughes 已提交
11
      .timeline-icon.hidden-xs.hidden-sm
P
Phil Hughes 已提交
12 13
        %a.author_link{ href: user_path(current_user) }
          = image_tag avatar_icon(current_user), alt: current_user.to_reference, class: 'avatar s40'
P
Phil Hughes 已提交
14
      .timeline-content.timeline-content-form
15
        = render "shared/notes/form", view: diff_view
16
    - elsif !current_user
P
Phil Hughes 已提交
17 18 19
      .disabled-comment.text-center
        .disabled-comment-text.inline
          Please
B
Bryce Johnson 已提交
20
          = link_to "register", new_session_path(:user, redirect_to_referer: 'yes')
P
Phil Hughes 已提交
21
          or
22
          = link_to "sign in", new_session_path(:user, redirect_to_referer: 'yes')
P
Phil Hughes 已提交
23
          to post a comment
24

G
gitlabhq 已提交
25
:javascript
26
  var notes = new Notes("#{notes_url}", #{@notes.map(&:id).to_json}, #{Time.now.to_i}, "#{diff_view}", false)