This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
tuxbliki/app/views/pages/show.html.erb

10 lines
786 B
Plaintext

<% throw_content :for_sidebar do -%>
<% if allowed_to?(:edit_page, @page) -%><a href="<%= url(:edit_page, :id => @page.name.gsub(/ /, '_')) -%>" rel="nofollow"><img src="/images/document-save.png" /> Edit page</a><br /><% end -%>
<% if allowed_to?(:delete_page, @page) -%><a href="<%= url(:delete_page, :id => @page.name.gsub(/ /, '_')) -%>" onclick="if(!confirm('Are you sure you want to delete this page?')){return false;}" rel="nofollow"><img src="/images/edit-delete.png" /> Destroy page</a><br /><% end -%>
<a href="<%= url(:controller => 'comments', :action => 'new', :page_id => @page.name.gsub(/ /, '_')) -%>" rel="nofollow"><img src="/images/mail-message-new.png" /> Post a comment</a><br />
<% end -%>
<%= partial :page, :with => [ @page ] %>
<%= partial :comments %>