From a5ef86bbe8c1d773b1e32d0fd9fd2c47bce239df Mon Sep 17 00:00:00 2001 From: evazion Date: Tue, 17 Sep 2019 00:28:41 -0500 Subject: [PATCH] views: add html ids for main menu and subnav menu. Also refactor secondary links to put the element in the default layout instead of in each _secondary_links partial. --- .../_secondary_links.html.erb | 14 ++-- .../artist_versions/_secondary_links.html.erb | 8 +- app/views/artists/_secondary_links.html.erb | 54 ++++++------- app/views/bans/_secondary_links.html.erb | 6 +- .../_secondary_links.html.erb | 6 +- app/views/comments/_secondary_links.html.erb | 10 +-- app/views/dmails/_secondary_links.html.erb | 22 +++-- .../favorite_groups/_secondary_links.html.erb | 32 ++++---- .../forum_topics/_secondary_links.html.erb | 80 +++++++++---------- app/views/ip_bans/_secondary_links.html.erb | 6 +- .../janitor_trials/_secondary_links.html.erb | 6 +- app/views/layouts/_main_links.html.erb | 2 +- app/views/layouts/default.html.erb | 8 +- .../news_updates/_secondary_links.html.erb | 6 +- app/views/notes/_secondary_links.html.erb | 16 ++-- app/views/pools/_secondary_links.html.erb | 50 ++++++------ .../post_versions/_secondary_links.html.erb | 12 ++- .../partials/common/_secondary_links.html.erb | 36 ++++----- .../saved_searches/_secondary_links.html.erb | 6 +- app/views/sessions/_secondary_links.html.erb | 8 +- .../tag_aliases/_secondary_links.html.erb | 12 ++- .../_secondary_links.html.erb | 12 ++- app/views/tags/_secondary_links.html.erb | 28 +++---- app/views/uploads/_secondary_links.html.erb | 12 ++- .../user_feedbacks/_secondary_links.html.erb | 22 +++-- .../_secondary_links.html.erb | 8 +- app/views/users/_secondary_links.html.erb | 64 +++++++-------- .../wiki_pages/_secondary_links.html.erb | 71 +++++++--------- 28 files changed, 277 insertions(+), 340 deletions(-) diff --git a/app/views/artist_commentaries/_secondary_links.html.erb b/app/views/artist_commentaries/_secondary_links.html.erb index 45b8a9ebf..5c4c6faa6 100644 --- a/app/views/artist_commentaries/_secondary_links.html.erb +++ b/app/views/artist_commentaries/_secondary_links.html.erb @@ -1,10 +1,8 @@ <% content_for(:secondary_links) do %> - - <%= quick_search_form_for(:text_matches, artist_commentaries_path, "commentaries") %> - <%= subnav_link_to "Search", search_artist_commentaries_path %> - <%= subnav_link_to "Listing", artist_commentaries_path %> - <%= subnav_link_to "Recent changes", artist_commentary_versions_path %> - <%= subnav_link_to "Translation requests", artist_commentaries_path(:search => {:post_tags_match => "commentary_request"}) %> - <%= subnav_link_to "Help", wiki_pages_path(:title => "help:artist_commentary") %> - + <%= quick_search_form_for(:text_matches, artist_commentaries_path, "commentaries") %> + <%= subnav_link_to "Search", search_artist_commentaries_path %> + <%= subnav_link_to "Listing", artist_commentaries_path %> + <%= subnav_link_to "Recent changes", artist_commentary_versions_path %> + <%= subnav_link_to "Translation requests", artist_commentaries_path(:search => {:post_tags_match => "commentary_request"}) %> + <%= subnav_link_to "Help", wiki_pages_path(:title => "help:artist_commentary") %> <% end %> diff --git a/app/views/artist_versions/_secondary_links.html.erb b/app/views/artist_versions/_secondary_links.html.erb index a56a64e7f..d49eb9149 100644 --- a/app/views/artist_versions/_secondary_links.html.erb +++ b/app/views/artist_versions/_secondary_links.html.erb @@ -1,7 +1,5 @@ <% 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 %> - + <%= subnav_link_to "Listing", artists_path %> + <%= subnav_link_to "New", new_artist_path %> + <%= subnav_link_to "Search", search_artist_versions_path %> <% end %> diff --git a/app/views/artists/_secondary_links.html.erb b/app/views/artists/_secondary_links.html.erb index 1dc49188b..ae820fa79 100644 --- a/app/views/artists/_secondary_links.html.erb +++ b/app/views/artists/_secondary_links.html.erb @@ -1,36 +1,34 @@ <% content_for(:secondary_links) do %> - - <%= quick_search_form_for(:any_name_or_url_matches, artists_path, "artists", autocomplete: "artist") %> - <%= subnav_link_to "Listing", artists_path %> - <%= subnav_link_to "Banned", banned_artists_path %> + <%= quick_search_form_for(:any_name_or_url_matches, artists_path, "artists", autocomplete: "artist") %> + <%= subnav_link_to "Listing", artists_path %> + <%= subnav_link_to "Banned", banned_artists_path %> + <% if CurrentUser.is_member? %> + <%= subnav_link_to "New", new_artist_path %> + <% end %> + <%= subnav_link_to "Recent changes", artist_versions_path %> + <%= subnav_link_to "URLs", artist_urls_path %> + <% if @artist && !@artist.new_record? %> +
  • |
  • + <%= subnav_link_to "Posts (#{@artist.tag.try(:post_count).to_i})", posts_path(:tags => @artist.name) %> + <%= subnav_link_to "Show", artist_path(@artist) %> <% if CurrentUser.is_member? %> - <%= subnav_link_to "New", new_artist_path %> + <%= subnav_link_to "Edit", edit_artist_path(@artist), :"data-shortcut" => "e" %> <% end %> - <%= subnav_link_to "Recent changes", artist_versions_path %> - <%= subnav_link_to "URLs", artist_urls_path %> - <% if @artist && !@artist.new_record? %> -
  • |
  • - <%= subnav_link_to "Posts (#{@artist.tag.try(:post_count).to_i})", posts_path(:tags => @artist.name) %> - <%= subnav_link_to "Show", artist_path(@artist) %> - <% if CurrentUser.is_member? %> - <%= subnav_link_to "Edit", edit_artist_path(@artist), :"data-shortcut" => "e" %> + <%= subnav_link_to "History", artist_versions_path(:search => {:artist_id => @artist.id}) %> + <% if @artist.deletable_by?(CurrentUser.user) %> + <% if @artist.is_active? %> + <%= subnav_link_to "Delete", artist_path(@artist), method: :delete, "data-shortcut": "shift+d", "data-confirm": "Are you sure you want to delete this artist?" %> + <% else %> + <%= subnav_link_to "Undelete", artist_path(@artist, format: "js"), method: :put, data: {confirm: "Are you sure you want to undelete this artist?", params: "artist[is_active]=true"}, remote: true %> <% end %> - <%= subnav_link_to "History", artist_versions_path(:search => {:artist_id => @artist.id}) %> - <% if @artist.deletable_by?(CurrentUser.user) %> - <% if @artist.is_active? %> - <%= subnav_link_to "Delete", artist_path(@artist), method: :delete, "data-shortcut": "shift+d", "data-confirm": "Are you sure you want to delete this artist?" %> - <% else %> - <%= subnav_link_to "Undelete", artist_path(@artist, format: "js"), method: :put, data: {confirm: "Are you sure you want to undelete this artist?", params: "artist[is_active]=true"}, remote: true %> - <% end %> - <% end %> - <% if CurrentUser.is_admin? %> - <% if @artist.is_banned? %> - <%= subnav_link_to "Unban", unban_artist_path(@artist), :method => :put, :data => {:confirm => "Are you sure you want to unban this artist?"} %> + <% end %> + <% if CurrentUser.is_admin? %> + <% if @artist.is_banned? %> + <%= subnav_link_to "Unban", unban_artist_path(@artist), :method => :put, :data => {:confirm => "Are you sure you want to unban this artist?"} %> - <% else %> - <%= subnav_link_to "Ban", ban_artist_path(@artist), :method => :put, :data => {:confirm => "Are you sure you want to ban this artist?"} %> - <% end %> + <% else %> + <%= subnav_link_to "Ban", ban_artist_path(@artist), :method => :put, :data => {:confirm => "Are you sure you want to ban this artist?"} %> <% end %> <% end %> -
    + <% end %> <% end %> diff --git a/app/views/bans/_secondary_links.html.erb b/app/views/bans/_secondary_links.html.erb index 3650d62af..679007f7a 100644 --- a/app/views/bans/_secondary_links.html.erb +++ b/app/views/bans/_secondary_links.html.erb @@ -1,6 +1,4 @@ <% content_for(:secondary_links) do %> - - <%= subnav_link_to "Listing", bans_path %> - <%= subnav_link_to "Ban", new_ban_path %> - + <%= subnav_link_to "Listing", bans_path %> + <%= subnav_link_to "Ban", new_ban_path %> <% end %> diff --git a/app/views/bulk_update_requests/_secondary_links.html.erb b/app/views/bulk_update_requests/_secondary_links.html.erb index 4df23561f..17c092482 100644 --- a/app/views/bulk_update_requests/_secondary_links.html.erb +++ b/app/views/bulk_update_requests/_secondary_links.html.erb @@ -1,6 +1,4 @@ <% content_for(:secondary_links) do %> - - <%= subnav_link_to "Listing", bulk_update_requests_path %> - <%= subnav_link_to "New", new_bulk_update_request_path %> - + <%= subnav_link_to "Listing", bulk_update_requests_path %> + <%= subnav_link_to "New", new_bulk_update_request_path %> <% end %> diff --git a/app/views/comments/_secondary_links.html.erb b/app/views/comments/_secondary_links.html.erb index 6aba38203..15c2e0281 100644 --- a/app/views/comments/_secondary_links.html.erb +++ b/app/views/comments/_secondary_links.html.erb @@ -1,8 +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 "Search", search_comments_path %> - <%= subnav_link_to "Help", wiki_pages_path(:title => "help:comments") %> - + <%= quick_search_form_for(:body_matches, comments_path, "comments") %> + <%= subnav_link_to "Listing", comments_path(:group_by => "post") %> + <%= subnav_link_to "Search", search_comments_path %> + <%= subnav_link_to "Help", wiki_pages_path(:title => "help:comments") %> <% end %> diff --git a/app/views/dmails/_secondary_links.html.erb b/app/views/dmails/_secondary_links.html.erb index 0ce8a8467..d18fca000 100644 --- a/app/views/dmails/_secondary_links.html.erb +++ b/app/views/dmails/_secondary_links.html.erb @@ -1,14 +1,12 @@ <% content_for(:secondary_links) do %> - - <%= quick_search_form_for(:message_matches, dmails_path, "dmails") %> - <%= subnav_link_to "All", all_dmails_path(set_default_folder: true) %> - <%= subnav_link_to "Received", received_dmails_path(set_default_folder: true) %> - <%= subnav_link_to "Sent", sent_dmails_path(set_default_folder: true) %> - <%= subnav_link_to "Spam", spam_dmails_path %> -
  • |
  • - <%= subnav_link_to "New", new_dmail_path %> - <%= subnav_link_to "Mark all as read", {:controller => "dmails", :action => "mark_all_as_read"}, :method => :post, :remote => true %> -
  • |
  • - <%= subnav_link_to "Help", wiki_pages_path(title: "help:dmail") %> -
    + <%= quick_search_form_for(:message_matches, dmails_path, "dmails") %> + <%= subnav_link_to "All", all_dmails_path(set_default_folder: true) %> + <%= subnav_link_to "Received", received_dmails_path(set_default_folder: true) %> + <%= subnav_link_to "Sent", sent_dmails_path(set_default_folder: true) %> + <%= subnav_link_to "Spam", spam_dmails_path %> +
  • |
  • + <%= subnav_link_to "New", new_dmail_path %> + <%= subnav_link_to "Mark all as read", {:controller => "dmails", :action => "mark_all_as_read"}, :method => :post, :remote => true %> +
  • |
  • + <%= subnav_link_to "Help", wiki_pages_path(title: "help:dmail") %> <% end %> diff --git a/app/views/favorite_groups/_secondary_links.html.erb b/app/views/favorite_groups/_secondary_links.html.erb index f3df55d68..d840809ba 100644 --- a/app/views/favorite_groups/_secondary_links.html.erb +++ b/app/views/favorite_groups/_secondary_links.html.erb @@ -1,22 +1,20 @@ <% content_for(:secondary_links) do %> - - <%= subnav_link_to "Listing", favorite_groups_path %> - <% if CurrentUser.is_member? %> - <%= subnav_link_to "New", new_favorite_group_path %> - <% end %> - <%= subnav_link_to "Help", wiki_pages_path(:title => "help:favorite_groups") %> + <%= subnav_link_to "Listing", favorite_groups_path %> + <% if CurrentUser.is_member? %> + <%= subnav_link_to "New", new_favorite_group_path %> + <% end %> + <%= subnav_link_to "Help", wiki_pages_path(:title => "help:favorite_groups") %> - <% if @favorite_group && !@favorite_group.new_record? %> -
  • |
  • - <%= subnav_link_to "Show", favorite_group_path(@favorite_group) %> - <%= subnav_link_to "Posts", posts_path(:tags => "favgroup:#{@favorite_group.id}") %> - <% if @favorite_group.editable_by?(CurrentUser.user) %> - <%= subnav_link_to "Edit", edit_favorite_group_path(@favorite_group) %> - <%= subnav_link_to "Delete", favorite_group_path(@favorite_group), :method => :delete, :data => {:confirm => "Are you sure you want to delete this favorite group?"} %> - <% if @favorite_group.post_count <= 100 %> - <%= subnav_link_to "Order", edit_favorite_group_order_path(@favorite_group) %> - <% end %> + <% if @favorite_group && !@favorite_group.new_record? %> +
  • |
  • + <%= subnav_link_to "Show", favorite_group_path(@favorite_group) %> + <%= subnav_link_to "Posts", posts_path(:tags => "favgroup:#{@favorite_group.id}") %> + <% if @favorite_group.editable_by?(CurrentUser.user) %> + <%= subnav_link_to "Edit", edit_favorite_group_path(@favorite_group) %> + <%= subnav_link_to "Delete", favorite_group_path(@favorite_group), :method => :delete, :data => {:confirm => "Are you sure you want to delete this favorite group?"} %> + <% if @favorite_group.post_count <= 100 %> + <%= subnav_link_to "Order", edit_favorite_group_order_path(@favorite_group) %> <% end %> <% end %> -
    + <% end %> <% end %> diff --git a/app/views/forum_topics/_secondary_links.html.erb b/app/views/forum_topics/_secondary_links.html.erb index 5416d9dfd..b466ca216 100644 --- a/app/views/forum_topics/_secondary_links.html.erb +++ b/app/views/forum_topics/_secondary_links.html.erb @@ -1,47 +1,45 @@ <% content_for(:secondary_links) do %> - - <%= quick_search_form_for(:body_matches, forum_posts_path, "forum posts") %> - <%= subnav_link_to "Listing", forum_topics_path %> - - <% if CurrentUser.is_member? %> - <%= subnav_link_to "New", new_forum_topic_path %> - <%= subnav_link_to "Request alias", new_tag_alias_request_path %> - <%= subnav_link_to "Request implication", new_tag_implication_request_path %> - <%= subnav_link_to "Request BUR", new_bulk_update_request_path %> - <%= subnav_link_to "Mark all as read", mark_all_as_read_forum_topics_path, :method => :post, :"data-shortcut" => "shift+r" %> + <%= quick_search_form_for(:body_matches, forum_posts_path, "forum posts") %> + <%= subnav_link_to "Listing", forum_topics_path %> + + <% if CurrentUser.is_member? %> + <%= subnav_link_to "New", new_forum_topic_path %> + <%= subnav_link_to "Request alias", new_tag_alias_request_path %> + <%= subnav_link_to "Request implication", new_tag_implication_request_path %> + <%= subnav_link_to "Request BUR", new_bulk_update_request_path %> + <%= subnav_link_to "Mark all as read", mark_all_as_read_forum_topics_path, :method => :post, :"data-shortcut" => "shift+r" %> + <% end %> + + <%= subnav_link_to "Search", search_forum_posts_path %> + <%= subnav_link_to "Help", wiki_pages_path(:title => "help:forum") %> + <% if CurrentUser.is_member? && @forum_topic && !@forum_topic.new_record? %> +
  • |
  • + <%= subnav_link_to "Reply", new_forum_post_path(:topic_id => @forum_topic.id) %> + <% if @forum_topic.user_subscription(CurrentUser.user) %> + <%= subnav_link_to "Unsubscribe", unsubscribe_forum_topic_path(@forum_topic), :method => :post %> + <% else %> + <%= subnav_link_to "Subscribe", subscribe_forum_topic_path(@forum_topic), :method => :post, :data => {:confirm => "Are you sure you want to receive email notifications for this forum topic?"} %> <% end %> - - <%= subnav_link_to "Search", search_forum_posts_path %> - <%= subnav_link_to "Help", wiki_pages_path(:title => "help:forum") %> - <% if CurrentUser.is_member? && @forum_topic && !@forum_topic.new_record? %> -
  • |
  • - <%= subnav_link_to "Reply", new_forum_post_path(:topic_id => @forum_topic.id) %> - <% if @forum_topic.user_subscription(CurrentUser.user) %> - <%= subnav_link_to "Unsubscribe", unsubscribe_forum_topic_path(@forum_topic), :method => :post %> - <% else %> - <%= subnav_link_to "Subscribe", subscribe_forum_topic_path(@forum_topic), :method => :post, :data => {:confirm => "Are you sure you want to receive email notifications for this forum topic?"} %> - <% end %> - <% if !@forum_topic.new_record? && @forum_topic.editable_by?(CurrentUser.user) %> - <%= subnav_link_to "Edit", edit_forum_topic_path(@forum_topic), "data-shortcut": "e" %> - <% if CurrentUser.is_moderator? %> - <% if @forum_topic.is_deleted? %> - <%= subnav_link_to "Undelete", undelete_forum_topic_path(@forum_topic), :method => :post %> - <% else %> - <%= subnav_link_to "Delete", forum_topic_path(@forum_topic), :method => :delete, :"data-shortcut" => "shift+d", :"data-confirm" => "Are you sure you want to delete this forum topic?" %> - <% end %> - <% if @forum_topic.is_locked? %> - <%= subnav_link_to "Unlock", forum_topic_path(@forum_topic, :forum_topic => {:is_locked => false}), :method => :put %> - <% else %> - <%= subnav_link_to "Lock", forum_topic_path(@forum_topic, :forum_topic => {:is_locked => true}), :method => :put, :data => {:confirm => "Are you sure you want to lock this forum topic?"} %> - <% end %> - <% if @forum_topic.is_sticky? %> - <%= subnav_link_to "Unsticky", forum_topic_path(@forum_topic, :forum_topic => {:is_sticky => false}), :method => :put %> - <% else %> - <%= subnav_link_to "Sticky", forum_topic_path(@forum_topic, :forum_topic => {:is_sticky => true}), :method => :put, :data => {:confirm => "Are you sure you want to sticky this forum topic?"} %> - <% end %> - <%= subnav_link_to "Merge", new_merge_forum_topic_path(@forum_topic) %> + <% if !@forum_topic.new_record? && @forum_topic.editable_by?(CurrentUser.user) %> + <%= subnav_link_to "Edit", edit_forum_topic_path(@forum_topic), "data-shortcut": "e" %> + <% if CurrentUser.is_moderator? %> + <% if @forum_topic.is_deleted? %> + <%= subnav_link_to "Undelete", undelete_forum_topic_path(@forum_topic), :method => :post %> + <% else %> + <%= subnav_link_to "Delete", forum_topic_path(@forum_topic), :method => :delete, :"data-shortcut" => "shift+d", :"data-confirm" => "Are you sure you want to delete this forum topic?" %> <% end %> + <% if @forum_topic.is_locked? %> + <%= subnav_link_to "Unlock", forum_topic_path(@forum_topic, :forum_topic => {:is_locked => false}), :method => :put %> + <% else %> + <%= subnav_link_to "Lock", forum_topic_path(@forum_topic, :forum_topic => {:is_locked => true}), :method => :put, :data => {:confirm => "Are you sure you want to lock this forum topic?"} %> + <% end %> + <% if @forum_topic.is_sticky? %> + <%= subnav_link_to "Unsticky", forum_topic_path(@forum_topic, :forum_topic => {:is_sticky => false}), :method => :put %> + <% else %> + <%= subnav_link_to "Sticky", forum_topic_path(@forum_topic, :forum_topic => {:is_sticky => true}), :method => :put, :data => {:confirm => "Are you sure you want to sticky this forum topic?"} %> + <% end %> + <%= subnav_link_to "Merge", new_merge_forum_topic_path(@forum_topic) %> <% end %> <% end %> -
    + <% end %> <% end %> diff --git a/app/views/ip_bans/_secondary_links.html.erb b/app/views/ip_bans/_secondary_links.html.erb index 4548ebfb3..f5375e834 100644 --- a/app/views/ip_bans/_secondary_links.html.erb +++ b/app/views/ip_bans/_secondary_links.html.erb @@ -1,6 +1,4 @@ <% content_for(:secondary_links) do %> - - <%= subnav_link_to "Listing", ip_bans_path %> - <%= subnav_link_to "New", new_ip_ban_path %> - + <%= subnav_link_to "Listing", ip_bans_path %> + <%= subnav_link_to "New", new_ip_ban_path %> <% end %> diff --git a/app/views/janitor_trials/_secondary_links.html.erb b/app/views/janitor_trials/_secondary_links.html.erb index a8e405926..e42fa5d95 100644 --- a/app/views/janitor_trials/_secondary_links.html.erb +++ b/app/views/janitor_trials/_secondary_links.html.erb @@ -1,6 +1,4 @@ <% content_for(:secondary_links) do %> - - <%= subnav_link_to "Listing", janitor_trials_path %> - <%= subnav_link_to "New", new_janitor_trial_path %> - + <%= subnav_link_to "Listing", janitor_trials_path %> + <%= subnav_link_to "New", new_janitor_trial_path %> <% end %> diff --git a/app/views/layouts/_main_links.html.erb b/app/views/layouts/_main_links.html.erb index 3d3933c00..2cde12760 100644 --- a/app/views/layouts/_main_links.html.erb +++ b/app/views/layouts/_main_links.html.erb @@ -1,4 +1,4 @@ - + <% if CurrentUser.is_anonymous? %> <%= nav_link_to("Sign in", new_session_path) %> <% else %> diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb index ac3d530c9..5437b03a7 100644 --- a/app/views/layouts/default.html.erb +++ b/app/views/layouts/default.html.erb @@ -101,7 +101,7 @@ <%= render "news_updates/listing" %>
    -

    <%= link_to Danbooru.config.app_name, "/" %>

    +

    <%= link_to Danbooru.config.app_name, "/" %>

    @@ -110,7 +110,11 @@
    diff --git a/app/views/news_updates/_secondary_links.html.erb b/app/views/news_updates/_secondary_links.html.erb index d9b8c75e1..798db0c5b 100644 --- a/app/views/news_updates/_secondary_links.html.erb +++ b/app/views/news_updates/_secondary_links.html.erb @@ -1,6 +1,4 @@ <% content_for(:secondary_links) do %> - - <%= subnav_link_to "Listing", news_updates_path %> - <%= subnav_link_to "New", new_news_update_path %> - + <%= subnav_link_to "Listing", news_updates_path %> + <%= subnav_link_to "New", new_news_update_path %> <% end %> diff --git a/app/views/notes/_secondary_links.html.erb b/app/views/notes/_secondary_links.html.erb index 84d768677..e091d2e7d 100644 --- a/app/views/notes/_secondary_links.html.erb +++ b/app/views/notes/_secondary_links.html.erb @@ -1,11 +1,9 @@ <% content_for(:secondary_links) do %> - - <%= quick_search_form_for(:body_matches, notes_path, "notes") %> - <%= subnav_link_to "Listing", notes_path %> - <%= subnav_link_to "Posts", posts_path(:tags => "order:note") %> - <%= subnav_link_to "Search", search_notes_path %> - <%= subnav_link_to "History", note_versions_path %> - <%= subnav_link_to "Requests", posts_path(:tags => "translation_request") %> - <%= subnav_link_to "Help", wiki_pages_path(:title => "help:notes") %> - + <%= quick_search_form_for(:body_matches, notes_path, "notes") %> + <%= subnav_link_to "Listing", notes_path %> + <%= subnav_link_to "Posts", posts_path(:tags => "order:note") %> + <%= subnav_link_to "Search", search_notes_path %> + <%= subnav_link_to "History", note_versions_path %> + <%= subnav_link_to "Requests", posts_path(:tags => "translation_request") %> + <%= subnav_link_to "Help", wiki_pages_path(:title => "help:notes") %> <% end %> diff --git a/app/views/pools/_secondary_links.html.erb b/app/views/pools/_secondary_links.html.erb index cd9f49bdd..2ac2dee3e 100644 --- a/app/views/pools/_secondary_links.html.erb +++ b/app/views/pools/_secondary_links.html.erb @@ -1,30 +1,28 @@ <% content_for(:secondary_links) do %> - - <%= quick_search_form_for(:name_matches, pools_path, "pools", autocomplete: "pool") %> - <%= subnav_link_to "Gallery", gallery_pools_path %> - <%= subnav_link_to "Listing", pools_path %> - <%= subnav_link_to "New", new_pool_path %> - <%= subnav_link_to "Help", wiki_pages_path(:search => {:title => "help:pools"}) %> - <% if @pool && !@pool.new_record? %> -
  • |
  • - <%= subnav_link_to "Show", pool_path(@pool) %> - <%= subnav_link_to "Posts", posts_path(:tags => "pool:#{@pool.id}") %> - <% if CurrentUser.is_member? %> - <%= subnav_link_to "Edit", edit_pool_path(@pool), "data-shortcut": "e" %> - <% end %> - <% if @pool.deletable_by?(CurrentUser.user) %> - <% if @pool.is_deleted? %> - <%= subnav_link_to "Undelete", undelete_pool_path(@pool), :method => :post, :remote => true %> - <% else %> - <%= subnav_link_to "Delete", pool_path(@pool), :method => :delete, :"data-shortcut" => "shift+d", :"data-confirm" => "Are you sure you want to delete this pool?", :remote => true %> - <% end %> - <% end %> - <% if PoolArchive.enabled? %> - <%= subnav_link_to "History", pool_versions_path(:search => {:pool_id => @pool.id}) %> - <% end %> - <% if CurrentUser.is_member? %> - <%= subnav_link_to "Order", edit_pool_order_path(@pool) %> + <%= quick_search_form_for(:name_matches, pools_path, "pools", autocomplete: "pool") %> + <%= subnav_link_to "Gallery", gallery_pools_path %> + <%= subnav_link_to "Listing", pools_path %> + <%= subnav_link_to "New", new_pool_path %> + <%= subnav_link_to "Help", wiki_pages_path(:search => {:title => "help:pools"}) %> + <% if @pool && !@pool.new_record? %> +
  • |
  • + <%= subnav_link_to "Show", pool_path(@pool) %> + <%= subnav_link_to "Posts", posts_path(:tags => "pool:#{@pool.id}") %> + <% if CurrentUser.is_member? %> + <%= subnav_link_to "Edit", edit_pool_path(@pool), "data-shortcut": "e" %> + <% end %> + <% if @pool.deletable_by?(CurrentUser.user) %> + <% if @pool.is_deleted? %> + <%= subnav_link_to "Undelete", undelete_pool_path(@pool), :method => :post, :remote => true %> + <% else %> + <%= subnav_link_to "Delete", pool_path(@pool), :method => :delete, :"data-shortcut" => "shift+d", :"data-confirm" => "Are you sure you want to delete this pool?", :remote => true %> <% end %> <% end %> -
    + <% if PoolArchive.enabled? %> + <%= subnav_link_to "History", pool_versions_path(:search => {:pool_id => @pool.id}) %> + <% end %> + <% if CurrentUser.is_member? %> + <%= subnav_link_to "Order", edit_pool_order_path(@pool) %> + <% end %> + <% end %> <% end %> diff --git a/app/views/post_versions/_secondary_links.html.erb b/app/views/post_versions/_secondary_links.html.erb index 135a7cc7f..1c193a4c0 100644 --- a/app/views/post_versions/_secondary_links.html.erb +++ b/app/views/post_versions/_secondary_links.html.erb @@ -1,9 +1,7 @@ <% content_for(:secondary_links) do %> - - <%= subnav_link_to "Listing", posts_path %> - <%= subnav_link_to "Upload", new_upload_path %> - <%= subnav_link_to "Search", search_post_versions_path %> - <%= subnav_link_to "Changes", post_versions_path %> - <%= subnav_link_to "Help", wiki_pages_path(:title => "help:posts") %> - + <%= subnav_link_to "Listing", posts_path %> + <%= subnav_link_to "Upload", new_upload_path %> + <%= subnav_link_to "Search", search_post_versions_path %> + <%= subnav_link_to "Changes", post_versions_path %> + <%= subnav_link_to "Help", wiki_pages_path(:title => "help:posts") %> <% end %> diff --git a/app/views/posts/partials/common/_secondary_links.html.erb b/app/views/posts/partials/common/_secondary_links.html.erb index ce9045a49..4500860c4 100644 --- a/app/views/posts/partials/common/_secondary_links.html.erb +++ b/app/views/posts/partials/common/_secondary_links.html.erb @@ -1,22 +1,20 @@ <% content_for(:secondary_links) do %> - - <%= subnav_link_to "Listing", posts_path %> - <%= subnav_link_to "Upload", new_upload_path %> - <%= subnav_link_to "Hot", posts_path(:tags => "order:rank", :d => "1") %> - <% if RecommenderService.available_for_user? %> - <%= subnav_link_to "Recommended", recommended_posts_path(context: "user") %> + <%= subnav_link_to "Listing", posts_path %> + <%= subnav_link_to "Upload", new_upload_path %> + <%= subnav_link_to "Hot", posts_path(:tags => "order:rank", :d => "1") %> + <% if RecommenderService.available_for_user? %> + <%= subnav_link_to "Recommended", recommended_posts_path(context: "user") %> + <% end %> + <% unless CurrentUser.is_anonymous? %> + <%= subnav_link_to "Favorites", posts_path(tags: "ordfav:#{CurrentUser.user.name}") %> + <%= subnav_link_to "Fav groups", favorite_groups_path %> + <% if CurrentUser.has_saved_searches? %> + <%= subnav_link_to "Saved searches", posts_path(:tags => "search:all") %> <% end %> - <% unless CurrentUser.is_anonymous? %> - <%= subnav_link_to "Favorites", posts_path(tags: "ordfav:#{CurrentUser.user.name}") %> - <%= subnav_link_to "Fav groups", favorite_groups_path %> - <% if CurrentUser.has_saved_searches? %> - <%= subnav_link_to "Saved searches", posts_path(:tags => "search:all") %> - <% end %> - <% end %> - <%= subnav_link_to "Changes", post_versions_path %> - <% if CurrentUser.can_approve_posts? %> - <%= subnav_link_to "Moderate", moderator_post_queue_path %> - <% end %> - <%= subnav_link_to "Help", wiki_pages_path(:title => "help:posts") %> - + <% end %> + <%= subnav_link_to "Changes", post_versions_path %> + <% if CurrentUser.can_approve_posts? %> + <%= subnav_link_to "Moderate", moderator_post_queue_path %> + <% end %> + <%= subnav_link_to "Help", wiki_pages_path(:title => "help:posts") %> <% end %> diff --git a/app/views/saved_searches/_secondary_links.html.erb b/app/views/saved_searches/_secondary_links.html.erb index bb256851b..8d2fb9ac7 100644 --- a/app/views/saved_searches/_secondary_links.html.erb +++ b/app/views/saved_searches/_secondary_links.html.erb @@ -1,6 +1,4 @@ <% content_for(:secondary_links) do %> - - <%= subnav_link_to "View posts", posts_path(:tags => "search:all") %> - <%= subnav_link_to "Manage saved searches", saved_searches_path %> - + <%= subnav_link_to "View posts", posts_path(:tags => "search:all") %> + <%= subnav_link_to "Manage saved searches", saved_searches_path %> <% end %> diff --git a/app/views/sessions/_secondary_links.html.erb b/app/views/sessions/_secondary_links.html.erb index 5fc14e383..f2e4f7dbf 100644 --- a/app/views/sessions/_secondary_links.html.erb +++ b/app/views/sessions/_secondary_links.html.erb @@ -1,7 +1,5 @@ <% content_for(:secondary_links) do %> - - <%= subnav_link_to "Sign up", new_user_path %> - <%= subnav_link_to "Reset Password", new_maintenance_user_password_reset_path %> - <%= subnav_link_to "Login Reminder", new_maintenance_user_login_reminder_path %> - + <%= subnav_link_to "Sign up", new_user_path %> + <%= subnav_link_to "Reset Password", new_maintenance_user_password_reset_path %> + <%= subnav_link_to "Login Reminder", new_maintenance_user_login_reminder_path %> <% end %> diff --git a/app/views/tag_aliases/_secondary_links.html.erb b/app/views/tag_aliases/_secondary_links.html.erb index 03310c095..43e5280a9 100644 --- a/app/views/tag_aliases/_secondary_links.html.erb +++ b/app/views/tag_aliases/_secondary_links.html.erb @@ -1,9 +1,7 @@ <% content_for(:secondary_links) do %> - - <%= subnav_link_to "Listing", tag_aliases_path %> - <%= subnav_link_to "MetaSearch", meta_searches_tags_path %> - <%= subnav_link_to "Request alias", new_tag_alias_request_path %> - <%= subnav_link_to "Request bulk update", new_bulk_update_request_path %> - <%= subnav_link_to "Help", wiki_pages_path(:title => "help:tag_aliases") %> - + <%= subnav_link_to "Listing", tag_aliases_path %> + <%= subnav_link_to "MetaSearch", meta_searches_tags_path %> + <%= subnav_link_to "Request alias", new_tag_alias_request_path %> + <%= subnav_link_to "Request bulk update", new_bulk_update_request_path %> + <%= subnav_link_to "Help", wiki_pages_path(:title => "help:tag_aliases") %> <% end %> diff --git a/app/views/tag_implications/_secondary_links.html.erb b/app/views/tag_implications/_secondary_links.html.erb index 7fe94b213..4b5cb3f60 100644 --- a/app/views/tag_implications/_secondary_links.html.erb +++ b/app/views/tag_implications/_secondary_links.html.erb @@ -1,9 +1,7 @@ <% content_for(:secondary_links) do %> - - <%= subnav_link_to "Listing", tag_implications_path %> - <%= subnav_link_to "MetaSearch", meta_searches_tags_path %> - <%= subnav_link_to "Request implication", new_tag_implication_request_path %> - <%= subnav_link_to "Request bulk update", new_bulk_update_request_path %> - <%= subnav_link_to "Help", wiki_pages_path(:title => "help:tag_implications") %> - + <%= subnav_link_to "Listing", tag_implications_path %> + <%= subnav_link_to "MetaSearch", meta_searches_tags_path %> + <%= subnav_link_to "Request implication", new_tag_implication_request_path %> + <%= subnav_link_to "Request bulk update", new_bulk_update_request_path %> + <%= subnav_link_to "Help", wiki_pages_path(:title => "help:tag_implications") %> <% end %> diff --git a/app/views/tags/_secondary_links.html.erb b/app/views/tags/_secondary_links.html.erb index 88b59f1c0..64f307ebc 100644 --- a/app/views/tags/_secondary_links.html.erb +++ b/app/views/tags/_secondary_links.html.erb @@ -1,18 +1,16 @@ <% content_for(:secondary_links) do %> - - <%= quick_search_form_for(:name_matches, tags_path, "tags", autocomplete: "tag") %> - <%= subnav_link_to "Listing", tags_path %> - <%= subnav_link_to "MetaSearch", meta_searches_tags_path %> - <%= subnav_link_to "Related tags", related_tag_path %> - <%= subnav_link_to "Cheatsheet", wiki_pages_path(:search => {:title => "help:cheatsheet"}) %> - <%= subnav_link_to "Help", wiki_pages_path(:search => {:title => "help:tags"}) %> - <% if @tag %> -
  • |
  • - <%= subnav_link_to "Posts (#{@tag.post_count})", posts_path(:tags => @tag.name) %> - <%= subnav_link_to "Edit", edit_tag_path(@tag) %> - <% if @tag.post_count < 1_000 %> - <%= subnav_link_to "Fix", new_tag_correction_path(:tag_id => @tag.id) %> - <% end %> + <%= quick_search_form_for(:name_matches, tags_path, "tags", autocomplete: "tag") %> + <%= subnav_link_to "Listing", tags_path %> + <%= subnav_link_to "MetaSearch", meta_searches_tags_path %> + <%= subnav_link_to "Related tags", related_tag_path %> + <%= subnav_link_to "Cheatsheet", wiki_pages_path(:search => {:title => "help:cheatsheet"}) %> + <%= subnav_link_to "Help", wiki_pages_path(:search => {:title => "help:tags"}) %> + <% if @tag %> +
  • |
  • + <%= subnav_link_to "Posts (#{@tag.post_count})", posts_path(:tags => @tag.name) %> + <%= subnav_link_to "Edit", edit_tag_path(@tag) %> + <% if @tag.post_count < 1_000 %> + <%= subnav_link_to "Fix", new_tag_correction_path(:tag_id => @tag.id) %> <% end %> -
    + <% end %> <% end %> diff --git a/app/views/uploads/_secondary_links.html.erb b/app/views/uploads/_secondary_links.html.erb index 3f5668e17..e85e7d9c9 100644 --- a/app/views/uploads/_secondary_links.html.erb +++ b/app/views/uploads/_secondary_links.html.erb @@ -1,9 +1,7 @@ <% content_for(:secondary_links) do %> - - <%= subnav_link_to "Listing", uploads_path %> - <%= subnav_link_to "New", new_upload_path %> - <%= subnav_link_to "Batch Upload", batch_uploads_path %> - <%= subnav_link_to "Similar Images Search", iqdb_queries_path %> - <%= subnav_link_to "Help", wiki_pages_path(search: { title: "help:upload" }) %> - + <%= subnav_link_to "Listing", uploads_path %> + <%= subnav_link_to "New", new_upload_path %> + <%= subnav_link_to "Batch Upload", batch_uploads_path %> + <%= subnav_link_to "Similar Images Search", iqdb_queries_path %> + <%= subnav_link_to "Help", wiki_pages_path(search: { title: "help:upload" }) %> <% end %> diff --git a/app/views/user_feedbacks/_secondary_links.html.erb b/app/views/user_feedbacks/_secondary_links.html.erb index ef3ac9831..d97e8bd8d 100644 --- a/app/views/user_feedbacks/_secondary_links.html.erb +++ b/app/views/user_feedbacks/_secondary_links.html.erb @@ -1,15 +1,13 @@ <% content_for(:secondary_links) do %> - - <% if CurrentUser.is_gold? %> - <% if @user_feedback %> - <%= subnav_link_to "New", new_user_feedback_path(:user_feedback => {:user_id => @user_feedback.user_id}) %> - <% elsif params[:search] && params[:search][:user_id] %> - <%= subnav_link_to "New", new_user_feedback_path(:user_feedback => {:user_id => params[:search][:user_id]}) %> - <% else %> - <%= subnav_link_to "New", new_user_feedback_path %> - <% end %> + <% if CurrentUser.is_gold? %> + <% if @user_feedback %> + <%= subnav_link_to "New", new_user_feedback_path(:user_feedback => {:user_id => @user_feedback.user_id}) %> + <% elsif params[:search] && params[:search][:user_id] %> + <%= subnav_link_to "New", new_user_feedback_path(:user_feedback => {:user_id => params[:search][:user_id]}) %> + <% else %> + <%= subnav_link_to "New", new_user_feedback_path %> <% end %> - <%= subnav_link_to "Listing", user_feedbacks_path %> - <%= subnav_link_to "Search", search_user_feedbacks_path %> - + <% end %> + <%= subnav_link_to "Listing", user_feedbacks_path %> + <%= subnav_link_to "Search", search_user_feedbacks_path %> <% end %> diff --git a/app/views/user_name_change_requests/_secondary_links.html.erb b/app/views/user_name_change_requests/_secondary_links.html.erb index 5e839727a..0ff9a13ff 100644 --- a/app/views/user_name_change_requests/_secondary_links.html.erb +++ b/app/views/user_name_change_requests/_secondary_links.html.erb @@ -1,7 +1,5 @@ <% content_for(:secondary_links) do %> - - <%= subnav_link_to "Listing", user_name_change_requests_path %> - <%= subnav_link_to "New", new_user_name_change_request_path %> - <%= subnav_link_to "Help", wiki_pages_path(:search => {:title => "help:user_name_change_requests"}) %> - + <%= subnav_link_to "Listing", user_name_change_requests_path %> + <%= subnav_link_to "New", new_user_name_change_request_path %> + <%= subnav_link_to "Help", wiki_pages_path(:search => {:title => "help:user_name_change_requests"}) %> <% end %> diff --git a/app/views/users/_secondary_links.html.erb b/app/views/users/_secondary_links.html.erb index 52d93c233..6257c83b8 100644 --- a/app/views/users/_secondary_links.html.erb +++ b/app/views/users/_secondary_links.html.erb @@ -1,41 +1,39 @@ <% content_for(:secondary_links) do %> - - <%= quick_search_form_for(:name_matches, users_path, "users", autocomplete: "user") %> - <%= subnav_link_to "Listing", users_path %> - <%= subnav_link_to "Search", search_users_path %> + <%= quick_search_form_for(:name_matches, users_path, "users", autocomplete: "user") %> + <%= subnav_link_to "Listing", users_path %> + <%= subnav_link_to "Search", search_users_path %> - <% if CurrentUser.user.is_anonymous? %> - <%= subnav_link_to "Sign up", new_user_path %> + <% if CurrentUser.user.is_anonymous? %> + <%= subnav_link_to "Sign up", new_user_path %> + <% end %> + + <% if @user && !@user.new_record? && !CurrentUser.user.is_anonymous? %> +
  • |
  • + <% if @user.id == CurrentUser.user.id %> + <%= subnav_link_to "Profile", profile_path %> + <%= subnav_link_to "Settings", settings_path %> + <%= subnav_link_to "Messages #{CurrentUser.user.dmail_count}", dmails_current_folder_path %> + + <% if !@user.is_platinum? %> + <%= subnav_link_to "Upgrade", new_user_upgrade_path %> + <% end %> + <% else %> + <%= subnav_link_to "Send message", new_dmail_path(:dmail => {:to_id => @user.id}) %> + <% if !@user.is_platinum? %> + <%= subnav_link_to "Gift upgrade", new_user_upgrade_path(:user_id => @user.id) %> + <% end %> <% end %> - <% if @user && !@user.new_record? && !CurrentUser.user.is_anonymous? %> -
  • |
  • - <% if @user.id == CurrentUser.user.id %> - <%= subnav_link_to "Profile", profile_path %> - <%= subnav_link_to "Settings", settings_path %> - <%= subnav_link_to "Messages #{CurrentUser.user.dmail_count}", dmails_current_folder_path %> - - <% if !@user.is_platinum? %> - <%= subnav_link_to "Upgrade", new_user_upgrade_path %> - <% end %> + <% if CurrentUser.user.is_moderator? %> + <%= subnav_link_to "Promote", edit_admin_user_path(@user) %> + <% if @user.is_banned? %> + <%= subnav_link_to "Unban", ban_path(@user.recent_ban) %> <% else %> - <%= subnav_link_to "Send message", new_dmail_path(:dmail => {:to_id => @user.id}) %> - <% if !@user.is_platinum? %> - <%= subnav_link_to "Gift upgrade", new_user_upgrade_path(:user_id => @user.id) %> - <% end %> + <%= subnav_link_to "Ban", new_ban_path(:ban => {:user_id => @user.id}) %> <% end %> - - <% if CurrentUser.user.is_moderator? %> - <%= subnav_link_to "Promote", edit_admin_user_path(@user) %> - <% if @user.is_banned? %> - <%= subnav_link_to "Unban", ban_path(@user.recent_ban) %> - <% else %> - <%= subnav_link_to "Ban", new_ban_path(:ban => {:user_id => @user.id}) %> - <% end %> - <% end %> - -
  • |
  • - <%= subnav_link_to "Sign out", sign_out_session_path %> <% end %> -
    + +
  • |
  • + <%= subnav_link_to "Sign out", sign_out_session_path %> + <% end %> <% end %> diff --git a/app/views/wiki_pages/_secondary_links.html.erb b/app/views/wiki_pages/_secondary_links.html.erb index 421aadc1b..440781321 100644 --- a/app/views/wiki_pages/_secondary_links.html.erb +++ b/app/views/wiki_pages/_secondary_links.html.erb @@ -1,49 +1,32 @@ <% content_for(:secondary_links) do %> - - <%= quick_search_form_for(:title, wiki_pages_path, "wiki pages", autocomplete: "wiki-page") %> - - <%= subnav_link_to "Listing", wiki_pages_path %> - - <%= subnav_link_to "Search", search_wiki_pages_path %> - + <%= quick_search_form_for(:title, wiki_pages_path, "wiki pages", autocomplete: "wiki-page") %> + <%= subnav_link_to "Listing", wiki_pages_path %> + <%= subnav_link_to "Search", search_wiki_pages_path %> + <% if CurrentUser.is_member? %> + <%= subnav_link_to "New", new_wiki_page_path %> + <% end %> + <%= subnav_link_to "Help", wiki_pages_path(:search => {:title => "help:wiki"}) %> + <% if @wiki_page && @wiki_page.new_record? && @wiki_page.try(:tag).present? %> +
  • |
  • + <%= subnav_link_to "Posts (#{@wiki_page.tag.post_count})", posts_path(:tags => @wiki_page.title) %> + <% elsif @wiki_page && !@wiki_page.new_record? %> +
  • |
  • + <%= subnav_link_to "Posts (#{@wiki_page.tag.try(:post_count) || 0})", posts_path(:tags => @wiki_page.title) %> + <%= subnav_link_to "History", wiki_page_versions_path(:search => {:wiki_page_id => @wiki_page.id}) %> <% if CurrentUser.is_member? %> - <%= subnav_link_to "New", new_wiki_page_path %> + <%= subnav_link_to "Edit", edit_wiki_page_path(@wiki_page), "data-shortcut": "e" %> <% end %> - - <%= subnav_link_to "Help", wiki_pages_path(:search => {:title => "help:wiki"}) %> - - <% if @wiki_page && @wiki_page.new_record? && @wiki_page.try(:tag).present? %> -
  • |
  • - - <%= subnav_link_to "Posts (#{@wiki_page.tag.post_count})", posts_path(:tags => @wiki_page.title) %> - - <% elsif @wiki_page && !@wiki_page.new_record? %> -
  • |
  • - - <%= subnav_link_to "Posts (#{@wiki_page.tag.try(:post_count) || 0})", posts_path(:tags => @wiki_page.title) %> - - <%= subnav_link_to "History", wiki_page_versions_path(:search => {:wiki_page_id => @wiki_page.id}) %> - - <% if CurrentUser.is_member? %> - <%= subnav_link_to "Edit", edit_wiki_page_path(@wiki_page), "data-shortcut": "e" %> - <% end %> - - <% if CurrentUser.is_builder? && !@wiki_page.is_deleted? %> - <%= subnav_link_to "Delete", wiki_page_path(@wiki_page), :remote => true, :method => :delete, :"data-shortcut" => "shift+d", :"data-confirm" => "Are you sure you want to delete this wiki page?" %> - <% end %> - - <% elsif @wiki_page_version %> -
  • |
  • - - <%= subnav_link_to "Newest", wiki_page_path(@wiki_page_version.wiki_page_id) %> - - <% if @wiki_page_version.previous %> - <%= subnav_link_to "Diff", diff_wiki_page_versions_path(:otherpage => @wiki_page_version.id, :thispage => @wiki_page_version.previous.id) %> - <% end %> - - <% if CurrentUser.is_member? %> - <%= subnav_link_to "Revert to", revert_wiki_page_path(@wiki_page_version.wiki_page_id, :version_id => @wiki_page_version.id), :method => :put, :data => {:confirm => "Are you sure you want to revert to this version?"} %> - <% end %> + <% if CurrentUser.is_builder? && !@wiki_page.is_deleted? %> + <%= subnav_link_to "Delete", wiki_page_path(@wiki_page), :remote => true, :method => :delete, :"data-shortcut" => "shift+d", :"data-confirm" => "Are you sure you want to delete this wiki page?" %> <% end %> -
    + <% elsif @wiki_page_version %> +
  • |
  • + <%= subnav_link_to "Newest", wiki_page_path(@wiki_page_version.wiki_page_id) %> + <% if @wiki_page_version.previous %> + <%= subnav_link_to "Diff", diff_wiki_page_versions_path(:otherpage => @wiki_page_version.id, :thispage => @wiki_page_version.previous.id) %> + <% end %> + <% if CurrentUser.is_member? %> + <%= subnav_link_to "Revert to", revert_wiki_page_path(@wiki_page_version.wiki_page_id, :version_id => @wiki_page_version.id), :method => :put, :data => {:confirm => "Are you sure you want to revert to this version?"} %> + <% end %> + <% end %> <% end %>