1
0
Fork 0
forked from OpenNeo/impress
impress/app/views/layouts/application.html.haml
Matchu 2876de2db0 Move closet-hangers-update form from partial to JS
We lose no-JS support, which I kinda miss, but caching is gonna be more
important down the line. Delete form moves next, then we cache.

CSRF token changes: it looks like, by setting a data attribute in AJAX, I
was overwriting the CSRF token. I don't remember it working that way, but
now we use beforeSend to add the X-CSRF-Token header instead, which is nicer,
anyway. The issue might've been something else, but this worked :/

The CSS was also not showing the loading ellipsis properly. I think that's a
dev-only issue in how live assets are being served versus static assets, but
may as well add UTF-8 charset directives everywhere, anyway.
2013-06-22 15:27:00 -07:00

76 lines
2.4 KiB
Text

!!! 5
%html
%head
%meta{charset: 'utf-8'}
%title
- if content_for? :title
= yield :title
|
- if content_for? :title_category
= yield :title_category
- else
#{t 'app_name'}: #{t '.title_tagline'}
/[if IE]
= include_javascript_libraries :html5
= yield :stylesheets
= stylesheet_link_tag "application"
= yield :meta
= open_graph_tags
= csrf_meta_tag
= signed_in_meta_tag
%body{:class => body_class}
= javascript_include_tag "analytics"
#container
= yield :before_title
- if content_for?(:title) && show_title_header?
%h1#title= yield :title
= render 'static/announcement.html'
= yield :before_flashes
= flashes
- if content_for? :content
= yield(:content)
- else
= yield
- if home_link?
%a#home-link{:href => root_path}
%span= t 'app_name'
#userbar
- if user_signed_in?
%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'), Openneo::Auth.remote_settings_url
= link_to t('.userbar.logout'), logout_path_with_return_to
- else
= link_to login_path_with_return_to, :id => 'userbar-log-in' do
= image_tag auth_server_icon_url
%span= t('.userbar.login')
#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)
= submit_tag 'Go'
%ul
%li= link_to t('organization_name'), 'http://openneo.net/'
%li= link_to t('.footer.blog'), 'http://blog.openneo.net/'
%li= link_to t('.footer.source_code'),
'http://github.com/matchu/openneo-impress-rails'
%li= link_to t('.footer.terms'), terms_path
%div
#{t('.footer.contact')}:
%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
= yield(:javascripts)