To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / documents / show.html.erb @ 1298:4f746d8966dd
History | View | Annotate | Download (1.23 KB)
| 1 | 0:513646585e45 | Chris | <div class="contextual"> |
|---|---|---|---|
| 2 | 1295:622f24f53b42 | Chris | <% if User.current.allowed_to?(:edit_documents, @project) %>
|
| 3 | 1115:433d4f72a19b | Chris | <%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
|
| 4 | 1295:622f24f53b42 | Chris | <% end %>
|
| 5 | <% if User.current.allowed_to?(:delete_documents, @project) %>
|
||
| 6 | 1115:433d4f72a19b | Chris | <%= delete_link document_path(@document) %>
|
| 7 | <% end %>
|
||
| 8 | 0:513646585e45 | Chris | </div>
|
| 9 | |||
| 10 | <h2><%=h @document.title %></h2> |
||
| 11 | |||
| 12 | <p><em><%=h @document.category.name %><br /> |
||
| 13 | <%= format_date @document.created_on %></em></p> |
||
| 14 | <div class="wiki"> |
||
| 15 | 1295:622f24f53b42 | Chris | <%= textilizable @document, :description, :attachments => @document.attachments %>
|
| 16 | 0:513646585e45 | Chris | </div>
|
| 17 | |||
| 18 | <h3><%= l(:label_attachment_plural) %></h3> |
||
| 19 | <%= link_to_attachments @document %>
|
||
| 20 | |||
| 21 | <% if authorize_for('documents', 'add_attachment') %>
|
||
| 22 | 1115:433d4f72a19b | Chris | <p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;", |
| 23 | 0:513646585e45 | Chris | :id => 'attach_files_link' %></p> |
| 24 | 1115:433d4f72a19b | Chris | <%= form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
|
| 25 | 0:513646585e45 | Chris | <div class="box"> |
| 26 | <p><%= render :partial => 'attachments/form' %></p> |
||
| 27 | </div>
|
||
| 28 | <%= submit_tag l(:button_add) %>
|
||
| 29 | 909:cbb26bc654de | Chris | <% end %>
|
| 30 | 0:513646585e45 | Chris | <% end %>
|
| 31 | |||
| 32 | <% html_title @document.title -%> |