This commit is contained in:
2025-04-01 00:38:54 +02:00
parent d4d4c0c09d
commit 87da06293a
22351 changed files with 5168854 additions and 7538 deletions

View File

@@ -0,0 +1,145 @@
{if $pm_load_function != 'displaySortCriteriaPanel'}
<div id="sortCriteriaPanel">
{/if}
{include file="../../core/clear.tpl"}
{if $auto_sync_active_status}
{module->_showInfo text="{l s='Be aware that auto synchronize object status with criterions is enabled into the module configuration. You will not be able to change the criterions status here.' mod='pm_advancedsearch4'}"}
{/if}
<div class="criterionGroupActions">
<ul>
<li>
<a href="{$base_config_url|as4_nofilter}&pm_load_function=processEnableAllCriterions&id_criterion_group={$criterion_group->id|intval}&id_search={$criterion_group->id_search|intval}" class="ajax_script_load activeAllCriterions{if $auto_sync_active_status} disabledAction{/if}" title="{l s='Enable all criterions' mod='pm_advancedsearch4'}">{l s='Enable all criterions' mod='pm_advancedsearch4'}</a>
</li>
<li>
<a href="{$base_config_url|as4_nofilter}&pm_load_function=processDisableAllCriterions&id_criterion_group={$criterion_group->id|intval}&id_search={$criterion_group->id_search|intval}" class="ajax_script_load disableAllCriterions{if $auto_sync_active_status} disabledAction{/if}" title="{l s='Disable all criterions' mod='pm_advancedsearch4'}">{l s='Disable all criterions' mod='pm_advancedsearch4'}</a>
</li>
</ul>
</div>
{include file="../../core/clear.tpl"}
<table class="criterionsList">
<thead>
<th colspan="2">{l s='Label' mod='pm_advancedsearch4'}</th>
{if $criterion_group->display_type == 2}
<th>{l s='Image' mod='pm_advancedsearch4'}</th>
{/if}
{if $has_custom_criterions}
<th>{l s='Link to a custom criterion' mod='pm_advancedsearch4'}</th>
{/if}
<th>{l s='Actions' mod='pm_advancedsearch4'}</th>
</thead>
<tbody>
{foreach from=$criterions item=criterion}
<tr id="criterion_{$criterion.id_criterion|intval}">
<td{if $criterion_group->sort_by == 'position'} class="dragIcon dragIconCriterion"{/if}>
<span class="ui-icon ui-icon-arrow-4-diag" style="{if $criterion_group->sort_by != 'position'}visibility:hidden{/if}"></span>
</td>
<td>
{if empty($criterion.is_custom)}
{$criterion.value|escape:'htmlall':'UTF-8'}
{if $criterion_group->criterion_group_type == 'category'}
{strip}
(
{if $criterion.level_depth > 0}
{l s='parent:' mod='pm_advancedsearch4'} {$criterion.parent_name|escape:'htmlall':'UTF-8'}
{/if}
{if $criterion.level_depth > 0 && $criterion_group->id_criterion_group_linked == 0} - {/if}
{if $criterion_group->id_criterion_group_linked == 0}
{l s='level:' mod='pm_advancedsearch4'} {if $criterion.level_depth > 0}{($criterion.level_depth|intval - 1)}{else}{$criterion.level_depth|intval}{/if}
{/if}
)
{/strip}
{/if}
{else}
<div class="criterionCustomLiveEditContainer" data-id-criterion="{$criterion.id_criterion|intval}" data-id-search="{$criterion_group->id_search|intval}">
{if $is_color_group}
<div class="criterionCustomLiveField">
{as4_inputColor obj=$criterion.obj key='color' label={l s='Color:' mod='pm_advancedsearch4'}}
</div>
{/if}
<div class="criterionCustomLiveField">
{as4_inputTextLang obj=$criterion.obj key='value'}
</div>
{module->_displaySubmit text="{l s='Save' mod='pm_advancedsearch4'}" name='submitCustomCriterionForm'}
</div>
{/if}
</td>
{if $criterion_group->display_type == 2}
<td class="criterionImageTd">
<div class="criterionImageContainer">
<form action="{$base_config_url|as4_nofilter}" method="post" enctype="multipart/form-data" target="dialogIframePostForm">
{as4_inlineUploadFile obj=$criterion.obj key="icon{$criterion.id_criterion|intval}" key_db='icon' destination='/search_files/criterions/'}
<input name="id_search" value="{$criterion_group->id_search|intval}" type="hidden" />
<input name="id_criterion" value="{$criterion.id_criterion|intval}" type="hidden" />
<input name="key_criterions_group" value="{$criterion_group->criterion_group_type|escape:'htmlall':'UTF-8'}-{$criterion_group->id_criterion_group_linked|intval}-{$criterion_group->id_search|intval}" type="hidden" />
</form>
</div>
</td>
{/if}
{if $has_custom_criterions}
<td class="criterionCustomTd">
{if empty($criterion.is_custom)}
{if $criterion.custom_criterions_list|is_array && sizeof($criterion.custom_criterions_list) > 1}
<div class="addCriterionToCustomGroupContainer">
{as4_select obj=$criterion.custom_criterions_obj options=$criterion.custom_criterions_list key="custom_group_link_id_{$criterion.id_criterion|intval}" defaultvalue=false onchange="processAddCustomCriterionToGroup($(this), {$criterion_group->id_search|intval}, {$criterion_group->id|intval})"}
</div>
{/if}
{/if}
</td>
{/if}
<td>
{if !empty($criterion.is_custom)}
<div class="criterionActions">
{strip}
<a href="{$base_config_url|as4_nofilter}&pm_load_function=processActiveCriterion&id_criterion={$criterion.id_criterion|intval}&id_search={$criterion_group->id_search|intval}" class="ajax_script_load {if !$auto_sync_active_status}activeCriterion{else} disabledAction{/if}">
<img src="../img/admin/{if $criterion.visible}enabled{else}disabled{/if}.gif" id="imgActiveCriterion{$criterion.id_criterion|intval}" />
</a>
&nbsp;
<a href="{$base_config_url|as4_nofilter}&pm_load_function=processDeleteCustomCriterion&id_criterion={$criterion.id_criterion|intval}&id_search={$criterion_group->id_search|intval}" class="ajax_script_load pm_confirm deleteCustomCriterion" title="{l s='Do you really want to delete this custom criterion ?' mod='pm_advancedsearch4'}">
<img src="../img/admin/delete.gif" id="imgDeleteCriterion{$criterion.id_criterion|intval}" class="imgDeleteCriterion" />
</a>
{/strip}
</div>
{elseif empty($criterion.is_custom)}
<div class="criterionActions">
<a href="{$base_config_url|as4_nofilter}&pm_load_function=processActiveCriterion&id_criterion={$criterion.id_criterion|intval}&id_search={$criterion_group->id_search|intval}" class="ajax_script_load {if !$auto_sync_active_status}activeCriterion{else} disabledAction{/if}">
<img src="../img/admin/{if $criterion.visible}enabled{else}disabled{/if}.gif" id="imgActiveCriterion{$criterion.id_criterion|intval}" />
</a>
</div>
{else}
<div class="criterionActions">
<a href="{$base_config_url|as4_nofilter}&pm_load_function=processActiveCriterion&id_criterion={$criterion.id_criterion|intval}&id_search={$criterion_group->id_search|intval}" class="ajax_script_load {if !$auto_sync_active_status}activeCriterion{else} disabledAction{/if}">
<img src="../img/admin/{if $criterion.visible}enabled{else}disabled{/if}.gif" id="imgActiveCriterion{$criterion.id_criterion|intval}" />
</a>
</div>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
{if $criterion_group->sort_by == 'position'}
<script type="text/javascript">
$("table.criterionsList tbody").sortable({
axis: 'y',
handle : '.dragIconCriterion',
helper: function(e, ui) {
ui.children().each(function() {
$(this).width($(this).outerWidth(true));
});
return ui;
},
update: function(event, ui) {
var order = $(this).sortable('toArray');
saveOrder(order.join(","), 'orderCriterion', {$criterion_group->id_search|intval});
}
});
</script>
{/if}
{if $pm_load_function != 'displaySortCriteriaPanel'}
</div>
{/if}

View File

@@ -0,0 +1,8 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,139 @@
{as4_startForm id="criteriaGroupOptions_{$params.obj->id}" obj=$params.obj params=$params}
{module->_displayTitle text="{l s='Criterion group settings' mod='pm_advancedsearch4'}"}
{if $params.obj->criterion_group_type == 'category'}
{if !empty($params.obj->id_criterion_group_linked)}
{module->_displaySubTitle text="{l s='Type:' mod='pm_advancedsearch4'} {l s='Category (level %d)' sprintf=$params.obj->id_criterion_group_linked mod='pm_advancedsearch4'}"}
{else}
{module->_displaySubTitle text="{l s='Type:' mod='pm_advancedsearch4'} {l s='Category (all level)' mod='pm_advancedsearch4'}"}
{/if}
{else}
{module->_displaySubTitle text="{l s='Type:' mod='pm_advancedsearch4'} {$criteria_group_labels[$params.obj->criterion_group_type]|ucfirst}"}
{/if}
{if $params.obj->criterion_group_type == 'subcategory'}
{module->_showInfo text="
{l s='This criterion group will only be available on categories and products pages.' mod='pm_advancedsearch4'}<br /><br />
{l s='Only subcategories of the base URL (context) will be shown.' mod='pm_advancedsearch4'}
"}
{/if}
{as4_inputTextLang obj=$params.obj key='name' label={l s='Public name' mod='pm_advancedsearch4'}}
{as4_select obj=$params.obj options=$display_type label={l s='Display method' mod='pm_advancedsearch4'} key='display_type' defaultvalue=false onchange="showRelatedOptions($(this), '{$params.obj->criterion_group_type}');"}
{as4_inputFileLang obj=$params.obj key='icon' label={l s='Icon' mod='pm_advancedsearch4'} destination='/search_files/criterions_group/' required=false extend=true tips={l s='You can upload a picture from your hard disk. This picture can be different for each language.' mod='pm_advancedsearch4'}}
{if $params.obj->criterion_group_type == 'category'}
<div class="blc_category_tree_options {if is_array($context_type) && sizeof($context_type) == 1}as4-hidden{/if}">
{as4_select obj=$params.obj options=$context_type label={l s='Starting level' mod='pm_advancedsearch4'} key='context_type' defaultvalue=false}
</div>
<div class="blc_category_options">
{if empty($params.obj->id_criterion_group_linked)}
<input name="show_all_depth" value="{$params.obj->show_all_depth|intval}" type="hidden" />
{*
{as4_inputActive obj=$params.obj key_active='show_all_depth' key_db='show_all_depth' label={l s='Show all depth' mod='pm_advancedsearch4'}}
*}
{else}
{as4_inputActive obj=$params.obj key_active='only_children' key_db='only_children' label={l s='Show only subcategories related to the previously selected criterions' mod='pm_advancedsearch4'}}
{/if}
</div>
{/if}
<div class="all_label" style="display:none">
{as4_inputTextLang obj=$params.obj key='all_label' label={l s='Label for “All“ choice' mod='pm_advancedsearch4'}}
</div>
<div class="blc_range">
{as4_inputActive obj=$params.obj key_active='range' key_db='range' label={l s='Display as range' mod='pm_advancedsearch4'} onclick="displayRangeOptions($(this), '{$params.obj->criterion_group_type}');"}
</div>
<div class="blc_range_nb" style="display:none">
{as4_inputText obj=$params.obj key='range_nb' label={l s='Step' mod='pm_advancedsearch4'} onchange='convertToPointDecimal($(this));'}
</div>
<div class="blc_range_interval" style="display:none">
{as4_inputTextLang obj=$params.obj key='range_interval' label={l s='Range (separated by comma)' mod='pm_advancedsearch4'} placeholder="0,50,100,150,200,500,1000"}
</div>
<div class="blc_range_sign" style="display:none">
{as4_inputTextLang obj=$params.obj key='range_sign' label={l s='Unit' mod='pm_advancedsearch4'}}
</div>
<div class="blc_with_search_area">
{as4_inputActive obj=$params.obj key_active='filter_option' key_db='filter_option' label={l s='Display input text in order to filter values' mod='pm_advancedsearch4'}}
</div>
<div class="multicrit" style="display:none">
{as4_inputActive obj=$params.obj key_active='is_multicriteria' key_db='is_multicriteria' label={l s='Allow multiple choice' mod='pm_advancedsearch4'} onclick="showRelatedOptions($('#display_type'), '{$params.obj->criterion_group_type}');"}
<div class="combined_criterion" style="display:none">
{as4_inputActive obj=$params.obj key_active='is_combined' key_db='is_combined' label={l s='Operator between criterions' mod='pm_advancedsearch4'} on_label={l s='AND' mod='pm_advancedsearch4'} off_label={l s='OR' mod='pm_advancedsearch4'}}
</div>
</div>
{if !$search_engine->id_hook|in_array:$display_vertical_search_block}
{as4_inputText obj=$params.obj key='css_classes' label={l s='CSS classes to apply' mod='pm_advancedsearch4'}}
{/if}
{if $search_engine->show_hide_crit_method == 3}
<div class="overflow_height_container">
{as4_inputText obj=$params.obj key='overflow_height' label={l s='Overflow height (in px)' mod='pm_advancedsearch4'}}
</div>
{/if}
{if $search_engine->show_hide_crit_method == 1 || $search_engine->show_hide_crit_method == 2}
<div class="max_display_container" style="display:none">
{as4_inputText obj=$params.obj key='max_display' label={l s='Maximum number of criteria to display (0 = unlimited)' mod='pm_advancedsearch4'}}
</div>
{/if}
<input name="id_search" value="{$params.obj->id_search|intval}" type="hidden" />
<input name="id_criterion_group" value="{$params.obj->id|intval}" type="hidden" />
{module->_displaySubmit text="{l s='Save' mod='pm_advancedsearch4'}" name='submitCriteriaGroupOptions'}
<script type="text/javascript">
$(document).ready(function () {
$("#range_on:checked").trigger("click");
$("#range_off:checked").trigger("click");
$("#display_type").trigger("change");
loadAjaxLink();
});
</script>
{if $params.obj->criterion_group_type|in_array:$sortable_criterion_group}
<div class="custom_criteria_container">
<hr />
{module->_displayTitle text="{l s='Create a new custom criterion' mod='pm_advancedsearch4'}"}
<div id="addCustomCriterionContainer" data-id-search="{$params.obj->id_search|intval}" data-id-criterion-group="{$params.obj->id|intval}">
{as4_inputTextLang obj=$new_custom_criterion key='value' label={l s='Criterion label:' mod='pm_advancedsearch4'}}
{if $is_color_group}
{as4_inputColor obj=$new_custom_criterion key='color' label={l s='Color:' mod='pm_advancedsearch4'}}
{/if}
<center>
{module->_displaySubmit text="{l s='Add custom criterion' mod='pm_advancedsearch4'}" name='submitAddCustomCriterionForm'}
</center>
</div>
<hr />
</div><!-- .custom_criteria_container -->
<div class="sort_criteria_container">
{module->_displayTitle text="{l s='Sort criteria' mod='pm_advancedsearch4'}"}
<div style="width:380px;float:left;">
<span style="float:left;line-height:25px;">
<b><em>{l s='Apply specific sort order:' mod='pm_advancedsearch4'}</em></b> &nbsp; &nbsp;
</span>
{as4_select obj=$params.obj options=$criterions_sort_by label=false key='sort_by' defaultvalue=0 onchange="reorderCriteria($('#sort_by').val(), $('#sort_way').val(), $('input[name=\'id_criterion_group\']').val(), {$params.obj->id_search|intval});"}
</div>
<div style="width:250px;float:left;">
{as4_select obj=$params.obj options=$criterions_sort_way label=false key='sort_way' defaultvalue=0 onchange="reorderCriteria($('#sort_by').val(), $('#sort_way').val(), $('input[name=\'id_criterion_group\']').val(), {$params.obj->id_search|intval});"}
</div>
{if !empty($criterions_list_rendered)}
{$criterions_list_rendered|as4_nofilter}
{/if}
{include file="../../core/clear.tpl"}
</div>
{/if}
{as4_endForm id="criteriaGroupOptions_{$params.obj->id}"}