From 1192f70f444b407089df13b3b1e6887cf690d13f Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Mon, 22 Dec 2008 12:19:18 -0600 Subject: [PATCH] @import In Published View In the Stylesheet Tweaks, the owner of a Web can specify an @import rule to pull in CSS styles form an external file. This worked in the "show" view, but was broken in the "published" view. Fixed. Also, update a functional test to match Revision 313. --- app/views/layouts/default.rhtml | 6 ++---- app/views/wiki/published.rhtml | 2 +- test/functional/admin_controller_test.rb | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml index c1a8489c..821a12f9 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.rhtml @@ -22,11 +22,9 @@ } <%= File.read(RAILS_ROOT + '/public/stylesheets/instiki.css') if @inline_style %> - <%= stylesheet_link_tag 'instiki' unless @inline_style %> - - + <%= javascript_include_tag :defaults %> diff --git a/app/views/wiki/published.rhtml b/app/views/wiki/published.rhtml index 6a904433..957dd325 100644 --- a/app/views/wiki/published.rhtml +++ b/app/views/wiki/published.rhtml @@ -2,7 +2,7 @@ @title = @page.plain_name @hide_navigation = false @style_additions = ".newWikiWord { background-color: white; font-style: italic; }" - @inline_style = true + @inline_style = false @show_footer = true -%> diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb index 7d74357d..7d483f03 100644 --- a/test/functional/admin_controller_test.rb +++ b/test/functional/admin_controller_test.rb @@ -97,7 +97,7 @@ class AdminControllerTest < Test::Unit::TestCase process 'create_web', 'system_password' => 'wrong', 'name' => 'Wiki Two', 'address' => 'wiki2' - assert_redirected_to :web => nil, :action => 'index' + assert_redirected_to :web => nil, :action => 'create_web' assert_nil @wiki.webs['wiki2'] end