<% notes.each do |note| %>
<% if !note.archived %>
<div class="row">
<div class="col-md-12">
<ul class="list-group">
<li class="list-group-item">
<div class="pull-left"><!-- note info -->
<ul class="list-unstyled">
<li><%= note.user.name %></li>
<li>(<%= l note.updated_at, format: :custom %>)</li>
</ul>
</div>
<div class="pull-right"><!-- note actions -->
<ul class="list-inline">
<li><%= link_to(_('Show'), "#note_show#{note.id}", class: 'note_show_link') %></li>
<% if current_user.id == note.user_id %>
<li><%= link_to(_('Edit'), "#note_edit#{note.id}", class: 'note_edit_link') %></li>
<li><%= link_to(_('Delete'), "#note_archive#{note.id}", class: 'note_archive_link') %></li>
<% else %>
<% if plan.administerable_by?(current_user.id) %>
<li><%= link_to(_('Delete'), "#note_archive#{note.id}", class: 'note_archive_link') %></li>
<% end %>
<% end %>
</ul>
</div>
<div class="clearfix"></div>
</li>
</ul>
</div>
</div>
<% end %>
<% end %>
<% notes.each do |note| %>
<% if !note.archived %>
<div class="row">
<div class="col-md-12">
<div id="<%= "note_show#{note.id}" %>" style="display:none;">
<%= render partial: "/notes/show", locals: { note: note }, formats: [:html] %>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div id="<%= "note_edit#{note.id}" %>" style="display:none;">
<%= render partial: "/notes/edit", locals: { note: note }, formats: [:html] %>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div id="<%= "note_archive#{note.id}" %>" style="display:none;">
<%= render partial: "/notes/archive", locals: { note: note }, formats: [:html] %>
</div>
</div>
</div>
<% end %>
<% end %>