From 18ed88c7e3c789366f6e5443dc4ee0bc981a4b88 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 20:18:16 +0100 Subject: Started the migration to Twitter Bootstrap. --- app/views/layouts/_footer.html.haml | 3 ++ app/views/layouts/_navbar.html.haml | 21 +++++++++ app/views/layouts/application.html.haml | 73 ++++++++++++----------------- app/views/layouts/old-application.html.haml | 48 +++++++++++++++++++ app/views/layouts/old_navbar.html.haml | 10 ++++ app/views/layouts/test.haml | 0 6 files changed, 113 insertions(+), 42 deletions(-) create mode 100644 app/views/layouts/_footer.html.haml create mode 100644 app/views/layouts/_navbar.html.haml create mode 100644 app/views/layouts/old-application.html.haml create mode 100644 app/views/layouts/old_navbar.html.haml create mode 100644 app/views/layouts/test.haml (limited to 'app/views/layouts') diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml new file mode 100644 index 0000000..dc74275 --- /dev/null +++ b/app/views/layouts/_footer.html.haml @@ -0,0 +1,3 @@ +%footer + %p + \© AMOOMA GmbH 2005 - #{Date.today.year.to_s} · Bachstr. 124 · 56566 Neuwied · Germany · #{mail_to 'info@amooma.de', 'info@amooma.de'} diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml new file mode 100644 index 0000000..4005e28 --- /dev/null +++ b/app/views/layouts/_navbar.html.haml @@ -0,0 +1,21 @@ +.navbar.navbar-inverse.navbar-fixed-top + .navbar-inner + .container-fluid + %a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"} + %span.icon-bar + %span.icon-bar + %span.icon-bar + %a.brand{:href => (current_user.nil? ? '/' : tenant_path(current_user.current_tenant))} Gemeinschaft 5 + .nav-collapse.collapse + %p.navbar-text.pull-right + - if current_user + %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} + = current_user + %ul.nav + %li.active + %a{:href => "#"} Home + %li + %a{:href => "#about"} About + %li + %a{:href => "#contact"} Contact + / /.nav-collapse diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index a2afbf8..8caee14 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,48 +1,37 @@ -!!! 5 - - - - -%html.no-js{ :lang => I18n.locale.to_s } - - %header - %meta{ :charset => "utf-8" }/ - ~#OPTIMIZE "/" seems to be supposed to make an empty element tag, but it doesn't work. HAML bug? - %title - = content_for?(:title) ? yield(:title) : "Untitled" - %meta{ :name => "viewport", :content => "width=device-width, initial-scale=1.0" }/ - = stylesheet_link_tag "application" +!!! +%html + %head + %meta{:charset => "utf-8"}/ + %title + = content_for?(:title) ? yield(:title) : "Gemeinschaft 5" + %meta{:name => 'viewport', :content => "width=device-width, initial-scale=1.0"} + - if content_for?(:meta_description) + %meta{:description => yield(:meta_description)}/ + %meta{:author => "AMOOMA GmbH"}/ + = stylesheet_link_tag "application", :media => "all" = javascript_include_tag "application" - = csrf_meta_tag - = yield(:head) - + = csrf_meta_tags + / HTML5 shim, for IE6-8 support of HTML5 elements + /[if lt IE 9] + %body - #container - - cache(['application_header', I18n.locale, current_user]) do - = render :partial => "shared/header" - = render :partial => "shared/flash", :locals => { :flash => flash} + = render 'layouts/navbar' - #content{:role => 'main'} - .light - %header.main - .breadcrumbs= render_breadcrumbs :separator => ' » ' - - if show_title? - %h1= yield(:title) - = yield + = render_breadcrumbs :builder => ::BootstrapBreadcrumbsBuilder, :separator => "/" - - cache(['application_footer', I18n.locale]) do - %footer#main - %ul - %li - %a{:href => "http://amooma.de/gemeinschaft/gs5"} Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')} - - if GuiFunction.display?('amooma_commercial_support_link_in_footer', current_user) - %li - %a{:href => "http://amooma.de"} Kommerzieller Support und Consulting - - if GuiFunction.display?('gemeinschaft_mailinglist_link_in_footer', current_user) - %li - %a{:href => "https://groups.google.com/group/gs5-users/"} Kostenlose Mailingliste + .container + .row + .span12 + - unless response.cache_control[:public] + - flash.each do |name, msg| + %div{:class => "alert alert-#{name == :notice ? "success" : "error"} fade in"} + %a.close{"data-dismiss" => "alert"} × + = msg - .amooma-logo - %span brought to you by - %a{ :target => '_blank', :href => "http://amooma.de/" } Amooma + = yield + .row + .span12 + %hr/ + = render 'layouts/footer' + / /container diff --git a/app/views/layouts/old-application.html.haml b/app/views/layouts/old-application.html.haml new file mode 100644 index 0000000..a2afbf8 --- /dev/null +++ b/app/views/layouts/old-application.html.haml @@ -0,0 +1,48 @@ +!!! 5 + + + + +%html.no-js{ :lang => I18n.locale.to_s } + + %header + %meta{ :charset => "utf-8" }/ + ~#OPTIMIZE "/" seems to be supposed to make an empty element tag, but it doesn't work. HAML bug? + %title + = content_for?(:title) ? yield(:title) : "Untitled" + %meta{ :name => "viewport", :content => "width=device-width, initial-scale=1.0" }/ + = stylesheet_link_tag "application" + = javascript_include_tag "application" + = csrf_meta_tag + = yield(:head) + + %body + #container + - cache(['application_header', I18n.locale, current_user]) do + = render :partial => "shared/header" + = render :partial => "shared/flash", :locals => { :flash => flash} + + #content{:role => 'main'} + .light + %header.main + .breadcrumbs= render_breadcrumbs :separator => ' » ' + - if show_title? + %h1= yield(:title) + = yield + + - cache(['application_footer', I18n.locale]) do + %footer#main + %ul + %li + %a{:href => "http://amooma.de/gemeinschaft/gs5"} Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')} + - if GuiFunction.display?('amooma_commercial_support_link_in_footer', current_user) + %li + %a{:href => "http://amooma.de"} Kommerzieller Support und Consulting + - if GuiFunction.display?('gemeinschaft_mailinglist_link_in_footer', current_user) + %li + %a{:href => "https://groups.google.com/group/gs5-users/"} Kostenlose Mailingliste + + .amooma-logo + %span brought to you by + %a{ :target => '_blank', :href => "http://amooma.de/" } Amooma + diff --git a/app/views/layouts/old_navbar.html.haml b/app/views/layouts/old_navbar.html.haml new file mode 100644 index 0000000..4d795e4 --- /dev/null +++ b/app/views/layouts/old_navbar.html.haml @@ -0,0 +1,10 @@ +.navbar.navbar-inverse.navbar-fixed-top + .navbar-inner + .container + %a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"} + %span.icon-bar + %span.icon-bar + %span.icon-bar + %a.brand{:href => "/"} Gemeinschaft 5 + + / /.nav-collapse diff --git a/app/views/layouts/test.haml b/app/views/layouts/test.haml new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3