upgrade to different theme for main webpage

This commit is contained in:
2012-11-09 12:25:59 +01:00
parent 6e1710ee2e
commit d41994866b
45 changed files with 479 additions and 77 deletions
BIN
View File
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

@@ -5,7 +5,7 @@ root.Qsupplier=
table_container = $('#section-table-'+table_id)
section_container = $('.section-tables-active')
section_container.append(table_container)
Qsupplier.position_table_in_active_section(section_container, table_container)
Qsupplier.position_table_in_active_section(section_container, table_container, true)
# Set the section id of the table in the database
$.ajax(
@@ -165,3 +165,6 @@ root.Qsupplier=
if table.needs_help then to.addClass('needs_help') else to.removeClass('needs_help')
if table.needs_payment then to.addClass('needs_payment') else to.removeClass('needs_payment')
)
add_tables_to_active_section: ->
number_start = $('#add-tables-number-start')
number_end = $('#add-tables-number-end')
@@ -126,6 +126,7 @@ function t(path, vars){
} catch(err){
result = parts[parts.length - 1].capitalize();
}
if(!result) return parts[parts.length - 1].capitalize();
$.each(vars, function(v, value){ result = result.replace('%{'+v+'}', value)});
return result;
}
@@ -147,7 +148,9 @@ function getUrlVars() {
$(function(){
if(getUrlVars().message){
var container = $('.alert-success');
container.find('div').text($translations[$locale]['messages'][getUrlVars().message] || ('Message ' + getUrlVars().message + ' not found'));
// Prepend messages. if there is no path/period specified
var message = t((getUrlVars().message.indexOf('.') > -1 ? '' : 'messages.' ) + getUrlVars().message )
container.find('div').text(message);
container.show();
}
if(getUrlVars().list_closed){
+1
View File
@@ -10,5 +10,6 @@
*
*= require_self
*= require_directory .
*= require 'theme1/application'
* require 'bootstrap-devise-rails'
*/
@@ -1,6 +1,6 @@
/*
*= require 'bootstrap_and_overrides'
*= require 'bootstrap_overrides'
*= require 'twitter-bootstrap/bootstrap_and_overrides'
*= require 'twitter-bootstrap/bootstrap_overrides'
*= require 'jquery-ui-1.8.23.custom.css'
*= require 'general'
*= require_directory .
@@ -1,7 +1,10 @@
$table-width: 75px
.section-title
font-size: 24px
padding: 4px 0px
.section-tables-container
.section-title
font-size: 24px
.section-manage-tables
margin: -26px 6px 4px 6px
.section-table
background-color: #ccc
height: 44px
@@ -14,6 +17,7 @@ $table-width: 75px
.table-link
margin-top: -45px
.table-number
color: black
position: absolute
top: 0
line-height: 44px
@@ -44,6 +48,7 @@ $table-width: 75px
text-decoration: none
&.section-tables-inactive
.section-table
position: relative
margin-top: 10px
margin-bottom: 30px
float: left
@@ -0,0 +1,14 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_directory .
* require 'bootstrap-devise-rails'
*/
@@ -0,0 +1,214 @@
body
background-color: #333
margin: 0
padding: 0
background-image: image-url('theme1/footer-bg.jpg')
background-position: center top
.header-nav-banner
background-image: image-url('theme1/header.jpg')
background-position: center 25px
#header-wrap
#ceiling
position: relative
width: 100%
background-image: image-url('theme1/ceiling-center.jpg')
background-position: top center
background-repeat: no-repeat
.left
background-image: image-url('theme1/ceiling-left.jpg')
background-position: right top
background-repeat: repeat-x
height: 25px
position: absolute
left: 0
width: 50%
.right
background-image: image-url('theme1/ceiling-right.jpg')
background-position: left top
background-repeat: repeat-x
height: 25px
position: absolute
right: 0
width: 50%
.lights
position: absolute
height: 140px
width: 990px
left: 50%
margin-left: -495px
div
position: relative
background-repeat: no-repeat
width: 315px
height: 140px
float: left
z-index: 2
&.light1
background-image: image-url('theme1/light-1.jpg')
margin-left: 15px
margin-right: 2px
&.light2
background-image: image-url('theme1/light-2.jpg')
margin-right: 3px
&.light3
background-image: image-url('theme1/light-3.jpg')
.container
width: 960px
padding-top: 60px
position: relative
z-index: 4
margin: 0 auto
#header
margin-bottom: 20px
height: 74px
a
margin: 20px
#nav-wrap
.container
clear: both
overflow: hidden
z-index: 100
width: 900px
height: 48px
padding: 11px 25px 24px 25px
background-image: image-url('theme1/nav-bar.png')
background-repeat: no-repeat
background-position: 0 0
margin: 0 auto
ul.nav
float: left
margin: 0
padding: 0
list-style: none
li
position: relative
float: left
list-style: none
a
border: 0
color: white
display: block
float: left
font-family: 'Pacifico',serif
font-size: 18px
height: 46px
line-height: 46px
margin: 0 10px
padding: 0 20px
text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5)
#banner-wrap
z-index: 2
position: relative
.left
position: absolute
bottom: 0
left: 0
background-image: image-url('theme1/floor-left.jpg')
background-position: right
height: 48px
width: 50%
.right
position: absolute
bottom: 0
right: 0
background-image: image-url('theme1/floor-right.jpg')
background-position: left
height: 48px
width: 50%
.container
background-image: image-url('theme1/floor-center.jpg')
background-position: center bottom
background-repeat: no-repeat
margin: 0 auto
width: 982px
#banner
background-image: image-url('theme1/banner-bg.png')
background-position: 2px bottom
background-repeat: no-repeat
padding-bottom: 38px
position: relative
width: 982px
.wsite-header
border: 10px solid white
margin-left: 61px
width: 840px
height: 260px
background-image: image-url('theme1/banner-tall.jpg')
#main-wrap
font-size: 14px
font-family: Georgia, serif
line-height: 1.5
color: #848585
h1
font-size: 28px
padding: 0.5em 0 0.2em 0
line-height: 1.4
font-family: 'Pacifico', serif
color: #AE571F
h2
font-size: 24px
padding: 0.5em 0 0.2em 0
line-height: 1.2
font-family: 'Pacifico', serif
color: #AE571F
background-image: image-url('theme1/wall-bg.jpg')
background-position: center
overflow: visible
z-index: 2
position: relative
.container
background-image: image-url('theme1/content-bg.png')
background-position: 2px
min-height: 400px
margin: 0 auto
width: 974px
.content-top
width: 960px
height: 30px
margin-left: 9px
background-image: image-url('theme1/content-top.jpg')
.main-inner
width: 894px
padding: 0 40px 30px 40px
#wsite-content
#footer-wrap
color: white
background-image: image-url('theme1/footer-bg.jpg')
background-position: center
text-align: right
overflow: visible
.footer-shadow
height: 72px
width: 100%
background-image: image-url('theme1/footer-top-shadow.png')
background-repeat: repeat-x
position: relative
z-index: 4
.container
background-color: #420F03
width: 838px
padding: 72px 30px 20px 30px
position: relative
top: -72px
z-index: 3
overflow: visible
margin: 0 auto
.footer-top
width: 974px
height: 4px
position: relative
top: -72px
left: -60px
overflow: visible
background-image: image-url('theme1/footer-top.png')
.bottom
background-image: image-url('theme1/footer-bottom.png')
width: 898px
height: 35px
position: relative
bottom: -35px
left: -30px
overflow: visible
@@ -0,0 +1,14 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_directory .
* require 'bootstrap-devise-rails'
*/
+2 -2
View File
@@ -8,8 +8,8 @@
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require 'bootstrap_and_overrides'
*= require 'bootstrap_overrides'
*= require 'twitter-bootstrap/bootstrap_and_overrides'
*= require 'twitter-bootstrap/bootstrap_overrides'
*= require 'general'
*= require_directory .
*= require_self
@@ -11,7 +11,7 @@ module Suppliers
@start_time += current_supplier.night_offset.to_f.hours
@end_time += current_supplier.night_offset.to_f.hours
end
@lists = List.for_user_created_at current_user, @start_time..@end_time
@lists = List.for_supplier_created_at current_supplier, @start_time..@end_time
respond_to do |format|
format.html # index.html.erb
+6
View File
@@ -19,6 +19,8 @@ class List
validates :supplier_id, presence: true
view :by_supplier_id_and_id, key: [:supplier_id, :_id]
view :by_supplier_id, key: :supplier_id
view :for_supplier_view, key: [:supplier_id, :created_at]
view :active_by_table_id_view, type: :custom, map_function: %|function(doc){
if(doc.ruby_class == 'List' && doc.state == 'active'){
@@ -83,6 +85,10 @@ class List
database.view(for_user_view({startkey: [user.id, range.last], endkey: [user.id, range.first], include_docs: true, reduce: false, descending: true}.merge(options)))
end
def self.for_supplier_created_at(supplier, range, options = {})
database.view(for_supplier_view({startkey: [supplier.id, range.last], endkey: [supplier.id, range.first], include_docs: true, reduce: false, descending: true}.merge(options)))
end
def close!
orders.include_relation(:product_orders)
set_price
-2
View File
@@ -1,5 +1,3 @@
.page-header
h1 Qwaiter
p
= image_tag 'qr.png', class: 'home-qr'
|Welcome on the Qwaiter homepage. Qwaiter is an application that lets you place orders by simply scanning a code from a table on a terrace or a restaurant. Then directly the menu appears and you can place your order. See the progress while you wait for your drinks!
+38 -37
View File
@@ -11,28 +11,48 @@ html lang="en"
/[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="/favicon.ico" rel="shortcut icon"
link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'
body
.container
.navbar
.navbar-inner
.header-nav-banner
#header-wrap
#ceiling
.left
.right
.lights
.light1
.light2
.light3
.container
a.btn.btn-navbar data-target=".nav-collapse" data-toggle="collapse"
span.icon-bar
span.icon-bar
span.icon-bar
a.brand href=root_path = image_tag 'icons/logo-small.png', alt: application_title
.container.nav-collapse
ul.nav
li= link_to User.model_name.human_plural, user_root_path
li= link_to Supplier.model_name.human_plural, supplier_root_path
#header
= link_to image_tag('icons/logo-small.png', alt: application_title), root_path
#nav-wrap
.container
ul.nav
li= link_to User.model_name.human_plural, user_root_path
li= link_to Supplier.model_name.human_plural, supplier_root_path
#banner-wrap
.left
.right
.container
#banner
.wsite-header
.clearing
#main-wrap
.container
.content-top
.main-inner
#wsite-content.wsite-not-footer= yield
#footer-wrap
.footer-shadow
.container
.footer-top
.bottom
p © Companytools 2012
= yield :footer
.content
- if flash[:alert].present?
.alert.alert-error
@@ -42,23 +62,4 @@ html lang="en"
.alert.alert-success
a.close data-dismiss="alert" ×
div= flash[:notice]
.row
.span9
= yield
.span3
.well.sidebar-nav
h3= application_title
ul.nav.nav-list
li.nav-header Links
li= link_to "Home", root_path
li= link_to "Companytools", 'http://www.companytools.nl/'
= yield :sidebar
footer
p © Companytools 2012
/!
Javascripts
\==================================================
/! Placed at the end of the document so the pages load faster
= javascript_include_tag "application"
= yield :footer
+2 -2
View File
@@ -17,8 +17,8 @@ html lang="en"
link href="/images/apple-touch-icon.png" rel="apple-touch-icon-precomposed"
link href="/favicon.ico" rel="shortcut icon"
javascript:
var data_host = 'http://data.qwaiter.com';
//var data_host = 'http://localhost:3000';
//var data_host = 'http://data.qwaiter.com';
var data_host = 'http://localhost:3000';
//var data_host = 'http://192.168.1.74:3000';
var $locale = '#{I18n.locale}';
var $url_vars = null;
@@ -0,0 +1,64 @@
doctype html
html lang="en"
head
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) : application_title
= csrf_meta_tags
/! 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="/favicon.ico" rel="shortcut icon"
body
.container
.navbar
.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=root_path = image_tag 'icons/logo-small.png', alt: application_title
.container.nav-collapse
ul.nav
li= link_to User.model_name.human_plural, user_root_path
li= link_to Supplier.model_name.human_plural, supplier_root_path
.content
- if flash[:alert].present?
.alert.alert-error
a.close data-dismiss="alert" ×
div= flash[:alert]
- if flash[:notice].present?
.alert.alert-success
a.close data-dismiss="alert" ×
div= flash[:notice]
.row
.span9
= yield
.span3
.well.sidebar-nav
h3= application_title
ul.nav.nav-list
li.nav-header Links
li= link_to "Home", root_path
li= link_to "Companytools", 'http://www.companytools.nl/'
= yield :sidebar
footer
p © Companytools 2012
/!
Javascripts
\==================================================
/! Placed at the end of the document so the pages load faster
= javascript_include_tag "application"
= yield :footer
@@ -21,6 +21,18 @@
= link_to :i, [:suppliers, table], class: 'btn btn-mini table-link'
.table-number = table.number
.clearfix
.form-actions
= link_to t("helpers.links.back"), suppliers_sections_path, class: 'btn'
'
= link_to t('helpers.links.edit'), [:edit, :suppliers, @section], class: 'btn'
'
= link_to t('supplier.section.tables_view'), [:tables_view, :suppliers, @section], class: [:btn, 'btn-info']
'
a.btn href='#add-tables-modal' role='button' data-toggle='modal'= t('supplier.section.add_tables.button_label')
'
a.btn href='#arrange-tables-modal' role='button' data-toggle='modal'= t('supplier.section.arrange_tables.button_label')
'
= link_to t("helpers.links.destroy"), [:suppliers, @section], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-danger'
- content_for :footer do
javascript:
var current_section_id = '#{@section.id}';
@@ -34,3 +46,22 @@
Qsupplier.position_table_in_active_section(active_section_container, $(this), true);
});
});
#add-tables-modal.modal.hide.fade tabindex=-1 role=:dialog aria-labeledby='add-tables-modal-label' aria-hidden=true
.modal-header
button.close type=:button data-dismiss=:modal aria-hidden=true x
h3#add-tables-modal-label= t('supplier.section.add_tables.modal.title')
.modal-body
p= t('supplier.section.add_tables.modal.body_header')
form.form-horizontal
.control-group
label.control-label for='add-tables-number-start' = t('supplier.section.add_tables.modal.number_start')
.controls
input.input-mini#add-tables-number-start type=:number value=100
.control-group
label.control-label for='add-tables-number-end' = t('supplier.section.add_tables.modal.number_end')
.controls
input.input-mini#add-tables-number-end type=:number value=120
.modal-footer
a.btn href='#' Close
a.btn.btn-primary href='#' onclick=%|Qsupplier.add_tables_to_active_section()| Add
+9 -1
View File
@@ -1,6 +1,14 @@
- model_class = Section
.page-header= title :show, @section
dl.dl-horizontal.show-list
dt= model_class.human_attribute_name(:title)
dd= @section.title
dl.dl-horizontal.show-list
dt= model_class.human_attribute_name(:width)
dd= @section.width
dl.dl-horizontal.show-list
dt= model_class.human_attribute_name(:height)
dd= @section.height
.form-actions
= link_to t("helpers.links.back"), suppliers_sections_path, class: 'btn'
'
@@ -1,8 +1,9 @@
- model_class = Section
- content_for :row do
.span12.section-title= @section.title
.span12
.well.section-tables-container.section-tables-active
.section-title.pull-right= @section.title
.section-manage-tables.pull-right= link_to '', manage_tables_suppliers_section_path(@section), class: 'icon-pencil btn'
- for table in @section.tables
.section-table.hide{ id="section-table-#{table.id}" data-position-x=table.position_x data-position-y=table.position_y data-table-id=table.id}
.table-number = link_to table.number, suppliers_table_path(table)