|
|
|
@ -30,15 +30,24 @@ See doc/COPYRIGHT.rdoc for more details. |
|
|
|
|
|
|
|
|
|
++#%> |
|
|
|
|
|
|
|
|
|
<div class="contextual"> |
|
|
|
|
<%= link_to_if_authorized l(:button_edit), {:controller => '/documents', :action => 'edit', :id => @document}, :class => 'icon icon-edit', :accesskey => accesskey(:edit) %> |
|
|
|
|
<%= link_to_if_authorized l(:button_delete), {:controller => '/documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-delete' %> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<h2><%=h @document.title %></h2> |
|
|
|
|
<% html_title h(@document.title) -%> |
|
|
|
|
<%= toolbar title: @document.title, subtitle: "#{@document.category.name} - #{format_date @document.created_on}" do %> |
|
|
|
|
<% if authorize_for(:documents, :edit) %> |
|
|
|
|
<li class="toolbar-item"> |
|
|
|
|
<%= link_to({:controller => '/documents', :action => 'edit', :id => @document}, class: 'button', accesskey: accesskey(:edit)) do %> |
|
|
|
|
<i class="button--icon icon-edit"></i> <%= l(:button_edit) %> |
|
|
|
|
<% end %> |
|
|
|
|
</li> |
|
|
|
|
<% end %> |
|
|
|
|
<% if authorize_for(:documents, :destroy) %> |
|
|
|
|
<li class="toolbar-item"> |
|
|
|
|
<%= link_to({:controller => '/documents', :action => 'destroy', :id => @document}, class: 'button', data: { :confirm => l(:text_are_you_sure) }, :method => :delete) do %> |
|
|
|
|
<i class="button--icon icon-delete"></i> <%= l(:button_delete) %> |
|
|
|
|
<% end %> |
|
|
|
|
</li> |
|
|
|
|
<% end %> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<p><em><%=h @document.category.name %><br /> |
|
|
|
|
<%= format_date @document.created_on %></em></p> |
|
|
|
|
<div class="wiki"> |
|
|
|
|
<%= textilizable @document.description, :attachments => @document.attachments %> |
|
|
|
|
</div> |
|
|
|
@ -57,4 +66,3 @@ See doc/COPYRIGHT.rdoc for more details. |
|
|
|
|
<% end %> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<% html_title h(@document.title) -%> |
|
|
|
|