From fcf568b9ea99d3b4fe241736f75a875411806253 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Mon, 9 Dec 2013 18:21:31 +0100 Subject: [PATCH] // BlockLayered 1.5 backward compatibility --- modules/blocklayered/blocklayered.php | 78 ++- .../blocklayered/css/blocklayered_admin.css | 72 +- ...dmin_bt.css => blocklayered_admin_1.6.css} | 0 modules/blocklayered/img/cogs.gif | Bin 0 -> 280 bytes modules/blocklayered/img/cross.png | Bin 0 -> 473 bytes modules/blocklayered/img/edit.gif | Bin 0 -> 973 bytes modules/blocklayered/js/blocklayered_admin.js | 2 +- modules/blocklayered/js/jquery.sortable.js | 85 +++ .../views/templates/admin/add.tpl | 657 ++++++++---------- .../views/templates/admin/add_1.6.tpl | 373 ++++++++++ .../views/templates/admin/view.tpl | 383 +++++----- .../views/templates/admin/view_1.6.tpl | 291 ++++++++ 12 files changed, 1328 insertions(+), 613 deletions(-) rename modules/blocklayered/css/{blocklayered_admin_bt.css => blocklayered_admin_1.6.css} (100%) create mode 100644 modules/blocklayered/img/cogs.gif create mode 100644 modules/blocklayered/img/cross.png create mode 100644 modules/blocklayered/img/edit.gif create mode 100644 modules/blocklayered/js/jquery.sortable.js create mode 100644 modules/blocklayered/views/templates/admin/add_1.6.tpl create mode 100644 modules/blocklayered/views/templates/admin/view_1.6.tpl diff --git a/modules/blocklayered/blocklayered.php b/modules/blocklayered/blocklayered.php index b18dcdf5d..7cbb3b684 100644 --- a/modules/blocklayered/blocklayered.php +++ b/modules/blocklayered/blocklayered.php @@ -1495,36 +1495,64 @@ class BlockLayered extends Module $this->context->smarty->assign('asso_shops', $helper->renderAssoShop()); } - $tree_categories_helper = new HelperTreeCategories('categories-treeview'); - $tree_categories_helper->setRootCategory((Shop::getContext() == Shop::CONTEXT_SHOP ? Category::getRootCategory()->id_category : 0)) - ->setUseCheckBox(true); + if (version_compare(_PS_VERSION_, '1.6.0', '>=') === TRUE) + { + $tree_categories_helper = new HelperTreeCategories('categories-treeview'); + $tree_categories_helper->setRootCategory((Shop::getContext() == Shop::CONTEXT_SHOP ? Category::getRootCategory()->id_category : 0)) + ->setUseCheckBox(true); + } + else + { + if (Shop::getContext() == Shop::CONTEXT_SHOP) + { + $root_category = Category::getRootCategory(); + $root_category = array('id_category' => $root_category->id_category, 'name' => $root_category->name); + } + else + $root_category = array('id_category' => '0', 'name' => $this->l('Root')); + + $tree_categories_helper = new Helper(); + } $module_url = Tools::getProtocol(Tools::usingSecureMode()).$_SERVER['HTTP_HOST'].$this->getPathUri(); if (method_exists($this->context->controller, 'addJquery')) { $this->context->controller->addJS($this->_path.'js/blocklayered_admin.js'); - $this->context->controller->addJS(_PS_JS_DIR_.'vendor/jquery.sortable.js'); + + if (version_compare(_PS_VERSION_, '1.6.0', '>=') === TRUE) + $this->context->controller->addJS(_PS_JS_DIR_.'vendor/jquery.sortable.js'); + else + $this->context->controller->addJS($this->_path.'js/jquery.sortable.js'); } if (version_compare(_PS_VERSION_, '1.6.0', '>=') === TRUE) - $this->context->controller->addCSS($this->_path.'css/blocklayered_admin_bt.css'); - /*else - $this->context->controller->addCSS($this->_path.'css/blocklayered_admin.css');*/ + $this->context->controller->addCSS($this->_path.'css/blocklayered_admin_1.6.css'); + else + $this->context->controller->addCSS($this->_path.'css/blocklayered_admin.css'); if (Tools::getValue('add_new_filters_template')) { $this->context->smarty->assign(array( 'current_url' => $this->context->link->getAdminLink('AdminModules').'&configure=blocklayered&tab_module=front_office_features&module_name=blocklayered', + 'uri' => $this->getPathUri(), 'id_layered_filter' => 0, 'template_name' => sprintf($this->l('My template - %s'), date('Y-m-d')), 'attribute_groups' => $attribute_groups, 'features' => $features, - 'total_filters' => 6+count($attribute_groups)+count($features), - 'categories_tree' => $tree_categories_helper->render(), + 'total_filters' => 6+count($attribute_groups)+count($features) )); - return $this->display(__FILE__, 'views/templates/admin/add.tpl'); + if (version_compare(_PS_VERSION_, '1.6.0', '>=') === TRUE) + $this->context->smarty->assign('categories_tree', $tree_categories_helper->render()); + else + $this->context->smarty->assign('categories_tree', $tree_categories_helper->renderCategoryTree( + $root_category, array(), 'categoryBox', false, false, array(), true)); + + if (version_compare(_PS_VERSION_, '1.6.0', '>=') === TRUE) + return $this->display(__FILE__, 'views/templates/admin/add_1.6.tpl'); + else + return $this->display(__FILE__, 'views/templates/admin/add.tpl'); } else if (Tools::getValue('edit_filters_template')) { @@ -1535,28 +1563,41 @@ class BlockLayered extends Module ); $filters = unserialize($template['filters']); - $tree_categories_helper->setSelectedCategories($filters['categories']); + + if (version_compare(_PS_VERSION_, '1.6.0', '>=') === TRUE) + { + $tree_categories_helper->setSelectedCategories($filters['categories']); + $this->context->smarty->assign('categories_tree', $tree_categories_helper->render()); + } + else + $this->context->smarty->assign('categories_tree',$tree_categories_helper->renderCategoryTree( + $root_category, $filters['categories'], 'categoryBox', false, false, array(), true)); + $select_shops = $filters['shop_list']; unset($filters['categories']); unset($filters['shop_list']); $this->context->smarty->assign(array( 'current_url' => $this->context->link->getAdminLink('AdminModules').'&configure=blocklayered&tab_module=front_office_features&module_name=blocklayered', + 'uri' => $this->getPathUri(), 'id_layered_filter' => (int)Tools::getValue('id_layered_filter'), 'template_name' => $template['name'], 'attribute_groups' => $attribute_groups, 'features' => $features, 'filters' => Tools::jsonEncode($filters), - 'total_filters' => 6+count($attribute_groups)+count($features), - 'categories_tree' => $tree_categories_helper->render(), + 'total_filters' => 6+count($attribute_groups)+count($features) )); - return $this->display(__FILE__, 'views/templates/admin/add.tpl'); + if (version_compare(_PS_VERSION_, '1.6.0', '>=') === TRUE) + return $this->display(__FILE__, 'views/templates/admin/add_1.6.tpl'); + else + return $this->display(__FILE__, 'views/templates/admin/add.tpl'); } else { $this->context->smarty->assign(array( 'message' => $message, + 'uri' => $this->getPathUri(), 'PS_LAYERED_INDEXED' => Configuration::getGlobalValue('PS_LAYERED_INDEXED'), 'current_url' => Tools::safeOutput(preg_replace('/&deleteFilterTemplate=[0-9]*&id_layered_filter=[0-9]*/', '', $_SERVER['REQUEST_URI'])), 'id_lang' => Context::getContext()->cookie->id_lang, @@ -1577,8 +1618,11 @@ class BlockLayered extends Module 'index_mnf' => Configuration::get('PS_LAYERED_FILTER_INDEX_MNF'), 'index_cat' => Configuration::get('PS_LAYERED_FILTER_INDEX_CAT') )); - - return $this->display(__FILE__, 'views/templates/admin/view.tpl'); + + if (version_compare(_PS_VERSION_, '1.6.0', '>=') === TRUE) + return $this->display(__FILE__, 'views/templates/admin/view_1.6.tpl'); + else + return $this->display(__FILE__, 'views/templates/admin/view.tpl'); } } @@ -3174,4 +3218,4 @@ class BlockLayered extends Module if ($values) Db::getInstance()->execute(rtrim($sql_to_insert, ',')); } -} +} \ No newline at end of file diff --git a/modules/blocklayered/css/blocklayered_admin.css b/modules/blocklayered/css/blocklayered_admin.css index e2636eb21..67b33d991 100644 --- a/modules/blocklayered/css/blocklayered_admin.css +++ b/modules/blocklayered/css/blocklayered_admin.css @@ -1,21 +1,53 @@ -#error-filter-name { display: none; } -#layered_container_left ul, #layered_container_right ul { list-style-type: none; padding-left: 0px; } -.ui-effects-transfer { border: 1px solid #CCC; } -.ui-state-highlight { height: 1.5em; line-height: 1.2em; } -ul#selected_filters, #layered_container_right ul { list-style-type: none; margin: 0; padding: 0; } -ul#selected_filters li, #layered_container_right ul li { width: 326px; font-size: 11px; padding: 8px 9px 7px 20px; height: 14px; margin-bottom: 5px; } -ul#selected_filters li span.ui-icon { position: absolute; margin-top: -2px; margin-left: -18px; } -#layered_container_right ul li span { display: none; } -#layered_container_right ul li { padding-left: 8px; position: relative; } -#layered_container_left ul li { cursor: move; position: relative; } -#layered-cat-counter { display: none; } -#layered-step-2, #layered-step-3 { display: none; } -#layered-step-2 h3 { margin-top: 0; } -#table-filter-templates tr th, #table-filter-templates tr td { text-align: center; } -.filter_type { width: 70px; position: absolute; right: 53px; top: 5px;} -.filter_show_limit { position: absolute; width: 40px; right: 5px; top: 5px; } -#layered-step-3 .alert { width: auto; } -#fancybox-content { - height: 400px !important; - overflow: auto !important; +.table-filter-templates, .table-configurations { + width: 100%; +} + +.table-configurations td { + padding: 10px; +} + +.table-configurations .label { + text-align: right; + font-weight: bold; + width: 30%; + vertical-align: top; +} + +.help-block { + font-weight: normal; + font-style: italic; + font-size: 11px; +} + +.text-right { + text-align: right; +} + +.text-left { + text-align: left; +} + +.filter_panel header { + margin-bottom: 10px; + font-weight: bold; +} + +.filter_list { + background-color: #fff; + padding-top: 1px; + padding-bottom: 1px; +} + +.filter_list_item { + background-color: #E9E9E9; + margin: 5px; +} + +.filter_list_item td { + white-space: nowrap; +} + +.filter_list_item .filter-title { + font-weight: bold; + width: 100%; } \ No newline at end of file diff --git a/modules/blocklayered/css/blocklayered_admin_bt.css b/modules/blocklayered/css/blocklayered_admin_1.6.css similarity index 100% rename from modules/blocklayered/css/blocklayered_admin_bt.css rename to modules/blocklayered/css/blocklayered_admin_1.6.css diff --git a/modules/blocklayered/img/cogs.gif b/modules/blocklayered/img/cogs.gif new file mode 100644 index 0000000000000000000000000000000000000000..659aace81c639dac0e3905c1a6d792c94051c20a GIT binary patch literal 280 zcmZ?wbhEHb6krfwIKsf-=jV6k%$dD=_by$!w56rx-o1Op#l_E_J=?Nn%gmWGv$M00 z9zFX0{rhXzuBD}=O`be?_3G8%zkjc(sp;zKVju!2{$ycfXAor20jUMq$-p`_L8Z^< zvP|+Sw&RT*Jyk4@TSSg_^PH{_={e+-(Bu%&5%;9P*wWXeGa)470!wF0!bS%lUSu@dqsemBSV>Nkhb4}ekAst$vC6)liHVDgO^G)qMxcvBKz{=B yM3eS*CPuCqycNtWEHQnvganj1*w}c4+c)qr@Ea)!H}EOdXen{C1npO3um%7GB3L{C literal 0 HcmV?d00001 diff --git a/modules/blocklayered/img/cross.png b/modules/blocklayered/img/cross.png new file mode 100644 index 0000000000000000000000000000000000000000..33a383748bca465d6d0e7be4fa2ce83c861e36ba GIT binary patch literal 473 zcmV;~0Ve*5P)1Bai@#8xK6ALSt`Ds!U zgJE$w!x4r~upuBeNDL+qQVRo&AX69_8I6G^o-xSIWB9ggCR~y$DjiIti(QyHiNWT; z1rwm&voHfda$rLYlhYZ#Z(52q5IOy#8P3n03Dykco(1bgG5}#nY&^ryJ)2N8v%B~) zoL{^Ut{E1HENGU1B^ZDHMEDoxSD+ZO8uT!Lhqh5*5X0XKC$V~g*}$CP-1>DOS1`g{ z05<@n+1SUM;or?Ga1BiAI$#=I?Ch4UU_;fHo8W8^o&;cN2@GxNd{hQ%GD^#sypjxcyz{1W3 zEO_G35tPt|#SXeWC><~$WhP^!%wmis3^C+UG80S@4$WBQ;juso00=MutP2U)_A3w6 P00000NkvXXu0mjf8D7L! literal 0 HcmV?d00001 diff --git a/modules/blocklayered/img/edit.gif b/modules/blocklayered/img/edit.gif new file mode 100644 index 0000000000000000000000000000000000000000..7934bbc8c96f3ad800a3ce2246698a1a137824ce GIT binary patch literal 973 zcmdT@?MstU6hF_l+%S{rlQ_32Iy6kCD1FgN7*D>;3L02CL&#~0EmJXEN`06zayG;H zl&CNwOE4qfFeRyB&Xq0qVcL8{Wu}{Rq;o1d#BAN!U(w~>bI<*8&hPy0<=pg)w8SI{ z6PQp3kV6D-ZEfjvI{Sodt|MFDB3z&EG#ZT_kEcsXOb#_3?T;+VzG}r znH{cF6vY~}y{^?^x7$6}mTA|@oGWI}&hoZn*=c?>(OJ6KBD5N=8x#WPT%WO7y!XqZ ztqwUDfA)KM%x%eE=u^zA~uTg0nlePfHq+xm~){c6r}v-Cw%vUK`vrJ%ImpygwF>!3ng7 zqjj`cOwxi#S{SI#;UOA4RETpIn;d|LmIE+w?gmLvf}20!Y&}U6w9WuYjFUv;aUy^m z1E2sT;_TZ5eTu~v&?n6Zx+(EfGhp$4M6jY9?qO*|C%QE2{8ZTFjG$X+zg@L*V z1(4W768jkV2Nn18>OdMeVq{5ZLi1NWF+8tKIdf%y{fp8ylfGQl(RI* zdXX?ddT@>jAOJ83d2B)mx@B5MI#ZIg223IcP(Rysx{f)Sutjg|ocDN)gtF_Xame8q zjgoewE*`O4Du-tcu|=z{-iQMl72pu~hz0!!CVJwx;7(2y^yQ7x4+GC!6k#=Eb&ME> z;EhY5_hnIOdGckS8az(0F`(?Xemxyr@~tW$-};3N@-s0gKU3?&;v%wM_DL``D>09+ zQ0CRC+5X%TQG#TBj6+q&>`ku7GiiJtKVCuz>8BX))>4`-)zIlgmGX1+46l|J!f%L< sf1PR=@{dx7Z?|JUtyKYF>aV4Wl{NK&_ZCFkW4`%xw&p5RB7h5j0nBhelmGw# literal 0 HcmV?d00001 diff --git a/modules/blocklayered/js/blocklayered_admin.js b/modules/blocklayered/js/blocklayered_admin.js index d23a9ee3e..0631cdc3a 100644 --- a/modules/blocklayered/js/blocklayered_admin.js +++ b/modules/blocklayered/js/blocklayered_admin.js @@ -58,7 +58,7 @@ $(document).ready( if (this.running == true) return false; - $('.ajax-message').hide(); + $('.ajax-message').hide(); this.running = true; if (typeof(this.restartAllowed) == 'undefined' || this.restartAllowed) diff --git a/modules/blocklayered/js/jquery.sortable.js b/modules/blocklayered/js/jquery.sortable.js new file mode 100644 index 000000000..a0023ef96 --- /dev/null +++ b/modules/blocklayered/js/jquery.sortable.js @@ -0,0 +1,85 @@ +/* + * HTML5 Sortable jQuery Plugin + * http://farhadi.ir/projects/html5sortable + * + * Copyright 2012, Ali Farhadi + * Released under the MIT license. + */ +(function($) { +var dragging, placeholders = $(); +$.fn.sortable = function(options) { + var method = String(options); + options = $.extend({ + connectWith: false + }, options); + return this.each(function() { + if (/^enable|disable|destroy$/.test(method)) { + var items = $(this).children($(this).data('items')).attr('draggable', method == 'enable'); + if (method == 'destroy') { + items.add(this).removeData('connectWith items') + .off('dragstart.h5s dragend.h5s selectstart.h5s dragover.h5s dragenter.h5s drop.h5s'); + } + return; + } + var isHandle, index, items = $(this).children(options.items); + var placeholder = $('<' + (/^ul|ol$/i.test(this.tagName) ? 'li' : 'div') + ' class="sortable-placeholder">'); + items.find(options.handle).mousedown(function() { + isHandle = true; + }).mouseup(function() { + isHandle = false; + }); + $(this).data('items', options.items) + placeholders = placeholders.add(placeholder); + if (options.connectWith) { + $(options.connectWith).add(this).data('connectWith', options.connectWith); + } + items.attr('draggable', 'true').on('dragstart.h5s', function(e) { + if (options.handle && !isHandle) { + return false; + } + isHandle = false; + var dt = e.originalEvent.dataTransfer; + dt.effectAllowed = 'move'; + dt.setData('Text', 'dummy'); + index = (dragging = $(this)).addClass('sortable-dragging').index(); + }).on('dragend.h5s', function() { + if (!dragging) { + return; + } + dragging.removeClass('sortable-dragging').show(); + placeholders.detach(); + if (index != dragging.index()) { + dragging.parent().trigger('sortupdate', {item: dragging, start_index: index, end_index: dragging.index()}); + } + dragging = null; + }).not('a[href], img').on('selectstart.h5s', function() { + this.dragDrop && this.dragDrop(); + return false; + }).end().add([this, placeholder]).on('dragover.h5s dragenter.h5s drop.h5s', function(e) { + if (!items.is(dragging) && options.connectWith !== $(dragging).parent().data('connectWith')) { + return true; + } + if (e.type == 'drop') { + e.stopPropagation(); + placeholders.filter(':visible').after(dragging); + dragging.trigger('dragend.h5s'); + return false; + } + e.preventDefault(); + e.originalEvent.dataTransfer.dropEffect = 'move'; + if (items.is(this)) { + if (options.forcePlaceholderSize) { + placeholder.height(dragging.outerHeight()); + } + dragging.hide(); + $(this)[placeholder.index() < $(this).index() ? 'after' : 'before'](placeholder); + placeholders.not(placeholder).detach(); + } else if (!placeholders.is(this) && !$(this).children(options.items).length) { + placeholders.detach(); + $(this).append(placeholder); + } + return false; + }); + }); +}; +})(jQuery); diff --git a/modules/blocklayered/views/templates/admin/add.tpl b/modules/blocklayered/views/templates/admin/add.tpl index 077cef31d..2f0900d81 100644 --- a/modules/blocklayered/views/templates/admin/add.tpl +++ b/modules/blocklayered/views/templates/admin/add.tpl @@ -1,373 +1,310 @@ {if isset($message)}{$message}{/if} -
-

