|
Apache/2.4.41 (Ubuntu) Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) server ip : 62.171.164.128 | your ip : 127.0.0.1 safemode OFF > / home / Mirasvit / SearchAutocomplete / view / adminhtml / templates / config / form / field / |
Filename | /home/Mirasvit/SearchAutocomplete/view/adminhtml/templates/config/form/field/indices.phtml |
Size | 2.7 kb |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 01-Jul-2024 20:52 |
Last modified | 06-Apr-2021 18:06 |
Last accessed | 28-Jan-2025 02:05 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php
/** @var \Mirasvit\SearchAutocomplete\Block\Adminhtml\Config\Form\Field\Indices $block */
?>
<td class="label">
<label><?= __('Searchable content') ?></label>
</td>
<td colspan="3">
<table class="sas__config-index" id="searchautocomplete-indices">
<tr>
<th></th>
<th><?= __('Index') ?></th>
<th><?= __('Is Enabled') ?></th>
<th><?= __('Max Number of results') ?></th>
</tr>
<?php foreach ($block->getIndices() as $index): ?>
<tr>
<td class="col-order" data-role="draggable-handle">
<div class="draggable-handle"></div>
<input type="hidden" data-role="order"
name="<?= $block->getNamePrefix($index) ?>[order]"
value="<?= $index->getData('order') ?>">
</td>
<td class="col-title"><?= $index->getTitle() ?></td>
<td class="col-is_active">
<div class="switcher" onselectstart="return false;">
<input type="checkbox" id="<?= $index->getIdentifier() ?>"
name="<?= $block->getNamePrefix($index) ?>[is_active]"
value="1"
<?php if ($index->getIsActive()): ?>checked<?php endif ?>>
<label class="switcher-label"
for="<?= $index->getIdentifier() ?>"
data-text-on="Enabled"
data-text-off="Disabled"
title="Index status"></label>
</div>
</td>
<td class="col-limit">
<input type="number" name="<?= $block->getNamePrefix($index) ?>[limit]"
value="<?= $index->getLimit() ?>"/>
</td>
</tr>
<?php endforeach ?>
<tr>
<td class="hint" colspan="4">
<?= __('⚠ Indices "Popular suggestions" and "Products in categories" don\'t work if "Fast Mode" enabled at the Autocomplete settings.') ?>
</td>
</tr>
</table>
</td>
<script>
require([
'jquery',
'collapsable'
], function ($) {
var list = $('#searchautocomplete-indices');
list.sortable({
axis: 'y',
handle: '[data-role=draggable-handle]',
items: 'tr',
update: function (event, data) {
list.find('[data-role=order]').each(function (i, el) {
$(el).val(i + 1);
});
},
tolerance: 'pointer'
});
});
</script>
/** @var \Mirasvit\SearchAutocomplete\Block\Adminhtml\Config\Form\Field\Indices $block */
?>
<td class="label">
<label><?= __('Searchable content') ?></label>
</td>
<td colspan="3">
<table class="sas__config-index" id="searchautocomplete-indices">
<tr>
<th></th>
<th><?= __('Index') ?></th>
<th><?= __('Is Enabled') ?></th>
<th><?= __('Max Number of results') ?></th>
</tr>
<?php foreach ($block->getIndices() as $index): ?>
<tr>
<td class="col-order" data-role="draggable-handle">
<div class="draggable-handle"></div>
<input type="hidden" data-role="order"
name="<?= $block->getNamePrefix($index) ?>[order]"
value="<?= $index->getData('order') ?>">
</td>
<td class="col-title"><?= $index->getTitle() ?></td>
<td class="col-is_active">
<div class="switcher" onselectstart="return false;">
<input type="checkbox" id="<?= $index->getIdentifier() ?>"
name="<?= $block->getNamePrefix($index) ?>[is_active]"
value="1"
<?php if ($index->getIsActive()): ?>checked<?php endif ?>>
<label class="switcher-label"
for="<?= $index->getIdentifier() ?>"
data-text-on="Enabled"
data-text-off="Disabled"
title="Index status"></label>
</div>
</td>
<td class="col-limit">
<input type="number" name="<?= $block->getNamePrefix($index) ?>[limit]"
value="<?= $index->getLimit() ?>"/>
</td>
</tr>
<?php endforeach ?>
<tr>
<td class="hint" colspan="4">
<?= __('⚠ Indices "Popular suggestions" and "Products in categories" don\'t work if "Fast Mode" enabled at the Autocomplete settings.') ?>
</td>
</tr>
</table>
</td>
<script>
require([
'jquery',
'collapsable'
], function ($) {
var list = $('#searchautocomplete-indices');
list.sortable({
axis: 'y',
handle: '[data-role=draggable-handle]',
items: 'tr',
update: function (event, data) {
list.find('[data-role=order]').each(function (i, el) {
$(el).val(i + 1);
});
},
tolerance: 'pointer'
});
});
</script>