diff --git a/app/assets/images/icons/list.png b/app/assets/images/icons/list.png index 97101a0f..d63c9724 100644 Binary files a/app/assets/images/icons/list.png and b/app/assets/images/icons/list.png differ diff --git a/app/assets/images/icons/menu.png b/app/assets/images/icons/menu.png index e4f891e6..df9b26c3 100644 Binary files a/app/assets/images/icons/menu.png and b/app/assets/images/icons/menu.png differ diff --git a/app/assets/images/icons/needs-help.png b/app/assets/images/icons/needs-help.png index d1de25c3..0fffdd04 100644 Binary files a/app/assets/images/icons/needs-help.png and b/app/assets/images/icons/needs-help.png differ diff --git a/app/assets/images/icons/needs-payment.png b/app/assets/images/icons/needs-payment.png index 8c595c3d..f0b8109a 100644 Binary files a/app/assets/images/icons/needs-payment.png and b/app/assets/images/icons/needs-payment.png differ diff --git a/app/assets/images/theme1/button-bar-left.png b/app/assets/images/theme1/button-bar-left.png new file mode 100644 index 00000000..9904d59f Binary files /dev/null and b/app/assets/images/theme1/button-bar-left.png differ diff --git a/app/assets/images/theme1/button-bar-middle.png b/app/assets/images/theme1/button-bar-middle.png new file mode 100644 index 00000000..fdf328fd Binary files /dev/null and b/app/assets/images/theme1/button-bar-middle.png differ diff --git a/app/assets/images/theme1/button-bar-right.png b/app/assets/images/theme1/button-bar-right.png new file mode 100644 index 00000000..357aec82 Binary files /dev/null and b/app/assets/images/theme1/button-bar-right.png differ diff --git a/app/assets/images/theme1/button-wood-left.png b/app/assets/images/theme1/button-wood-left.png new file mode 100644 index 00000000..aa949d8a Binary files /dev/null and b/app/assets/images/theme1/button-wood-left.png differ diff --git a/app/assets/images/theme1/button-wood-middle.png b/app/assets/images/theme1/button-wood-middle.png new file mode 100644 index 00000000..63ab89ee Binary files /dev/null and b/app/assets/images/theme1/button-wood-middle.png differ diff --git a/app/assets/images/theme1/button-wood-right.png b/app/assets/images/theme1/button-wood-right.png new file mode 100644 index 00000000..24b632ee Binary files /dev/null and b/app/assets/images/theme1/button-wood-right.png differ diff --git a/app/assets/javascripts/user/application.js.erb b/app/assets/javascripts/user/application.js.erb index 2be7040a..7cdc271c 100644 --- a/app/assets/javascripts/user/application.js.erb +++ b/app/assets/javascripts/user/application.js.erb @@ -39,7 +39,8 @@ var path_mapping = { list_products: '/user/list_products', active_list: '/user/active_list', history_list: '/user/history_list', - obtain_user_token: '/user/obtain_token' + obtain_user_token: '/user/obtain_token', + lists_history: '/user/list_history' } var $translations = { en: { diff --git a/app/assets/stylesheets/_constants.css.sass b/app/assets/stylesheets/_constants.css.sass index 4f3aade9..1a3502fa 100644 --- a/app/assets/stylesheets/_constants.css.sass +++ b/app/assets/stylesheets/_constants.css.sass @@ -1,6 +1,7 @@ //$qbrown: #634227 $qbrown: #853d15 $qbrown-active: lighten($qbrown, 20%) +$green: #7BB459 //Heineken //$wood: image-url('textures/wood001-vertical.jpg') $wood: image-url('textures/theme1.jpg') $background-brown: #57351f diff --git a/app/assets/stylesheets/user/_constants.css.sass b/app/assets/stylesheets/user/_constants.css.sass new file mode 100644 index 00000000..20088d19 --- /dev/null +++ b/app/assets/stylesheets/user/_constants.css.sass @@ -0,0 +1,78 @@ +$qbrown: #853d15 +$qbrown-active: lighten($qbrown, 20%) +$green: #7BB459 //Heineken +//$wood: image-url('textures/wood001-vertical.jpg') +$wood: image-url('textures/theme1.jpg') +$background-brown: #57351f +$side-spacing: 5px +=wood-button + background-color: transparent + background-repeat: no-repeat, no-repeat, repeat-x + background-position: left center, right center, center center + background-image: url(/assets/theme1/button-wood-left.png), url(/assets/theme1/button-wood-right.png), url(/assets/theme1/button-wood-middle.png) + color: $green + border-width: 0 + border-radius: 0 + height: 31px + //padding-bottom: 18px + +box-shadow(#000 4px 4px 8px) + &:hover + background-color: transparent + background-repeat: no-repeat, no-repeat, repeat-x + background-position: left center, right center, center center + background-image: url(/assets/theme1/button-wood-left.png), url(/assets/theme1/button-wood-right.png), url(/assets/theme1/button-wood-middle.png) + color: blue +=button-bar + background-color: transparent + background-repeat: no-repeat, no-repeat + background-position: left bottom, right bottom + background-image: image-url('theme1/button-bar-left.png'), image-url('theme1/button-bar-right.png') + color: $green + border-width: 0 + border-radius: 0 + min-height: 61px + height: 61px + padding-left: 49px + padding-right: 53px + .button-bar-inner + //+single-box-shadow(#000, 0px, 4px, 8px, 0px, true) + background-color: white + background-repeat: repeat-x + background-position: center bottom + background-image: image-url('theme1/button-bar-middle.png') + //min-height: 61px + height: 100% + .button-bar-content + padding: 8px + .title + margin-top: -10px + margin-right: 5px + margin-left: 5px + margin-bottom: 3px + color: black + float: left + .action-buttons + float: left + width: 150px + //padding-bottom: 18px + //+box-shadow(#000 4px 4px 8px) +=user-button + +wood-button + cursor: pointer + border: 0px solid black + //+border-radius(4px) + //+box-shadow(#000 4px 4px 8px) + width: 30px + //height: 34px + display: inline-block + float: left + margin-right: 15px + background-color: $qbrown + text-align: center + line-height: 34px + text-indent: -5000px + &.active + background-color: $qbrown-active + &.hide + display: none + diff --git a/app/assets/stylesheets/user/list_products.css.sass b/app/assets/stylesheets/user/list_products.css.sass new file mode 100644 index 00000000..71aa35e7 --- /dev/null +++ b/app/assets/stylesheets/user/list_products.css.sass @@ -0,0 +1,5 @@ +@import compass +@import user/constants +#products-table + .order-product-button + +wood-button diff --git a/app/assets/stylesheets/user/structure.css.sass b/app/assets/stylesheets/user/structure.css.sass index 03f83469..e8dc2fe0 100644 --- a/app/assets/stylesheets/user/structure.css.sass +++ b/app/assets/stylesheets/user/structure.css.sass @@ -1,27 +1,5 @@ @import compass -@import constants -$side-spacing: 5px -=user-button - cursor: pointer - border: 2px solid black - +border-radius(4px) - +box-shadow(#000 4px 4px 8px) - width: 34px - height: 34px - display: block - float: left - margin-left: 15px - background-color: $qbrown - text-align: center - line-height: 34px - background-repeat: no-repeat - background-position: center center - text-indent: -5000px - &.active - background-color: $qbrown-active - &.hide - display: none - +@import user/constants html background-image: $wood background-color: $background-brown @@ -58,14 +36,21 @@ body margin-top: 5px margin-left: auto margin-right: auto - background-color: green width: 262px a +user-button + span + display: block + width: 28px + height: 26px + background-repeat: no-repeat + background-position: center center &.home-list-link - background-image: image-url('icons/list.png') + span + background-image: image-url('icons/list.png') &.home-menu-link - background-image: image-url('icons/menu.png') + span + background-image: image-url('icons/menu.png') //padding-top: 50px .navbar-fixed-top margin-left: -$side-spacing @@ -82,11 +67,6 @@ body .order-count-cell white-space: nowrap .page-header - .supplier-name - float: right - margin-right: 8px - .table-number - float: right #list-needs-help-button button margin-left: 5px @@ -99,11 +79,32 @@ body padding-left: 5px .user-top-button +user-button - show-active-list - background-image: image-url('icons/list.png') - place-order-on-list - background-image: image-url('icons/menu.png') - list-needs-payment-button - background-image: image-url('icons/needs-payment.png') - list-needs-help-button - background-image: image-url('icons/needs-help.png') + span + display: block + width: 28px + height: 28px + background-position: center center + background-repeat: no-repeat +.top-button-bar + +button-bar + height: 90px + .button-bar-content + padding-top: 10px + .supplier-name + float: right + margin-right: 8px + .table-number + float: right + #show-active-list + span + background-image: image-url('icons/list.png') + #place-order-on-list + span + background-image: image-url('icons/menu.png') + #list-needs-payment-button + span + background-image: image-url('icons/needs-payment.png') + #list-needs-help-button + span + background-image: image-url('icons/needs-help.png') + diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 63895cdf..4c1cde3a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -97,4 +97,16 @@ module ApplicationHelper render(template, handlers: [:mustache]) end + def top_bar(options = {}, &block) + title = options[:title] + title = title.present? ? content_tag(:h3, t("user.#{title}"), class: 'title', data: {t: title}) : '' + content_tag :div, class: 'top-button-bar' do + content_tag :div, class: 'button-bar-inner' do + content_tag :div, class: 'button-bar-content' do + (title + capture(&block)).html_safe + end + end + end + end + end diff --git a/app/templates/user/_products_category_for_order.mustache b/app/templates/user/_products_category_for_order.mustache index eddbf7c6..fb7cf3ff 100644 --- a/app/templates/user/_products_category_for_order.mustache +++ b/app/templates/user/_products_category_for_order.mustache @@ -8,6 +8,6 @@ +