enhance show or new wpages; move wpage preview code to helper

This commit is contained in:
Toks
2013-05-11 08:31:03 -04:00
parent 189544f66f
commit f972ee53c0
5 changed files with 25 additions and 14 deletions

View File

@@ -15,12 +15,7 @@
<%= wiki_page_alias_and_implication_list(@wiki_page)%>
<div id="wiki-page-posts">
<% if Post.fast_count(@wiki_page.title) > 0 %>
<h2>Posts</h2>
<% end %>
<%= @wiki_page.post_set.presenter.post_previews_html(self) %>
</div>
<%= wiki_page_post_previews(@wiki_page) %>
<div class="clearfix"></div>

View File

@@ -18,12 +18,7 @@
<%= wiki_page_alias_and_implication_list(@wiki_page) %>
</div>
<div id="wiki-page-posts">
<% if Post.fast_count(@wiki_page.title) > 0 %>
<h2>Posts</h2>
<% end %>
<%= @wiki_page.post_set.presenter.post_previews_html(self) %>
</div>
<%= wiki_page_post_previews(@wiki_page) %>
</section>
</div>
</div>

View File

@@ -7,12 +7,17 @@
<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>
<%= wiki_page_alias_and_implication_list(@wiki_page)%>
<%= wiki_page_post_previews(@wiki_page) %>
</section>
</div>
</div>
<%= render "secondary_links" %>
<% content_for(:page_title) do %>
Wiki - <%= params[:title] %> - <%= Danbooru.config.app_name %>
<% end %>
<%= render "secondary_links" %>