@@ -1,36 +1,34 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | 2 | <%= link_to l(:label_document_new), new_project_document_path(@project), :class => 'icon icon-add', |
|
3 | 3 | :onclick => 'Element.show("add-document"); Form.Element.focus("document_title"); return false;' if User.current.allowed_to?(:manage_documents, @project) %> |
|
4 | 4 | </div> |
|
5 | 5 | |
|
6 | 6 | <div id="add-document" style="display:none;"> |
|
7 | 7 | <h2><%=l(:label_document_new)%></h2> |
|
8 | 8 | <% labelled_form_for @document, :url => project_documents_path(@project), :html => {:multipart => true} do |f| %> |
|
9 | 9 | <%= render :partial => 'form', :locals => {:f => f} %> |
|
10 | 10 | <p> |
|
11 | 11 | <%= submit_tag l(:button_create) %> |
|
12 | 12 | <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-document")' %> |
|
13 | 13 | </p> |
|
14 | 14 | <% end %> |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | <h2><%=l(:label_document_plural)%></h2> |
|
18 | 18 | |
|
19 | 19 | <% if @grouped.empty? %><p class="nodata"><%= l(:label_no_data) %></p><% end %> |
|
20 | 20 | |
|
21 | 21 | <% @grouped.keys.sort.each do |group| %> |
|
22 | 22 | <h3><%= group %></h3> |
|
23 | 23 | <%= render :partial => 'documents/document', :collection => @grouped[group] %> |
|
24 | 24 | <% end %> |
|
25 | 25 | |
|
26 | 26 | <% content_for :sidebar do %> |
|
27 |
|
|
|
28 | <% form_tag({}, :method => :get) do %> | |
|
29 | <label><%= radio_button_tag 'sort_by', 'category', (@sort_by == 'category'), :onclick => 'this.form.submit();' %> <%= l(:field_category) %></label><br /> | |
|
30 | <label><%= radio_button_tag 'sort_by', 'date', (@sort_by == 'date'), :onclick => 'this.form.submit();' %> <%= l(:label_date) %></label><br /> | |
|
31 | <label><%= radio_button_tag 'sort_by', 'title', (@sort_by == 'title'), :onclick => 'this.form.submit();' %> <%= l(:field_title) %></label><br /> | |
|
32 | <label><%= radio_button_tag 'sort_by', 'author', (@sort_by == 'author'), :onclick => 'this.form.submit();' %> <%= l(:field_author) %></label> | |
|
33 | <% end %> | |
|
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) %> | |
|
34 | 32 | <% end %> |
|
35 | 33 | |
|
36 | 34 | <% html_title(l(:label_document_plural)) -%> |
General Comments 0
You need to be logged in to leave comments.
Login now