annotate app/views/documents/index.html.erb @ 1327:287f201c2802 redmine-2.2-integration

Add italic
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Wed, 19 Jun 2013 20:56:22 +0100
parents 433d4f72a19b
children 622f24f53b42 261b3d9a4903
rev   line source
Chris@0 1 <div class="contextual">
Chris@1115 2 <%= link_to l(:label_document_new), new_project_document_path(@project), :class => 'icon icon-add',
Chris@1115 3 :onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:manage_documents, @project) %>
Chris@0 4 </div>
Chris@0 5
Chris@0 6 <div id="add-document" style="display:none;">
Chris@0 7 <h2><%=l(:label_document_new)%></h2>
Chris@1115 8 <%= labelled_form_for @document, :url => project_documents_path(@project), :html => {:multipart => true} do |f| %>
Chris@1115 9 <%= render :partial => 'form', :locals => {:f => f} %>
Chris@1115 10 <p>
Chris@1115 11 <%= submit_tag l(:button_create) %>
Chris@1115 12 <%= link_to l(:button_cancel), "#", :onclick => '$("#add-document").hide(); return false;' %>
Chris@1115 13 </p>
Chris@0 14 <% end %>
Chris@0 15 </div>
Chris@0 16
Chris@0 17 <h2><%=l(:label_document_plural)%></h2>
Chris@0 18
Chris@0 19 <% if @grouped.empty? %><p class="nodata"><%= l(:label_no_data) %></p><% end %>
Chris@0 20
Chris@0 21 <% @grouped.keys.sort.each do |group| %>
Chris@0 22 <h3><%= group %></h3>
Chris@0 23 <%= render :partial => 'documents/document', :collection => @grouped[group] %>
Chris@0 24 <% end %>
Chris@0 25
Chris@0 26 <% content_for :sidebar do %>
Chris@1115 27 <h3><%= l(:label_sort_by, '') %></h3>
Chris@1115 28 <%= link_to l(:field_category), {:sort_by => 'category'}, :class => (@sort_by == 'category' ? 'selected' :nil) %><br />
Chris@1115 29 <%= link_to l(:label_date), {:sort_by => 'date'}, :class => (@sort_by == 'date' ? 'selected' :nil) %><br />
Chris@1115 30 <%= link_to l(:field_title), {:sort_by => 'title'}, :class => (@sort_by == 'title' ? 'selected' :nil) %><br />
Chris@1115 31 <%= link_to l(:field_author), {:sort_by => 'author'}, :class => (@sort_by == 'author' ? 'selected' :nil) %>
Chris@0 32 <% end %>
Chris@0 33
Chris@0 34 <% html_title(l(:label_document_plural)) -%>