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

59 lines
3.0 KiB
Plaintext
Raw Normal View History

!!!
%html
%head
%title= choose_title
= render :partial => "layouts/stylesheets"
= render :partial => "layouts/javascripts"
= csrf_meta_tag
%body
2011-03-09 13:13:36 +00:00
#container
#header
%h1
2011-11-01 21:09:10 +00:00
%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
2011-10-26 01:36:30 +01:00
-if current_user.can_perform?('users', 'index')
%li{:class => controller.controller_path == 'users' ? 'active' : '' }
%a{:href => users_path}= t("layout.menu.users")
-if current_user.can_perform?('platforms', 'index')
%li{:class => controller.controller_path == 'platforms' ? 'active' : '' }
%a{:href => platforms_path}= t("layout.menu.platforms")
-if current_user.can_perform?('projects', 'index')
%li{:class => controller.controller_path == 'projects' ? 'active' : '' }
%a{:href => projects_path}= t("layout.menu.projects")
2011-10-26 01:36:30 +01:00
-if current_user.can_perform?('downloads', 'index')
%li{:class => controller.controller_path == 'downloads' ? 'active' : '' }
%a{:href => downloads_path}= t("layout.menu.downloads")
-if current_user.can_perform?('event_logs', 'index')
%li{:class => controller.controller_path == 'event_logs' ? 'active' : '' }
%a{:href => event_logs_path}= t("layout.menu.event_logs")
-if current_user.can_perform?('build_lists', 'index')
%li{:class => controller.controller_path == 'build_lists' ? 'active' : '' }
%a{:href => all_build_lists_path}= t("layout.menu.build_lists")
2011-10-26 01:36:30 +01:00
-if current_user.can_perform?('categories', 'index')
%li{:class => controller.controller_path == 'categories' ? 'active' : '' }
%a{:href => catalogs_path}= t("layout.menu.categories")
2011-10-26 01:36:30 +01:00
-if current_user.can_perform?('roles', 'index')
%li{:class => controller.controller_path == 'roles' ? 'active' : '' }
%a{:href => roles_path}= t("layout.menu.roles")
-if current_user.can_perform?('personal_repositories', 'show')
%li{:class => controller.controller_path == 'personal_repositories' ? 'active' : '' }
2011-10-31 16:25:16 +00:00
%a{:href => personal_repository_path( current_user.personal_repository.id )}= t("layout.menu.personal_repository")
- if current_user.can_perform?('auto_build_lists', 'index')
%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
2011-10-14 07:35:25 +01:00
#sidebar
= yield :sidebar