From e2b93c9e298ffa045764f8a8cd78cd3f29927402 Mon Sep 17 00:00:00 2001 From: "Jason R. Blevins" Date: Sat, 10 Mar 2007 18:03:40 -0500 Subject: [PATCH] Made S5 view publically viewable for published webs. Added an S5 view link to the bottom of the published view page. --- app/controllers/application.rb | 3 ++- app/views/navigation.rhtml | 2 +- app/views/wiki/published.rhtml | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/app/controllers/application.rb b/app/controllers/application.rb index c45f8d00..d2e2c843 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -190,7 +190,8 @@ class ApplicationController < ActionController::Base @web.nil? or @web.password.nil? or cookies[CGI.escape(@web_name)] == @web.password or - password_check(@params['password']) + password_check(@params['password']) or + (@web.published? and action_name == 's5') end end diff --git a/app/views/navigation.rhtml b/app/views/navigation.rhtml index afad662c..c7b9b6c6 100644 --- a/app/views/navigation.rhtml +++ b/app/views/navigation.rhtml @@ -23,6 +23,6 @@ end onblur="this.value == '' ? this.value = 'Search' : true" /> <%= end_form_tag %> <% else %> - <%= list_item 'Home Page', {:action => 'published', :id => 'HomePage'}, 'Home, Sweet Home', 'H' %> | + <%= list_item 'Home Page', {:action => 'published', :id => 'HomePage'}, 'Home, Sweet Home', 'H' %> <% end%> diff --git a/app/views/wiki/published.rhtml b/app/views/wiki/published.rhtml index b394583c..6a8f6a4e 100644 --- a/app/views/wiki/published.rhtml +++ b/app/views/wiki/published.rhtml @@ -7,3 +7,19 @@ %> <%= @renderer.display_published %> + +
+ <%= @page.revisions? ? "Revised" : "Created" %> on <%= format_date(@page.revised_at) %> + by + <%= author_link(@page, { :mode => (@link_mode || :show) }) %> +
+ +