From c2ea0be841412930ec7353443dac6262677ec95a Mon Sep 17 00:00:00 2001 From: Kevin Granger Date: Fri, 4 Oct 2013 19:13:02 +0200 Subject: [PATCH] // orders WIP --- admin-dev/themes/default/css/admin-theme.css | 83 ++++---- admin-dev/themes/default/css/admin-theme.sass | 7 +- .../controllers/orders/_discount_form.tpl | 13 +- .../controllers/orders/_documents.tpl | 6 +- .../controllers/orders/_new_product.tpl | 8 +- .../controllers/orders/_product_line.tpl | 47 +++-- .../template/controllers/orders/_shipping.tpl | 5 +- .../controllers/orders/helpers/view/view.tpl | 199 ++++++++++++------ .../default/template/helpers/form/form.tpl | 2 +- controllers/admin/AdminOrdersController.php | 5 + js/admin_order.js | 41 +++- 11 files changed, 271 insertions(+), 145 deletions(-) diff --git a/admin-dev/themes/default/css/admin-theme.css b/admin-dev/themes/default/css/admin-theme.css index 94cdaa5a5..bfe87649c 100644 --- a/admin-dev/themes/default/css/admin-theme.css +++ b/admin-dev/themes/default/css/admin-theme.css @@ -8146,25 +8146,26 @@ textarea { border-color: #cccccc !important; } /* line 559, admin-theme.sass */ -tr.highlight td { - background-color: #ffffc0; } +tr.highlighted td { + background-color: #1ba6e5 !important; + color: white; } -/* line 562, admin-theme.sass */ +/* line 565, admin-theme.sass */ .hook_panel { -webkit-box-shadow: rgba(255, 255, 255, 0.9) 0 0 0 1px inset; box-shadow: rgba(255, 255, 255, 0.9) 0 0 0 1px inset; padding: 10px 10px 5px 10px; margin-bottom: 3px !important; } -/* line 567, admin-theme.sass */ +/* line 570, admin-theme.sass */ .module_name { font-size: 1.2em; } -/* line 571, admin-theme.sass */ +/* line 574, admin-theme.sass */ .hook_panel_header { margin: 0 -10px 0 -10px; padding: 0 10px 10px 10px; } -/* line 574, admin-theme.sass */ +/* line 577, admin-theme.sass */ .hook_panel_header .hook_name { font-weight: 400; font-size: 1.2em; @@ -8177,15 +8178,15 @@ tr.highlight td { border: solid 1px #cccccc; background-color: white; padding: 0 4px; } -/* line 582, admin-theme.sass */ +/* line 585, admin-theme.sass */ .hook_panel_header .hook_title { text-transform: uppercase; font-size: 1em; } -/* line 585, admin-theme.sass */ +/* line 588, admin-theme.sass */ .hook_panel_header .hook_description { padding: 3px 0 0 3px; } -/* line 589, admin-theme.sass */ +/* line 592, admin-theme.sass */ .module_list .module_list_item { display: table; width: 100%; @@ -8200,7 +8201,7 @@ tr.highlight td { -o-border-radius: 3px; border-radius: 3px; } -/* line 597, admin-theme.sass */ +/* line 600, admin-theme.sass */ .module_col_select { display: table-cell; width: 22px; @@ -8209,13 +8210,13 @@ tr.highlight td { text-align: center; border-right: 1px solid #dddddd; } -/* line 604, admin-theme.sass */ +/* line 607, admin-theme.sass */ .module_col_position { display: table-cell; width: 60px; vertical-align: middle; text-align: right; } -/* line 609, admin-theme.sass */ +/* line 612, admin-theme.sass */ .module_col_position .positions { font-family: "Ubuntu", sans-serif; font-weight: 200; @@ -8233,41 +8234,41 @@ tr.highlight td { border: solid 1px #cccccc; background-color: #eeeeee; } -/* line 620, admin-theme.sass */ +/* line 623, admin-theme.sass */ .module_col_icon { display: table-cell; width: 50px; text-align: center; vertical-align: middle; } -/* line 626, admin-theme.sass */ +/* line 629, admin-theme.sass */ .module_col_infos { display: table-cell; height: 50px; vertical-align: middle; } -/* line 631, admin-theme.sass */ +/* line 634, admin-theme.sass */ .module_col_actions { display: table-cell; width: 160px; padding: 0 10px; vertical-align: middle; text-align: right; } -/* line 637, admin-theme.sass */ +/* line 640, admin-theme.sass */ .module_col_actions .btn-group { text-align: left; } -/* line 641, admin-theme.sass */ +/* line 644, admin-theme.sass */ .tree { padding: 0 0 0 20px; list-style: none; } -/* line 644, admin-theme.sass */ +/* line 647, admin-theme.sass */ .tree input { margin-right: 4px; } -/* line 646, admin-theme.sass */ +/* line 649, admin-theme.sass */ .tree i { font-size: 1.3em; } -/* line 650, admin-theme.sass */ +/* line 653, admin-theme.sass */ .tree .tree-item-name, .tree .tree-folder-name { padding: 0 5px; -webkit-border-radius: 6px; @@ -8276,17 +8277,17 @@ tr.highlight td { -o-border-radius: 6px; border-radius: 6px; font-weight: normal; } -/* line 654, admin-theme.sass */ +/* line 657, admin-theme.sass */ .tree .tree-item-name:hover, .tree .tree-folder-name:hover { background-color: #eeeeee; cursor: pointer; } -/* line 657, admin-theme.sass */ +/* line 660, admin-theme.sass */ .tree .tree-selected { background-color: #a4dcf5; } -/* line 659, admin-theme.sass */ +/* line 662, admin-theme.sass */ .tree .tree-selected i.tree-dot { background-color: #1ba6e5; } -/* line 661, admin-theme.sass */ +/* line 664, admin-theme.sass */ .tree i.tree-dot { display: inline-block; position: relative; @@ -8299,55 +8300,55 @@ tr.highlight td { -ms-border-radius: 6px; -o-border-radius: 6px; border-radius: 6px; } -/* line 669, admin-theme.sass */ +/* line 672, admin-theme.sass */ .tree .tree-item-disable, .tree .tree-folder-name-disable { color: #cccccc; } -/* line 671, admin-theme.sass */ +/* line 674, admin-theme.sass */ .tree .tree-item-disable:hover, .tree .tree-folder-name-disable:hover { color: #cccccc; background-color: none; } -/* line 675, admin-theme.sass */ +/* line 678, admin-theme.sass */ .nav-tabs { border-bottom: none; } -/* line 678, admin-theme.sass */ +/* line 681, admin-theme.sass */ .nav-tabs li.active a.tab-page { background-color: white; } -/* line 681, admin-theme.sass */ +/* line 684, admin-theme.sass */ .tree-actions { padding-bottom: 4px; display: inline-block; } -/* line 686, admin-theme.sass */ +/* line 689, admin-theme.sass */ .tt-query { border-bottom-right-radius: 3px !important; border-top-right-radius: 3px !important; } -/* line 688, admin-theme.sass */ +/* line 691, admin-theme.sass */ .tt-dropdown-menu { background-color: white; border: solid 1px #cccccc; font-size: 0.9em; text-transform: none; } -/* line 693, admin-theme.sass */ +/* line 696, admin-theme.sass */ .tt-suggestions { padding: 0 6px; -webkit-box-shadow: rgba(0, 0, 0, 0.25) 0 1px 4px; box-shadow: rgba(0, 0, 0, 0.25) 0 1px 4px; } -/* line 696, admin-theme.sass */ +/* line 699, admin-theme.sass */ .tt-suggestion p { border-bottom: solid 1px #cccccc; margin: 0 !important; padding: 0 !important; } -/* line 700, admin-theme.sass */ +/* line 703, admin-theme.sass */ .tt-suggestion:last-child p { border-bottom: none; } -/* line 704, admin-theme.sass */ +/* line 707, admin-theme.sass */ .tagify-container { background-color: white; padding: 2px 6px; @@ -8361,10 +8362,10 @@ tr.highlight td { border: solid 1px #cccccc; -webkit-box-shadow: rgba(0, 0, 0, 0.075) 0 1px 1px inset; box-shadow: rgba(0, 0, 0, 0.075) 0 1px 1px inset; } -/* line 712, admin-theme.sass */ +/* line 715, admin-theme.sass */ .tagify-container span { float: left; } -/* line 714, admin-theme.sass */ +/* line 717, admin-theme.sass */ .tagify-container > span { display: inline-block; padding: 3px 5px; @@ -8373,26 +8374,26 @@ tr.highlight td { border: 1px solid #1ba6e5; background-color: #60c1ed; color: white; } -/* line 722, admin-theme.sass */ +/* line 725, admin-theme.sass */ .tagify-container > span > a { padding-left: 5px; color: #1ba6e5; text-decoration: none; font-weight: bold; } -/* line 727, admin-theme.sass */ +/* line 730, admin-theme.sass */ .tagify-container > input { margin-top: 2px; border: 0 none; width: 100px; -webkit-box-shadow: none; box-shadow: none; } -/* line 732, admin-theme.sass */ +/* line 735, admin-theme.sass */ .tagify-container > input:focus { outline: 0; -webkit-box-shadow: none; box-shadow: none; } -/* line 737, admin-theme.sass */ +/* line 740, admin-theme.sass */ li.sortable-placeholder { border: 1px dashed #cccccc; background-color: #bbbbbb; diff --git a/admin-dev/themes/default/css/admin-theme.sass b/admin-dev/themes/default/css/admin-theme.sass index e62465787..906d63f45 100755 --- a/admin-dev/themes/default/css/admin-theme.sass +++ b/admin-dev/themes/default/css/admin-theme.sass @@ -556,8 +556,11 @@ textarea background-color: white border-color: #ccc!important -tr.highlight td - background-color: #FFFFC0 +tr.highlighted td + background-color: $brand-primary!important + color: white + + .hook_panel @extend .well diff --git a/admin-dev/themes/default/template/controllers/orders/_discount_form.tpl b/admin-dev/themes/default/template/controllers/orders/_discount_form.tpl index 23ef6ee08..d4fac3786 100644 --- a/admin-dev/themes/default/template/controllers/orders/_discount_form.tpl +++ b/admin-dev/themes/default/template/controllers/orders/_discount_form.tpl @@ -99,18 +99,17 @@ {/if} - +
- - +
\ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/orders/_documents.tpl b/admin-dev/themes/default/template/controllers/orders/_documents.tpl index 853048cfd..33221b48f 100644 --- a/admin-dev/themes/default/template/controllers/orders/_documents.tpl +++ b/admin-dev/themes/default/template/controllers/orders/_documents.tpl @@ -123,8 +123,8 @@ {if !isset($document->is_delivery)} {if $document->getRestPaid()} - - {l s='Set payment form'} + + {l s='Enter Payment'} {/if} @@ -148,7 +148,7 @@

- +

diff --git a/admin-dev/themes/default/template/controllers/orders/_product_line.tpl b/admin-dev/themes/default/template/controllers/orders/_product_line.tpl index 9eb840650..325614c2b 100755 --- a/admin-dev/themes/default/template/controllers/orders/_product_line.tpl +++ b/admin-dev/themes/default/template/controllers/orders/_product_line.tpl @@ -134,26 +134,38 @@ {/if} -

- {l s='Quantity:'} + +
+ +
+ +
0/{$productQuantity-$product['product_quantity_refunded']}
+
-
- - 0/{$productQuantity-$product['product_quantity_refunded']} + +
+ +
+
+ {$currency->prefix} + {$currency->suffix} +
+ +
-
- {l s='Amount:'} + +
+ {if !empty($product['amount_refund']) && $product['amount_refund'] > 0} + ({l s='%s refund' sprintf=$product['amount_refund']}) + {/if} + +
-
- {$currency->prefix} - - {$currency->suffix} -
- {if !empty($product['amount_refund']) && $product['amount_refund'] > 0} - ({l s='%s refund' sprintf=$product['amount_refund']}) - {/if} - - + {if ($can_edit && !$order->hasBeenDelivered())} @@ -198,7 +210,6 @@ {l s='Cancel'} - {/if} diff --git a/admin-dev/themes/default/template/controllers/orders/_shipping.tpl b/admin-dev/themes/default/template/controllers/orders/_shipping.tpl index c40fddcef..442cc499f 100644 --- a/admin-dev/themes/default/template/controllers/orders/_shipping.tpl +++ b/admin-dev/themes/default/template/controllers/orders/_shipping.tpl @@ -66,7 +66,10 @@
diff --git a/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl index 7645dbc16..c35d56fbc 100755 --- a/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl @@ -119,7 +119,7 @@ {foreach from=$history item=row key=key} {if ($key == 0)} - + {$row['ostate_name']|stripslashes} {if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{/if} @@ -332,7 +332,7 @@ {if count($order->getOrderPayments()) > 0} -

+

{l s='Warning'} {displayPrice price=$total_paid currency=$currency->id} {l s='paid instead of'} @@ -764,7 +764,7 @@ {/if} - {l s='Partial refund'} + {l s='Partial refund'} {if !$order->hasBeenDelivered()} @@ -788,10 +788,10 @@ {if $can_edit} {if !$order->hasBeenDelivered()}

{/if} {/if} @@ -836,9 +836,13 @@ {displayPrice price=$order->total_shipping_tax_incl currency=$currency->id} - {$currency->prefix} - - {$currency->suffix} +
+
+ {$currency->prefix} + {$currency->suffix} +
+ +
@@ -851,6 +855,59 @@
+ +
@@ -872,7 +929,9 @@ {l s='Value'} - {if $can_edit}{/if} + {if $can_edit} + + {/if} @@ -908,35 +967,6 @@ {/if} {/if} - -
@@ -946,36 +976,79 @@ {l s='New message'} - -
- {l s='to add a comment or send a message to the customer.'} + +
{l s='Click here'} {l s='to see all messages.'} + -
- - {l s='Display to customer?'} - {l s='Yes'} - {l s='No'} - -

- - - - - - -
@@ -989,7 +1062,7 @@
{if ($message['is_new_for_me'])} - + {/if} {l s='At'} {dateFormat date=$message['date_add']} @@ -1003,4 +1076,8 @@ {/if} + + {/block} \ No newline at end of file diff --git a/admin-dev/themes/default/template/helpers/form/form.tpl b/admin-dev/themes/default/template/helpers/form/form.tpl index 773e9fcef..8ef5ff597 100644 --- a/admin-dev/themes/default/template/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/helpers/form/form.tpl @@ -368,7 +368,7 @@ {if isset($input.disabled) && $input.disabled}disabled="disabled"{/if} />