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,30 +1,26 @@
|
||||
<div id="c-wiki-pages">
|
||||
<div id="a-index">
|
||||
<%= render "sidebar" %>
|
||||
<%= render "sidebar" %>
|
||||
|
||||
<section id="content">
|
||||
<h1>Wiki</h1>
|
||||
<% content_for(:content) do %>
|
||||
<h1>Wiki</h1>
|
||||
|
||||
<table class="striped" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Last edited</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @wiki_pages.each do |wiki_page| %>
|
||||
<tr>
|
||||
<td class="category-<%= wiki_page.category_name %>"><%= link_to wiki_page.pretty_title, wiki_page_path(wiki_page, :noredirect => 1) %></td>
|
||||
<td><%= wiki_page.updated_at.strftime("%Y-%m-%d %H:%M") %> by <%= h link_to_user wiki_page.updater %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="striped" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Last edited</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @wiki_pages.each do |wiki_page| %>
|
||||
<tr>
|
||||
<td class="category-<%= wiki_page.category_name %>"><%= link_to wiki_page.pretty_title, wiki_page_path(wiki_page, :noredirect => 1) %></td>
|
||||
<td><%= wiki_page.updated_at.strftime("%Y-%m-%d %H:%M") %> by <%= h link_to_user wiki_page.updater %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= numbered_paginator(@wiki_pages) %>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<%= numbered_paginator(@wiki_pages) %>
|
||||
<% end %>
|
||||
|
||||
<%= render "secondary_links" %>
|
||||
|
||||
Reference in New Issue
Block a user