|
|
@ -35,14 +35,14 @@ See doc/COPYRIGHT.rdoc for more details. |
|
|
|
subtitle: "#{@document.category.name} - #{format_date @document.created_on}" do %> |
|
|
|
subtitle: "#{@document.category.name} - #{format_date @document.created_on}" do %> |
|
|
|
<% if authorize_for(:documents, :edit) %> |
|
|
|
<% if authorize_for(:documents, :edit) %> |
|
|
|
<li class="toolbar-item"> |
|
|
|
<li class="toolbar-item"> |
|
|
|
<%= link_to({:controller => '/documents', :action => 'edit', :id => @document}, class: 'button', accesskey: accesskey(:edit)) do %> |
|
|
|
<%= link_to({controller: '/documents', action: 'edit', id: @document}, class: 'button', accesskey: accesskey(:edit)) do %> |
|
|
|
<i class="button--icon icon-edit"></i> <%= l(:button_edit) %> |
|
|
|
<i class="button--icon icon-edit"></i> <%= l(:button_edit) %> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
<% if authorize_for(:documents, :destroy) %> |
|
|
|
<% if authorize_for(:documents, :destroy) %> |
|
|
|
<li class="toolbar-item"> |
|
|
|
<li class="toolbar-item"> |
|
|
|
<%= link_to({:controller => '/documents', :action => 'destroy', :id => @document}, class: 'button', data: { :confirm => l(:text_are_you_sure) }, :method => :delete) do %> |
|
|
|
<%= 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) %> |
|
|
|
<i class="button--icon icon-delete"></i> <%= l(:button_delete) %> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
</li> |
|
|
|
</li> |
|
|
@ -50,18 +50,18 @@ See doc/COPYRIGHT.rdoc for more details. |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
|
|
<div class="wiki"> |
|
|
|
<div class="wiki"> |
|
|
|
<%= textilizable @document.description, :attachments => @document.attachments %> |
|
|
|
<%= format_text @document.description, attachments: @document.attachments %> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<h3><%= l(:label_attachment_plural) %></h3> |
|
|
|
<h3><%= l(:label_attachment_plural) %></h3> |
|
|
|
<%= link_to_attachments @document %> |
|
|
|
<%= link_to_attachments @document %> |
|
|
|
|
|
|
|
|
|
|
|
<% if authorize_for('documents', 'add_attachment') %> |
|
|
|
<% if authorize_for('documents', 'add_attachment') %> |
|
|
|
<p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;", |
|
|
|
<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> |
|
|
|
id: 'attach_files_link' %></p> |
|
|
|
<%= form_tag(add_attachment_document_path(@document), method: :post, multipart: true, :id => "add_attachment_form", :style => "display:none;") do %> |
|
|
|
<%= form_tag(add_attachment_document_path(@document), method: :post, multipart: true, id: "add_attachment_form", style: "display:none;") do %> |
|
|
|
<div class="box"> |
|
|
|
<div class="box"> |
|
|
|
<p><%= render :partial => 'attachments/form' %></p> |
|
|
|
<p><%= render partial: 'attachments/form' %></p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<%= styled_button_tag l(:button_add), class: "-highlight -with-icon icon-checkmark" %> |
|
|
|
<%= styled_button_tag l(:button_add), class: "-highlight -with-icon icon-checkmark" %> |
|
|
|
|
|
|
|
|
|
|
|