rosa-build/app/views/layouts/application.html.haml

59 lines
2.7 KiB
Plaintext

!!!
%html
%head
%title= choose_title
= render :partial => "layouts/stylesheets"
= render :partial => "layouts/javascripts"
= csrf_meta_tag
%body
#container
#header
%h1
%a{:href => "/"}= choose_title
#user-navigation
%ul.wat-cf
%li= link_to current_user.uname, edit_user_registration_path
%li= link_to t('layout.logout'), destroy_user_session_path, :method => :delete, :class => "logout"
#main-navigation
%ul.wat-cf
-if can? :index, User
%li{:class => controller.controller_path == 'users' ? 'active' : '' }
%a{:href => users_path}= t("layout.menu.users")
-if can? :index, Platform
%li{:class => controller.controller_path == 'platforms' ? 'active' : '' }
%a{:href => platforms_path}= t("layout.menu.platforms")
-if can? :index, Project
%li{:class => controller.controller_path == 'projects' ? 'active' : '' }
%a{:href => projects_path}= t("layout.menu.projects")
-if can? :index, Group
%li{:class => controller.controller_path == 'groups' ? 'active' : '' }
%a{:href => groups_path}= t("layout.menu.groups")
-if can? :index, Download
%li{:class => controller.controller_path == 'downloads' ? 'active' : '' }
%a{:href => downloads_path}= t("layout.menu.downloads")
-if can? :index, EventLog
%li{:class => controller.controller_path == 'event_logs' ? 'active' : '' }
%a{:href => event_logs_path}= t("layout.menu.event_logs")
-if can? :index, BuildList
%li{:class => controller.controller_path == 'build_lists' ? 'active' : '' }
%a{:href => all_build_lists_path}= t("layout.menu.build_lists")
-if can? :platforms, Category
%li{:class => controller.controller_path == 'categories' ? 'active' : '' }
%a{:href => catalogs_path}= t("layout.menu.categories")
-if can? :read, current_user.personal_repository
%li{:class => controller.controller_path == 'personal_repositories' ? 'active' : '' }
%a{:href => personal_repository_path( current_user.personal_repository.id )}= t("layout.menu.personal_repository")
- if can? :index, AutoBuildList
%li{:class => controller.controller_path == 'auto_build_lists' ? 'active' : '' }
%a{:href => auto_build_lists_path}= t("layout.menu.auto_build_lists")
#wrapper.wat-cf
= render :partial => "layouts/flashes"
#main
= yield
#footer
.block
#sidebar
= yield :sidebar