Skip to content

Instantly share code, notes, and snippets.

@unrealhoang
Last active December 26, 2015 06:09
Show Gist options
  • Save unrealhoang/7105793 to your computer and use it in GitHub Desktop.
Save unrealhoang/7105793 to your computer and use it in GitHub Desktop.
#mainnav.hidden-phone.hidden-tablet
%ul
- @nav_links.each do |link|
%li{ :class => (controller_name == link[:name]) ? "active" : nil }
- if controller_name == link[:name]
%span{ :class => "current-arrow" }
%a{:href => link[:path]}
.icon
%span.fs1{"aria-hidden" => "true", "data-icon" => link[:icon]}
= link[:show_name]
before_filter :navigation_links
def navigation_links
@nav_links = [
{ :path => admin_dashboard_path, :name => "dashboard", :icon => "", :show_name => "Dashboard" },
{ :path => admin_admins_path, :name => "admins", :icon => "", :show_name => "Admin" },
{ :path => admin_users_path, :name => "users", :icon => "", :show_name => "User" },
{ :path => admin_cases_path, :name => "cases", :icon => "", :show_name => "Cases" },
{ :path => admin_emails_path, :name => "emails", :icon => "", :show_name => "Emails" },
{ :path => admin_static_pages_path, :name => "static_pages", :icon => "", :show_name => "Static Page" },
{ :path => admin_dashboard_path, :name => "dashboard", :icon => "", :show_name => "Dashboard" },
]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment