views: convert helpers to partials.

This commit is contained in:
evazion
2020-01-11 20:01:14 -06:00
parent 153a8339ab
commit abacc8ebb1
12 changed files with 64 additions and 87 deletions

View File

@@ -0,0 +1,7 @@
<% if wiki_page.tag.present? && wiki_page.tag.post_count > 0 %>
<div id="wiki-page-posts">
<h2>Posts (<%= link_to "view all", posts_path(tags: wiki_page.title) %>)</h2>
<%= wiki_page.post_set.presenter.post_previews_html(self) %>
</div>
<% end %>

View File

@@ -19,8 +19,8 @@
<%= dtext_preview_button "wiki_page", "body" %>
<% end %>
<%= wiki_page_alias_and_implication_list(@wiki_page)%>
<%= wiki_page_post_previews(@wiki_page) %>
<%= render "tag_relationships/alias_and_implication_list", tag: @wiki_page.tag %>
<%= render "wiki_pages/posts", wiki_page: @wiki_page %>
<% end %>
<%= render "secondary_links" %>

View File

@@ -29,13 +29,13 @@
<p><%= link_to "View artist", @wiki_page.artist %></p>
<% end %>
<%= wiki_page_alias_and_implication_list(@wiki_page) %>
<%= render "tag_relationships/alias_and_implication_list", tag: @wiki_page.tag %>
<% else %>
<p>This artist has requested removal of their information.</p>
<% end %>
</div>
<%= wiki_page_post_previews(@wiki_page) %>
<%= render "wiki_pages/posts", wiki_page: @wiki_page %>
<% end %>
<% content_for(:page_title) do %>