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

27 lines
1.2 KiB
Plaintext

<% simple ||= false -%>
<div class="hentry" id="article-<%= @page.id %>">
<h2 class="entry-title">
<%= @page.title %>
</h2>
<div class="vcard">
<% if @page.owner_type.nil? -%>Posted by <span class="fn"><%= @page.created_by.title rescue 'That other guy' -%></span><% end -%> Created: <%= @page.created_at -%>
</div>
<br class="clear" />
<div class="entry-content">
<%= replace_wiki_words(@page.html) %>
</div>
<% unless simple -%><ul class="meta">
<% if @page.tags.size > 0 -%><li>Tags: <%= @page.tags.collect { |t| t.name }.sort.join(' ') -%></li><% end -%>
<li>Version: <%= @page.version -%></li>
<% @page.owner.page_attributes.each do |x| -%>
<li><%= x -%></li>
<% end if !@page.owner_id.nil? and !@page.owner_type.nil? and @page.owner.respond_to?("page_attributes") %>
<% if @page.created_by != @page.updated_by -%><li>Last updated by: <%= @page.updated_by.title rescue 'That other other guy' -%></li><% end %>
</ul><% end -%>
</div>
<% content_for 'sidebar' do -%>
<% if @page.allow_discussions? or !@page.discussions.empty? -%>
<%= link_to "Discuss", discussion_path(@page.id) -%> (<%= @page.discussions.size -%>)<br />
<% end -%>
<% end -%>