S5 views are now visible on a published Web.

Another improvement from Jason Blevins.
This commit is contained in:
Jacques Distler 2007-03-10 18:56:33 -06:00
commit 234d5d82f0
3 changed files with 19 additions and 2 deletions

View file

@ -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

View file

@ -23,6 +23,6 @@ end
onblur="this.value == '' ? this.value = 'Search' : true" /></fieldset>
<%= 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%>
</div>

View file

@ -7,3 +7,19 @@
%>
<%= @renderer.display_published %>
<div class="byline">
<%= @page.revisions? ? "Revised" : "Created" %> on <%= format_date(@page.revised_at) %>
by
<%= author_link(@page, { :mode => (@link_mode || :show) }) %>
</div>
<div class="navigation">
<span class="views">
<% if WikiReference.pages_in_category(@web, 'S5-slideshow').map.include?(@page.name) %>
Views:
<%= link_to 'S5', {:web => @web.address, :action => 's5',
:id => @page.name}, {:id => 'view_S5'} %>
<% end %>
</span>
</div>