1
0
Fork 0
forked from OpenNeo/impress
impress/app/views/layouts/application.html.haml

77 lines
2.5 KiB
Text
Raw Normal View History

2010-11-05 15:45:05 -07:00
!!! 5
%html
%head
%meta{charset: 'utf-8'}
2010-11-06 08:52:58 -07:00
%title
- if content_for? :title
= yield :title
2011-05-13 05:21:42 -07:00
|
2011-05-21 19:58:48 -07:00
- if content_for? :title_category
= yield :title_category
- else
#{t 'app_name'}: #{t '.title_tagline'}
2013-12-26 09:44:03 -08:00
%link{href: image_path('favicon.png'), rel: 'icon'}
= yield :stylesheets
= stylesheet_link_tag "application"
2011-05-20 16:29:04 -07:00
= yield :meta
= open_graph_tags
= csrf_meta_tag
= signed_in_meta_tag
- if user_signed_in?
= current_user_id_meta_tag
2010-11-05 15:45:05 -07:00
%body{:class => body_class}
#container
= yield :before_title
= render 'static/announcement'
- if content_for?(:title) && show_title_header?
2010-11-06 08:52:58 -07:00
%h1#title= yield :title
2010-11-05 15:45:05 -07:00
= yield :before_flashes
= flashes
- if content_for? :content
= yield(:content)
- else
= yield
2010-11-30 13:52:38 -08:00
- if home_link?
2010-11-05 15:45:05 -07:00
%a#home-link{:href => root_path}
%span= t 'app_name'
2010-11-05 15:45:05 -07:00
#userbar
- if user_signed_in?
2010-11-06 15:12:42 -07:00
%span
= t '.userbar.greeting', :user_name => current_user.name
= userbar_contributions_summary(current_user)
= link_to t('.userbar.items'), user_closet_hangers_path(current_user), :id => 'userbar-items-link'
= link_to t('.userbar.outfits'), current_user_outfits_path
= link_to t('.userbar.settings'), edit_auth_user_registration_path
= button_to t('.userbar.logout'), destroy_auth_user_session_path, method: :delete,
params: {return_to: request.fullpath}
2010-11-05 15:45:05 -07:00
- else
= link_to auth_user_sign_in_path_with_return_to, :id => 'userbar-log-in' do
%span= t('.userbar.login')
2010-11-05 15:45:05 -07:00
#footer
= form_tag choose_locale_path, :id => 'locale-form' do
= hidden_field_tag 'return_to', request.fullpath
= select_tag 'locale', options_for_select(locale_options, locale)
%noscript= submit_tag 'Go'
2010-11-05 15:45:05 -07:00
%ul
%li= link_to t('organization_name'), 'https://openneo.net/'
%li= link_to t('.footer.blog'), 'https://blog.openneo.net/'
%li= link_to t('.footer.source_code'), 'https://github.com/openneo/impress'
%li= link_to t('.footer.terms'), terms_path
2010-11-05 15:45:05 -07:00
%div
#{t('.footer.contact')}:
2010-11-05 15:45:05 -07:00
%ul
%li= link_to t('.footer.suggestions'), feedback_url
%li= mail_to contact_email, t('.footer.email')
%p= t '.footer.copyright', :year => Date.today.year
= javascript_include_tag 'application'
= yield(:javascripts)