views: convert helpers to partials.
This commit is contained in:
7
app/views/wiki_pages/_posts.html.erb
Normal file
7
app/views/wiki_pages/_posts.html.erb
Normal 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 %>
|
||||
@@ -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" %>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
Reference in New Issue
Block a user