/favorites: replace favorites view with ordfav: search.

Make /favorites redirect to a ordfav:<user> search instead of having a
separate view just for favorites. This duplicated a lot of code for no
good reason.
This commit is contained in:
evazion
2019-08-31 19:58:38 -05:00
parent 7f7730d249
commit b77eebf136
8 changed files with 19 additions and 249 deletions

View File

@@ -1,43 +0,0 @@
<div id="c-favorites">
<div id="a-index">
<aside id="sidebar">
<%= render "posts/partials/common/search", :path => favorites_path, :tags => @favorite_set.tag_string, :tags_dom_id => "tags" %>
<%= render "posts/partials/index/mode_menu" %>
<%= render "posts/partials/index/blacklist" %>
<section id="tag-box">
<h1>Tags</h1>
<%= @favorite_set.presenter.tag_list_html %>
</section>
<section id="related-box">
<h1>Related</h1>
<ul id="related-list">
<li><%= link_to "Deleted posts", posts_path(:tags => "#{@favorite_set.tag_string} status:deleted"), :rel => "nofollow" %></li>
<li><%= link_to "Random post", random_posts_path(:tags => @favorite_set.tag_string), :id => "random-post", :rel => "nofollow", :"data-shortcut" => "r" %></li>
</ul>
</section>
</aside>
<section id="content">
<h1>Favorites</h1>
<%= render "posts/partials/index/edit" %>
<div id="posts">
<%= @favorite_set.presenter.post_previews_html(self) %>
<%= sequential_paginator(@favorite_set.favorites) %>
</div>
</section>
</div>
</div>
<%= render "posts/partials/common/secondary_links" %>
<% content_for(:page_title) do %>
Favorites - <%= @user.pretty_name %> - <%= Danbooru.config.app_name %>
<% end %>