diff --git a/admin-dev/themes/default/css/admin-theme.css b/admin-dev/themes/default/css/admin-theme.css index 81962e0b3..2248e7602 100644 --- a/admin-dev/themes/default/css/admin-theme.css +++ b/admin-dev/themes/default/css/admin-theme.css @@ -5089,7 +5089,7 @@ body.fixed-top { border-radius: 5px; -webkit-box-shadow: rgba(0, 0, 0, 0.1) 0 0 7px, white 0 0 0 4px inset; box-shadow: rgba(0, 0, 0, 0.1) 0 0 7px, white 0 0 0 4px inset; } - #content form legend { + #content legend { float: left; padding: 0 0 0 0; margin: 5px 0 15px 0; diff --git a/admin-dev/themes/default/css/admin-theme.sass b/admin-dev/themes/default/css/admin-theme.sass index b2ad5a669..a448cf79f 100755 --- a/admin-dev/themes/default/css/admin-theme.sass +++ b/admin-dev/themes/default/css/admin-theme.sass @@ -53,7 +53,7 @@ body.fixed-top background-color: $bg-content-color @include border-radius(5px) @include box-shadow(rgba(black,0.10) 0 0 7px, white 0 0 0 4px inset) - form legend + legend float: left padding: 0 0 0 0 margin: 5px 0 15px 0 diff --git a/admin-dev/themes/default/template/helpers/form/form.tpl b/admin-dev/themes/default/template/helpers/form/form.tpl index 5085fc34a..d8510f1d6 100644 --- a/admin-dev/themes/default/template/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/helpers/form/form.tpl @@ -283,6 +283,7 @@ + {elseif $input.type == 'textarea'} {if isset($input.lang) AND $input.lang} {foreach $languages as $language} @@ -312,6 +313,7 @@ {else} {/if} + {elseif $input.type == 'checkbox'} {foreach $input.values.query as $value} {assign var=id_checkbox value=$input.name|cat:'_'|cat:$value[$input.values.id]} @@ -395,12 +397,20 @@ value="{$fields_value[$input.name]|escape:'htmlall':'UTF-8'}" /> {elseif $input.type == 'date'} - +
+
+ + + + +
+
+ {elseif $input.type == 'free'} {$fields_value[$input.name]} {/if} diff --git a/admin-dev/themes/default/template/helpers/list/list_footer.tpl b/admin-dev/themes/default/template/helpers/list/list_footer.tpl index e34a59a18..05706a1ee 100644 --- a/admin-dev/themes/default/template/helpers/list/list_footer.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_footer.tpl @@ -22,20 +22,50 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - - - {if $bulk_actions} -

- {foreach $bulk_actions as $key => $params} - - {/foreach} -

- {/if} + + + {if $bulk_actions} +

+ {foreach $bulk_actions as $key => $params} + + {/foreach} +

+ {/if} + + {if !$simple_header} +
+ + {if $page > 1} +   + + {/if} + {l s='Page'} {$page} / {$total_pages} + {if $page < $total_pages} +   + + {/if} + + + +  |  + + + + / {$list_total} {l s='result(s)'} +
+ {/if} + + {if !$simple_header} - - + + {/if} {hook h='displayAdminListAfter'} 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 57a72b701..c98b7b8cf 100644 --- a/admin-dev/themes/default/template/helpers/list/list_header.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_header.tpl @@ -24,51 +24,46 @@ *} {if !$simple_header} + +{* Display column names and arrows for ordering (ASC, DESC) *} +{if $is_order_position} + - {* Display column names and arrows for ordering (ASC, DESC) *} - {if $is_order_position} - - - - {/if} - - - - -{/if}{* End if simple_header *} + +{/if} + +{/if} {if $show_toolbar} {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} {/if} {if !$simple_header} -
{block name="leadin"}{/block}
+
{block name="leadin"}{/block}
{/if} - - - {hook h='displayAdminListBefore'} + {if isset($name_controller)} {capture name=hookName assign=hookName}display{$name_controller|ucfirst}ListBefore{/capture} {hook h=$hookName} @@ -77,48 +72,13 @@ {hook h=$hookName} {/if} - {if !$simple_header}
- {block name="override_header"}{/block} - + {block name="override_header"}{/block} - -{/if} + - {if !$simple_header} - - - {if $page > 1} -   - - {/if} - - {l s='Page'} {$page} / {$total_pages} - - {if $page < $total_pages} -   - - {/if} - - - -  |  - - - - - - / {$list_total} {l s='result(s)'} - - - {/if} - - - {* - {foreach $fields_display AS $key => $params} - - {/foreach} - {if $shop_link_type} - - {/if} - {if $has_actions} - - {/if} *} +{/if} +
{foreach $fields_display AS $key => $params} - + + + {/if} + {/foreach} {if $shop_link_type} - + {/if} {if $has_actions} - + {/if} {if !$simple_header} @@ -197,43 +142,43 @@ {* Filters (input, select, date or bool) *} {foreach $fields_display AS $key => $params} - + {/if} + {/foreach} {if $shop_link_type} - + {/if} {if $has_actions} - + {/if} - - {/if} - \ No newline at end of file + + {/if} + \ No newline at end of file diff --git a/classes/helper/HelperList.php b/classes/helper/HelperList.php index 8cbab8b4c..a05365c27 100644 --- a/classes/helper/HelperList.php +++ b/classes/helper/HelperList.php @@ -574,24 +574,28 @@ class HelperListCore extends Helper $this->fields_list[$key] = $params; } - $this->header_tpl->assign(array_merge($this->tpl_vars, array( - 'title' => $this->title, - 'show_toolbar' => $this->show_toolbar, - 'toolbar_scroll' => $this->toolbar_scroll, - 'toolbar_btn' => $this->toolbar_btn, - 'table' => $this->table, - 'currentIndex' => $this->currentIndex, - 'action' => $action, + Context::getContext()->smarty->assign(array( 'page' => $page, 'simple_header' => $this->simple_header, 'total_pages' => $total_pages, 'selected_pagination' => $selected_pagination, 'pagination' => $this->_pagination, 'list_total' => $this->listTotal, + 'token' => $this->token, + 'table' => $this->table, + 'bulk_actions' => $this->bulk_actions + )); + + $this->header_tpl->assign(array_merge($this->tpl_vars, array( + 'title' => $this->title, + 'show_toolbar' => $this->show_toolbar, + 'toolbar_scroll' => $this->toolbar_scroll, + 'toolbar_btn' => $this->toolbar_btn, + 'currentIndex' => $this->currentIndex, + 'action' => $action, 'is_order_position' => $this->position_identifier && $this->orderBy == 'position', 'order_way' => $this->orderWay, 'order_by' => $this->orderBy, - 'token' => $this->token, 'fields_display' => $this->fields_list, 'delete' => in_array('delete', $this->actions), 'identifier' => $this->identifier, @@ -599,12 +603,11 @@ class HelperListCore extends Helper 'shop_link_type' => $this->shopLinkType, 'has_actions' => !empty($this->actions), 'has_bulk_actions' => !empty($this->bulk_actions), - 'bulk_actions' => $this->bulk_actions, 'table_id' => isset($table_id) ? $table_id : null, 'table_dnd' => isset($table_dnd) ? $table_dnd : null, 'name' => isset($name) ? $name : null, 'name_id' => isset($name_id) ? $name_id : null, - 'row_hover' => $this->row_hover, + 'row_hover' => $this->row_hover ))); return $this->header_tpl->fetch(); @@ -616,11 +619,7 @@ class HelperListCore extends Helper public function displayListFooter() { $this->footer_tpl->assign(array_merge($this->tpl_vars, array( - 'token' => $this->token, - 'table' => $this->table, - 'current' => $this->currentIndex, - 'bulk_actions' => $this->bulk_actions, - 'simple_header' => $this->simple_header + 'current' => $this->currentIndex ))); return $this->footer_tpl->fetch(); } diff --git a/controllers/admin/AdminDeliverySlipController.php b/controllers/admin/AdminDeliverySlipController.php index cf83a2904..8ea2f3ebe 100644 --- a/controllers/admin/AdminDeliverySlipController.php +++ b/controllers/admin/AdminDeliverySlipController.php @@ -40,13 +40,11 @@ class AdminDeliverySlipControllerCore extends AdminController 'PS_DELIVERY_PREFIX' => array( 'title' => $this->l('Delivery prefix:'), 'desc' => $this->l('Prefix used for delivery slips'), - 'size' => 6, 'type' => 'textLang' ), 'PS_DELIVERY_NUMBER' => array( 'title' => $this->l('Delivery number:'), 'desc' => $this->l('The next delivery slip will begin with this number and then increase with each additional slip.'), - 'size' => 6, 'cast' => 'intval', 'type' => 'text' ) @@ -63,31 +61,30 @@ class AdminDeliverySlipControllerCore extends AdminController $this->fields_form = array( 'legend' => array( 'title' => $this->l('Print PDF delivery slips'), - 'image' => '../img/admin/AdminPdf.gif' + 'icon' => 'icon-print' ), 'input' => array( array( 'type' => 'date', 'label' => $this->l('From:'), 'name' => 'date_from', - 'size' => 20, 'maxlength' => 10, 'required' => true, - 'desc' => $this->l('Format: 2011-12-31 (inclusive)') + 'hint' => $this->l('Format: 2011-12-31 (inclusive)') ), array( 'type' => 'date', 'label' => $this->l('To:'), 'name' => 'date_to', - 'size' => 20, 'maxlength' => 10, 'required' => true, - 'desc' => $this->l('Format: 2012-12-31 (inclusive)') + 'hint' => $this->l('Format: 2012-12-31 (inclusive)') ) ), 'submit' => array( 'title' => $this->l('Generate PDF file'), - 'class' => 'button' + 'class' => 'btn btn-primary', + 'icon' => 'icon-download-alt' ) ); diff --git a/controllers/admin/AdminInvoicesController.php b/controllers/admin/AdminInvoicesController.php index c90344b84..f95a3d05f 100644 --- a/controllers/admin/AdminInvoicesController.php +++ b/controllers/admin/AdminInvoicesController.php @@ -132,7 +132,7 @@ class AdminInvoicesControllerCore extends AdminController $this->fields_form = array( 'legend' => array( 'title' => $this->l('By order status'), - 'icon' => 'icon-pushpin' + 'icon' => 'icon-time' ), 'input' => array( array( diff --git a/controllers/admin/AdminOrderMessageController.php b/controllers/admin/AdminOrderMessageController.php index 0db53bfe5..9ed6b6c41 100644 --- a/controllers/admin/AdminOrderMessageController.php +++ b/controllers/admin/AdminOrderMessageController.php @@ -46,16 +46,13 @@ class AdminOrderMessageControllerCore extends AdminController $this->fields_list = array( 'id_order_message' => array( 'title' => $this->l('ID'), - 'align' => 'center', - 'width' => 25 + 'align' => 'center' ), 'name' => array( - 'title' => $this->l('Name'), - 'width' => 140 + 'title' => $this->l('Name') ), 'message' => array( 'title' => $this->l('Message'), - 'width' => 600, 'maxlength' => 300 ) ); @@ -63,7 +60,7 @@ class AdminOrderMessageControllerCore extends AdminController $this->fields_form = array( 'legend' => array( 'title' => $this->l('Order messages'), - 'image' => '../img/admin/email.gif' + 'icon' => 'icon-mail' ), 'input' => array( array( @@ -79,8 +76,6 @@ class AdminOrderMessageControllerCore extends AdminController 'lang' => true, 'label' => $this->l('Message:'), 'name' => 'message', - 'cols' => 50, - 'rows' => 15, 'required' => true ) ), diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index eeabe2400..44e3e6b5c 100755 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -64,17 +64,14 @@ class AdminOrdersControllerCore extends AdminController $this->fields_list = array( 'id_order' => array( 'title' => $this->l('ID'), - 'align' => 'center', - 'width' => 25 + 'align' => 'center' ), 'reference' => array( 'title' => $this->l('Reference'), - 'align' => 'center', - 'width' => 65 + 'align' => 'center' ), 'new' => array( 'title' => $this->l('New'), - 'width' => 25, 'align' => 'center', 'type' => 'bool', 'tmpTableFilter' => true, @@ -93,7 +90,6 @@ class AdminOrdersControllerCore extends AdminController ), 'total_paid_tax_incl' => array( 'title' => $this->l('Total'), - 'width' => 70, 'align' => 'right', 'prefix' => '', 'suffix' => '', @@ -101,13 +97,11 @@ class AdminOrdersControllerCore extends AdminController 'currency' => true ), 'payment' => array( - 'title' => $this->l('Payment: '), - 'width' => 100 + 'title' => $this->l('Payment: ') ), 'osname' => array( 'title' => $this->l('Status'), 'color' => 'color', - 'width' => 280, 'type' => 'select', 'list' => $statuses_array, 'filter_key' => 'os!id_order_state', @@ -115,14 +109,12 @@ class AdminOrdersControllerCore extends AdminController ), 'date_add' => array( 'title' => $this->l('Date'), - 'width' => 130, 'align' => 'right', 'type' => 'datetime', 'filter_key' => 'a!date_add' ), 'id_pdf' => array( 'title' => $this->l('PDF'), - 'width' => 35, 'align' => 'center', 'callback' => 'printPDFIcons', 'orderby' => false, @@ -2258,4 +2250,3 @@ class AdminOrdersControllerCore extends AdminController $order_invoice->update(); } } - diff --git a/controllers/admin/AdminSlipController.php b/controllers/admin/AdminSlipController.php index 4783db2de..dd462b111 100644 --- a/controllers/admin/AdminSlipController.php +++ b/controllers/admin/AdminSlipController.php @@ -35,7 +35,6 @@ class AdminSlipControllerCore extends AdminController 'id_order_slip' => array( 'title' => $this->l('ID'), 'align' => 'center', - 'width' => 25 ), 'id_order' => array( 'title' => $this->l('ID Order'), @@ -43,13 +42,11 @@ class AdminSlipControllerCore extends AdminController ), 'date_add' => array( 'title' => $this->l('Date issued'), - 'width' => 150, 'type' => 'date', 'align' => 'right' ), 'id_pdf' => array( 'title' => $this->l('PDF'), - 'width' => 35, 'align' => 'center', 'callback' => 'printPDFIcons', 'orderby' => false, @@ -83,32 +80,31 @@ class AdminSlipControllerCore extends AdminController $this->fields_form = array( 'legend' => array( 'title' => $this->l('Print a PDF'), - 'image' => '../img/admin/pdf.gif' + 'icon' => 'icon-print' ), 'input' => array( array( 'type' => 'date', 'label' => $this->l('From:'), 'name' => 'date_from', - 'size' => 20, 'maxlength' => 10, 'required' => true, - 'desc' => $this->l('Format: 2011-12-31 (inclusive)') + 'hint' => $this->l('Format: 2011-12-31 (inclusive)') ), array( 'type' => 'date', 'label' => $this->l('To:'), 'name' => 'date_to', - 'size' => 20, 'maxlength' => 10, 'required' => true, - 'desc' => $this->l('Format: 2012-12-31 (inclusive)') + 'hint' => $this->l('Format: 2012-12-31 (inclusive)') ) ), 'submit' => array( 'title' => $this->l('Generate PDF file'), - 'class' => 'button', - 'id' => 'submitPrint' + 'class' => 'btn btn-primary', + 'id' => 'submitPrint', + 'icon' => 'icon-download-alt' ) ); diff --git a/controllers/admin/AdminStatusesController.php b/controllers/admin/AdminStatusesController.php index 26dc14aa6..f094b40a4 100644 --- a/controllers/admin/AdminStatusesController.php +++ b/controllers/admin/AdminStatusesController.php @@ -73,8 +73,7 @@ class AdminStatusesControllerCore extends AdminController $this->fields_list = array( 'id_order_state' => array( 'title' => $this->l('ID'), - 'align' => 'center', - 'width' => 25 + 'align' => 'center' ), 'name' => array( 'title' => $this->l('Name'), @@ -85,7 +84,6 @@ class AdminStatusesControllerCore extends AdminController 'title' => $this->l('Icon'), 'align' => 'center', 'image' => 'os', - 'width' => 25, 'orderby' => false, 'search' => false ), @@ -96,14 +94,12 @@ class AdminStatusesControllerCore extends AdminController '1' => 'enabled.gif', '0' => 'disabled.gif' ), - 'width' => 190, 'type' => 'bool', 'orderby' => false ), 'delivery' => array( 'title' => $this->l('Delivery'), 'align' => 'center', - 'width' => 25, 'icon' => array( '1' => 'enabled.gif', '0' => 'disabled.gif' @@ -115,7 +111,6 @@ class AdminStatusesControllerCore extends AdminController 'invoice' => array( 'title' => $this->l('Invoice'), 'align' => 'center', - 'width' => 25, 'icon' => array( '1' => 'enabled.gif', '0' => 'disabled.gif' @@ -124,8 +119,7 @@ class AdminStatusesControllerCore extends AdminController 'orderby' => false ), 'template' => array( - 'title' => $this->l('Email template'), - 'width' => 120 + 'title' => $this->l('Email template') ) ); } @@ -146,8 +140,7 @@ class AdminStatusesControllerCore extends AdminController $this->fields_list = array( 'id_order_return_state' => array( 'title' => $this->l('ID'), - 'align' => 'center', - 'width' => 25 + 'align' => 'center' ), 'name' => array( 'title' => $this->l('Name'), @@ -245,7 +238,7 @@ class AdminStatusesControllerCore extends AdminController 'tinymce' => true, 'legend' => array( 'title' => $this->l('Order status'), - 'image' => '../img/admin/time.gif' + 'icon' => 'icon-time' ), 'input' => array( array( @@ -253,23 +246,23 @@ class AdminStatusesControllerCore extends AdminController 'label' => $this->l('Status name:'), 'name' => 'name', 'lang' => true, - 'size' => 40, 'required' => true, - 'hint' => $this->l('Invalid characters: numbers and').' !<>,;?=+()@#"�{}_$%:', - 'desc' => $this->l('Order status (e.g. \'Pending\')') + 'hint' => array( + $this->l('Order status (e.g. \'Pending\')'), + $this->l('Invalid characters: numbers and').' !<>,;?=+()@#"�{}_$%:' + ) ), array( 'type' => 'file', 'label' => $this->l('Icon:'), 'name' => 'icon', - 'desc' => $this->l('Upload an icon from your computer (File type: .gif, suggested size: 16x16)') + 'hint' => $this->l('Upload an icon from your computer (File type: .gif, suggested size: 16x16)') ), array( 'type' => 'color', 'label' => $this->l('Color:'), 'name' => 'color', - 'size' => 30, - 'desc' => $this->l('Status will be highlighted in this color. (HTML colors only)').' "lightblue", "#CC6600")' + 'hint' => $this->l('Status will be highlighted in this color. (HTML colors only)').' "lightblue", "#CC6600")' ), array( 'type' => 'checkbox', @@ -358,8 +351,10 @@ class AdminStatusesControllerCore extends AdminController 'id' => 'id', 'name' => 'name' ), - 'hint' => $this->l('Only letters, number and hashtags are allowed.'), - 'desc' => $this->l('Email template for both .html and .txt') + 'hint' => array( + $this->l('Only letters, number and hashtags are allowed.'), + $this->l('Email template for both .html and .txt') + ) ) ), 'submit' => array( @@ -392,7 +387,7 @@ class AdminStatusesControllerCore extends AdminController 'tinymce' => true, 'legend' => array( 'title' => $this->l('Order status'), - 'image' => '../img/admin/time.gif' + 'icon' => 'icon-time' ), 'input' => array( array( @@ -400,17 +395,17 @@ class AdminStatusesControllerCore extends AdminController 'label' => $this->l('Status name:'), 'name' => 'name', 'lang' => true, - 'size' => 40, 'required' => true, - 'hint' => $this->l('Invalid characters: numbers and').' !<>,;?=+()@#"�{}_$%:', - 'desc' => $this->l('Order\'s return status name') + 'hint' => array( + $this->l('Order\'s return status name'), + $this->l('Invalid characters: numbers and').' !<>,;?=+()@#"�{}_$%:' + ) ), array( 'type' => 'color', 'label' => $this->l('Color:'), 'name' => 'color', - 'size' => 30, - 'desc' => $this->l('Status will be highlighted in this color. (HTML colors only)').' "lightblue", "#CC6600")' + 'hint' => $this->l('Status will be highlighted in this color. (HTML colors only)').' "lightblue", "#CC6600")' ) ), 'submit' => array(
- {if $has_bulk_actions} - - {/if} + {if $has_bulk_actions} + + {/if} - {if isset($params.hint)} - {$params.hint}  - {/if} - - {$params.title} + + {if isset($params.hint)} + {$params.hint}  + {/if} + + {$params.title} {if (!isset($params.orderby) || $params.orderby) && !$simple_header} - + - - - + + - - - {elseif !$simple_header} - {/if} - - {if $shop_link_type == 'shop'} - {l s='Shop'} - {else} - {l s='Group shop'} - {/if} -
  -
+ {if $shop_link_type == 'shop'} + {l s='Shop'} + {else} + {l s='Group shop'} + {/if} + {l s='Actions'}{if !$simple_header}{/if}{l s='Actions'}{if !$simple_header}{/if}
- {if isset($params.search) && !$params.search} - -- - {else} - {if $params.type == 'bool'} - + {if isset($params.search) && !$params.search} + -- + {else} + {if $params.type == 'bool'} + + {elseif $params.type == 'date' || $params.type == 'datetime'} + {l s='From'} + {l s='To'} + {elseif $params.type == 'select'} + {if isset($params.filter_key)} + - {elseif $params.type == 'date' || $params.type == 'datetime'} - {l s='From'} - {l s='To'} - {elseif $params.type == 'select'} - {if isset($params.filter_key)} - - {/if} - {else} - {/if} + {else} + {/if} - --------