{l s='New filters template' mod='blocklayered'}

+
+ {l s='Configuration' mod='blocklayered'} {l s='New filters template' mod='blocklayered'}
-
- -
- -

{l s='Only as a reminder' mod='blockfacette'}

-
-
-
- -
- {$categories_tree} -
-
- {if isset($asso_shops)} -
- -
{$asso_shops}
-
- {/if} -
- -
-
-
- {l s='Total filters: %s'|sprintf:$total_filters mod='blocklayered'} -
-
-
    -
  • -
    - -
    -
    -

    {l s='Sub-categories filter' mod='blockfacette'}

    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
  • -
  • -
    - -
    -
    - {l s='Product stock filter' mod='blockfacette'} -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
  • -
  • -
    - -
    -
    - {l s='Product condition filter' mod='blockfacette'} -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
  • -
  • -
    - -
    -
    - {l s='Product manufacturer filter' mod='blockfacette'} -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
  • -
  • -
    - -
    -
    - {l s='Product weight filter (slider)' mod='blockfacette'} -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
  • -
  • -
    - -
    -
    - {l s='Product price filter (slider)' mod='blockfacette'} -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
  • - {if $attribute_groups|count > 0} - {foreach $attribute_groups as $attribute_group} -
  • -
    - -
    -
    -

    - {if $attribute_group['n'] > 1} - {l s='Attribute group: %1$s (%2$d attributes)'|sprintf:$attribute_group['name']:$attribute_group['n'] mod='blockfacette'} - {else} - {l s='Attribute group: %1$s (%2$d attribute)'|sprintf:$attribute_group['name']:$attribute_group['n'] mod='blockfacette'} - {/if} - {if $attribute_group['is_color_group']} - - {/if} -

    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
  • - {/foreach} - {/if} + + + + + + + + + + + {if isset($asso_shops)} + + + + + {/if} + + + + + + + + + +
    {l s='Template name:' mod='blocklayered'} + +

    {l s='Only as a reminder' mod='blockfacette'}

    +
    {l s='Categories used for this template:' mod='blocklayered'}{$categories_tree}
    + {l s='Choose shop association:' mod='blocklayered'} + {$asso_shops}
    + {l s='Filters:' mod='blocklayered'} +

    {l s='You can drag and drop filters to adjust position' mod='blocclayered'}

    +
    +
    +
    + {l s='Total filters: %s'|sprintf:$total_filters mod='blocklayered'} - {l s='Selected filters: %s'|sprintf:0 mod='blocklayered'} +
    +
    +
      +
    • + + + + + + + + + + + +
      {l s='Sub-categories filter' mod='blockfacette'}{l s='Filter result limit:' mod='blocklayered'} + + {l s='Filter style:' mod='blocklayered'} + +
      +
    • +
    • + + + + + + + + + + + +
      {l s='Product stock filter' mod='blockfacette'}{l s='Filter result limit:' mod='blocklayered'} + + {l s='Filter style:' mod='blocklayered'} + +
      +
    • +
    • + + + + + + + + + + + +
      {l s='Product condition filter' mod='blockfacette'}{l s='Filter result limit:' mod='blocklayered'} + + {l s='Filter style:' mod='blocklayered'} + +
      +
    • +
    • + + + + + + + + + + + +
      {l s='Product manufacturer filter' mod='blockfacette'}{l s='Filter result limit:' mod='blocklayered'} + + {l s='Filter style:' mod='blocklayered'} + +
      +
    • +
    • + + + + + + + + + + + +
      {l s='Product weight filter (slider)' mod='blockfacette'}{l s='Filter result limit:' mod='blocklayered'} + + {l s='Filter style:' mod='blocklayered'} + +
      +
    • +
    • + + + + + + + + + + + +
      {l s='Product price filter (slider)' mod='blockfacette'}{l s='Filter result limit:' mod='blocklayered'} + + {l s='Filter style:' mod='blocklayered'} + +
      +
    • + {if $attribute_groups|count > 0} + {foreach $attribute_groups as $attribute_group} +
    • + + + + + + + + + + + +
      + {if $attribute_group['n'] > 1} + {l s='Attribute group: %1$s (%2$d attributes)'|sprintf:$attribute_group['name']:$attribute_group['n'] mod='blockfacette'} + {else} + {l s='Attribute group: %1$s (%2$d attribute)'|sprintf:$attribute_group['name']:$attribute_group['n'] mod='blockfacette'} + {/if} + {if $attribute_group['is_color_group']} + + {/if} + {l s='Filter result limit:' mod='blocklayered'} + + {l s='Filter style:' mod='blocklayered'} + +
      +
    • + {/foreach} + {/if} - {if $features|count > 0} - {foreach $features as $feature} -
    • -
      - -
      -
      -

      - {if $feature['n'] > 1}{l s='Feature: %1$s (%2$d values)'|sprintf:$feature['name']:$feature['n'] mod='blockfacette'}{else}{l s='Feature: %1$s (%2$d value)'|sprintf:$feature['name']:$feature['n'] mod='blockfacette'}{/if} -

      -
      -
      - -
      - -
      -
      -
      - -
      - -
      -
      -
    • - {/foreach} - {/if} -
    -
    -
    - - - + {if $features|count > 0} + {foreach $features as $feature} +
  • + + + + + + + + + + + +
    + {if $feature['n'] > 1}{l s='Feature: %1$s (%2$d values)'|sprintf:$feature['name']:$feature['n'] mod='blockfacette'}{else}{l s='Feature: %1$s (%2$d value)'|sprintf:$feature['name']:$feature['n'] mod='blockfacette'}{/if} + {l s='Filter result limit:' mod='blocklayered'} + + {l s='Filter style:' mod='blocklayered'} + +
    +
  • + {/foreach} + {/if} + + + +
      + + + Cancel + +
    -
+
\ No newline at end of file diff --git a/modules/blocklayered/views/templates/admin/add_1.6.tpl b/modules/blocklayered/views/templates/admin/add_1.6.tpl new file mode 100644 index 000000000..11708cab8 --- /dev/null +++ b/modules/blocklayered/views/templates/admin/add_1.6.tpl @@ -0,0 +1,373 @@ +{if isset($message)}{$message}{/if} +
+

{l s='New filters template' mod='blocklayered'}

+
+ + +
+ +
+ +

{l s='Only as a reminder' mod='blockfacette'}

+
+
+
+ +
+ {$categories_tree} +
+
+ {if isset($asso_shops)} +
+ +
{$asso_shops}
+
+ {/if} +
+ +
+
+
+ {l s='Total filters: %s'|sprintf:$total_filters mod='blocklayered'} +
+
+
    +
  • +
    + +
    +
    +

    {l s='Sub-categories filter' mod='blockfacette'}

    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
  • +
  • +
    + +
    +
    + {l s='Product stock filter' mod='blockfacette'} +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
  • +
  • +
    + +
    +
    + {l s='Product condition filter' mod='blockfacette'} +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
  • +
  • +
    + +
    +
    + {l s='Product manufacturer filter' mod='blockfacette'} +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
  • +
  • +
    + +
    +
    + {l s='Product weight filter (slider)' mod='blockfacette'} +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
  • +
  • +
    + +
    +
    + {l s='Product price filter (slider)' mod='blockfacette'} +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
  • + {if $attribute_groups|count > 0} + {foreach $attribute_groups as $attribute_group} +
  • +
    + +
    +
    +

    + {if $attribute_group['n'] > 1} + {l s='Attribute group: %1$s (%2$d attributes)'|sprintf:$attribute_group['name']:$attribute_group['n'] mod='blockfacette'} + {else} + {l s='Attribute group: %1$s (%2$d attribute)'|sprintf:$attribute_group['name']:$attribute_group['n'] mod='blockfacette'} + {/if} + {if $attribute_group['is_color_group']} + + {/if} +

    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
  • + {/foreach} + {/if} + + {if $features|count > 0} + {foreach $features as $feature} +
  • +
    + +
    +
    +

    + {if $feature['n'] > 1}{l s='Feature: %1$s (%2$d values)'|sprintf:$feature['name']:$feature['n'] mod='blockfacette'}{else}{l s='Feature: %1$s (%2$d value)'|sprintf:$feature['name']:$feature['n'] mod='blockfacette'}{/if} +

    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
  • + {/foreach} + {/if} +
+
+
+
+
+ +
+
+ + \ No newline at end of file diff --git a/modules/blocklayered/views/templates/admin/view.tpl b/modules/blocklayered/views/templates/admin/view.tpl index 05dbf3313..88e66f68f 100644 --- a/modules/blocklayered/views/templates/admin/view.tpl +++ b/modules/blocklayered/views/templates/admin/view.tpl @@ -5,21 +5,20 @@ -
-

{l s='Indexes and caches' mod='blocklayered'}

+
+ {l s='Indexes and caches' mod='blocklayered'} {l s='Indexes and caches' mod='blocklayered'} +
 
-
+
{l s='You can set a cron job that will rebuild price index using the following URL:' mod='blocklayered'}
{$price_indexer_url} @@ -36,21 +35,22 @@
-
{l s='A nightly rebuild is recommended.' mod='blocklayered'}
+
{l s='A nightly rebuild is recommended.' mod='blocklayered'}
-
-
-

{l s='Filters templates' mod='blocklayered'}{$filters_templates|count}

+
+
 
+
+ {l s='Filters templates' mod='blocklayered'} {l s='Filters templates (%d)'|sprintf:{$filters_templates|count} mod='blocklayered'} {if $filters_templates|count > 0}
- +
- + - - - + + + @@ -60,25 +60,10 @@ - {/foreach} @@ -87,188 +72,156 @@
 
