From 8f3a4694c3b4677203ce8e9356444c24d7135031 Mon Sep 17 00:00:00 2001 From: Magnus Holm Date: Wed, 5 Aug 2009 15:51:16 +0200 Subject: [PATCH] Adding rel_prefix to the templates --- extras/rdoc/generator/singledarkfish.rb | 2 ++ extras/rdoc/generator/template/flipbook/page.rhtml | 12 ++++++------ extras/rdoc/generator/template/flipbook/readme.rhtml | 10 +++++----- .../rdoc/generator/template/flipbook/reference.rhtml | 10 +++++----- extras/rdoc/generator/template/flipbook/toc.rhtml | 8 ++++---- 5 files changed, 22 insertions(+), 20 deletions(-) diff --git a/extras/rdoc/generator/singledarkfish.rb b/extras/rdoc/generator/singledarkfish.rb index 047b731..2508730 100644 --- a/extras/rdoc/generator/singledarkfish.rb +++ b/extras/rdoc/generator/singledarkfish.rb @@ -148,6 +148,7 @@ def generate_book chapters.each do |file| templatefile = @template_dir + template(:page) outfile = @basedir + @options.op_dir + file.path + rel_prefix = @outputdir.relative_path_from(outfile.dirname) render_template(templatefile, binding, outfile) end end @@ -157,6 +158,7 @@ def generate_thing(name, to) templatefile = @template_dir + template(name) outfile = @basedir + @options.op_dir + to + rel_prefix = @outputdir.relative_path_from(outfile.dirname) FileUtils.mkdir_p(File.dirname(outfile)) render_template(templatefile, binding, outfile) diff --git a/extras/rdoc/generator/template/flipbook/page.rhtml b/extras/rdoc/generator/template/flipbook/page.rhtml index da1fe92..ed5e5a9 100644 --- a/extras/rdoc/generator/template/flipbook/page.rhtml +++ b/extras/rdoc/generator/template/flipbook/page.rhtml @@ -2,16 +2,16 @@ <%= h @options.title %> - - - + + +