Muestra el desplegable de ficheros en las páginas del wiki solo si son editables o tienen adjuntos

This commit is contained in:
Manuel Cillero 2018-12-09 13:22:43 +01:00
parent 3c31ac4771
commit 00e98fef22

View file

@ -46,8 +46,9 @@
<%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
<% if @page.attachments.length > 0 || (@editable && authorize_for('wiki', 'add_attachment')) %>
<fieldset class="collapsible collapsed">
<legend onclick="toggleFieldset(this);"><%= l(:label_attachment_plural) %></legend>
<legend onclick="toggleFieldset(this);"><%= l(:label_attachment_plural) %> (<%= @page.attachments.length %>)</legend>
<div style="display: none;">
<%= link_to_attachments @page, :thumbnails => true %>
@ -66,6 +67,7 @@
<% end %>
</div>
</fieldset>
<% end %>
<% other_formats_links do |f| %>
<%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>