Made S5 view publically viewable for published webs.
Added an S5 view link to the bottom of the published view page.
This commit is contained in:
parent
12743280fb
commit
e2b93c9e29
|
@ -190,7 +190,8 @@ class ApplicationController < ActionController::Base
|
||||||
@web.nil? or
|
@web.nil? or
|
||||||
@web.password.nil? or
|
@web.password.nil? or
|
||||||
cookies[CGI.escape(@web_name)] == @web.password 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
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,6 +23,6 @@ end
|
||||||
onblur="this.value == '' ? this.value = 'Search' : true" /></fieldset>
|
onblur="this.value == '' ? this.value = 'Search' : true" /></fieldset>
|
||||||
<%= end_form_tag %>
|
<%= end_form_tag %>
|
||||||
<% else %>
|
<% 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%>
|
<% end%>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,3 +7,19 @@
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<%= @renderer.display_published %>
|
<%= @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>
|
||||||
|
|
Loading…
Reference in a new issue