Added twitter bootstrap layout. Adapt home page.
This commit is contained in:
parent
31735f35ab
commit
f20ae890dd
18 changed files with 334 additions and 264 deletions
|
|
@ -1,80 +0,0 @@
|
|||
<%
|
||||
u = @current_user
|
||||
tabs = [
|
||||
{ :name => "Start", :url => root_path, :active => ["index", "home"],
|
||||
:subnav => [
|
||||
{ :name => "Meine Aufgaben", :url => user_tasks_path },
|
||||
{ :name => "Meine Bestellgruppe", :url => my_ordergroup_path, :access_denied? => (!u.ordergroup)},
|
||||
{ :name => "Mein Profil", :url => my_profile_path}
|
||||
]
|
||||
},
|
||||
{ :name => "Foodcoop", :url => tasks_path,
|
||||
:active => ["foodcoop", "tasks", "messages", "foodcoop/ordergroups", "foodcoop/workgroups", "foodcoop/users"],
|
||||
:subnav => [
|
||||
{ :name => "Mitglieder", :url => foodcoop_users_path},
|
||||
{ :name => "Abeitsgruppen", :url => foodcoop_workgroups_path},
|
||||
{ :name => "Bestellgruppen", :url => foodcoop_ordergroups_path},
|
||||
{ :name => "Nachrichten", :url => messages_path},
|
||||
{ :name => "Aufgaben", :url => tasks_path}
|
||||
]
|
||||
},
|
||||
{ :name => "Wiki", :url => wiki_path, :active => ["pages", "wiki"],
|
||||
:subnav => [
|
||||
{ :name => "Startseite", :url => wiki_path },
|
||||
{ :name => "Alle Seiten", :url => all_pages_path }
|
||||
]
|
||||
},
|
||||
{ :name => "Bestellungen", :url => u.ordergroup ? group_orders_path : orders_path,
|
||||
:active => ["orders", "ordering"],
|
||||
:subnav => [
|
||||
{ :name => "Bestellen!", :url => group_orders_path },
|
||||
{ :name => "Meine Bestellungen", :url => archive_group_orders_path },
|
||||
{ :name => "Bestellverwaltung", :url => orders_path, :access_denied? => (!u.role_orders?) }
|
||||
]
|
||||
},
|
||||
{ :name => "Artikel", :url => suppliers_path,
|
||||
:active => ["articles", "suppliers", "deliveries", "article_categories", "stockit", "stock_takings"],
|
||||
:access_denied? => (!u.role_article_meta? && !u.role_suppliers?),
|
||||
:subnav => [
|
||||
{ :name => "Artikel", :url => suppliers_path },
|
||||
{ :name => "Lager", :url => stock_articles_path },
|
||||
{ :name => "Lieferantinnen", :url => suppliers_path, :access_denied? => (!u.role_suppliers?) },
|
||||
{ :name => "Kategorien", :url => article_categories_path }
|
||||
]
|
||||
},
|
||||
{ :name => "Finanzen", :url => finance_root_path,
|
||||
:active => ["finance/"],
|
||||
:access_denied? => (!u.role_finance?),
|
||||
:subnav => [
|
||||
{ :name => "Konten verwalten", :url => finance_ordergroups_path },
|
||||
{ :name => "Bestellungen abrechnen", :url => finance_balancing_path },
|
||||
{ :name => "Rechnungen", :url => finance_invoices_path }
|
||||
]
|
||||
},
|
||||
{ :name => "Administration", :url => admin_root_path,
|
||||
:active => ["admin/"],
|
||||
:access_denied? => (!u.role_admin?),
|
||||
:subnav => [
|
||||
{ :name => "Benutzerinnen", :url => admin_users_path },
|
||||
{ :name => "Bestellgruppen", :url => admin_ordergroups_path },
|
||||
{ :name => "Arbeitsgruppen", :url => admin_workgroups_path }
|
||||
]
|
||||
}
|
||||
]
|
||||
-%>
|
||||
<ul>
|
||||
<% for tab in tabs -%>
|
||||
<% unless tab[:access_denied?] -%>
|
||||
<li class="<%= 'current' if tab_is_active?(tab) %>">
|
||||
<%= link_to tab[:name], tab[:url] %>
|
||||
<ul>
|
||||
<% for subtab in tab[:subnav] -%>
|
||||
<% unless subtab[:access_denied?] -%>
|
||||
<li><%= link_to subtab[:name], subtab[:url] %></li>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
</ul>
|
||||
</li>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
</ul>
|
||||
|
|
@ -1,32 +1,58 @@
|
|||
!!!
|
||||
%html
|
||||
!!! 5
|
||||
%html(lang="en")
|
||||
%head
|
||||
%meta{"http-equiv" => "content-type", :content => "text/html;charset=UTF-8"}
|
||||
%title= "FoodSoft - " + (yield(:title) or controller.controller_name)
|
||||
= stylesheet_link_tag 'application'
|
||||
= stylesheet_link_tag "print", :media => "print"
|
||||
<!--[if lte IE 7]>
|
||||
= stylesheet_link_tag 'ie_hacks'
|
||||
<![endif]-->
|
||||
= javascript_include_tag 'application'
|
||||
%meta(charset="utf-8")
|
||||
%meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
|
||||
%meta(name="viewport" content="width=device-width, initial-scale=1.0")
|
||||
%title= content_for?(:title) ? yield(:title) : "Foodsoft"
|
||||
= csrf_meta_tags
|
||||
= yield(:head)
|
||||
%body
|
||||
#logininfo= render :partial => 'shared/loginInfo'
|
||||
|
||||
#header
|
||||
#logo
|
||||
= link_to root_path do
|
||||
<span>food</span>soft
|
||||
%span{:style => "color:white; font-size:45%; letter-spacing: -1px;"}= FoodsoftConfig[:name]
|
||||
#nav= render :partial => 'layouts/main_tabnav'
|
||||
/ Le HTML5 shim, for IE6-8 support of HTML elements
|
||||
/[if lt IE 9]
|
||||
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
|
||||
= stylesheet_link_tag "application", :media => "all"
|
||||
%link(href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144")
|
||||
%link(href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon-precomposed" sizes="114x114")
|
||||
%link(href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon-precomposed" sizes="72x72")
|
||||
%link(href="images/apple-touch-icon.png" rel="apple-touch-icon-precomposed")
|
||||
%link(href="images/favicon.ico" rel="shortcut icon")
|
||||
|
||||
#main
|
||||
#content
|
||||
- flash.each do |name, msg|
|
||||
= content_tag :h3, msg, :id => "flash#{name.to_s.camelize}", :class => "flash #{name}"
|
||||
#loader{:style => "display:none;"}= image_tag("loader.gif", :border => 0)
|
||||
- if show_title?
|
||||
%h1= yield(:title)
|
||||
= yield
|
||||
#ajax_box(style="display:none")
|
||||
|
||||
%body
|
||||
.row-fluid
|
||||
|
||||
.navbar.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
|
||||
= link_to 'Foodsoft', root_path(anchor: ''), class: 'brand'
|
||||
.container.nav-collapse
|
||||
= render_navigation expand_all: true, renderer: :bootstrap
|
||||
|
||||
.container-fluid
|
||||
.row-fluid
|
||||
- if content_for?(:sidebar)
|
||||
.span2
|
||||
= yield(:sidebar)
|
||||
.span10
|
||||
- if show_title?
|
||||
.page-header
|
||||
%h1= yield(:title)
|
||||
= yield
|
||||
- else
|
||||
- if show_title?
|
||||
.page-header
|
||||
%h1= yield(:title)
|
||||
= yield
|
||||
|
||||
%footer
|
||||
%p
|
||||
Foodsoft, open source software to manage a non-profit food coop.
|
||||
|
||||
/
|
||||
Javascripts
|
||||
\==================================================
|
||||
/ Placed at the end of the document so the pages load faster
|
||||
= javascript_include_tag "application"
|
||||
|
|
|
|||
32
app/views/layouts/application1.html.haml
Normal file
32
app/views/layouts/application1.html.haml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
!!!
|
||||
%html
|
||||
%head
|
||||
%meta{"http-equiv" => "content-type", :content => "text/html;charset=UTF-8"}
|
||||
%title= "FoodSoft - " + (yield(:title) or controller.controller_name)
|
||||
= stylesheet_link_tag 'application'
|
||||
= stylesheet_link_tag "print", :media => "print"
|
||||
<!--[if lte IE 7]>
|
||||
= stylesheet_link_tag 'ie_hacks'
|
||||
<![endif]-->
|
||||
= javascript_include_tag 'application'
|
||||
= csrf_meta_tags
|
||||
= yield(:head)
|
||||
%body
|
||||
#logininfo= render :partial => 'shared/loginInfo'
|
||||
|
||||
#header
|
||||
#logo
|
||||
= link_to root_path do
|
||||
<span>food</span>soft
|
||||
%span{:style => "color:white; font-size:45%; letter-spacing: -1px;"}= FoodsoftConfig[:name]
|
||||
#nav= render :partial => 'layouts/main_tabnav'
|
||||
|
||||
#main
|
||||
#content
|
||||
- flash.each do |name, msg|
|
||||
= content_tag :h3, msg, :id => "flash#{name.to_s.camelize}", :class => "flash #{name}"
|
||||
#loader{:style => "display:none;"}= image_tag("loader.gif", :border => 0)
|
||||
- if show_title?
|
||||
%h1= yield(:title)
|
||||
= yield
|
||||
#ajax_box(style="display:none")
|
||||
Loading…
Add table
Add a link
Reference in a new issue