summaryrefslogtreecommitdiff
path: root/app/views/layouts
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-22 00:04:03 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-22 00:04:03 +0100
commitab63774d954fe1f967a97ffe5a0a66016eca2257 (patch)
treeb3974a58deabe6a989ad7352f10e75d7495cb0c5 /app/views/layouts
parent495bbfdf78206c8adaec057e83900dda6754092c (diff)
parentf8bc860750f06ab95f9ced8e919e846d3e589819 (diff)
Merge branch 'tb-css' into develop
Diffstat (limited to 'app/views/layouts')
-rw-r--r--app/views/layouts/_footer.html.haml13
-rw-r--r--app/views/layouts/_navbar.html.haml43
-rw-r--r--app/views/layouts/application.html.haml74
-rw-r--r--app/views/layouts/old-application.html.haml48
-rw-r--r--app/views/layouts/old_navbar.html.haml10
-rw-r--r--app/views/layouts/test.haml0
6 files changed, 146 insertions, 42 deletions
diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml
new file mode 100644
index 0000000..a0f2940
--- /dev/null
+++ b/app/views/layouts/_footer.html.haml
@@ -0,0 +1,13 @@
+- 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
diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml
new file mode 100644
index 0000000..d6f08cb
--- /dev/null
+++ b/app/views/layouts/_navbar.html.haml
@@ -0,0 +1,43 @@
+.navbar.navbar-inverse.navbar-fixed-top
+ .navbar-inner
+ .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
+
+ - 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
+ %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)}
+ = current_user
+ - else
+ %li
+ %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)}
+ = current_user
+
+ %li
+ %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 a2afbf8..74331af 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -1,48 +1,38 @@
-!!! 5
-<!--[if lt IE 7]> <html lang="en" class="no-js ie6"> <![endif]-->
-<!--[if IE 7]> <html lang="en" class="no-js ie7"> <![endif]-->
-<!--[if IE 8]> <html lang="en" class="no-js ie8"> <![endif]-->
-<!--[if gt IE 8]><!-->
-%html.no-js{ :lang => I18n.locale.to_s }
- <!--<![endif]-->
- %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]
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
%body
- #container
- - cache(['application_header', I18n.locale, current_user]) do
- = render :partial => "shared/header"
- = render :partial => "shared/flash", :locals => { :flash => flash}
+ .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
- #content{:role => 'main'}
- .light
- %header.main
- .breadcrumbs= render_breadcrumbs :separator => ' » '
- - if show_title?
- %h1= yield(:title)
- = yield
+ - if current_user
+ = 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
+ = render 'layouts/navbar'
- .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
+<!--[if lt IE 7]> <html lang="en" class="no-js ie6"> <![endif]-->
+<!--[if IE 7]> <html lang="en" class="no-js ie7"> <![endif]-->
+<!--[if IE 8]> <html lang="en" class="no-js ie8"> <![endif]-->
+<!--[if gt IE 8]><!-->
+%html.no-js{ :lang => I18n.locale.to_s }
+ <!--<![endif]-->
+ %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
--- /dev/null
+++ b/app/views/layouts/test.haml