From 23e9c6beb2538db774c65dfc285f5ef3ce0ca877 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Sun, 11 Oct 2009 09:49:01 -0500 Subject: [PATCH] Use AssetTagHelpers in S5 Template Otherwise S5 breaks when Instiki is deployed to a non-root URL (e.g., by setting RailsBaseURI in Passenger). Also a stylistic tweak in lib/node.rb --- app/views/wiki/s5.rhtml | 14 +++++++------- lib/node.rb | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/wiki/s5.rhtml b/app/views/wiki/s5.rhtml index eaf894d0..4c7fd42e 100644 --- a/app/views/wiki/s5.rhtml +++ b/app/views/wiki/s5.rhtml @@ -13,15 +13,15 @@ - - - - - +<%= stylesheet_link_tag "/s5/ui/core/outline.css", :media => 'screen', :id => 'outlineStyle' %> +<%= stylesheet_link_tag "/s5/ui/core/print.css", :media => 'print', :id => 'slidePrint' %> +<%= stylesheet_link_tag "/s5/ui/core/opera.css", :media => 'projection', :id => 'operaFix' %> +<%= stylesheet_link_tag "/s5/ui/core/math.css", :media => 'all', :id => 'mathStyle' %> +<%= stylesheet_link_tag "/s5/themes/#{@s5_theme}/slides.css", :media => 'projection', :id => 'slideProj' %> - - +<%= javascript_include_tag "/s5/ui/core/slides.js" %> +<%= javascript_include_tag 'prototype' %> diff --git a/lib/node.rb b/lib/node.rb index 6b5260e6..66ed0575 100644 --- a/lib/node.rb +++ b/lib/node.rb @@ -308,7 +308,7 @@ module XHTML #:nodoc: # Returns non-+nil+ if this tag can contain child nodes. def childless?(xml = false) - return false if xml && @closing.nil? + return false if xml && @closing.nil? # !@closing.nil? || @name =~ /^(img|br|hr|link|meta|area|base|basefont| col|frame|input|isindex|param)$/ox @@ -327,7 +327,7 @@ module XHTML #:nodoc: s << "/" if (@children.empty? && @closing == :self) or self.childless? s << ">" @children.each { |child| s << child.to_s } - s << "" if @closing != :self && !@closing.nil? && !@children.empty? + s << "" unless @closing == :self or self.childless? or @children.empty? s.join end end