Fixed links on wiki/export page
This commit is contained in:
parent
6f8b5b44d3
commit
e9c4948d0a
|
@ -3,10 +3,10 @@
|
|||
<p>You can export all the pages in this web as a zip file in either HTML (with working links and all) or the pure markup (to import in another wiki).</p>
|
||||
|
||||
<ul id="feedsList">
|
||||
<li><a href="../export_html">HTML</a>
|
||||
<li><a href="../export_markup">Markup (<%= @web.markup %>)</a>
|
||||
<li><%= link_to 'HTML', :web => @web.address, :action => 'export_html' %></li>
|
||||
<li><%= link_to "Markup (#{@web.markup.to_s.capitalize})", :web => @web.address, :action => 'export_markup' %></li>
|
||||
<% if OPTIONS[:pdflatex] && @web.markup == :textile %>
|
||||
<li><a href="../export_tex">TeX</a>
|
||||
<li><a href="../export_pdf">PDF</a>
|
||||
<li><%= link_to 'TeX', :web => @web.address, :action => 'export_tex' %></li>
|
||||
<li><%= link_to 'PDF', :web => @web.address, :action => 'export_pdf' %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
@ -7,7 +7,6 @@ require 'fileutils'
|
|||
pwd = File.expand_path(File.dirname(__FILE__) + "/..")
|
||||
|
||||
OPTIONS = {
|
||||
|
||||
# Overridable options
|
||||
:port => 2500,
|
||||
:ip => '0.0.0.0',
|
||||
|
@ -42,6 +41,9 @@ ARGV.options do |opts|
|
|||
opts.on('-t', '--storage=storage', String,
|
||||
'Makes Instiki use the specified directory for storage.',
|
||||
'Default: ./storage/[port]') { |OPTIONS[:storage]| }
|
||||
opts.on('-x', '--notex',
|
||||
'Blocks wiki exports to TeX and PDF, even when pdflatex is available.'
|
||||
) { |OPTIONS[:notex]| }
|
||||
opts.on('-v', '--verbose',
|
||||
'Enables debug-level logging'
|
||||
) { OPTIONS[:verbose] = true }
|
||||
|
@ -66,6 +68,16 @@ INSTIKI_DEBUG_LOG = OPTIONS[:verbose]
|
|||
require File.expand_path(File.dirname(__FILE__) + '/../config/environment')
|
||||
WikiService.storage_path = storage_path
|
||||
|
||||
if OPTIONS[:notex]
|
||||
OPTIONS[:pdflatex] = false
|
||||
else
|
||||
begin
|
||||
OPTIONS[:pdflatex] = system "pdflatex -version"
|
||||
rescue Errno::ENOENT
|
||||
OPTIONS[:pdflatex] = false
|
||||
end
|
||||
end
|
||||
|
||||
if defined? INSTIKI_BATCH_JOB
|
||||
require 'application'
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue