nav menu: add html ids to secondary nav menu links (#3844).
This commit is contained in:
@@ -7,15 +7,24 @@ module ApplicationHelper
|
||||
raw(wordbreaked_string)
|
||||
end
|
||||
|
||||
def nav_link_to(text, url, options = nil)
|
||||
def nav_link_to(text, url, **options)
|
||||
if nav_link_match(params[:controller], url)
|
||||
klass = "current"
|
||||
else
|
||||
klass = nil
|
||||
end
|
||||
|
||||
id = "nav-" + text.downcase.gsub(/[^a-z ]/, "").parameterize
|
||||
tag.li(link_to(text, url, options), class: klass, id: id)
|
||||
li_link_to(text, url, id_prefix: "nav-", class: klass, **options)
|
||||
end
|
||||
|
||||
def subnav_link_to(text, url, **options)
|
||||
li_link_to(text, url, id_prefix: "subnav-", **options)
|
||||
end
|
||||
|
||||
def li_link_to(text, url, id_prefix: "", **options)
|
||||
klass = options.delete(:class)
|
||||
id = id_prefix + text.downcase.gsub(/[^a-z ]/, "").parameterize
|
||||
tag.li(link_to(text, url, options), id: id, class: klass)
|
||||
end
|
||||
|
||||
def fast_link_to(text, link_params, options = {})
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= render "artist_commentaries/quick_search" %></li>
|
||||
<li><%= link_to "Search", search_artist_commentaries_path %></li>
|
||||
<li><%= link_to "Listing", artist_commentaries_path %></li>
|
||||
<li><%= link_to "Recent changes", artist_commentary_versions_path %></li>
|
||||
<li><%= link_to "Translation requests", artist_commentaries_path(:search => {:post_tags_match => "commentary_request"}) %></li>
|
||||
<li><%= link_to "Help", wiki_pages_path(:title => "help:artist_commentary") %></li>
|
||||
<%= 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") %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", artists_path %></li>
|
||||
<li><%= link_to "New", new_artist_path %></li>
|
||||
<li><%= link_to "Search", search_artist_versions_path %></li>
|
||||
<%= subnav_link_to "Listing", artists_path %>
|
||||
<%= subnav_link_to "New", new_artist_path %>
|
||||
<%= subnav_link_to "Search", search_artist_versions_path %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= render "artists/quick_search" %></li>
|
||||
<li><%= link_to "Listing", artists_path %></li>
|
||||
<li><%= link_to "Banned", banned_artists_path %></li>
|
||||
<li><%= link_to "New", new_artist_path %></li>
|
||||
<li><%= link_to "Recent changes", artist_versions_path %></li>
|
||||
<%= subnav_link_to "Listing", artists_path %>
|
||||
<%= subnav_link_to "Banned", banned_artists_path %>
|
||||
<%= subnav_link_to "New", new_artist_path %>
|
||||
<%= subnav_link_to "Recent changes", artist_versions_path %>
|
||||
<% if @artist && !@artist.new_record? %>
|
||||
<li>|</li>
|
||||
<li><%= link_to "Posts (#{Post.fast_count(@artist.name)})", posts_path(:tags => @artist.name) %></li>
|
||||
<li><%= link_to "Show", artist_path(@artist) %></li>
|
||||
<%= subnav_link_to "Posts (#{Post.fast_count(@artist.name)})", posts_path(:tags => @artist.name) %>
|
||||
<%= subnav_link_to "Show", artist_path(@artist) %>
|
||||
<% if CurrentUser.is_member? %>
|
||||
<li id="artist-edit"><%= link_to "Edit", edit_artist_path(@artist), :"data-shortcut" => "e" %></li>
|
||||
<%= subnav_link_to "Edit", edit_artist_path(@artist), :"data-shortcut" => "e" %>
|
||||
<% end %>
|
||||
<li><%= link_to "History", artist_versions_path(:search => {:artist_id => @artist.id}) %></li>
|
||||
<%= subnav_link_to "History", artist_versions_path(:search => {:artist_id => @artist.id}) %>
|
||||
<% if @artist.deletable_by?(CurrentUser.user) %>
|
||||
<% if @artist.is_active? %>
|
||||
<li id="artist-delete"><%= link_to "Delete", artist_path(@artist), method: :delete, "data-shortcut": "shift+d", "data-confirm": "Are you sure you want to delete this artist?" %></li>
|
||||
<%= 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 %>
|
||||
<li><%= 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 %></li>
|
||||
<%= 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? %>
|
||||
<li><%= link_to "Unban", unban_artist_path(@artist), :method => :put, :data => {:confirm => "Are you sure you want to unban this artist?"} %></li>
|
||||
<%= subnav_link_to "Unban", unban_artist_path(@artist), :method => :put, :data => {:confirm => "Are you sure you want to unban this artist?"} %>
|
||||
|
||||
<% else %>
|
||||
<li><%= link_to "Ban", ban_artist_path(@artist), :method => :put, :data => {:confirm => "Are you sure you want to ban this artist?"} %></li>
|
||||
<%= subnav_link_to "Ban", ban_artist_path(@artist), :method => :put, :data => {:confirm => "Are you sure you want to ban this artist?"} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", bans_path %></li>
|
||||
<li><%= link_to "Ban", new_ban_path %></li>
|
||||
<%= subnav_link_to "Listing", bans_path %>
|
||||
<%= subnav_link_to "Ban", new_ban_path %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", bulk_update_requests_path %></li>
|
||||
<li><%= link_to "New", new_bulk_update_request_path %></li>
|
||||
<%= subnav_link_to "Listing", bulk_update_requests_path %>
|
||||
<%= subnav_link_to "New", new_bulk_update_request_path %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= render "comments/quick_search" %></li>
|
||||
<li><%= link_to "Listing", comments_path(:group_by => "post") %></li>
|
||||
<li><%= link_to "Search", search_comments_path %></li>
|
||||
<li><%= link_to "Help", wiki_pages_path(:title => "help:comments") %></li>
|
||||
<%= 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") %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= render "quick_search" %></li>
|
||||
<li><%= link_to "All", all_dmails_path(set_default_folder: true) %></li>
|
||||
<li><%= link_to "Received", received_dmails_path(set_default_folder: true) %></li>
|
||||
<li><%= link_to "Sent", sent_dmails_path(set_default_folder: true) %></li>
|
||||
<li><%= link_to "Spam", spam_dmails_path %></li>
|
||||
<%= 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 %>
|
||||
<li>|</li>
|
||||
<li><%= link_to "New", new_dmail_path %></li>
|
||||
<li><%= link_to "Mark all as read", {:controller => "dmails", :action => "mark_all_as_read"}, :method => :post, :remote => true %></li>
|
||||
<%= 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 %></li>
|
||||
<li>|</li>
|
||||
<li><%= link_to "Help", wiki_pages_path(title: "help:dmail") %></li>
|
||||
<%= subnav_link_to "Help", wiki_pages_path(title: "help:dmail") %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", favorite_groups_path %></li>
|
||||
<%= subnav_link_to "Listing", favorite_groups_path %>
|
||||
<% if CurrentUser.is_member? %>
|
||||
<li><%= link_to "New", new_favorite_group_path %></li>
|
||||
<%= subnav_link_to "New", new_favorite_group_path %>
|
||||
<% end %>
|
||||
<li><%= link_to "Help", wiki_pages_path(:title => "help:favorite_groups") %></li>
|
||||
<%= subnav_link_to "Help", wiki_pages_path(:title => "help:favorite_groups") %>
|
||||
|
||||
<% if @favorite_group && !@favorite_group.new_record? %>
|
||||
<li>|</li>
|
||||
<li><%= link_to "Show", favorite_group_path(@favorite_group) %></li>
|
||||
<li><%= link_to "Posts", posts_path(:tags => "favgroup:#{@favorite_group.id}") %></li>
|
||||
<%= 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) %>
|
||||
<li><%= link_to "Edit", edit_favorite_group_path(@favorite_group) %></li>
|
||||
<li><%= link_to "Delete", favorite_group_path(@favorite_group), :method => :delete, :data => {:confirm => "Are you sure you want to delete this favorite group?"} %></li>
|
||||
<%= 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 %>
|
||||
<li><%= link_to "Order", edit_favorite_group_order_path(@favorite_group) %></li>
|
||||
<%= subnav_link_to "Order", edit_favorite_group_order_path(@favorite_group) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= render "forum_posts/quick_search" %></li>
|
||||
<li><%= link_to "Listing", forum_topics_path %></li>
|
||||
<%= subnav_link_to "Listing", forum_topics_path %>
|
||||
|
||||
<% if CurrentUser.is_member? %>
|
||||
<li><%= link_to "New", new_forum_topic_path %></li>
|
||||
<li><%= link_to "Request alias", new_tag_alias_request_path %></li>
|
||||
<li><%= link_to "Request implication", new_tag_implication_request_path %></li>
|
||||
<li id="forum-topic-mark-all-as-read"><%= link_to "Mark all as read", mark_all_as_read_forum_topics_path, :method => :post, :"data-shortcut" => "shift+r" %></li>
|
||||
<%= 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 "Mark all as read", mark_all_as_read_forum_topics_path, :method => :post, :"data-shortcut" => "shift+r" %>
|
||||
<% end %>
|
||||
|
||||
<li><%= link_to "Search", search_forum_posts_path %></li>
|
||||
<li><%= link_to "Help", wiki_pages_path(:title => "help:forum") %></li>
|
||||
<%= 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? %>
|
||||
<li>|</li>
|
||||
<li><%= link_to "Reply", new_forum_post_path(:topic_id => @forum_topic.id) %></li>
|
||||
<%= subnav_link_to "Reply", new_forum_post_path(:topic_id => @forum_topic.id) %>
|
||||
<% if @forum_topic.user_subscription(CurrentUser.user) %>
|
||||
<li><%= link_to "Unsubscribe", unsubscribe_forum_topic_path(@forum_topic), :method => :post %></li>
|
||||
<%= subnav_link_to "Unsubscribe", unsubscribe_forum_topic_path(@forum_topic), :method => :post %>
|
||||
<% else %>
|
||||
<li><%= 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?"} %></li>
|
||||
<%= 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) %>
|
||||
<li><%= link_to "Edit", edit_forum_topic_path(@forum_topic), "data-shortcut": "e" %></li>
|
||||
<%= subnav_link_to "Edit", edit_forum_topic_path(@forum_topic), "data-shortcut": "e" %>
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<% if @forum_topic.is_deleted? %>
|
||||
<li><%= link_to "Undelete", undelete_forum_topic_path(@forum_topic), :method => :post %></li>
|
||||
<%= subnav_link_to "Undelete", undelete_forum_topic_path(@forum_topic), :method => :post %>
|
||||
<% else %>
|
||||
<li id="forum-topic-delete"><%= 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?" %></li>
|
||||
<%= 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? %>
|
||||
<li><%= link_to "Unlock", forum_topic_path(@forum_topic, :forum_topic => {:is_locked => false}), :method => :put %></li>
|
||||
<%= subnav_link_to "Unlock", forum_topic_path(@forum_topic, :forum_topic => {:is_locked => false}), :method => :put %>
|
||||
<% else %>
|
||||
<li><%= 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?"} %></li>
|
||||
<%= 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? %>
|
||||
<li><%= link_to "Unsticky", forum_topic_path(@forum_topic, :forum_topic => {:is_sticky => false}), :method => :put %></li>
|
||||
<%= subnav_link_to "Unsticky", forum_topic_path(@forum_topic, :forum_topic => {:is_sticky => false}), :method => :put %>
|
||||
<% else %>
|
||||
<li><%= 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?"} %></li>
|
||||
<%= 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 %>
|
||||
<li><%= link_to "Merge", new_merge_forum_topic_path(@forum_topic) %></li>
|
||||
<%= subnav_link_to "Merge", new_merge_forum_topic_path(@forum_topic) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", ip_bans_path %></li>
|
||||
<li><%= link_to "New", new_ip_ban_path %></li>
|
||||
<%= subnav_link_to "Listing", ip_bans_path %>
|
||||
<%= subnav_link_to "New", new_ip_ban_path %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", janitor_trials_path %></li>
|
||||
<li><%= link_to "New", new_janitor_trial_path %></li>
|
||||
<%= subnav_link_to "Listing", janitor_trials_path %>
|
||||
<%= subnav_link_to "New", new_janitor_trial_path %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", news_updates_path %></li>
|
||||
<li><%= link_to "New", new_news_update_path %></li>
|
||||
<%= subnav_link_to "Listing", news_updates_path %>
|
||||
<%= subnav_link_to "New", new_news_update_path %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= render "notes/quick_search" %></li>
|
||||
<li><%= link_to "Listing", notes_path %></li>
|
||||
<li><%= link_to "Posts", posts_path(:tags => "order:note") %></li>
|
||||
<li><%= link_to "Search", search_notes_path %></li>
|
||||
<li><%= link_to "History", note_versions_path %></li>
|
||||
<li><%= link_to "Requests", posts_path(:tags => "translation_request") %></li>
|
||||
<li><%= link_to "Help", wiki_pages_path(:title => "help:notes") %></li>
|
||||
<%= 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") %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= render "pools/quick_search" %></li>
|
||||
<li><%= link_to "Gallery", gallery_pools_path %></li>
|
||||
<li><%= link_to "Listing", pools_path %></li>
|
||||
<li><%= link_to "New", new_pool_path %></li>
|
||||
<li><%= link_to "Help", wiki_pages_path(:search => {:title => "help:pools"}) %></li>
|
||||
<%= 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? %>
|
||||
<li>|</li>
|
||||
<li><%= link_to "Show", pool_path(@pool) %></li>
|
||||
<li><%= link_to "Posts", posts_path(:tags => "pool:#{@pool.id}") %></li>
|
||||
<%= subnav_link_to "Show", pool_path(@pool) %>
|
||||
<%= subnav_link_to "Posts", posts_path(:tags => "pool:#{@pool.id}") %>
|
||||
<% if CurrentUser.is_member? %>
|
||||
<li id="pool-edit"><%= link_to "Edit", edit_pool_path(@pool), "data-shortcut": "e" %></li>
|
||||
<%= subnav_link_to "Edit", edit_pool_path(@pool), "data-shortcut": "e" %>
|
||||
<% end %>
|
||||
<% if @pool.deletable_by?(CurrentUser.user) %>
|
||||
<% if @pool.is_deleted? %>
|
||||
<li id="pool-delete"><%= link_to "Undelete", undelete_pool_path(@pool), :method => :post, :remote => true %></li>
|
||||
<%= subnav_link_to "Undelete", undelete_pool_path(@pool), :method => :post, :remote => true %>
|
||||
<% else %>
|
||||
<li id="pool-delete"><%= 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 %></li>
|
||||
<%= 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? %>
|
||||
<li><%= link_to "History", pool_versions_path(:search => {:pool_id => @pool.id}) %></li>
|
||||
<%= subnav_link_to "History", pool_versions_path(:search => {:pool_id => @pool.id}) %>
|
||||
<% end %>
|
||||
<% if @pool.post_count <= 100 && CurrentUser.is_member? %>
|
||||
<li><%= link_to "Order", edit_pool_order_path(@pool) %></li>
|
||||
<%= subnav_link_to "Order", edit_pool_order_path(@pool) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</menu>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", posts_path %></li>
|
||||
<li><%= link_to "Upload", new_upload_path %></li>
|
||||
<li><%= link_to "Search", search_post_versions_path %></li>
|
||||
<li><%= link_to "Changes", post_versions_path %></li>
|
||||
<li><%= link_to "Help", wiki_pages_path(:title => "help:posts") %></li>
|
||||
<%= 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") %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", posts_path %></li>
|
||||
<li id="secondary-links-posts-upload" class="nonessential"><%= link_to "Upload", new_upload_path %></li>
|
||||
<li id="secondary-links-posts-hot"><%= link_to "Hot", posts_path(:tags => "order:rank", :d => "1") %></li>
|
||||
<%= 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? %>
|
||||
<li><%= link_to "Recommended", recommended_posts_path(context: "user") %></li>
|
||||
<%= subnav_link_to "Recommended", recommended_posts_path(context: "user") %>
|
||||
<% end %>
|
||||
<% unless CurrentUser.is_anonymous? %>
|
||||
<li id="secondary-links-posts-favorites"><%= link_to "Favorites", favorites_path %></li>
|
||||
<li id="secondary-links-posts-favorite-groups"><%= link_to "Fav groups", favorite_groups_path %></li>
|
||||
<%= subnav_link_to "Favorites", favorites_path %>
|
||||
<%= subnav_link_to "Fav groups", favorite_groups_path %>
|
||||
<% if CurrentUser.has_saved_searches? %>
|
||||
<li id="secondary-links-posts-saved-searches"><%= link_to "Saved searches", posts_path(:tags => "search:all") %></li>
|
||||
<%= subnav_link_to "Saved searches", posts_path(:tags => "search:all") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<li id="secondary-links-posts-changes" class="nonessential"><%= link_to "Changes", post_versions_path %></li>
|
||||
<%= subnav_link_to "Changes", post_versions_path %>
|
||||
<% if CurrentUser.can_approve_posts? %>
|
||||
<li id="secondary-links-posts-moderate" class="nonessential"><%= link_to "Moderate", moderator_post_queue_path %></li>
|
||||
<%= subnav_link_to "Moderate", moderator_post_queue_path %>
|
||||
<% end %>
|
||||
<li id="secondary-links-posts-help" class="nonessential"><%= link_to "Help", wiki_pages_path(:title => "help:posts") %></li>
|
||||
<%= subnav_link_to "Help", wiki_pages_path(:title => "help:posts") %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "View posts", posts_path(:tags => "search:all") %></li>
|
||||
<li><%= link_to "Manage saved searches", saved_searches_path %></li>
|
||||
<%= subnav_link_to "View posts", posts_path(:tags => "search:all") %>
|
||||
<%= subnav_link_to "Manage saved searches", saved_searches_path %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Sign up", new_user_path %></li>
|
||||
<li><%= link_to "Reset Password", new_maintenance_user_password_reset_path %></li>
|
||||
<li><%= link_to "Login Reminder", new_maintenance_user_login_reminder_path %></li>
|
||||
<%= 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 %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", tag_aliases_path %></li>
|
||||
<li><%= link_to "MetaSearch", meta_searches_tags_path %></li>
|
||||
<li><%= link_to "Request alias", new_tag_alias_request_path %></li>
|
||||
<li><%= link_to "Request bulk update", new_bulk_update_request_path %></li>
|
||||
<li><%= link_to "Help", wiki_pages_path(:title => "help:tag_aliases") %></li>
|
||||
<%= 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") %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", tag_implications_path %></li>
|
||||
<li><%= link_to "MetaSearch", meta_searches_tags_path %></li>
|
||||
<li><%= link_to "Request implication", new_tag_implication_request_path %></li>
|
||||
<li><%= link_to "Request bulk update", new_bulk_update_request_path %></li>
|
||||
<li><%= link_to "Help", wiki_pages_path(:title => "help:tag_implications") %></li>
|
||||
<%= 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") %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= render "tags/quick_search" %></li>
|
||||
<li><%= link_to "Listing", tags_path %></li>
|
||||
<li><%= link_to "MetaSearch", meta_searches_tags_path %></li>
|
||||
<li><%= link_to "Related tags", related_tag_path %></li>
|
||||
<li><%= link_to "Cheatsheet", wiki_pages_path(:search => {:title => "help:cheatsheet"}) %></li>
|
||||
<li><%= link_to "Help", wiki_pages_path(:search => {:title => "help:tags"}) %></li>
|
||||
<%= 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 %>
|
||||
<li>|</li>
|
||||
<li><%= link_to "Posts (#{Post.fast_count(@tag.name)})", posts_path(:tags => @tag.name) %></li>
|
||||
<li><%= link_to "Edit", edit_tag_path(@tag) %></li>
|
||||
<%= subnav_link_to "Posts (#{Post.fast_count(@tag.name)})", posts_path(:tags => @tag.name) %>
|
||||
<%= subnav_link_to "Edit", edit_tag_path(@tag) %>
|
||||
<% if @tag.post_count < 1_000 %>
|
||||
<li><%= link_to "Fix", new_tag_correction_path(:tag_id => @tag.id) %></li>
|
||||
<%= subnav_link_to "Fix", new_tag_correction_path(:tag_id => @tag.id) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</menu>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", uploads_path %></li>
|
||||
<li><%= link_to "New", new_upload_path %></li>
|
||||
<li><%= link_to "Batch Upload", batch_uploads_path %></li>
|
||||
<li><%= link_to "Similar Images Search", iqdb_queries_path %></li>
|
||||
<li><%= link_to "Help", wiki_pages_path(search: { title: "help:upload" }) %></li>
|
||||
<%= 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" }) %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
<menu>
|
||||
<% if CurrentUser.is_gold? %>
|
||||
<% if @user_feedback %>
|
||||
<li><%= link_to "New", new_user_feedback_path(:user_feedback => {:user_id => @user_feedback.user_id}) %></li>
|
||||
<%= subnav_link_to "New", new_user_feedback_path(:user_feedback => {:user_id => @user_feedback.user_id}) %>
|
||||
<% elsif params[:search] && params[:search][:user_id] %>
|
||||
<li><%= link_to "New", new_user_feedback_path(:user_feedback => {:user_id => params[:search][:user_id]}) %></li>
|
||||
<%= subnav_link_to "New", new_user_feedback_path(:user_feedback => {:user_id => params[:search][:user_id]}) %>
|
||||
<% else %>
|
||||
<li><%= link_to "New", new_user_feedback_path %></li>
|
||||
<%= subnav_link_to "New", new_user_feedback_path %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<li><%= link_to "Listing", user_feedbacks_path %></li>
|
||||
<li><%= link_to "Search", search_user_feedbacks_path %></li>
|
||||
<%= subnav_link_to "Listing", user_feedbacks_path %>
|
||||
<%= subnav_link_to "Search", search_user_feedbacks_path %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", user_name_change_requests_path %></li>
|
||||
<li><%= link_to "New", new_user_name_change_request_path %></li>
|
||||
<li><%= link_to "Help", wiki_pages_path(:search => {:title => "help:user_name_change_requests"}) %></li>
|
||||
<%= 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"}) %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= render "users/quick_search" %></li>
|
||||
<li><%= link_to "Listing", users_path %></li>
|
||||
<li><%= link_to "Search", search_users_path %></li>
|
||||
<%= subnav_link_to "Listing", users_path %>
|
||||
<%= subnav_link_to "Search", search_users_path %>
|
||||
|
||||
<% if CurrentUser.user.is_anonymous? %>
|
||||
<li><%= link_to "Sign up", new_user_path %></li>
|
||||
<%= subnav_link_to "Sign up", new_user_path %>
|
||||
<% end %>
|
||||
|
||||
<% if @user && !@user.new_record? && !CurrentUser.user.is_anonymous? %>
|
||||
<li>|</li>
|
||||
<% if @user.id == CurrentUser.user.id %>
|
||||
<li><%= link_to "Settings", edit_user_path(CurrentUser.user) %></li>
|
||||
<li><%= link_to "Profile", user_path(CurrentUser.user) %></li>
|
||||
<li><%= link_to "Messages #{CurrentUser.user.dmail_count}", dmails_current_folder_path %></li>
|
||||
<%= subnav_link_to "Settings", edit_user_path(CurrentUser.user) %>
|
||||
<%= subnav_link_to "Profile", user_path(CurrentUser.user) %>
|
||||
<%= subnav_link_to "Messages #{CurrentUser.user.dmail_count}", dmails_current_folder_path %>
|
||||
|
||||
<% if !@user.is_platinum? %>
|
||||
<li><%= link_to "Upgrade", new_user_upgrade_path %></li>
|
||||
<%= subnav_link_to "Upgrade", new_user_upgrade_path %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<li><%= link_to "Send message", new_dmail_path(:dmail => {:to_id => @user.id}) %></li>
|
||||
<%= subnav_link_to "Send message", new_dmail_path(:dmail => {:to_id => @user.id}) %>
|
||||
<% if !@user.is_platinum? %>
|
||||
<li><%= link_to "Gift upgrade", new_user_upgrade_path(:user_id => @user.id) %></li>
|
||||
<%= subnav_link_to "Gift upgrade", new_user_upgrade_path(:user_id => @user.id) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if CurrentUser.user.is_moderator? %>
|
||||
<li><%= link_to "Promote", edit_admin_user_path(@user) %></li>
|
||||
<%= subnav_link_to "Promote", edit_admin_user_path(@user) %>
|
||||
<% if @user.is_banned? %>
|
||||
<li><%= link_to "Unban", ban_path(@user.recent_ban) %></li>
|
||||
<%= subnav_link_to "Unban", ban_path(@user.recent_ban) %>
|
||||
<% else %>
|
||||
<li><%= link_to "Ban", new_ban_path(:ban => {:user_id => @user.id}) %></li>
|
||||
<%= subnav_link_to "Ban", new_ban_path(:ban => {:user_id => @user.id}) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<li>|</li>
|
||||
<li><%= link_to "Sign out", sign_out_session_path %></li>
|
||||
<%= subnav_link_to "Sign out", sign_out_session_path %>
|
||||
<% end %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= render "wiki_pages/quick_search" %></li>
|
||||
<li><%= link_to "Listing", wiki_pages_path %></li>
|
||||
<li><%= link_to "Search", search_wiki_pages_path %></li>
|
||||
<%= subnav_link_to "Listing", wiki_pages_path %>
|
||||
<%= subnav_link_to "Search", search_wiki_pages_path %>
|
||||
|
||||
<% if CurrentUser.is_member? %>
|
||||
<li><%= link_to "New", new_wiki_page_path %></li>
|
||||
<%= subnav_link_to "New", new_wiki_page_path %>
|
||||
<% end %>
|
||||
|
||||
<li><%= link_to "Help", wiki_pages_path(:search => {:title => "help:wiki"}) %></li>
|
||||
<%= subnav_link_to "Help", wiki_pages_path(:search => {:title => "help:wiki"}) %>
|
||||
|
||||
<% if @wiki_page && @wiki_page.new_record? && @wiki_page.try(:tag).present? %>
|
||||
<li>|</li>
|
||||
<li><%= link_to "Posts (#{@wiki_page.tag.post_count})", posts_path(:tags => @wiki_page.title) %></li>
|
||||
<%= subnav_link_to "Posts (#{@wiki_page.tag.post_count})", posts_path(:tags => @wiki_page.title) %>
|
||||
<% elsif @wiki_page && !@wiki_page.new_record? %>
|
||||
<li>|</li>
|
||||
<li><%= link_to "Posts (#{@wiki_page.tag.try(:post_count) || 0})", posts_path(:tags => @wiki_page.title) %></li>
|
||||
<li><%= link_to "History", wiki_page_versions_path(:search => {:wiki_page_id => @wiki_page.id}) %></li>
|
||||
<%= 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? %>
|
||||
<li id="wiki-page-edit"><%= link_to "Edit", edit_wiki_page_path(@wiki_page), "data-shortcut": "e" %></li>
|
||||
<%= subnav_link_to "Edit", edit_wiki_page_path(@wiki_page), "data-shortcut": "e" %>
|
||||
<% end %>
|
||||
<% if CurrentUser.is_builder? && !@wiki_page.is_deleted? %>
|
||||
<li id="wiki-page-delete"><%= 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?" %></li>
|
||||
<%= 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 %>
|
||||
<li>|</li>
|
||||
<li><%= link_to "Newest", wiki_page_path(@wiki_page_version.wiki_page_id) %></li>
|
||||
<%= subnav_link_to "Newest", wiki_page_path(@wiki_page_version.wiki_page_id) %>
|
||||
<% if CurrentUser.is_member? %>
|
||||
<li><%= 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?"} %></li>
|
||||
<%= 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 %>
|
||||
</menu>
|
||||
|
||||
Reference in New Issue
Block a user