Se eliminan las etiquetas HTML en la impresión a texto y se ajusta el formato de impresión
This commit is contained in:
parent
b9ba4eb28f
commit
494983367c
4 changed files with 49 additions and 2 deletions
|
@ -42,6 +42,8 @@ class WikiController < ApplicationController
|
|||
helper :watchers
|
||||
include Redmine::Export::PDF
|
||||
|
||||
include ActionView::Helpers::SanitizeHelper
|
||||
|
||||
# List of pages, sorted alphabetically and by parent (hierarchy)
|
||||
def index
|
||||
load_pages_for_index
|
||||
|
@ -107,7 +109,7 @@ class WikiController < ApplicationController
|
|||
send_data(export, :type => 'text/html', :filename => filename_for_content_disposition("#{@page.title}.html"))
|
||||
return
|
||||
elsif params[:format] == 'txt'
|
||||
send_data(@content.text, :type => 'text/plain', :filename => filename_for_content_disposition("#{@page.title}.txt"))
|
||||
send_data(strip_tags(@content.text), :type => 'text/plain', :filename => filename_for_content_disposition("#{@page.title}.txt"))
|
||||
return
|
||||
end
|
||||
end
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
|
||||
|
||||
<% if @page.attachments.length > 0 || (@editable && authorize_for('wiki', 'add_attachment')) %>
|
||||
<fieldset class="collapsible collapsed">
|
||||
<fieldset class="collapsible collapsed<% if @page.attachments.length == 0 %> hide-when-print<% end %>">
|
||||
<legend onclick="toggleFieldset(this);"><%= l(:label_attachment_plural) %> (<%= @page.attachments.length %>)</legend>
|
||||
<div style="display: none;">
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue