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
+2 -1
View File
@@ -18,7 +18,7 @@ group :assets do
gem 'compass-rails' gem 'compass-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes # See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3' gem 'uglifier', '>= 1.0.3'
end end
@@ -26,6 +26,7 @@ end
gem 'jquery-rails' gem 'jquery-rails'
gem 'haml-rails' gem 'haml-rails'
gem 'slim-rails' gem 'slim-rails'
gem 'less-rails'
gem 'couch_potato' , :git => 'git://github.com/bterkuile/couch_potato.git' gem 'couch_potato' , :git => 'git://github.com/bterkuile/couch_potato.git'
gem 'simply_stored' , :git => 'git://github.com/bterkuile/simply_stored.git' gem 'simply_stored' , :git => 'git://github.com/bterkuile/simply_stored.git'
+25 -24
View File
@@ -9,7 +9,7 @@ GIT
GIT GIT
remote: git://github.com/bterkuile/simply_stored.git remote: git://github.com/bterkuile/simply_stored.git
revision: ad8c6af0d845a8eb3d1caeb47ede1e607f94e854 revision: 955a484c4046b3343f07fd0d783342d01bf26f66
specs: specs:
simply_stored (1.0.0) simply_stored (1.0.0)
activesupport activesupport
@@ -50,25 +50,25 @@ GEM
ansi (1.4.3) ansi (1.4.3)
arel (3.0.2) arel (3.0.2)
bcrypt-ruby (3.0.1) bcrypt-ruby (3.0.1)
builder (3.0.3) builder (3.0.4)
capybara (1.1.2) capybara (1.1.3)
mime-types (>= 1.16) mime-types (>= 1.16)
nokogiri (>= 1.3.3) nokogiri (>= 1.3.3)
rack (>= 1.0.0) rack (>= 1.0.0)
rack-test (>= 0.5.4) rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0) selenium-webdriver (~> 2.0)
xpath (~> 0.1.4) xpath (~> 0.1.4)
childprocess (0.3.5) childprocess (0.3.6)
ffi (~> 1.0, >= 1.0.6) ffi (~> 1.0, >= 1.0.6)
chunky_png (1.2.6) chunky_png (1.2.6)
coderay (1.0.7) coderay (1.0.8)
coffee-rails (3.2.2) coffee-rails (3.2.2)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
railties (~> 3.2.0) railties (~> 3.2.0)
coffee-script (2.2.0) coffee-script (2.2.0)
coffee-script-source coffee-script-source
execjs execjs
coffee-script-source (1.3.3) coffee-script-source (1.4.0)
commonjs (0.2.6) commonjs (0.2.6)
compass (0.12.2) compass (0.12.2)
chunky_png (~> 1.2) chunky_png (~> 1.2)
@@ -109,7 +109,7 @@ GEM
hike (1.2.1) hike (1.2.1)
i18n (0.6.1) i18n (0.6.1)
journey (1.0.4) journey (1.0.4)
jquery-rails (2.1.2) jquery-rails (2.1.3)
railties (>= 3.1.0, < 5.0) railties (>= 3.1.0, < 5.0)
thor (~> 0.14) thor (~> 0.14)
json (1.6.7) json (1.6.7)
@@ -121,7 +121,7 @@ GEM
rails rails
less (2.2.2) less (2.2.2)
commonjs (~> 0.2.6) commonjs (~> 0.2.6)
less-rails (2.2.3) less-rails (2.2.6)
actionpack (>= 3.1) actionpack (>= 3.1)
less (~> 2.2.0) less (~> 2.2.0)
libv8 (3.3.10.4) libv8 (3.3.10.4)
@@ -131,11 +131,11 @@ GEM
i18n (>= 0.4.0) i18n (>= 0.4.0)
mime-types (~> 1.16) mime-types (~> 1.16)
treetop (~> 1.4.8) treetop (~> 1.4.8)
method_source (0.8) method_source (0.8.1)
mime-types (1.19) mime-types (1.19)
mini_magick (3.4) mini_magick (3.4)
subexec (~> 0.2.1) subexec (~> 0.2.1)
multi_json (1.3.6) multi_json (1.3.7)
nokogiri (1.5.5) nokogiri (1.5.5)
orm_adapter (0.0.7) orm_adapter (0.0.7)
polyglot (0.3.3) polyglot (0.3.3)
@@ -150,7 +150,7 @@ GEM
rack rack
rack-ssl (1.3.2) rack-ssl (1.3.2)
rack rack
rack-test (0.6.1) rack-test (0.6.2)
rack (>= 1.0) rack (>= 1.0)
rails (3.2.8) rails (3.2.8)
actionmailer (= 3.2.8) actionmailer (= 3.2.8)
@@ -180,25 +180,25 @@ GEM
rspec-core (2.11.1) rspec-core (2.11.1)
rspec-expectations (2.11.3) rspec-expectations (2.11.3)
diff-lcs (~> 1.1.3) diff-lcs (~> 1.1.3)
rspec-mocks (2.11.2) rspec-mocks (2.11.3)
rspec-rails (2.11.0) rspec-rails (2.11.4)
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
railties (>= 3.0) railties (>= 3.0)
rspec (~> 2.11.0) rspec (~> 2.11.0)
rubyzip (0.9.9) rubyzip (0.9.9)
sass (3.2.1) sass (3.2.2)
sass-rails (3.2.5) sass-rails (3.2.5)
railties (~> 3.2.0) railties (~> 3.2.0)
sass (>= 3.1.10) sass (>= 3.1.10)
tilt (~> 1.3) tilt (~> 1.3)
selenium-webdriver (2.25.0) selenium-webdriver (2.26.0)
childprocess (>= 0.2.5) childprocess (>= 0.2.5)
libwebsocket (~> 0.1.3) libwebsocket (~> 0.1.3)
multi_json (~> 1.0) multi_json (~> 1.0)
rubyzip rubyzip
slim (1.3.0) slim (1.3.3)
temple (~> 0.4.1) temple (~> 0.5.5)
tilt (~> 1.3.3) tilt (~> 1.3.3)
slim-rails (1.0.3) slim-rails (1.0.3)
actionpack (~> 3.0) actionpack (~> 3.0)
@@ -211,26 +211,25 @@ GEM
rack (~> 1.0) rack (~> 1.0)
tilt (~> 1.1, != 1.3.0) tilt (~> 1.1, != 1.3.0)
subexec (0.2.2) subexec (0.2.2)
temple (0.4.1) temple (0.5.5)
therubyracer (0.10.2) therubyracer (0.10.2)
libv8 (~> 3.3.10) libv8 (~> 3.3.10)
thin (1.4.1) thin (1.5.0)
daemons (>= 1.0.9) daemons (>= 1.0.9)
eventmachine (>= 0.12.6) eventmachine (>= 0.12.6)
rack (>= 1.0.0) rack (>= 1.0.0)
thor (0.16.0) thor (0.16.0)
tilt (1.3.3) tilt (1.3.3)
treetop (1.4.10) treetop (1.4.12)
polyglot polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
turn (0.9.6) turn (0.9.6)
ansi ansi
twitter-bootstrap-rails (2.1.3) twitter-bootstrap-rails (2.1.6)
actionpack (>= 3.1) actionpack (>= 3.1)
less-rails (~> 2.2.3) execjs
railties (>= 3.1) railties (>= 3.1)
therubyracer (~> 0.10.2) tzinfo (0.3.35)
tzinfo (0.3.33)
uglifier (1.3.0) uglifier (1.3.0)
execjs (>= 0.3.0) execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2) multi_json (~> 1.0, >= 1.0.2)
@@ -253,6 +252,7 @@ DEPENDENCIES
haml-rails haml-rails
jquery-rails jquery-rails
kaminari-bootstrap kaminari-bootstrap
less-rails
mini_magick mini_magick
pry pry
rack-cors rack-cors
@@ -263,6 +263,7 @@ DEPENDENCIES
selenium-webdriver selenium-webdriver
simply_stored! simply_stored!
slim-rails slim-rails
therubyracer
thin thin
turn turn
twitter-bootstrap-rails twitter-bootstrap-rails
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) table_container = $('#section-table-'+table_id)
section_container = $('.section-tables-active') section_container = $('.section-tables-active')
section_container.append(table_container) 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 # Set the section id of the table in the database
$.ajax( $.ajax(
@@ -165,3 +165,6 @@ root.Qsupplier=
if table.needs_help then to.addClass('needs_help') else to.removeClass('needs_help') 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') 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){ } catch(err){
result = parts[parts.length - 1].capitalize(); result = parts[parts.length - 1].capitalize();
} }
if(!result) return parts[parts.length - 1].capitalize();
$.each(vars, function(v, value){ result = result.replace('%{'+v+'}', value)}); $.each(vars, function(v, value){ result = result.replace('%{'+v+'}', value)});
return result; return result;
} }
@@ -147,7 +148,9 @@ function getUrlVars() {
$(function(){ $(function(){
if(getUrlVars().message){ if(getUrlVars().message){
var container = $('.alert-success'); 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(); container.show();
} }
if(getUrlVars().list_closed){ if(getUrlVars().list_closed){
+1
View File
@@ -10,5 +10,6 @@
* *
*= require_self *= require_self
*= require_directory . *= require_directory .
*= require 'theme1/application'
* require 'bootstrap-devise-rails' * require 'bootstrap-devise-rails'
*/ */
@@ -1,6 +1,6 @@
/* /*
*= require 'bootstrap_and_overrides' *= require 'twitter-bootstrap/bootstrap_and_overrides'
*= require 'bootstrap_overrides' *= require 'twitter-bootstrap/bootstrap_overrides'
*= require 'jquery-ui-1.8.23.custom.css' *= require 'jquery-ui-1.8.23.custom.css'
*= require 'general' *= require 'general'
*= require_directory . *= require_directory .
@@ -1,7 +1,10 @@
$table-width: 75px $table-width: 75px
.section-title
font-size: 24px
padding: 4px 0px
.section-tables-container .section-tables-container
.section-title .section-manage-tables
font-size: 24px margin: -26px 6px 4px 6px
.section-table .section-table
background-color: #ccc background-color: #ccc
height: 44px height: 44px
@@ -14,6 +17,7 @@ $table-width: 75px
.table-link .table-link
margin-top: -45px margin-top: -45px
.table-number .table-number
color: black
position: absolute position: absolute
top: 0 top: 0
line-height: 44px line-height: 44px
@@ -44,6 +48,7 @@ $table-width: 75px
text-decoration: none text-decoration: none
&.section-tables-inactive &.section-tables-inactive
.section-table .section-table
position: relative
margin-top: 10px margin-top: 10px
margin-bottom: 30px margin-bottom: 30px
float: left 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 * 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. * compiled file, but it's generally better to create a new file per style scope.
* *
*= require 'bootstrap_and_overrides' *= require 'twitter-bootstrap/bootstrap_and_overrides'
*= require 'bootstrap_overrides' *= require 'twitter-bootstrap/bootstrap_overrides'
*= require 'general' *= require 'general'
*= require_directory . *= require_directory .
*= require_self *= require_self
@@ -11,7 +11,7 @@ module Suppliers
@start_time += current_supplier.night_offset.to_f.hours @start_time += current_supplier.night_offset.to_f.hours
@end_time += current_supplier.night_offset.to_f.hours @end_time += current_supplier.night_offset.to_f.hours
end 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| respond_to do |format|
format.html # index.html.erb format.html # index.html.erb
+6
View File
@@ -19,6 +19,8 @@ class List
validates :supplier_id, presence: true validates :supplier_id, presence: true
view :by_supplier_id_and_id, key: [:supplier_id, :_id] 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){ view :active_by_table_id_view, type: :custom, map_function: %|function(doc){
if(doc.ruby_class == 'List' && doc.state == 'active'){ 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))) 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 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! def close!
orders.include_relation(:product_orders) orders.include_relation(:product_orders)
set_price set_price
-2
View File
@@ -1,5 +1,3 @@
.page-header
h1 Qwaiter
p p
= image_tag 'qr.png', class: 'home-qr' = 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! |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] /[if lt IE 9]
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js" = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
= stylesheet_link_tag "application", :media => "all" = 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="/favicon.ico" rel="shortcut icon"
link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'
body body
.container .header-nav-banner
#header-wrap
.navbar #ceiling
.navbar-inner .left
.right
.lights
.light1
.light2
.light3
.container .container
a.btn.btn-navbar data-target=".nav-collapse" data-toggle="collapse" #header
span.icon-bar = link_to image_tag('icons/logo-small.png', alt: application_title), root_path
span.icon-bar #nav-wrap
span.icon-bar .container
a.brand href=root_path = image_tag 'icons/logo-small.png', alt: application_title ul.nav
.container.nav-collapse li= link_to User.model_name.human_plural, user_root_path
ul.nav li= link_to Supplier.model_name.human_plural, supplier_root_path
li= link_to User.model_name.human_plural, user_root_path #banner-wrap
li= link_to Supplier.model_name.human_plural, supplier_root_path .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 &copy; Companytools 2012
= yield :footer
.content .content
- if flash[:alert].present? - if flash[:alert].present?
.alert.alert-error .alert.alert-error
@@ -42,23 +62,4 @@ html lang="en"
.alert.alert-success .alert.alert-success
a.close data-dismiss="alert" &#215; a.close data-dismiss="alert" &#215;
div= flash[:notice] 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 &copy; Companytools 2012
/!
Javascripts
\==================================================
/! Placed at the end of the document so the pages load faster
= javascript_include_tag "application" = 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="/images/apple-touch-icon.png" rel="apple-touch-icon-precomposed"
link href="/favicon.ico" rel="shortcut icon" link href="/favicon.ico" rel="shortcut icon"
javascript: javascript:
var data_host = 'http://data.qwaiter.com'; //var data_host = 'http://data.qwaiter.com';
//var data_host = 'http://localhost:3000'; var data_host = 'http://localhost:3000';
//var data_host = 'http://192.168.1.74:3000'; //var data_host = 'http://192.168.1.74:3000';
var $locale = '#{I18n.locale}'; var $locale = '#{I18n.locale}';
var $url_vars = null; 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" &#215;
div= flash[:alert]
- if flash[:notice].present?
.alert.alert-success
a.close data-dismiss="alert" &#215;
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 &copy; 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' = link_to :i, [:suppliers, table], class: 'btn btn-mini table-link'
.table-number = table.number .table-number = table.number
.clearfix .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 - content_for :footer do
javascript: javascript:
var current_section_id = '#{@section.id}'; var current_section_id = '#{@section.id}';
@@ -34,3 +46,22 @@
Qsupplier.position_table_in_active_section(active_section_container, $(this), true); 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 - model_class = Section
.page-header= title :show, @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 .form-actions
= link_to t("helpers.links.back"), suppliers_sections_path, class: 'btn' = link_to t("helpers.links.back"), suppliers_sections_path, class: 'btn'
' '
@@ -1,8 +1,9 @@
- model_class = Section - model_class = Section
- content_for :row do - content_for :row do
.span12.section-title= @section.title
.span12 .span12
.well.section-tables-container.section-tables-active .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 - 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} .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) .table-number = link_to table.number, suppliers_table_path(table)
+14
View File
@@ -65,6 +65,10 @@ en:
price: Price price: Price
list: list:
created_at: Created created_at: Created
state: Status
needs_help: Needs attention
needs_payment: Wants to pay
closed_at: Closed at
supplier: supplier:
menu: menu:
active_lists: Active %{lists} active_lists: Active %{lists}
@@ -84,6 +88,16 @@ en:
lists: lists:
show: show:
title: Show %{list} title: Show %{list}
section:
tables_view: Tables view
add_tables:
button_label: Add tables
modal:
title: Add tables
arrange_tables:
button_label: Arrange tables
modal:
title: Arrange tables
user: user:
active_list: active_list:
+23
View File
@@ -64,6 +64,15 @@ nl:
price: Prijs price: Prijs
list: list:
created_at: Aangemaakt created_at: Aangemaakt
state: Status
needs_help: Vraag actief
needs_payment: Rekening gevraagd
closed_at: Afgesloten op
price: Prijs
section:
title: Titel
width: Breedte
height: Lengte
supplier: supplier:
menu: menu:
active_lists: Actieve %{lists} active_lists: Actieve %{lists}
@@ -83,6 +92,20 @@ nl:
lists: lists:
show: show:
title: "%{list} tonen" title: "%{list} tonen"
section:
tables_view: Tafel overzicht
add_tables:
button_label: Voeg tafels toe
modal:
title: Voeg tafels toe
body_header: ""
number_start: Vanaf nummer
number_end: Tot nummer
arrange_tables:
button_label: Positioneer tafels
modal:
title: Positioneer tafels
body_header: ""
user: user:
active_list: active_list: