Commit d4baaa95 authored by jplang's avatar jplang

Hide wiki attachments by default and add thumbnails (#22941).

git-svn-id: https://svn.redmine.org/redmine/trunk@15604 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent a85ba7f2
...@@ -46,24 +46,26 @@ ...@@ -46,24 +46,26 @@
<%= render(:partial => "wiki/content", :locals => {:content => @content}) %> <%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
<%= link_to_attachments @page %> <fieldset class="collapsible collapsed">
<legend onclick="toggleFieldset(this);"><%= l(:label_attachment_plural) %></legend>
<div style="display: none;">
<% if @editable && authorize_for('wiki', 'add_attachment') %> <%= link_to_attachments @page, :thumbnails => true %>
<div id="wiki_add_attachment">
<p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;", <% if @editable && authorize_for('wiki', 'add_attachment') %>
:id => 'attach_files_link' %></p> <div id="wiki_add_attachment">
<%= form_tag({:controller => 'wiki', :action => 'add_attachment', <%= form_tag({:controller => 'wiki', :action => 'add_attachment',
:project_id => @project, :id => @page.title}, :project_id => @project, :id => @page.title},
:multipart => true, :id => "add_attachment_form", :multipart => true, :id => "add_attachment_form") do %>
:style => "display:none;") do %> <div class="box">
<div class="box"> <p><%= render :partial => 'attachments/form' %></p>
<p><%= render :partial => 'attachments/form' %></p> </div>
<%= submit_tag l(:button_add) %>
<% end %>
</div> </div>
<%= submit_tag l(:button_add) %> <% end %>
<%= link_to l(:button_cancel), {}, :onclick => "$('#add_attachment_form').hide(); return false;" %>
<% end %>
</div> </div>
<% end %> </fieldset>
<% other_formats_links do |f| %> <% other_formats_links do |f| %>
<%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %> <%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
......
...@@ -683,7 +683,7 @@ a.remove-upload:hover {text-decoration:none !important;} ...@@ -683,7 +683,7 @@ a.remove-upload:hover {text-decoration:none !important;}
div.fileover { background-color: lavender; } div.fileover { background-color: lavender; }
div.attachments { margin-top: 12px; } div.attachments { margin: 12px 0; }
div.attachments p { margin:4px 0 2px 0; } div.attachments p { margin:4px 0 2px 0; }
div.attachments img { vertical-align: middle; } div.attachments img { vertical-align: middle; }
div.attachments span.author { font-size: 0.9em; color: #888; } div.attachments span.author { font-size: 0.9em; color: #888; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment