From 133429720c1ad9e69d2a7ababd52095941345d3c Mon Sep 17 00:00:00 2001 From: wvengen Date: Fri, 3 Jan 2014 14:11:50 +0100 Subject: [PATCH] old price display tweaks --- .../bootstrap_and_overrides.css.less | 35 ++++++++++++------- app/helpers/orders_helper.rb | 2 +- config/locales/en.yml | 1 + 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.less b/app/assets/stylesheets/bootstrap_and_overrides.css.less index 031a40fa..a0641542 100644 --- a/app/assets/stylesheets/bootstrap_and_overrides.css.less +++ b/app/assets/stylesheets/bootstrap_and_overrides.css.less @@ -30,7 +30,19 @@ body { // Example: // @linkColor: #ff0000; -// Custom styles + +// main ui colours +@mainRedColor: #ED0606; + +// article status +@articleUsedColor: green; +@articleUnusedColor: red; +@articleUnavailColor: #999; +@articleUpdatedColor: #468847; + +// dim colors by this amount when the information is less important +@nonessentialDim: 35%; + // Fix empty dd tags in horizontal dl, see https://github.com/twitter/bootstrap/issues/4062 .dl-horizontal { @@ -53,13 +65,6 @@ body { margin-bottom: 0; } -@mainRedColor: #ED0606; - -@articleUsedColor: green; -@articleUnusedColor: red; -@articleUnavailColor: #999; -@articleUpdatedColor: #468847; - .logo { margin: 10px 0 0 30px; @@ -258,6 +263,13 @@ tr.unavailable { } } +// it's a bit distracting +.icon-asterisk { + font-size: 80%; + vertical-align: middle; + padding-bottom: 0.4ex; +} + // allow buttons as input add-on (with proper height) .input-append button.add-on { height: inherit; @@ -282,10 +294,9 @@ i.package { padding-left: 20px; font-style: normal; } -@packageDim: 35%; -.package { color: tint(@textColor, @packageDim); } -.used .package { color: tint(@articleUsedColor, @packageDim); } -.unused .package { color: tint(@articleUnusedColor, @packageDim); } +.package { color: tint(@textColor, @nonessentialDim); } +.used .package { color: tint(@articleUsedColor, @nonessentialDim); } +.unused .package { color: tint(@articleUnusedColor, @nonessentialDim); } .unavailable .package { color: @articleUnavailColor; } .input-nano { diff --git a/app/helpers/orders_helper.rb b/app/helpers/orders_helper.rb index fff67eff..8e76d93e 100644 --- a/app/helpers/orders_helper.rb +++ b/app/helpers/orders_helper.rb @@ -38,7 +38,7 @@ module OrdersHelper def article_price_change_hint(order_article, gross=false) return nil if order_article.article.price == order_article.price.price - title = "#{t('.old_price')}: #{number_to_currency order_article.article.price}" + title = "#{t('helpers.orders.old_price')}: #{number_to_currency order_article.article.price}" title += " / #{number_to_currency order_article.article.gross_price}" if gross "".html_safe end diff --git a/config/locales/en.yml b/config/locales/en.yml index 57642601..351b19bf 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -738,6 +738,7 @@ en: new_invoice: New invoice show_invoice: Show invoice orders: + old_price: Old price option_choose: Choose supplier/stock option_stock: Stock order_pdf: Create PDF