deprecate tag subscriptions with warnings

This commit is contained in:
r888888888
2017-04-14 16:00:20 -07:00
parent 8b38e4d39a
commit 97da8f8647
16 changed files with 22 additions and 147 deletions

View File

@@ -3,10 +3,6 @@
<ul id="related-list">
<li><%= link_to "Deleted posts", posts_path(:tags => "#{params[:tags]} status:deleted"), :rel => "nofollow" %></li>
<% if @post_set.is_tag_subscription? %>
<li><%= link_to "Manage subscriptions", tag_subscriptions_path %></li>
<% end %>
<li><%= link_to "Random post", random_posts_path(:tags => params[:tags]), :id => "random-post", :rel => "nofollow" %></li>
<li><%= link_to "Mobile version", mobile_posts_path(:tags => params[:tags]) %></li>

View File

@@ -1,9 +1,6 @@
<% content_for(:secondary_links) do %>
<menu>
<li><%= link_to "Listing", tag_subscriptions_path %></li>
<% if CurrentUser.is_member? %>
<li><%= link_to "New", new_tag_subscription_path %></li>
<% end %>
<li><%= link_to "Help", wiki_pages_path(:title => "help:tag_subscriptions") %></li>
<% if @tag_subscription && !@tag_subscription.new_record? && @tag_subscription.editable_by?(CurrentUser.user) %>

View File

@@ -1,6 +1,9 @@
<div id="c-tag-subscriptions">
<div id="a-index">
<h1>Tag Subscriptions</h1>
<p class="info">The tag subscription feature is being deprecated. You can move your current tag subscriptions to saved searches by clicking the "migrate" link below.</p>
<table class="striped" width="100%">
<thead>
<tr>
@@ -17,17 +20,13 @@
<td><%= tag_subscription.pretty_tag_query %></td>
<td><%= tag_subscription.post_id_array.size %></td>
<td>
<%= link_to "edit", edit_tag_subscription_path(tag_subscription) %>
| <%= link_to "delete", tag_subscription_path(tag_subscription), :method => :delete, :data => {:confirm => "Are you sure you want to delete this subscription?"} %>
| <%= link_to "posts", posts_path(:tags => "sub:#{tag_subscription.creator.name}:#{tag_subscription.name}"), :rel => "nofollow" %>
<%= link_to "delete", tag_subscription_path(tag_subscription), :method => :delete, :data => {:confirm => "Are you sure you want to delete this subscription?"} %>
| <%= link_to "migrate", migrate_tag_subscription_path(tag_subscription), :method => :post %>
</td>
</tr>
<% end %>
</tbody>
</table>
<p class="info">You can create up to <%= Danbooru.config.max_tag_subscriptions %> subscriptions with up to 20 queries each.</p>
</div>
</div>

View File

@@ -2,9 +2,11 @@
<div id="a-new">
<h1>New Tag Subscription</h1>
<%= error_messages_for "tag_subscription" %>
<p class="info">This feature is disabled.</p>
<%= render "form" %>
<%#= error_messages_for "tag_subscription" %>
<%#= render "form" %>
</div>
</div>

View File

@@ -1,24 +0,0 @@
<div id="c-tag-subscriptions">
<div id="a-posts">
<aside id="sidebar">
<%= render "posts/partials/common/search", :path => posts_tag_subscription_path, :tags => @post_set.tag_string, :tags_dom_id => "tags" %>
<%= render "posts/partials/index/mode_menu" %>
<%= render "posts/partials/index/blacklist" %>
</aside>
<section id="content">
<h1>Tag Subscriptions [<%= link_to "edit", tag_subscriptions_path %>]</h1>
<%= @post_set.presenter.post_previews_html(self) %>
<%= numbered_paginator(@posts) %>
</section>
<%= render "posts/partials/common/secondary_links" %>
</div>
</div>
<% content_for(:page_title) do %>
Tag Subscriptions - <%= @user.name %> - <%= Danbooru.config.app_name %>
<% end %>

View File

@@ -12,9 +12,6 @@
<li>|</li>
<% if @user.id == CurrentUser.user.id %>
<li><%= link_to "Settings", edit_user_path(CurrentUser.user) %></li>
<% if @user.is_gold? %>
<li><%= link_to "Edit subscriptions", tag_subscriptions_path %></li>
<% end %>
<li><%= link_to "Profile", user_path(CurrentUser.user) %></li>
<li><%= link_to "Messages #{CurrentUser.user.dmail_count}", dmails_current_folder_path %></li>

View File

@@ -150,13 +150,7 @@
<tr>
<th>Subscriptions</th>
<td>
<% presenter.subscriptions.each do |subscription| %>
<p>
<strong><%= link_to subscription.pretty_name, posts_path(:tags => "sub:#{user.name}:#{subscription.name}") %></strong>
&ndash;
<%= presenter.tag_links_for_subscription(self, subscription) %>
</p>
<% end %>
<em>This feature has been disabled. <%= link_to "Migrate your tag subscriptions to saved searches", tag_subscriptions_path %>.</em>
</td>
</tr>