{else} -
{l s='No filter template found.' mod='blocklayered'}
+
{l s='No filter template found.' mod='blocklayered'}
{/if} - -
-

{l s='Configuration' mod='blocklayered'}

-
-
- -
-
-
- - - - - - - -
-
-
-
-
- -
-
-
- - - - - - - -
-
-
-
-
- -
-
-
- - - - - - - -
-
-
-
-
- -
- -
-
-
- -
-
-
- - - - - - - -
-
-
-
-
- -
-
-
- - - - - - - -
-
-
-
-
- -
-
-
- - - - - - - -
-
-
-
-
- -
-
-
- - - - - - - -
-
-
-
-
- -
-
-
- - - - - - - -
-
-
-
-
-
- -
-
+ +
 
+
+ {l s='Configuration' mod='blocklayered'} {l s='Configuration' mod='blocklayered'} + +
{l s='ID' mod='blocklayered'}{l s='ID' mod='blocklayered'} {l s='Name' mod='blocklayered'}{l s='Categories' mod='blocklayered'}{l s='Created on' mod='blocklayered'}{l s='Actions' mod='blocklayered'}{l s='Categories' mod='blocklayered'}{l s='Created on' mod='blocklayered'}{l s='Actions' mod='blocklayered'}
{$template['name']} {(int)$template['n_categories']} {Tools::displayDate($template['date_add'],null , true)} - + + {l s='Edit' mod='blocklayered'}{l s='Edit' mod='blocklayered'} + {l s='Delete' mod='blocklayered'}{l s='Delete' mod='blocklayered'}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {l s='Hide filter values with no product is matching' mod='blocklayered'} + + + + + +
+ {l s='Show the number of matching products' mod='blocklayered'} + + + + + +
+ {l s='Show products from subcategories' mod='blocklayered'} + + + + + +
+ {l s='Category filter depth (0 for no limits, 1 by default)' mod='blocklayered'} + + +
+ {l s='Use tax to filter price' mod='blocklayered'} + + + + + +
+ {l s='Allow indexing robots (google, yahoo, bing, ...) to use condition filter' mod='blocklayered'} + + + + + +
+ {l s='Allow indexing robots (google, yahoo, bing, ...) to use availability filter' mod='blocklayered'} + + + + + +
+ {l s='Allow indexing robots (google, yahoo, bing, ...) to use manufacturer filter' mod='blocklayered'} + + + + + +
+ {l s='Allow indexing robots (google, yahoo, bing, ...) to use category filter' mod='blocklayered'} + + + + + +
  + +
-
+
\ No newline at end of file