show.rhtml
28 lines
| 1.3 KiB
| text/html+ruby
|
RhtmlLexer
|
r330 | <div class="contextual"> | ||
|
r793 | <%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'icon icon-edit', :accesskey => accesskey(:edit) %> | ||
|
r330 | <%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> | ||
</div> | ||||
|
r951 | <h2><%=h @document.title %></h2> | ||
|
r330 | |||
|
r951 | <p><em><%=h @document.category.name %><br /> | ||
|
r330 | <%= format_date @document.created_on %></em></p> | ||
|
r1022 | <div class="wiki"> | ||
|
r549 | <%= textilizable @document.description, :attachments => @document.attachments %> | ||
|
r1022 | </div> | ||
|
r330 | |||
<h3><%= l(:label_attachment_plural) %></h3> | ||||
|
r2114 | <%= link_to_attachments @document %> | ||
|
r330 | |||
<% if authorize_for('documents', 'add_attachment') %> | ||||
|
r1166 | <p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;", | ||
:id => 'attach_files_link' %></p> | ||||
<% form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %> | ||||
<div class="box"> | ||||
<p><%= render :partial => 'attachments/form' %></p> | ||||
</div> | ||||
|
r330 | <%= submit_tag l(:button_add) %> | ||
<% end %> | ||||
|
r2 | <% end %> | ||
|
r951 | |||
|
r1019 | <% html_title @document.title -%> | ||