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-12-09 19:54:46 +03:00
|
|
|
<%= link_to_attachments @document %>
|
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) %>
|
2011-05-30 22:52:25 +04:00
|
|
|
<% 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 -%>
|
2010-03-18 23:06:16 +03:00
|
|
|
|
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<%= stylesheet_link_tag 'scm' %>
|
|
|
|
<% end %>
|