To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / 2f / 2ff7c4a24ae3be5225189f1a6fd5fd0c91104ce3.svn-base @ 1298:4f746d8966dd
History | View | Annotate | Download (1.52 KB)
| 1 | 1295:622f24f53b42 | Chris | <div class="contextual"> |
|---|---|---|---|
| 2 | <%= link_to l(:label_document_new), new_project_document_path(@project), :class => 'icon icon-add', |
||
| 3 | :onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:add_documents, @project) %>
|
||
| 4 | </div> |
||
| 5 | |||
| 6 | <div id="add-document" style="display:none;"> |
||
| 7 | <h2><%=l(:label_document_new)%></h2> |
||
| 8 | <%= labelled_form_for @document, :url => project_documents_path(@project), :html => {:multipart => true} do |f| %>
|
||
| 9 | <%= render :partial => 'form', :locals => {:f => f} %>
|
||
| 10 | <p> |
||
| 11 | <%= submit_tag l(:button_create) %> |
||
| 12 | <%= link_to l(:button_cancel), "#", :onclick => '$("#add-document").hide(); return false;' %>
|
||
| 13 | </p> |
||
| 14 | <% end %> |
||
| 15 | </div> |
||
| 16 | |||
| 17 | <h2><%=l(:label_document_plural)%></h2> |
||
| 18 | |||
| 19 | <% if @grouped.empty? %><p class="nodata"><%= l(:label_no_data) %></p><% end %> |
||
| 20 | |||
| 21 | <% @grouped.keys.sort.each do |group| %> |
||
| 22 | <h3><%= group %></h3> |
||
| 23 | <%= render :partial => 'documents/document', :collection => @grouped[group] %> |
||
| 24 | <% end %> |
||
| 25 | |||
| 26 | <% content_for :sidebar do %> |
||
| 27 | <h3><%= l(:label_sort_by, '') %></h3> |
||
| 28 | <%= link_to l(:field_category), {:sort_by => 'category'}, :class => (@sort_by == 'category' ? 'selected' :nil) %><br />
|
||
| 29 | <%= link_to l(:label_date), {:sort_by => 'date'}, :class => (@sort_by == 'date' ? 'selected' :nil) %><br />
|
||
| 30 | <%= link_to l(:field_title), {:sort_by => 'title'}, :class => (@sort_by == 'title' ? 'selected' :nil) %><br />
|
||
| 31 | <%= link_to l(:field_author), {:sort_by => 'author'}, :class => (@sort_by == 'author' ? 'selected' :nil) %>
|
||
| 32 | <% end %> |
||
| 33 | |||
| 34 | <% html_title(l(:label_document_plural)) -%> |