Fixed links on wiki/export page

This commit is contained in:
Alexey Verkhovsky 2005-04-03 07:52:01 +00:00
parent 6f8b5b44d3
commit e9c4948d0a
2 changed files with 17 additions and 5 deletions

View file

@ -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> <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"> <ul id="feedsList">
<li><a href="../export_html">HTML</a> <li><%= link_to 'HTML', :web => @web.address, :action => 'export_html' %></li>
<li><a href="../export_markup">Markup (<%= @web.markup %>)</a> <li><%= link_to "Markup (#{@web.markup.to_s.capitalize})", :web => @web.address, :action => 'export_markup' %></li>
<% if OPTIONS[:pdflatex] && @web.markup == :textile %> <% if OPTIONS[:pdflatex] && @web.markup == :textile %>
<li><a href="../export_tex">TeX</a> <li><%= link_to 'TeX', :web => @web.address, :action => 'export_tex' %></li>
<li><a href="../export_pdf">PDF</a> <li><%= link_to 'PDF', :web => @web.address, :action => 'export_pdf' %></li>
<% end %> <% end %>
</ul> </ul>

View file

@ -7,7 +7,6 @@ require 'fileutils'
pwd = File.expand_path(File.dirname(__FILE__) + "/..") pwd = File.expand_path(File.dirname(__FILE__) + "/..")
OPTIONS = { OPTIONS = {
# Overridable options # Overridable options
:port => 2500, :port => 2500,
:ip => '0.0.0.0', :ip => '0.0.0.0',
@ -42,6 +41,9 @@ ARGV.options do |opts|
opts.on('-t', '--storage=storage', String, opts.on('-t', '--storage=storage', String,
'Makes Instiki use the specified directory for storage.', 'Makes Instiki use the specified directory for storage.',
'Default: ./storage/[port]') { |OPTIONS[: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', opts.on('-v', '--verbose',
'Enables debug-level logging' 'Enables debug-level logging'
) { OPTIONS[:verbose] = true } ) { OPTIONS[:verbose] = true }
@ -66,6 +68,16 @@ INSTIKI_DEBUG_LOG = OPTIONS[:verbose]
require File.expand_path(File.dirname(__FILE__) + '/../config/environment') require File.expand_path(File.dirname(__FILE__) + '/../config/environment')
WikiService.storage_path = storage_path 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 if defined? INSTIKI_BATCH_JOB
require 'application' require 'application'
else else