From 3c035324f43426ee58d63b75048fd4bdb98b02a5 Mon Sep 17 00:00:00 2001 From: sLorenzini Date: Fri, 26 Jul 2013 12:14:48 +0200 Subject: [PATCH] // update order tab --- .../controllers/orders/_documents.tpl | 2 +- .../controllers/return/helpers/form/form.tpl | 126 +++--- .../controllers/slip/_print_pdf_icon.tpl | 9 +- .../template/helpers/list/list_header.tpl | 4 +- .../template/helpers/options/options.tpl | 362 ++++++++++-------- .../admin/AdminDeliverySlipController.php | 1 + .../admin/AdminOrderMessageController.php | 1 + .../admin/AdminPreferencesController.php | 1 + controllers/admin/AdminReturnController.php | 1 + controllers/admin/AdminSlipController.php | 1 + controllers/admin/AdminStatusesController.php | 1 + 11 files changed, 271 insertions(+), 238 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/orders/_documents.tpl b/admin-dev/themes/default/template/controllers/orders/_documents.tpl index f75665ac8..a3a2f27d5 100644 --- a/admin-dev/themes/default/template/controllers/orders/_documents.tpl +++ b/admin-dev/themes/default/template/controllers/orders/_documents.tpl @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - +
{/if} {if $has_actions} - + {/if} {if !$simple_header} @@ -208,7 +208,7 @@ {elseif $params.type == 'date' || $params.type == 'datetime'} - {l s='From'}
+ {l s='From'} {l s='To'} {elseif $params.type == 'select'} {if isset($params.filter_key)} diff --git a/admin-dev/themes/default/template/helpers/options/options.tpl b/admin-dev/themes/default/template/helpers/options/options.tpl index 77de7d98c..7e9e2f17b 100644 --- a/admin-dev/themes/default/template/helpers/options/options.tpl +++ b/admin-dev/themes/default/template/helpers/options/options.tpl @@ -38,178 +38,204 @@ {if isset($categoryData['name'])} name={$categoryData['name']}{/if} {if isset($categoryData['id'])} id={$categoryData['id']} {/if} method="post" - enctype="multipart/form-data"> + enctype="multipart/form-data" class="form-horizontal"> {foreach $option_list AS $category => $categoryData} {if isset($categoryData['top'])}{$categoryData['top']}{/if} -
- {* Options category title *} - - - {if isset($categoryData['title'])}{$categoryData['title']}{else}{l s='Options'}{/if} - +
+ {* Options category title *} + + + {if isset($categoryData['title'])}{$categoryData['title']}{else}{l s='Options'}{/if} + - {* Category description *} - {if (isset($categoryData['description']) && $categoryData['description'])} -
{$categoryData['description']}
- {/if} - {* Category info *} - {if (isset($categoryData['info']) && $categoryData['info'])} -

{$categoryData['info']}

- {/if} - - {if !$categoryData['hide_multishop_checkbox'] && $use_multishop} - {l s='Check/uncheck all'} {l s='(Check boxes if you want to set a custom value for this shop or group shop context)'} -
- {/if} - - {foreach $categoryData['fields'] AS $key => $field} - {if $field['type'] == 'hidden'} - - {else} -
- {if !$categoryData['hide_multishop_checkbox'] && $field['multishop_default'] && empty($field['no_multishop_checkbox'])} -
- -
- {/if} - {block name="label"} - {if isset($field['title'])} - - {/if} - {/block} - {block name="field"} -
- {block name="input"} - {if $field['type'] == 'select'} - {if $field['list']} - - {else if isset($input.empty_message)} - {$input.empty_message} - {/if} - {elseif $field['type'] == 'bool'} - - - - - - - {elseif $field['type'] == 'radio'} - {foreach $field['choices'] AS $k => $v} - -
- {/foreach} -
- {elseif $field['type'] == 'checkbox'} - {foreach $field['choices'] AS $k => $v} - -
- {/foreach} -
- {elseif $field['type'] == 'text'} - - {if isset($field['suffix'])} {$field['suffix']|strval}{/if} - {elseif $field['type'] == 'password'} - - {if isset($field['suffix'])} {$field['suffix']|strval}{/if} - {elseif $field['type'] == 'textarea'} - - {elseif $field['type'] == 'file'} - {if isset($field['thumb']) && $field['thumb']} - {$field['title']}
- {/if} - - {elseif $field['type'] == 'color'} - - {elseif $field['type'] == 'price'} - {$currency_left_sign}{$currency_right_sign} {l s='(tax excl.)'} - {elseif $field['type'] == 'textLang' || $field['type'] == 'textareaLang' || $field['type'] == 'selectLang'} - {if $field['type'] == 'textLang'} - {foreach $field['languages'] AS $id_lang => $value} -
- -
- {/foreach} - {elseif $field['type'] == 'textareaLang'} - {foreach $field['languages'] AS $id_lang => $value} -
- -
- {/foreach} - {elseif $field['type'] == 'selectLang'} - {foreach $languages as $language} -
- -
- {/foreach} - {/if} - {if count($languages) > 1} -
- -
-
- {l s='Choose language:'}

- {foreach $languages as $language} - {$language.name} - {/foreach} -
- {/if} -
- {/if} - - {if isset($field['required']) && $field['required'] && $field['type'] != 'radio'} - * - {/if} - {if isset($field['hint'])}{$field['hint']} {/if} - {/block}{* end block input *} - {if isset($field['desc'])}

{$field['desc']}

{/if} - {if $field['is_invisible']}

{l s='You can\'t change the value of this configuration field in the context of this shop.'}

{/if} -
-
-
- {/block}{* end block field *} + {* Category description *} + {if (isset($categoryData['description']) && $categoryData['description'])} +
{$categoryData['description']}
{/if} - {/foreach} - {if isset($categoryData['submit'])} -
- -
- {/if} - {if isset($categoryData['required_fields']) && $categoryData['required_fields']} -
* {l s='Required field'}
- {/if} - {if isset($categoryData['bottom'])}{$categoryData['bottom']}{/if} -

+ {* Category info *} + {if (isset($categoryData['info']) && $categoryData['info'])} +

{$categoryData['info']}

+ {/if} + + {if !$categoryData['hide_multishop_checkbox'] && $use_multishop} + {l s='Check/uncheck all'} {l s='(Check boxes if you want to set a custom value for this shop or group shop context)'} +
+ {/if} + + {foreach $categoryData['fields'] AS $key => $field} + {if $field['type'] == 'hidden'} + + {else} +
+
+ {if !$categoryData['hide_multishop_checkbox'] && $field['multishop_default'] && empty($field['no_multishop_checkbox'])} +
+ +
+ {/if} + {block name="label"} + {if isset($field['title']) && isset($field['desc'])} + + {else} + + {/if} + {/block} + {block name="field"} + + {block name="input"} + {if $field['type'] == 'select'} +
+ {if $field['list']} + + {else if isset($input.empty_message)} + {$input.empty_message} + {/if} +
+ {elseif $field['type'] == 'bool'} +
+
+
+ + + + + + + +
+
+
+ + {elseif $field['type'] == 'radio'} + {foreach $field['choices'] AS $k => $v} +
+

+ + +

+
+ {/foreach} + {elseif $field['type'] == 'checkbox'} + {foreach $field['choices'] AS $k => $v} +
+

+ + +

+
+ {/foreach} + {elseif $field['type'] == 'text'} +
+ + {if isset($field['suffix'])} {$field['suffix']|strval}{/if} +
+ {elseif $field['type'] == 'password'} +
+ + {if isset($field['suffix'])} {$field['suffix']|strval}{/if} +
+ {elseif $field['type'] == 'textarea'} +
+ +
+ {elseif $field['type'] == 'file'} + {if isset($field['thumb']) && $field['thumb']} +
+ {$field['title']} +
+ {/if} +
+ +
+ {elseif $field['type'] == 'color'} +
+ +
+ {elseif $field['type'] == 'price'} +
+ {$currency_left_sign}{$currency_right_sign} {l s='(tax excl.)'} +
+ {elseif $field['type'] == 'textLang' || $field['type'] == 'textareaLang' || $field['type'] == 'selectLang'} + {if $field['type'] == 'textLang'} + {foreach $field['languages'] AS $id_lang => $value} +
+ +
+ {/foreach} + {elseif $field['type'] == 'textareaLang'} + {foreach $field['languages'] AS $id_lang => $value} +
+ +
+ {/foreach} + {elseif $field['type'] == 'selectLang'} + {foreach $languages as $language} +
+ +
+ + + {/foreach} + {/if} + {if count($languages) > 1} + {* TO DO - ajouter les langues*} +
+ +
+
+ {l s='Choose language:'}

+ {foreach $languages as $language} + {$language.name} + {/foreach} +
+ {/if} + {/if} + + {if isset($field['required']) && $field['required'] && $field['type'] != 'radio'} + * + {/if} + {if isset($field['hint'])}{$field['hint']} {/if} + {/block}{* end block input *} + {if $field['is_invisible']} +

+ {l s='You can\'t change the value of this configuration field in the context of this shop.'} +

+ {/if} +
+
+ {/block}{* end block field *} + {/if} + {/foreach} + {if isset($categoryData['submit'])} +
+ +
+ {/if} + {if isset($categoryData['required_fields']) && $categoryData['required_fields']} +
* {l s='Required field'}
+ {/if} + {if isset($categoryData['bottom'])}{$categoryData['bottom']}{/if} +
{/foreach} {hook h='displayAdminOptions'} {if isset($name_controller)} diff --git a/controllers/admin/AdminDeliverySlipController.php b/controllers/admin/AdminDeliverySlipController.php index c2cca91a9..cf83a2904 100644 --- a/controllers/admin/AdminDeliverySlipController.php +++ b/controllers/admin/AdminDeliverySlipController.php @@ -28,6 +28,7 @@ class AdminDeliverySlipControllerCore extends AdminController { public function __construct() { + $this->bootstrap = true; $this->table = 'delivery'; $this->context = Context::getContext(); diff --git a/controllers/admin/AdminOrderMessageController.php b/controllers/admin/AdminOrderMessageController.php index 0eeb6f53a..0db53bfe5 100644 --- a/controllers/admin/AdminOrderMessageController.php +++ b/controllers/admin/AdminOrderMessageController.php @@ -28,6 +28,7 @@ class AdminOrderMessageControllerCore extends AdminController { public function __construct() { + $this->bootstrap = true; $this->table = 'order_message'; $this->className = 'OrderMessage'; $this->lang = true; diff --git a/controllers/admin/AdminPreferencesController.php b/controllers/admin/AdminPreferencesController.php index f878f69fc..039b9ccf8 100644 --- a/controllers/admin/AdminPreferencesController.php +++ b/controllers/admin/AdminPreferencesController.php @@ -29,6 +29,7 @@ class AdminPreferencesControllerCore extends AdminController public function __construct() { + $this->bootstrap = true; $this->context = Context::getContext(); $this->className = 'Configuration'; $this->table = 'configuration'; diff --git a/controllers/admin/AdminReturnController.php b/controllers/admin/AdminReturnController.php index 39866ea4b..5d22ba53f 100644 --- a/controllers/admin/AdminReturnController.php +++ b/controllers/admin/AdminReturnController.php @@ -28,6 +28,7 @@ class AdminReturnControllerCore extends AdminController { public function __construct() { + $this->bootstrap = true; $this->context = Context::getContext(); $this->table = 'order_return'; $this->className = 'OrderReturn'; diff --git a/controllers/admin/AdminSlipController.php b/controllers/admin/AdminSlipController.php index 49c03e9a4..4783db2de 100644 --- a/controllers/admin/AdminSlipController.php +++ b/controllers/admin/AdminSlipController.php @@ -28,6 +28,7 @@ class AdminSlipControllerCore extends AdminController { public function __construct() { + $this->bootstrap = true; $this->table = 'order_slip'; $this->className = 'OrderSlip'; $this->fields_list = array( diff --git a/controllers/admin/AdminStatusesController.php b/controllers/admin/AdminStatusesController.php index e1cc6f887..26dc14aa6 100644 --- a/controllers/admin/AdminStatusesController.php +++ b/controllers/admin/AdminStatusesController.php @@ -28,6 +28,7 @@ class AdminStatusesControllerCore extends AdminController { public function __construct() { + $this->bootstrap = true; $this->table = 'order_state'; $this->className = 'OrderState'; $this->lang = true;
diff --git a/admin-dev/themes/default/template/controllers/return/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/return/helpers/form/form.tpl index 8c8a53e46..8d2b5263a 100644 --- a/admin-dev/themes/default/template/controllers/return/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/return/helpers/form/form.tpl @@ -27,80 +27,78 @@ {block name="input"} {if $input.type == 'text_customer'} - {$customer->firstname} {$customer->lastname} -

- {l s='View details on the customer page'} + {$customer->firstname} {$customer->lastname} +

+ {l s='View details on the customer page'}

{elseif $input.type == 'text_order'} - {$text_order} -

- {l s='View details on the order page'} + {$text_order} +

+ {l s='View details on the order page'}

{elseif $input.type == 'list_products'} - - - - - + {/if} + {/foreach} +
  - +
+ + + + + + + + + + {foreach $returnedCustomizations as $returnedCustomization} - - - - + + + + - - {foreach $returnedCustomizations as $returnedCustomization} + {foreach $customizationDatas as $type => $datas} - - - - + + {/foreach} + {/foreach} + + {* Classic products *} + {foreach $products as $k => $product} + {if !isset($quantityDisplayed[$product['id_order_detail']]) || $product['product_quantity']|intval > $quantityDisplayed[$product['id_order_detail']]|intval} + + + + + - {foreach $customizationDatas as $type => $datas} - - - - {/foreach} - {/foreach} - - {* Classic products *} - {foreach $products as $k => $product} - {if !isset($quantityDisplayed[$product['id_order_detail']]) || $product['product_quantity']|intval > $quantityDisplayed[$product['id_order_detail']]|intval} - - - - - - - {/if} - {/foreach} -
{l s='Reference'}{l s='Product name'}{l s='Quantity'}{l s='Action'}
{l s='Reference'}{l s='Product name'}{l s='Quantity'}{l s='Action'}{$returnedCustomization['reference']}{$returnedCustomization['name']}{$returnedCustomization['product_quantity']|intval} + + + {l s='Delete'} + +
{$returnedCustomization['reference']}{$returnedCustomization['name']}{$returnedCustomization['product_quantity']|intval} - - + + {if $type == 'type_file'} +
    + {foreach $datas a $data name='loop'} +
  • + +
  • + {/foreach} +
+ {elseif $type == 'type_textfield'} +
    + {foreach $datas as $data name='loop'} +
  • {if $data['name']}$data['name']{else}{l s='Text #%d' sprintf=$loop.iteration}{/if}{l s=':'} {$data['value']}
  • + {/foreach} +
+ {/if} +
{$product['product_reference']}{$product['product_name']}{$product['product_quantity']} + + + {l s='Delete'}
- {if $type == 'type_file'} -
    - {foreach $datas a $data name='loop'} -
  • - -
  • - {/foreach} -
- {elseif $type == 'type_textfield'} -
    - {foreach $datas as $data name='loop'} -
  • {if $data['name']}$data['name']{else}{l s='Text #%d' sprintf=$loop.iteration}{/if}{l s=':'} {$data['value']}
  • - {/foreach} -
- {/if} -
{$product['product_reference']}{$product['product_name']}{$product['product_quantity']} - - - -
-
{else} {$smarty.block.parent} diff --git a/admin-dev/themes/default/template/controllers/slip/_print_pdf_icon.tpl b/admin-dev/themes/default/template/controllers/slip/_print_pdf_icon.tpl index 8ae907309..90efe9e88 100755 --- a/admin-dev/themes/default/template/controllers/slip/_print_pdf_icon.tpl +++ b/admin-dev/themes/default/template/controllers/slip/_print_pdf_icon.tpl @@ -24,6 +24,9 @@ *} {* Generate HTML code for printing OrderSlip Icon with link *} - -order_slip - + + + + {l s='Download credit slip'} + + diff --git a/admin-dev/themes/default/template/helpers/list/list_header.tpl b/admin-dev/themes/default/template/helpers/list/list_header.tpl index 50edc26c6..57a72b701 100644 --- a/admin-dev/themes/default/template/helpers/list/list_header.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_header.tpl @@ -184,7 +184,7 @@
{l s='Actions'}{if !$simple_header}{/if}{l s='Actions'}{if !$simple_header}{/if}