2007-03-12 20:59:02 +03:00
|
|
|
<div class="contextual">
|
2007-10-05 22:05:41 +04:00
|
|
|
<%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<%= 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>
|
|
|
|
|
2007-12-07 21:42:40 +03:00
|
|
|
<h2><%=h @document.title %></h2>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
2007-12-07 21:42:40 +03:00
|
|
|
<p><em><%=h @document.category.name %><br />
|
2007-03-12 20:59:02 +03:00
|
|
|
<%= format_date @document.created_on %></em></p>
|
2008-01-04 20:55:08 +03:00
|
|
|
<div class="wiki">
|
2007-05-28 16:15:19 +04:00
|
|
|
<%= textilizable @document.description, :attachments => @document.attachments %>
|
2008-01-04 20:55:08 +03:00
|
|
|
</div>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
|
|
|
<h3><%= l(:label_attachment_plural) %></h3>
|
2008-02-29 22:46:58 +03:00
|
|
|
<%= link_to_attachments @attachments, :delete_url => (authorize_for('documents', 'destroy_attachment') ? {:controller => 'documents', :action => 'destroy_attachment', :id => @document} : nil) %>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
|
|
|
<% if authorize_for('documents', 'add_attachment') %>
|
2008-02-29 22:46:58 +03:00
|
|
|
<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>
|
2007-03-12 20:59:02 +03:00
|
|
|
<%= submit_tag l(:button_add) %>
|
|
|
|
<% end %>
|
2006-06-28 22:11:03 +04:00
|
|
|
<% end %>
|
2007-12-07 21:42:40 +03:00
|
|
|
|
2008-01-03 01:41:53 +03:00
|
|
|
<% html_title @document.title -%>
|