app/views/layouts/carnival/_menu.html.haml in carnival-0.0.59 vs app/views/layouts/carnival/_menu.html.haml in carnival-0.1.0

- old
+ new

@@ -1,32 +1,17 @@ - menus = Carnival::Config::menu.clone -- if current_admin_user.present? - .menu.full - %ul.menu - %li{:style => "border-top:none;"} - %span.arrow - %ul.dropdown_main_menu - %li.dashboard - = link_to t("menu.dashboard"), admin_root_url, {:class => " btn_usuario sublevel"} - %li.administracao - = link_to t("menu.admin"), "#", {:class => " btn_usuario sublevel"} +.menu.short +.menu.full + %ul.menu + %ul.dropdown_main_menu + - menus.each do |key, menu| + %li{:class => menu[:class]} + = link_to t("carnival.menu.#{ menu[:label].downcase.gsub(' ', '_') }"), menu_link(menu[:link]), {:class => " btn_usuario sublevel"} unless menu[:link].nil? + - if menu[:subs].present? %ul.dropdown_main_menu_sublevel - %li - = link_to t('menu.admin_user'), carnival_admin_users_path, {:class => "#{set_resource_actived_if_current(carnival_admin_users_path)}"} - - menus[:admin][:subs].each do |sub| + - menu[:subs].each do |sub| %li - = link_to t(sub[:label]), sub[:link], {:class => "#{set_resource_actived_if_current(sub[:link])} #{sub[:class]}"} - - menus.delete :admin - - menus.each do |key, menu| - %li{:class =>menu[:class]} - = link_to t(menu[:label]), menu_link(menu[:link]), {:class => " btn_usuario sublevel"} unless menu[:link].nil? - - if menu[:subs].present? - %ul.dropdown_main_menu_sublevel - - menu[:subs].each do |sub| - %li - = link_to t(sub[:label]), menu_link(sub[:link]), {:class => "#{set_resource_actived_if_current(sub[:link])} #{sub[:class]}"} + = link_to t("carnival.menu.#{ sub[:label].downcase.gsub(' ', '_') }"), menu_link(sub[:link]), {:class => "#{set_resource_actived_if_current(sub[:link])} #{sub[:class]}"} - %li.minify - %span="Minimizar" + %li.minify + %span= t('minimize') - - .menu.short