188 lines
8.7 KiB
Smarty
188 lines
8.7 KiB
Smarty
<div class="title"><h5>Управление ЧПУ всех модулей</h5></div>
|
||
|
||
<div class="breadCrumbHolder module">
|
||
<div class="breadCrumb module">
|
||
<ul>
|
||
<li class="firstB"><a href="index.php" title="{#MAIN_PAGE#}">{#MAIN_PAGE#}</a></li>
|
||
<li><a href="index.php?do=modules&cp={$sess}">Управление модулями</a></li>
|
||
<li>Список всех ЧПУ</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<form action="index.php?do=modules&action=alias_delete_batch&cp={$sess}" method="post" id="AliasBatchForm" class="mainForm">
|
||
<div class="widget first">
|
||
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic">
|
||
<thead>
|
||
<tr>
|
||
<td width="20"><div align="center"><input type="checkbox" class="selall_aliases"></div></td>
|
||
<td>Название ссылки</td>
|
||
<td>Системное имя</td>
|
||
<td>Action</td>
|
||
<td>Оригинальный URL</td>
|
||
<td>ЧПУ Алиас</td>
|
||
<td>Документ (ID)</td>
|
||
<td width="40" align="center">Меню</td>
|
||
<td width="40" align="center">Док.</td>
|
||
<td width="40" align="center">Сайт</td>
|
||
<td width="40" align="center">История</td>
|
||
<td width="40" align="center">Правка</td>
|
||
<td width="40" align="center">Удалить</td>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{foreach from=$modules_list item=mod}
|
||
<tr>
|
||
<td align="center">
|
||
<input type="checkbox" name="alias_ids[]" value="{$mod.id}" class="alias_check">
|
||
</td>
|
||
<td><strong>{$mod.module_link_name|default:$mod.title}</strong></td>
|
||
<td><span class="cmsStats">{$mod.sys_name}</span></td>
|
||
<td><span class="blue">{$mod.module_action|default:'---'}</span></td>
|
||
<td><span class="dgrey" style="font-size: 11px;">{$mod.module_link|default:'---'}</span></td>
|
||
<td>
|
||
<input type="text" value="{$mod.alias_url}" style="width: 90%; font-family: monospace;" readonly />
|
||
</td>
|
||
<td>
|
||
{if $mod.doc_id > 0}
|
||
<span class="green" style="font-size: 11px;">
|
||
{$all_docs[$mod.doc_id]|default:'Документ не найден'}
|
||
<small class="dgrey">(ID: {$mod.doc_id})</small>
|
||
</span>
|
||
{else}
|
||
<span class="dgrey">Без привязки</span>
|
||
{/if}
|
||
</td>
|
||
|
||
<td align="center">
|
||
{if $mod.module_admin == '1'}
|
||
<span class="icon_sprite ico_navigation" title="В меню"></span>
|
||
{else}
|
||
<span class="icon_sprite ico_navigation_no" title="Скрыт"></span>
|
||
{/if}
|
||
</td>
|
||
|
||
<td align="center">
|
||
{if $mod.doc_id > 0 && $mod.rubric_id}
|
||
<a class="topDir icon_sprite ico_copy"
|
||
title="Перейти к редактированию документа"
|
||
href="index.php?do=docs&action=edit&rubric_id={$mod.rubric_id}&Id={$mod.doc_id}&cp={$sess}"
|
||
target="_blank"></a>
|
||
{else}
|
||
<span class="icon_sprite ico_copy" style="opacity: 0.2;" title="Привязка отсутствует"></span>
|
||
{/if}
|
||
</td>
|
||
|
||
<td align="center">
|
||
<a href="../{$mod.alias_url}"
|
||
title="Посмотреть на сайте"
|
||
class="icon_sprite ico_globus topDir"
|
||
target="_blank"></a>
|
||
</td>
|
||
|
||
<td align="center">
|
||
<a href="index.php?do=modules&action=alias_history&id={$mod.id}&cp={$sess}&ajax=1&onlycontent=1"
|
||
data-dialog="alias-history-{$mod.id}"
|
||
data-height="650"
|
||
data-modal="true"
|
||
data-title="История алиасов: {$mod.module_link_name|default:$mod.sys_name}"
|
||
class="openDialog icon_sprite ico_list topleftDir"
|
||
title="История"></a>
|
||
</td>
|
||
|
||
<td align="center">
|
||
<a href="index.php?do=modules&action=aliases&id={$mod.id}&cp={$sess}&ajax=1&onlycontent=1"
|
||
data-dialog="aliases-{$mod.id}"
|
||
data-height="650"
|
||
data-modal="true"
|
||
data-title="Редактировать алиас: {$mod.module_link_name|default:$mod.title}"
|
||
class="openDialog icon_sprite ico_edit topleftDir"
|
||
title="Редактировать"></a>
|
||
</td>
|
||
|
||
<td align="center">
|
||
<a href="javascript:void(0);"
|
||
class="icon_sprite ico_delete topleftDir"
|
||
title="Удалить"
|
||
onclick="jConfirm('Удалить алиас <strong>{$mod.alias_url}</strong>?', 'Подтверждение', function(r) {
|
||
if(r) window.location.href='index.php?do=modules&action=alias_delete&id={$mod.id}&cp={$sess}';
|
||
});"></a>
|
||
</td>
|
||
</tr>
|
||
{foreachelse}
|
||
<tr class="noborder">
|
||
<td colspan="13" align="center">
|
||
<ul class="messages">
|
||
<li class="highlight yellow">Список ЧПУ алиасов пуст.</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
{/foreach}
|
||
</tbody>
|
||
{if $modules_list}
|
||
<thead>
|
||
<tr>
|
||
<td colspan="13"> </td>
|
||
</tr>
|
||
</thead>
|
||
<tfoot>
|
||
<tr>
|
||
<td colspan="13" style="padding: 10px;">
|
||
<div class="formSubmit" style="margin: 0; padding: 0; float: left;">
|
||
<input type="button" class="button redBtn deleteSelected" value="Удалить выбранные" style="float: left;">
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tfoot>
|
||
{/if}
|
||
</table>
|
||
</div>
|
||
</form>
|
||
|
||
<div class="fix" style="margin-top: 20px;">
|
||
<a href="index.php?do=modules&cp={$sess}" class="button basicBtn">Вернуться к списку модулей</a>
|
||
|
||
<a href="index.php?do=modules&action=aliases&id=0&cp={$sess}&ajax=1&onlycontent=1"
|
||
data-dialog="aliases-0"
|
||
data-height="650"
|
||
data-modal="true"
|
||
data-title="Добавить новый алиас"
|
||
class="button basicBtn greenBtn openDialog">Добавить новый алиас</a>
|
||
</div>
|
||
|
||
{literal}
|
||
<script type="text/javascript">
|
||
$(function() {
|
||
// Выделить все
|
||
$('.selall_aliases').on('change', function() {
|
||
var checked = $(this).is(':checked');
|
||
$('.alias_check').prop('checked', checked);
|
||
// Обновляем визуальные стили jqTransform если используется
|
||
if ($.isFunction($.fn.jqTransform)) {
|
||
if(checked) {
|
||
$('.alias_check').parent().find('a').addClass('jqTransformChecked');
|
||
} else {
|
||
$('.alias_check').parent().find('a').removeClass('jqTransformChecked');
|
||
}
|
||
}
|
||
});
|
||
|
||
// Массовое удаление
|
||
$('.deleteSelected').on('click', function(e) {
|
||
e.preventDefault();
|
||
var $checked = $('.alias_check:checked');
|
||
|
||
if ($checked.length === 0) {
|
||
$.jGrowl("Ничего не выбрано!", {theme: 'error'});
|
||
return false;
|
||
}
|
||
|
||
jConfirm('Удалить выбранные алиасы (' + $checked.length + ' шт.)?', 'Подтверждение', function(r) {
|
||
if (r) {
|
||
$('#AliasBatchForm').submit();
|
||
}
|
||
});
|
||
});
|
||
});
|
||
</script>
|
||
{/literal} |