diaspora/app/views/layouts/application.html.haml
Steven Hancock e1607baff4 jquery_include_tag helper
Implement the jquery_include_tag helper, which is used in several
views but was not implemented in the code. This helper attempts to
load jQuery from the Google CDN (matching the version of the vendored
jquery.js in jquery-rails), falling back to the vendored copy if the
google CDN fails. The helper also loads jquery_ujs.js from jquery-rails.

A jquery_cdn setting is added to application.yml to enable or disable
serving jQuery from the Google CDN (for those podmins who would rather
not use Google's services).

Update app/views/application.html.haml to use the jquery_include_tag
helper since it was the only view that was including the vendored
copy of jquery directly with jquery_include_tag.
2012-03-27 18:07:44 -07:00

73 lines
2.3 KiB
Text

-# Copyright (c) 2010-2011, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
!!!
%html{:lang => I18n.locale.to_s, :dir => (rtl?) ? 'rtl' : 'ltr'}
%head
%meta{:charset => 'utf-8'}
%meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1'}
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}
%meta{:name => "description", :content => "Diaspora*"}
%meta{:name => "author", :content => "Diaspora, Inc."}
%link{:rel => 'shortcut icon', :href => '/favicon.png'}
%link{:rel => 'apple-touch-icon', :href => '/apple-touch-icon.png'}
%title
= page_title yield(:page_title)
= include_base_css_framework
= stylesheet_link_tag 'login', 'application', 'default'
- if rtl?
= stylesheet_link_tag :rtl, :media => 'all'
= old_browser_js_support
<!--[if IE]>
= javascript_include_tag :ie
<![endif]-->
= jquery_include_tag
- unless @landing_page
= javascript_include_tag :main, :templates
= load_javascript_locales
= set_asset_host
= set_current_user_in_javascript
= translation_missing_warnings
= current_user_atom_tag
= yield(:head)
= csrf_meta_tag
%body
= flash_messages
%header
- unless current_user
= render 'layouts/header'
.container
- if @aspect == :getting_started || @page == :logged_out
= yield
- else
.span-24.last
= yield
- unless @landing_page
%a{:id=>"back-to-top", :title=>"#{t('.back_to_top')}", :href=>"#"}
&#8679;
%footer
.container
%ul#footer_nav
%li= link_to '@joindiaspora', "http://twitter.com/joindiaspora"
%li= link_to 'github', "https://github.com/diaspora/diaspora"
%li= link_to t('layouts.header.blog'), "http://blog.joindiaspora.com"
%li= link_to t('layouts.header.code'), "#{root_url.chomp('/')}/source.tar.gz" unless request.url.match(/joindiaspora.com/)
%li= link_to t('.whats_new'), 'https://github.com/diaspora/diaspora/wiki/Changelog'
%li= link_to(t('layouts.application.toggle'), toggle_mobile_path) if is_mobile_device?
= image_tag 'powered_by_diaspora.png', :height => "11px", :width => "145px"