nav menu: add html ids to main menu nav links (#3844).

This commit is contained in:
evazion
2018-08-26 12:46:19 -05:00
parent 8ccc238791
commit b98bc26397
3 changed files with 4 additions and 2 deletions

View File

@@ -14,7 +14,8 @@ module ApplicationHelper
klass = nil klass = nil
end end
content_tag("li", link_to(text, url, options), :class => klass) id = "nav-" + text.downcase.gsub(/[^a-z ]/, "").parameterize
tag.li(link_to(text, url, options), class: klass, id: id)
end end
def fast_link_to(text, link_params, options = {}) def fast_link_to(text, link_params, options = {})

View File

@@ -26,6 +26,7 @@ header#top {
li { li {
margin: 0; margin: 0;
padding: 0; padding: 0;
white-space: nowrap;
} }
li a { li a {

View File

@@ -19,5 +19,5 @@
<% if CurrentUser.is_moderator? %> <% if CurrentUser.is_moderator? %>
<%= nav_link_to("Dashboard", moderator_dashboard_path) %> <%= nav_link_to("Dashboard", moderator_dashboard_path) %>
<% end %> <% end %>
<%= nav_link_to("More&nbsp;&raquo;".html_safe, site_map_path) %> <%= nav_link_to("More »", site_map_path) %>
</menu> </menu>