// update localization and modules tabs
This commit is contained in:
@@ -26,29 +26,67 @@
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
|
||||
<form action="{$url_submit}" id={$table}_form method="post">
|
||||
<form action="{$url_submit}" id={$table}_form method="post" class="form-horizontal">
|
||||
{if $display_key}
|
||||
<input type="hidden" name="show_modules" value="{$display_key}" />
|
||||
{/if}
|
||||
<fieldset>
|
||||
<legend><img src="../img/t/AdminModulesPositions.gif" />{l s='Transplant a module'}</legend>
|
||||
<label>{l s='Module'} :</label>
|
||||
<div class="margin-form">
|
||||
<select name="id_module" {if $edit_graft} disabled="disabled"{/if}>
|
||||
{foreach $modules as $module}
|
||||
<option value="{$module->id}" {if $id_module == $module->id || (!$id_module && $show_modules == $module->id)}selected="selected"{/if}>{$module->displayName|stripslashes}</option>
|
||||
{/foreach}
|
||||
</select><sup> *</sup>
|
||||
<h3>
|
||||
<i class="icon-paste"></i>
|
||||
{l s='Transplant a module'}
|
||||
</h3>
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3 required"> {l s='Module:'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="id_module" {if $edit_graft} disabled="disabled"{/if}>
|
||||
{foreach $modules as $module}
|
||||
<option value="{$module->id}" {if $id_module == $module->id || (!$id_module && $show_modules == $module->id)}selected="selected"{/if}>{$module->displayName|stripslashes}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<label>{l s='Hook into'} :</label>
|
||||
<div class="margin-form">
|
||||
<select name="id_hook" {if $edit_graft} disabled="disabled"{/if}>
|
||||
{foreach $hooks as $hook}
|
||||
<option value="{$hook['id_hook']}" {if $id_hook == $hook['id_hook']} selected="selected"{/if}>{$hook['name']}{if $hook['name'] != $hook['title']} ({$hook['title']}){/if}</option>
|
||||
{/foreach}
|
||||
</select><sup> *</sup>
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3 required"> {l s='Hook into'} :</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="id_hook" {if $edit_graft} disabled="disabled"{/if}>
|
||||
{foreach $hooks as $hook}
|
||||
<option value="{$hook['id_hook']}" {if $id_hook == $hook['id_hook']} selected="selected"{/if}>{$hook['name']}{if $hook['name'] != $hook['title']} ({$hook['title']}){/if}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3">{l s='Exceptions'} :</label>
|
||||
<div class="col-lg-6">
|
||||
{if !$except_diff}
|
||||
{$exception_list}
|
||||
{else}
|
||||
{foreach $exception_list_diff as $value}
|
||||
{$value}
|
||||
{/foreach}
|
||||
{/if}
|
||||
<div class="alert alert-block">
|
||||
<p>{l s='Please specify the files for which you do not want the module to be displayed.'}.</p>
|
||||
<p>{l s='Please input each filename, separated by a comma.'}.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
{if $edit_graft}
|
||||
<input type="hidden" name="id_module" value="{$id_module}" />
|
||||
<input type="hidden" name="id_hook" value="{$id_hook}" />
|
||||
{/if}
|
||||
<input type="submit" value="{l s='Save'}" name="{if $edit_graft}submitEditGraft{else}submitAddToHook{/if}" id="{$table}_form_submit_btn" class="btn btn-primary" />
|
||||
<p>
|
||||
<span class="text-danger">*</span>
|
||||
{l s='Required field'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA
|
||||
function position_exception_add(shopID)
|
||||
@@ -78,28 +116,6 @@
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<label>{l s='Exceptions'} :</label>
|
||||
<div class="margin-form">
|
||||
{if !$except_diff}
|
||||
{$exception_list}
|
||||
{else}
|
||||
{foreach $exception_list_diff as $value}
|
||||
{$value}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{l s='Please specify the files for which you do not want the module to be displayed.'}.<br />
|
||||
{l s='Please input each filename, separated by a comma.'}.
|
||||
<br /><br />
|
||||
</div>
|
||||
|
||||
<div class="margin-form">
|
||||
{if $edit_graft}
|
||||
<input type="hidden" name="id_module" value="{$id_module}" />
|
||||
<input type="hidden" name="id_hook" value="{$id_hook}" />
|
||||
{/if}
|
||||
<input type="submit" value="{l s='Save'}" name="{if $edit_graft}submitEditGraft{else}submitAddToHook{/if}" id="{$table}_form_submit_btn" class="button" />
|
||||
</div>
|
||||
<div class="small"><sup>*</sup> {l s='Required field'}</div>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
@@ -72,7 +72,7 @@
|
||||
{foreach $hooks as $hook}
|
||||
<div class="row-light clearfix">
|
||||
<a name="{$hook['name']}"></a>
|
||||
<table cellpadding="0" cellspacing="0" class="table table-striped table-hover {if $hook['module_count'] >= 2} tableDnD{/if}" id="{$hook['id_hook']}">
|
||||
<table class="table {if $hook['module_count'] >= 2} tableDnD{/if}" id="{$hook['id_hook']}">
|
||||
<colgroup>
|
||||
<col width="10">
|
||||
<col width="30">
|
||||
@@ -80,94 +80,106 @@
|
||||
<col width="">
|
||||
<col width="50">
|
||||
</colgroup>
|
||||
<tr class="nodrag nodrop">
|
||||
<th colspan="5">
|
||||
<thead>
|
||||
<tr class="nodrag nodrop">
|
||||
{if $hook['module_count'] && $can_move}
|
||||
<input type="checkbox" id="Ghook{$hook['id_hook']}" style="margin-right: 2px;" onclick="hookCheckboxes({$hook['id_hook']}, 0, this)"/>
|
||||
<th>
|
||||
<input type="checkbox" id="Ghook{$hook['id_hook']}" style="margin-right: 2px;" onclick="hookCheckboxes({$hook['id_hook']}, 0, this)"/>
|
||||
</th>
|
||||
{/if}
|
||||
<span>{$hook['title']} - </span>
|
||||
<span class="badge">{$hook['module_count']} {if $hook['module_count'] > 1}{l s='Modules'}{else}{l s='Module'}{/if} </span>
|
||||
{if !empty($hook['description'])}
|
||||
<p class="text-muted">
|
||||
[{$hook['description']}]
|
||||
</p>
|
||||
{/if}
|
||||
<p>({l s='Technical name: '}{$hook['name']})</p>
|
||||
</th>
|
||||
</tr>
|
||||
{if $hook['module_count']}
|
||||
{foreach $hook['modules'] as $position => $module}
|
||||
{if isset($module['instance'])}
|
||||
<tr id="{$hook['id_hook']}_{$module['instance']->id}" {cycle values='class="alt_row",'}>
|
||||
<td align="center">
|
||||
<input type="checkbox" id="mod{$hook['id_hook']}_{$module['instance']->id}" class="hook{$hook['id_hook']}" onclick="hookCheckboxes({$hook['id_hook']}, 1, this)" name="unhooks[]" value="{$hook['id_hook']}_{$module['instance']->id}"/>
|
||||
</td>
|
||||
{if !$display_key}
|
||||
<td align="center" class="positions">{$module@iteration}</td>
|
||||
<td {if $can_move && $hook['module_count'] >= 2} align=center class="dragHandle"{/if} id="td_{$hook['id_hook']}_{$module['instance']->id}">
|
||||
{if $can_move}
|
||||
<a {if {$module@iteration} == 1} style="display: none;"{/if} href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&direction=0&token={$token}&changePosition#{$hook['name']}">
|
||||
<img src="../img/admin/up.gif" alt="{l s='Up'}" title="{l s='Up'}" />
|
||||
</a><br />
|
||||
<a {if {$module@iteration} == count($hook['modules'])} style="display: none;"{/if} href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&direction=1&token={$token}&changePosition#{$hook['name']}">
|
||||
<img src="../img/admin/down.gif" alt="{l s='Down'}" title="{l s='Down'}" />
|
||||
</a>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<div class="lab_modules_positions" for="mod{$hook['id_hook']}_{$module['instance']->id}">
|
||||
{else}
|
||||
<td colspan="3">
|
||||
<div class="lab_modules_positions" for="mod{$hook['id_hook']}_{$module['instance']->id}">
|
||||
{/if}
|
||||
<h4>
|
||||
<img src="../modules/{$module['instance']->name}/logo.png" alt="{$module['instance']->name|stripslashes}" />
|
||||
{$module['instance']->displayName|stripslashes}
|
||||
</h4>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{l s='Version:'}</dt>
|
||||
<dd>
|
||||
{if $module['instance']->version}v{if $module['instance']->version|intval == $module['instance']->version}{sprintf('%.1f', $module['instance']->version)}{else}{$module['instance']->version|floatval}{/if}{/if}
|
||||
</dd>
|
||||
<dt>{l s='Description:'}</dt>
|
||||
<dd>
|
||||
{$module['instance']->description}
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group btn-group-action">
|
||||
<span class="btn btn-default btn-small">{l s='Choose an action'}</span>
|
||||
<button class="btn btn-default btn-small dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&editGraft{if $display_key}&show_modules={$display_key}{/if}&token={$token}">
|
||||
<i class="icon-pencil"></i>
|
||||
{l s='Edit'}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&deleteGraft{if $display_key}&show_modules={$display_key}{/if}&token={$token}">
|
||||
<i class="icon-trash"></i>
|
||||
{l s='Delete'}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<p class="text-warning">{l s='No module was found for this hook.'}</p>
|
||||
</td>
|
||||
<th colspan="5">
|
||||
<h3>
|
||||
{$hook['title']} -
|
||||
<span class="badge">{$hook['module_count']} {if $hook['module_count'] > 1}{l s='Modules'}{else}{l s='Module'}{/if} </span>
|
||||
<span>({l s='Technical name: '}{$hook['name']})</span>
|
||||
</h3>
|
||||
</th>
|
||||
</tr>
|
||||
{/if}
|
||||
</thead>
|
||||
<tbody>
|
||||
{if !empty($hook['description'])}
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<p class="text-muted">
|
||||
[{$hook['description']}]
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $hook['module_count']}
|
||||
{foreach $hook['modules'] as $position => $module}
|
||||
{if isset($module['instance'])}
|
||||
<tr id="{$hook['id_hook']}_{$module['instance']->id}" {cycle values='class="alt_row",'}>
|
||||
<td align="center">
|
||||
<input type="checkbox" id="mod{$hook['id_hook']}_{$module['instance']->id}" class="hook{$hook['id_hook']}" onclick="hookCheckboxes({$hook['id_hook']}, 1, this)" name="unhooks[]" value="{$hook['id_hook']}_{$module['instance']->id}"/>
|
||||
</td>
|
||||
{if !$display_key}
|
||||
<td align="center" class="positions">{$module@iteration}</td>
|
||||
<td {if $can_move && $hook['module_count'] >= 2} align=center class="dragHandle"{/if} id="td_{$hook['id_hook']}_{$module['instance']->id}">
|
||||
{if $can_move}
|
||||
<a {if {$module@iteration} == 1} style="display: none;"{/if} href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&direction=0&token={$token}&changePosition#{$hook['name']}">
|
||||
<img src="../img/admin/up.gif" alt="{l s='Up'}" title="{l s='Up'}" />
|
||||
</a><br />
|
||||
<a {if {$module@iteration} == count($hook['modules'])} style="display: none;"{/if} href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&direction=1&token={$token}&changePosition#{$hook['name']}">
|
||||
<img src="../img/admin/down.gif" alt="{l s='Down'}" title="{l s='Down'}" />
|
||||
</a>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<div class="lab_modules_positions" for="mod{$hook['id_hook']}_{$module['instance']->id}">
|
||||
{else}
|
||||
<td colspan="3">
|
||||
<div class="lab_modules_positions" for="mod{$hook['id_hook']}_{$module['instance']->id}">
|
||||
{/if}
|
||||
<h4>
|
||||
<img src="../modules/{$module['instance']->name}/logo.png" alt="{$module['instance']->name|stripslashes}" />
|
||||
{$module['instance']->displayName|stripslashes}
|
||||
</h4>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{l s='Version:'}</dt>
|
||||
<dd>
|
||||
{if $module['instance']->version}v{if $module['instance']->version|intval == $module['instance']->version}{sprintf('%.1f', $module['instance']->version)}{else}{$module['instance']->version|floatval}{/if}{/if}
|
||||
</dd>
|
||||
<dt>{l s='Description:'}</dt>
|
||||
<dd>
|
||||
{$module['instance']->description}
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group btn-group-action">
|
||||
<span class="btn btn-default btn-small">{l s='Choose an action'}</span>
|
||||
<button class="btn btn-default btn-small dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&editGraft{if $display_key}&show_modules={$display_key}{/if}&token={$token}">
|
||||
<i class="icon-pencil"></i>
|
||||
{l s='Edit'}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&deleteGraft{if $display_key}&show_modules={$display_key}{/if}&token={$token}">
|
||||
<i class="icon-trash"></i>
|
||||
{l s='Delete'}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<p class="text-warning">{l s='No module was found for this hook.'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
Reference in New Issue
Block a user