end of day commit
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.page-header= title 'Select Qr code'
|
||||
ul#qr-list
|
||||
- for table in @tables
|
||||
li= link_to_function image_tag(url_for(qrcode_table_path(table, format: :png))), %|Quser.actions_for_table('#{table.id}')|
|
||||
li= link_to_function image_tag(url_for(table_qr_image_path(table_id: table.id, format: :png))), %|Quser.actions_for_table({table_id: '#{table.id}'})|
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
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="images/favicon.ico" rel="shortcut icon"
|
||||
|
||||
body
|
||||
.navbar.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=root_path = application_title
|
||||
.container.nav-collapse
|
||||
ul.nav
|
||||
li= link_to User.model_name.human_plural, users_path
|
||||
li= link_to Supplier.model_name.human_plural, suppliers_path
|
||||
li= link_to Table.model_name.human_plural, tables_path
|
||||
li= link_to Product.model_name.human_plural, products_path
|
||||
li= link_to List.model_name.human_plural, lists_path
|
||||
li= link_to Order.model_name.human_plural, orders_path
|
||||
li= link_to ProductCategory.model_name.human_plural, product_categories_path
|
||||
|
||||
.container
|
||||
|
||||
.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
|
||||
@@ -16,8 +16,6 @@ html lang="en"
|
||||
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"
|
||||
javascript:
|
||||
var active_list_id = #{session[:active_list_id] ? "'#{session[:active_list_id]}'" : 'null'};
|
||||
|
||||
body
|
||||
.navbar.navbar-fixed-top
|
||||
@@ -30,13 +28,8 @@ html lang="en"
|
||||
a.brand href=root_path = application_title
|
||||
.container.nav-collapse
|
||||
ul.nav
|
||||
li= link_to User.model_name.human_plural, users_path
|
||||
li= link_to Supplier.model_name.human_plural, suppliers_path
|
||||
li= link_to Table.model_name.human_plural, tables_path
|
||||
li= link_to Product.model_name.human_plural, products_path
|
||||
li= link_to List.model_name.human_plural, lists_path
|
||||
li= link_to Order.model_name.human_plural, orders_path
|
||||
li= link_to ProductCategory.model_name.human_plural, product_categories_path
|
||||
li= link_to User.model_name.human_plural, user_root_path
|
||||
li= link_to Supplier.model_name.human_plural, supplier_root_path
|
||||
|
||||
.container
|
||||
|
||||
|
||||
@@ -18,7 +18,10 @@ html lang="en"
|
||||
link href="images/apple-touch-icon.png" rel="apple-touch-icon-precomposed"
|
||||
link href="images/favicon.ico" rel="shortcut icon"
|
||||
javascript:
|
||||
var active_list_id = #{session[:active_list_id] ? "'#{session[:active_list_id]}'" : 'null'};
|
||||
// Dummy holder when Qmobile object is not supplied by the mobile phone
|
||||
var QMobile = {
|
||||
scanQr: function(){window.location = '/select_qrcode'}
|
||||
}
|
||||
|
||||
body
|
||||
.navbar.navbar-fixed-top
|
||||
@@ -31,8 +34,6 @@ html lang="en"
|
||||
a.brand href=user_root_path = application_title
|
||||
.container.nav-collapse
|
||||
ul.nav#top-navigation-list
|
||||
- if list_open?
|
||||
li= link_to 'Move table', '#'
|
||||
li= link_to 'View history', user_list_history_path
|
||||
|
||||
.container
|
||||
|
||||
@@ -17,8 +17,6 @@ html lang="en"
|
||||
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"
|
||||
javascript:
|
||||
var active_list_id = #{session[:active_list_id] ? "'#{session[:active_list_id]}'" : 'null'};
|
||||
|
||||
body
|
||||
.navbar.navbar-fixed-top.navbar-inverse
|
||||
@@ -32,12 +30,20 @@ html lang="en"
|
||||
ul.nav#top-navigation-list
|
||||
li= link_to t('supplier.menu.active_orders', orders: Order.model_name.human_plural), supplier_active_orders_path
|
||||
li= link_to t('supplier.menu.active_lists', lists: List.model_name.human_plural), supplier_active_lists_path
|
||||
li= link_to ProductCategory.model_name.human_plural, suppliers_product_categories_path
|
||||
li= link_to Product.model_name.human_plural, suppliers_products_path
|
||||
li= link_to Section.model_name.human_plural, suppliers_sections_path
|
||||
li= link_to Table.model_name.human_plural, suppliers_tables_path
|
||||
ul.nav.pull-right
|
||||
li.dropdown
|
||||
a.dropdown-toggle href="#" data-toggle="dropdown"
|
||||
= current_supplier.email
|
||||
b.caret
|
||||
ul.dropdown-menu
|
||||
li= link_to 'Logout', destroy_supplier_session_path, method: :delete
|
||||
.container.nav-collapse
|
||||
|
||||
.container
|
||||
|
||||
.content
|
||||
- if flash[:alert].present?
|
||||
.alert.alert-error
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
.control-group class=(@product_category.errors[:supplier_id].any? ? 'error' : nil)
|
||||
= f.label :supplier_id, Supplier.model_name.human, class: 'control-label'
|
||||
.controls
|
||||
= f.select :supplier_id, options_for_select(@suppliers.map{|a| [a.name, a.id]}), include_blank: nil
|
||||
= f.collection_select :supplier_id, @suppliers, :id, :name, include_blank: nil
|
||||
.form-actions
|
||||
= f.submit nil, class: 'btn btn-primary'
|
||||
'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- model_class = ProductCategory
|
||||
div.page-header= title :index, model_class
|
||||
.page-header= title :index, model_class
|
||||
- if @product_categories.any?
|
||||
table.table.table-striped
|
||||
thead
|
||||
@@ -7,16 +7,16 @@ div.page-header= title :index, model_class
|
||||
th= model_class.human_attribute_name(:name)
|
||||
th= model_class.human_attribute_name(:position)
|
||||
th= Supplier.model_name.human
|
||||
th= model_class.human_attribute_name(:created_at)
|
||||
th=t 'helpers.actions'
|
||||
th.timestamp= model_class.human_attribute_name(:created_at)
|
||||
th.actions=t 'helpers.actions'
|
||||
tbody
|
||||
- @product_categories.each do |product_category|
|
||||
tr
|
||||
td= link_to product_category.name, product_category
|
||||
td.link= link_to product_category.name, product_category
|
||||
td= product_category.position
|
||||
td= link_to_if product_category.supplier.present?, product_category.supplier.try(:name), product_category.supplier
|
||||
td=l product_category.created_at, format: :short
|
||||
td
|
||||
td.link= link_to_if product_category.supplier.present?, product_category.supplier.try(:name), product_category.supplier
|
||||
td.timestamp=l product_category.created_at, format: :short
|
||||
td.actions
|
||||
= link_to t('helpers.links.edit'), [:edit, product_category], class: 'btn btn-mini'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), product_category, method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- model_class = Product
|
||||
div.page-header= title :index, model_class
|
||||
.page-header= title :index, model_class
|
||||
- if @products.any?
|
||||
table.table.table-striped
|
||||
thead
|
||||
@@ -9,18 +9,18 @@ div.page-header= title :index, model_class
|
||||
th= model_class.human_attribute_name(:price)
|
||||
th= ProductCategory.model_name.human
|
||||
th= Supplier.model_name.human
|
||||
th= model_class.human_attribute_name(:created_at)
|
||||
th=t 'helpers.actions'
|
||||
th.timestamp= model_class.human_attribute_name(:created_at)
|
||||
th.actions=t 'helpers.actions'
|
||||
tbody
|
||||
- @products.each do |product|
|
||||
tr
|
||||
td= link_to product.name, product
|
||||
td.link= link_to product.name, product
|
||||
td= product.code
|
||||
td= product.price
|
||||
td= link_to_if product.product_category.present?, product.product_category.try(:name), product.product_category
|
||||
td= link_to_if product.supplier.present?, product.supplier.try(:name), product.supplier
|
||||
td=l product.created_at, format: :short
|
||||
td
|
||||
td.link= link_to_if product.product_category.present?, product.product_category.try(:name), product.product_category
|
||||
td.link= link_to_if product.supplier.present?, product.supplier.try(:name), product.supplier
|
||||
td.timestamp=l product.created_at, format: :short
|
||||
td.actions
|
||||
= link_to t('helpers.links.edit'), [:edit, product], class: 'btn btn-mini'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), product, method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
= form_for [:suppliers, @product_category], html: {class: 'form-horizontal' } do |f|
|
||||
= render 'error_messages', target: @product_category
|
||||
.control-group class=(@product_category.errors[:name].any? ? 'error' : nil)
|
||||
= f.label :name, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :name, class: 'text_field'
|
||||
.control-group class=(@product_category.errors[:position].any? ? 'error' : nil)
|
||||
= f.label :position, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :position, class: 'text_field'
|
||||
.form-actions
|
||||
= f.submit nil, class: 'btn btn-primary'
|
||||
'
|
||||
= link_to t("helpers.links.cancel"), suppliers_product_categories_path, class: 'btn'
|
||||
@@ -0,0 +1,4 @@
|
||||
- model_class = ProductCategory
|
||||
.page-header
|
||||
= title :edit, model_class
|
||||
= render 'form'
|
||||
@@ -0,0 +1,24 @@
|
||||
- model_class = ProductCategory
|
||||
.page-header= title :index, model_class
|
||||
- if @product_categories.any?
|
||||
table.table.table-striped
|
||||
thead
|
||||
tr
|
||||
th= model_class.human_attribute_name(:name)
|
||||
th= model_class.human_attribute_name(:position)
|
||||
th.timestamp= model_class.human_attribute_name(:created_at)
|
||||
th.actions=t 'helpers.actions'
|
||||
tbody
|
||||
- @product_categories.each do |product_category|
|
||||
tr
|
||||
td.link= link_to product_category.name, [:suppliers, product_category]
|
||||
td= product_category.position
|
||||
td.timestamp=l product_category.created_at, format: :short
|
||||
td.actions
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, product_category], class: 'btn btn-mini'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, product_category], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
|
||||
- else
|
||||
= no_content_given model_class
|
||||
= link_to t("helpers.links.new"), new_suppliers_product_category_path, class: 'btn btn-primary'
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
- model_class = ProductCategory
|
||||
.page-header
|
||||
= title :new, model_class
|
||||
= render 'form'
|
||||
@@ -0,0 +1,18 @@
|
||||
- model_class = ProductCategory
|
||||
.page-header= title :show, @product_category
|
||||
|
||||
dl.dl-horizontal.show-list
|
||||
dt= model_class.human_attribute_name(:name)
|
||||
dd= @product_category.name
|
||||
dt= model_class.human_attribute_name(:position)
|
||||
dd= @product_category.position
|
||||
|
||||
.form-actions
|
||||
= link_to t("helpers.links.back"), suppliers_product_categories_path, class: 'btn'
|
||||
'
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, @product_category], class: 'btn'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, @product_category], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-danger'
|
||||
- content_for :row do
|
||||
- @products = @product_category.products
|
||||
= render template: 'suppliers/products/index'
|
||||
@@ -0,0 +1,22 @@
|
||||
= form_for [:suppliers, @product], html: {class: 'form-horizontal' } do |f|
|
||||
= render 'error_messages', target: @product
|
||||
.control-group class=(@product.errors[:name].any? ? 'error' : nil)
|
||||
= f.label :name, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :name, class: 'text_field'
|
||||
.control-group class=(@product.errors[:code].any? ? 'error' : nil)
|
||||
= f.label :code, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :code, class: 'text_field'
|
||||
.control-group class=(@product.errors[:price].any? ? 'error' : nil)
|
||||
= f.label :price, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :price, class: ['text_field', :currency]
|
||||
.control-group class=(@product.errors[:product_category_id].any? ? 'error' : nil)
|
||||
= f.label :product_category_id, ProductCategory.model_name.human, class: 'control-label'
|
||||
.controls
|
||||
= f.collection_select :product_category_id, current_supplier.product_categories, :id, :name, include_blank: ''
|
||||
.form-actions
|
||||
= f.submit nil, class: 'btn btn-primary'
|
||||
'
|
||||
= link_to t("helpers.links.cancel"), suppliers_products_path, class: 'btn'
|
||||
@@ -0,0 +1,4 @@
|
||||
- model_class = Product
|
||||
.page-header
|
||||
= title :edit, model_class
|
||||
= render 'form'
|
||||
@@ -0,0 +1,28 @@
|
||||
- model_class = Product
|
||||
.page-header= title :index, model_class
|
||||
- if @products.any?
|
||||
table.table.table-striped
|
||||
thead
|
||||
tr
|
||||
th= model_class.human_attribute_name(:name)
|
||||
th= model_class.human_attribute_name(:code)
|
||||
th.currency= model_class.human_attribute_name(:price)
|
||||
th= ProductCategory.model_name.human
|
||||
th.timestamp= model_class.human_attribute_name(:created_at)
|
||||
th.actions=t 'helpers.actions'
|
||||
tbody
|
||||
- @products.each do |product|
|
||||
tr
|
||||
td.link= link_to product.name, product
|
||||
td= product.code
|
||||
td.currency=currency product.price
|
||||
td.link= link_to_if product.product_category.present?, product.product_category.try(:name), [:suppliers, product.product_category]
|
||||
td.timestamp=l product.created_at, format: :short
|
||||
td.actions
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, product], class: 'btn btn-mini'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, product], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
|
||||
- else
|
||||
= no_content_given model_class
|
||||
= link_to t("helpers.links.new"), new_suppliers_product_path(product_category_id: @product_category.try(:id)), class: 'btn btn-primary'
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
- model_class = Product
|
||||
.page-header
|
||||
= title :new, model_class
|
||||
= render 'form'
|
||||
@@ -0,0 +1,20 @@
|
||||
- model_class = Product
|
||||
.page-header= title :show, @product
|
||||
|
||||
dl.dl-horizontal.show-list
|
||||
dt= model_class.human_attribute_name(:name)
|
||||
dd= @product.name
|
||||
dt= model_class.human_attribute_name(:code)
|
||||
dd= @product.code
|
||||
dt= model_class.human_attribute_name(:price)
|
||||
dd= @product.price
|
||||
- if @product.product_category.present?
|
||||
dt= ProductCategory.model_name.human
|
||||
dd= link_to @product.product_category.name, @product.product_category
|
||||
|
||||
.form-actions
|
||||
= link_to t("helpers.links.back"), suppliers_products_path, class: 'btn'
|
||||
'
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, @product], class: 'btn'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, @product], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-danger'
|
||||
@@ -16,7 +16,8 @@
|
||||
- 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}
|
||||
.pull-right.action-button-container
|
||||
= link_to table.number, [:suppliers, table], class: 'btn btn-mini table-number'
|
||||
= link_to :i, [:suppliers, table], class: 'btn btn-mini table-link'
|
||||
.table-number = table.number
|
||||
.span3
|
||||
h3= t('table.has_no_section')
|
||||
.well.section-tables-container.section-tables-inactive
|
||||
@@ -24,7 +25,8 @@
|
||||
.section-table{ id="section-table-#{table.id}" data-position-x=table.position_x data-position-y=table.position_y data-table-id=table.id}
|
||||
.pull-right.action-button-container
|
||||
button.btn.btn-primary.btn-mini onClick="Qsupplier.move_table_to_active_section('#{table.id}')" +
|
||||
= link_to table.number, [:suppliers, table], class: 'btn btn-mini table-number'
|
||||
= link_to :i, [:suppliers, table], class: 'btn btn-mini table-link'
|
||||
.table-number = table.number
|
||||
.clearfix
|
||||
- content_for :footer do
|
||||
javascript:
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
ul.nav.nav-tabs.nav-stacked
|
||||
li
|
||||
button.btn.btn-primary onClick="QMobile.scanQr()" Scan Qr
|
||||
- if list_open?
|
||||
li= link_to 'Place order', user_list_products_path(supplier_id: active_list.supplier.id)
|
||||
li= link_to 'Active list', user_active_list_path
|
||||
- else
|
||||
li= link_to 'Join table with Qr scan', '/select_qrcode'
|
||||
li
|
||||
button.btn.btn-primary onClick="QMobile.scanQr()" Scan Qr
|
||||
li= link_to 'Place order', user_list_products_path
|
||||
li= link_to 'Show active list', user_active_list_path
|
||||
li= link_to 'Subscribe to list', '#'
|
||||
li= link_to 'Check out menu', '#'
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
.page-header= title 'User list history'
|
||||
p Todo
|
||||
ul
|
||||
- for list in @lists
|
||||
li= link_to l(list.created_at, format: :short), user_history_list_path(list_id: list.id)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
span#list-needs-help-button
|
||||
table#products-table.table.table-striped.table-hover
|
||||
tbody
|
||||
-# content_for :sidebar do
|
||||
table#active-order-table.table.table-striped.hide
|
||||
thead
|
||||
tr
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
.page-header
|
||||
h4= t('user.show_products.title', products: Product.model_name.human_plural)
|
||||
table#products-table.table.table-striped.table-hover
|
||||
tbody
|
||||
table#active-order-table.table.table-striped.hide
|
||||
thead
|
||||
tr
|
||||
th Product
|
||||
th #
|
||||
th.currency Total
|
||||
th
|
||||
tbody
|
||||
tfoot
|
||||
tr
|
||||
td colspan=2
|
||||
button class="btn btn-primary" onClick="Quser.order_selected_products({table_id: '#{@table.id}'})" Bestellen
|
||||
|
|
||||
button class="btn btn btn-warning" onClick="Qrammer.clear_active_list()" Clear
|
||||
td.currency
|
||||
strong#active-order-total
|
||||
td
|
||||
- content_for :footer do
|
||||
javascript:
|
||||
jQuery(function(){
|
||||
Quser.load_table_products('#{@table.id}', #{@table.occupied? ? 'true' : 'false'});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user