Fix #5179: Add wiki page versions to wiki page secondary links plus standardization
* Call it "Changes" when referring to the global list of changes (pool changes, artist changes, etc). * Call it "History" when referring to the history of a single item (pool history, artist history, etc). * Put the artist history search form on the /artist_versions page, and remove the /artist_versions/search endpoint.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<%= quick_search_form_for(:text_matches, artist_commentaries_path, "commentaries") %>
|
||||
<%= subnav_link_to "Listing", artist_commentaries_path %>
|
||||
<%= subnav_link_to "Recent changes", artist_commentary_versions_path %>
|
||||
<%= subnav_link_to "Commentaries", artist_commentaries_path %>
|
||||
<%= subnav_link_to "Changes", artist_commentary_versions_path %>
|
||||
<%= subnav_link_to "Translation requests", artist_commentaries_path(:search => {:post_tags_match => "commentary_request"}) %>
|
||||
<%= subnav_link_to "Help", wiki_page_path("help:artist_commentary") %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<div id="p-<%= listing_type(:artist_id) %>-listing">
|
||||
<%= search_form_for(artist_versions_path) do |f| %>
|
||||
<%= f.input :updater_name, label: "Updater", input_html: { value: params.dig(:search, :updater_name), "data-autocomplete": "user" } %>
|
||||
<%= f.input :name, label: "Artist", input_html: { value: params.dig(:search, :name), "data-autocomplete": "artist" } %>
|
||||
<%= f.submit "Search" %>
|
||||
<% end %>
|
||||
|
||||
<div id="p-<%= listing_type(:artist_id) %>-listing">
|
||||
<%= table_for @artist_versions, class: "striped autofit", width: "100%" do |t| %>
|
||||
<% t.column "Name", td: {class: "diff-body"} do |artist_version| %>
|
||||
<%= link_to artist_version.name, artist_path(artist_version.artist_id) %>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<%= subnav_link_to "Listing", artists_path %>
|
||||
<%= subnav_link_to "New", new_artist_path %>
|
||||
<%= subnav_link_to "Search", search_artist_versions_path %>
|
||||
<% end %>
|
||||
@@ -11,4 +11,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "secondary_links" %>
|
||||
<%= render "artists/secondary_links" %>
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<%= quick_search_form_for(:any_name_or_url_matches, artists_path, "artists", autocomplete: "artist", redirect: true) %>
|
||||
<%= subnav_link_to "Listing", artists_path %>
|
||||
<%= subnav_link_to "Banned", artists_path(search: { is_banned: "true", order: "updated_at" }) %>
|
||||
<%= subnav_link_to "Artists", artists_path %>
|
||||
<% if policy(Artist).create? %>
|
||||
<%= subnav_link_to "New", new_artist_path %>
|
||||
<% end %>
|
||||
<%= subnav_link_to "Recent changes", artist_versions_path %>
|
||||
<%= subnav_link_to "Banned", artists_path(search: { is_banned: "true", order: "updated_at" }) %>
|
||||
<%= subnav_link_to "Changes", artist_versions_path %>
|
||||
<%= subnav_link_to "URLs", artist_urls_path %>
|
||||
<% if @artist && !@artist.new_record? && (!@artist.is_banned? || policy(@artist).can_view_banned?) %>
|
||||
<li>|</li>
|
||||
<%= subnav_link_to "Posts (#{@artist.tag.try(:post_count).to_i})", posts_path(:tags => @artist.name) %>
|
||||
<%= subnav_link_to "Show", artist_path(@artist) %>
|
||||
<% if policy(@artist).update? %>
|
||||
<%= subnav_link_to "Edit", edit_artist_path(@artist), :"data-shortcut" => "e" %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<%= quick_search_form_for(:body_matches, comments_path, "comments") %>
|
||||
<%= subnav_link_to "Listing", comments_path(:group_by => "post") %>
|
||||
<%= subnav_link_to "Comments", comments_path %>
|
||||
<%= subnav_link_to "Search", comments_path(group_by: "comment") %>
|
||||
<% if policy(CommentVote).can_see_votes? %>
|
||||
<%= subnav_link_to "Votes", comment_votes_path %>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<%= quick_search_form_for(:body_matches, notes_path, "notes") %>
|
||||
<%= subnav_link_to "Listing", notes_path %>
|
||||
<%= subnav_link_to "Notes", notes_path %>
|
||||
<%= subnav_link_to "Posts", posts_path(:tags => "order:note") %>
|
||||
<%= subnav_link_to "History", note_versions_path %>
|
||||
<%= subnav_link_to "Changes", note_versions_path %>
|
||||
<%= subnav_link_to "Requests", posts_path(:tags => "translation_request") %>
|
||||
<%= subnav_link_to "Help", wiki_page_path("help:notes") %>
|
||||
<% end %>
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
<%= subnav_link_to "New", new_pool_path %>
|
||||
<% end %>
|
||||
<% if PoolVersion.enabled? %>
|
||||
<%= subnav_link_to "Recent changes", pool_versions_path %>
|
||||
<%= subnav_link_to "Changes", pool_versions_path %>
|
||||
<% end %>
|
||||
<%= subnav_link_to "Help", wiki_page_path("help:pools") %>
|
||||
<% if @pool && !@pool.new_record? %>
|
||||
<li>|</li>
|
||||
<%= subnav_link_to "Show", pool_path(@pool) %>
|
||||
<%= subnav_link_to "Posts", posts_path(:tags => "pool:#{@pool.id}") %>
|
||||
<% if policy(@pool).update? %>
|
||||
<%= subnav_link_to "Edit", edit_pool_path(@pool), "data-shortcut": "e" %>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<%= quick_search_form_for(:name_matches, tags_path, "tags", autocomplete: "tag") %>
|
||||
<%= subnav_link_to "Tags", tags_path %>
|
||||
<%= subnav_link_to "History", tag_versions_path %>
|
||||
<%= subnav_link_to "Changes", tag_versions_path %>
|
||||
<%= subnav_link_to("Aliases", tag_aliases_path) %>
|
||||
<%= subnav_link_to("Implications", tag_implications_path) %>
|
||||
<%= subnav_link_to "Request alias/implication", new_bulk_update_request_path %>
|
||||
@@ -13,5 +13,6 @@
|
||||
<li>|</li>
|
||||
<%= subnav_link_to "Posts (#{@tag.post_count})", posts_path(:tags => @tag.name) %>
|
||||
<%= subnav_link_to "Edit", edit_tag_path(@tag) %>
|
||||
<%= subnav_link_to "History", tag_versions_path(search: { tag_id: @tag.id }) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<% if policy(WikiPage).new? %>
|
||||
<%= subnav_link_to "New", new_wiki_page_path %>
|
||||
<% end %>
|
||||
<%= subnav_link_to "Changes", wiki_page_versions_path %>
|
||||
<%= subnav_link_to "Help", wiki_page_path("help:wiki") %>
|
||||
<% if @wiki_page && @wiki_page.new_record? && @wiki_page.try(:tag).present? %>
|
||||
<li>|</li>
|
||||
|
||||
@@ -67,11 +67,7 @@ Rails.application.routes.draw do
|
||||
end
|
||||
end
|
||||
resources :artist_urls, only: [:index]
|
||||
resources :artist_versions, :only => [:index, :show] do
|
||||
collection do
|
||||
get :search
|
||||
end
|
||||
end
|
||||
resources :artist_versions, only: [:index, :show]
|
||||
resources :bans
|
||||
resources :bulk_update_requests do
|
||||
member do
|
||||
|
||||
Reference in New Issue
Block a user