diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9be8afc1..134df0bf 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -44,9 +44,12 @@ module ApplicationHelper # Creates a hyperlink to a Wiki page, or to a "new page" form if the page doesn't exist yet def link_to_page(page_name, web = @web, text = nil, options = {}) raise 'Web not defined' if web.nil? - home_page_url = url_for :web => web.address, :action => 'show', :id => 'HomePage', :only_path => true - base_url = home_page_url.sub(%r-/show/HomePage/?$-, '') - web.make_link(page_name, text, options.merge(:base_url => base_url)) + web.make_link(page_name, text, options.merge(:base_url => "#{base_url}/#{web.address}")) + end + + def base_url + home_page_url = url_for :controller => 'admin', :action => 'create_system', :only_path => true + home_page_url.sub(%r-/create_system/?$-, '') end # Creates a menu of categories diff --git a/app/views/admin/edit_web.rhtml b/app/views/admin/edit_web.rhtml index 1affc010..558ef68a 100644 --- a/app/views/admin/edit_web.rhtml +++ b/app/views/admin/edit_web.rhtml @@ -135,5 +135,4 @@ TODO Enable these input elements again after release 0.10
<%= end_form_tag %> - - +<%= javascript_include_tag 'edit_web' %> diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml index 0dc5b2b0..eb1472aa 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.rhtml @@ -26,22 +26,16 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <%= File.read(RAILS_ROOT + '/public/stylesheets/instiki.css') if @inline_style %> - + <%= stylesheet_link_tag 'instiki' unless @inline_style %> - + <% if @web %> - - + <%= auto_discovery_link_tag(:rss, :controller => 'wiki', :web => @web.address, :action => 'rss_with_headlines') %> + <%= auto_discovery_link_tag(:rss, :controller => 'wiki', :web => @web.address, :action => 'rss_with_content') %> <% end %> diff --git a/public/javascripts/edit_web.js b/public/javascripts/edit_web.js index 01efc888..38b1ba49 100644 --- a/public/javascripts/edit_web.js +++ b/public/javascripts/edit_web.js @@ -50,3 +50,6 @@ function overrideAutocomplete() { }//loop thru input elements } } + +// This line is executed when the script is loaded +overrideAutocomplete();