views: factor out sidebar layout template.
* Factor out common sidebar layout template. * Convert wiki pages and posts to use this template. * Add data-layout attribute to <body> element indicating the current layout.
This commit is contained in:
@@ -1,25 +1,21 @@
|
||||
<div id="c-wiki-pages">
|
||||
<div id="a-show">
|
||||
<%= render "sidebar" %>
|
||||
<%= render "sidebar" %>
|
||||
|
||||
<section id="content">
|
||||
<h1 id="wiki-page-title">
|
||||
<%= link_to @wiki_page.pretty_title, posts_path(:tags => @wiki_page.title), :class => "tag-type-#{@wiki_page.category_name}" %>
|
||||
</h1>
|
||||
<div id="wiki-page-body" class="prose">
|
||||
<p>This wiki page does not exist. <%= link_to "Create new wiki page", new_wiki_page_path(:wiki_page => {:title => params[:title]}) %>.</p>
|
||||
</div>
|
||||
|
||||
<% if @wiki_page.artist.present? %>
|
||||
<p><%= link_to "View artist", @wiki_page.artist %></p>
|
||||
<% end %>
|
||||
|
||||
<%= wiki_page_alias_and_implication_list(@wiki_page)%>
|
||||
|
||||
<%= wiki_page_post_previews(@wiki_page) %>
|
||||
</section>
|
||||
<% content_for(:content) do %>
|
||||
<h1 id="wiki-page-title">
|
||||
<%= link_to @wiki_page.pretty_title, posts_path(:tags => @wiki_page.title), :class => "tag-type-#{@wiki_page.category_name}" %>
|
||||
</h1>
|
||||
<div id="wiki-page-body" class="prose">
|
||||
<p>This wiki page does not exist. <%= link_to "Create new wiki page", new_wiki_page_path(:wiki_page => {:title => params[:title]}) %>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if @wiki_page.artist.present? %>
|
||||
<p><%= link_to "View artist", @wiki_page.artist %></p>
|
||||
<% end %>
|
||||
|
||||
<%= wiki_page_alias_and_implication_list(@wiki_page)%>
|
||||
|
||||
<%= wiki_page_post_previews(@wiki_page) %>
|
||||
<% end %>
|
||||
|
||||
<%= render "secondary_links" %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user