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 From 2ff26eb7e2649b15cac850bc0c4c0363211d3379 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 22:41:02 +0100 Subject: Footer --- app/views/layouts/_footer.html.haml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'app/views/layouts') diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index dc74275..a0f2940 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -1,3 +1,13 @@ -%footer - %p - \© AMOOMA GmbH 2005 - #{Date.today.year.to_s} · Bachstr. 124 · 56566 Neuwied · Germany · #{mail_to 'info@amooma.de', 'info@amooma.de'} +- cache(['application_footer', I18n.locale]) do + %footer + %ul{:class => 'nav nav-pills'} + %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"} Support und Consulting + - if GuiFunction.display?('gemeinschaft_mailinglist_link_in_footer', current_user) + %li + %a{:href => "https://groups.google.com/group/gs5-users/"} Mailingliste + %li{:class => 'pull-right'} + = link_to 'brought to you by AMOOMA GmbH', 'http://amooma.de' \ No newline at end of file -- cgit v1.2.3 From 25f7eec8c93630650c2b5f980712261a14b00def Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 23:44:19 +0100 Subject: Avatar --- app/views/layouts/_navbar.html.haml | 43 +++++++++++++++++++++------------ app/views/layouts/application.html.haml | 9 ++++--- 2 files changed, 33 insertions(+), 19 deletions(-) (limited to 'app/views/layouts') diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index 4005e28..d6a8422 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -1,21 +1,34 @@ .navbar.navbar-inverse.navbar-fixed-top .navbar-inner - .container-fluid + .container + %a.brand{:href => (current_user.nil? ? '/' : tenant_path(current_user.current_tenant))} + Gemeinschaft 5 + %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 + %span.icon-bar + + - if current_user + .nav-collapse.collapse + %ul.nav + %li + %a{:href => "#about"} About + %li.pull_right + %a{:href => "#contact"} Contact + + - if current_user + %ul.nav.pull-right + - if current_page?(tenant_user_path(current_user.current_tenant, current_user)) + %li.active + %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} + = current_user + - else + %li + %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} + = current_user + %li - %a{:href => "#contact"} Contact - / /.nav-collapse + %a.navbar-link{:href => log_out_path} + %i.icon-off.icon-white + diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 8caee14..74331af 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -15,10 +15,6 @@ /[if lt IE 9] %body - = render 'layouts/navbar' - - = render_breadcrumbs :builder => ::BootstrapBreadcrumbsBuilder, :separator => "/" - .container .row .span12 @@ -28,6 +24,11 @@ %a.close{"data-dismiss" => "alert"} × = msg + - if current_user + = render_breadcrumbs :builder => ::BootstrapBreadcrumbsBuilder, :separator => "/" + + = render 'layouts/navbar' + = yield .row -- cgit v1.2.3 From f8bc860750f06ab95f9ced8e919e846d3e589819 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 00:02:03 +0100 Subject: Icons --- app/views/layouts/_navbar.html.haml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/views/layouts') diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index d6a8422..d6f08cb 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -19,6 +19,15 @@ - if current_user %ul.nav.pull-right + %li + - if current_user.image? + =image_tag(current_user.image_url(:mini).to_s, :class => 'img-rounded') + - else + - if current_user.male? + = image_tag 'icons/user-male-16x.png', :class => 'img-rounded' + - else + = image_tag 'icons/user-female-16x.png', :class => 'img-rounded' + - if current_page?(tenant_user_path(current_user.current_tenant, current_user)) %li.active %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} -- cgit v1.2.3