// update localization and modules tabs
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="token" value="{$token}" />
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{include file='controllers/modules/header.tpl'}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<span class="pull-right">
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-default" href="index.php?controller={$smarty.get.controller|htmlentities}&token={$smarty.get.token|htmlentities}">
|
||||
<i class="icon-list"></i>
|
||||
{l s='Normal view'}
|
||||
@@ -11,7 +11,7 @@
|
||||
<i class="icon-star"></i>
|
||||
{l s='Favorites view'}
|
||||
</a>
|
||||
</span>
|
||||
</fiv>
|
||||
</div>
|
||||
<div class="col-lg-12"> </div>
|
||||
<div id="container" class="col-lg-12">
|
||||
@@ -31,12 +31,12 @@
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="nodrag nodrop">
|
||||
<th class="center">{l s='Logo'}</th>
|
||||
<th class="center">{l s='Module Name'}</th>
|
||||
<th>{l s='Logo'}</th>
|
||||
<th>{l s='Module Name'}</th>
|
||||
<th>{l s='Description'}</th>
|
||||
<th class="center">{l s='Status'}</th>
|
||||
<th>{l s='Status'}</th>
|
||||
<th>{l s='Tab'}</th>
|
||||
<th class="center">{l s='Categories'}</th>
|
||||
<th>{l s='Categories'}</th>
|
||||
<th>{l s='Interest'}</th>
|
||||
<th>{l s='Favorite'}</th>
|
||||
<th> </th>
|
||||
@@ -45,16 +45,16 @@
|
||||
<tbody>
|
||||
{foreach from=$modules key=km item=module}
|
||||
<tr height="32" {if $km % 2 eq 0} class="alt_row"{/if}>
|
||||
<td class="center">
|
||||
<td>
|
||||
<img src="{if isset($module->image)}{$module->image}{else}../modules/{$module->name}/{$module->logo}{/if}" width="57" height="57" />
|
||||
</td>
|
||||
<td class="center moduleName">
|
||||
<td class="moduleName">
|
||||
<h5>{$module->displayName}</h5>
|
||||
</td>
|
||||
<td>
|
||||
<span class="moduleFavDesc">{$module->description|truncate:80:'...'}</span>
|
||||
</td>
|
||||
<td class="center setup">
|
||||
<td class="setup">
|
||||
{if isset($module->id) && $module->id gt 0}
|
||||
<span class="label label-success">{l s='Installed'}</span>
|
||||
{else}
|
||||
@@ -77,7 +77,7 @@
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
<td class="center">
|
||||
<td>
|
||||
<span>{$module->categoryName}</span>
|
||||
</td>
|
||||
<td>
|
||||
@@ -94,7 +94,7 @@
|
||||
<option value="0" {if isset($module->preferences.favorite) && $module->preferences.favorite eq '0'}selected="selected"{/if}>{l s='No'}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="center" id="r_{$module->name}">
|
||||
<td id="r_{$module->name}">
|
||||
<span> </span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -28,7 +28,10 @@
|
||||
<!--start addons login-->
|
||||
<div id="addons_login_div" class="row" >
|
||||
<div class="col-lg-12">
|
||||
<legend>{l s='You are logged into PrestaShop Addons.'}</legend>
|
||||
<h3>
|
||||
<i class="icon-user"></i>
|
||||
{l s='You are logged into PrestaShop Addons.'}
|
||||
</h3>
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-9">
|
||||
<i class="icon-user"></i> {l s='Welcome'} {$username_addons}
|
||||
@@ -54,7 +57,10 @@
|
||||
<div id="addons_login_div" class="row">
|
||||
<div class="col-lg-12">
|
||||
<form id="addons_login_form" method="post" class="form-horizontal">
|
||||
<legend>{l s='Do you have a %s account?' sprintf='<a href="http://addons.prestashop.com/">PrestaShop Addons</a>'}</legend>
|
||||
<h3>
|
||||
<i class="icon-user"></i>
|
||||
{l s='Do you have a %s account?' sprintf='<a href="http://addons.prestashop.com/">PrestaShop Addons</a>'}
|
||||
</h3>
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3">{l s='Addons Login'} :</label>
|
||||
<div class="input-group col-lg-4">
|
||||
@@ -84,7 +90,6 @@
|
||||
<!--end addons login-->
|
||||
{/if}
|
||||
{/if}
|
||||
<div class="clear"> </div>
|
||||
{/if}
|
||||
|
||||
<!--start filter module-->
|
||||
|
||||
@@ -92,32 +92,7 @@
|
||||
{/if}
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<p class="desc">{if isset($module->description) && $module->description ne ''}{l s='Description'} : {$module->description}{else} {/if}</p>
|
||||
{if isset($module->message) && (!isset($module->type) || ($module->type != 'addonsMustHave' || $module->type !== 'addonsNative'))}<div class="alert">{$module->message}</div>{/if}
|
||||
<div class="row-fluid">
|
||||
|
||||
{if !isset($module->not_on_disk)}
|
||||
{$module->optionsHtml}
|
||||
{if isset($module->preferences) && isset($module->preferences['favorite']) && $module->preferences['favorite'] == 1}
|
||||
<a class="btn btn-default btn-small action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#">
|
||||
<i class="icon-star"></i> {l s='Remove from Favorites'}
|
||||
</a>
|
||||
<a class="btn btn-default btn-small action_module action_favorite toggle_favorite" data-module="{$module->name}" data-value="1" href="#" style="display: none;">
|
||||
<i class="icon-star"></i> {l s='Mark as Favorite'}
|
||||
</a>
|
||||
{else}
|
||||
<a class="btn btn-default btn-small action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#" style="display: none;">
|
||||
<i class="icon-star"></i> {l s='Remove from Favorites'}
|
||||
</a>
|
||||
<a class="btn btn-default btn-small action_module action_favorite toggle_favorite" data-module="{$module->name}" data-value="1" href="#">
|
||||
<i class="icon-star"></i> {l s='Mark as Favorite'}
|
||||
</a>
|
||||
{/if}
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="center">
|
||||
@@ -159,6 +134,43 @@
|
||||
{/if}
|
||||
</a>
|
||||
</p>
|
||||
<div class="row-fluid btn-group btn-group-action">
|
||||
{if !isset($module->not_on_disk)}
|
||||
<span class="btn btn-default btn-small">
|
||||
<i class="icon-cog"></i> {l s='Choose an action'}
|
||||
</span>
|
||||
<button data-toggle="dropdown" class="btn btn-default btn-small dropdown-toggle">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{$module->optionsHtml}
|
||||
{if isset($module->preferences) && isset($module->preferences['favorite']) && $module->preferences['favorite'] == 1}
|
||||
<li>
|
||||
<a class="action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#">
|
||||
<i class="icon-star"></i> {l s='Remove from Favorites'}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action_module action_favorite toggle_favorite" data-module="{$module->name}" data-value="1" href="#" style="display: none;">
|
||||
<i class="icon-star"></i> {l s='Mark as Favorite'}
|
||||
</a>
|
||||
</li>
|
||||
{else}
|
||||
<li>
|
||||
<a class="action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#" style="display: none;">
|
||||
<i class="icon-star"></i> {l s='Remove from Favorites'}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action_module action_favorite toggle_favorite" data-module="{$module->name}" data-value="1" href="#">
|
||||
<i class="icon-star"></i> {l s='Mark as Favorite'}
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
{/if}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<span class="pull-right">
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-default" href="index.php?controller={$smarty.get.controller|htmlentities}&token={$smarty.get.token|htmlentities}">
|
||||
<i class="icon-list"></i>
|
||||
{l s='Normal view'}
|
||||
@@ -47,36 +47,37 @@
|
||||
<i class="icon-star"></i>
|
||||
{l s='Favorites view'}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container">
|
||||
<!--start sidebar module-->
|
||||
<div class="row-fluid">
|
||||
<div class="categorieTitle col-lg-3">
|
||||
<legend>{l s='Categories'}</legend>
|
||||
<ul class="tab nav nav-pills nav-stacked">
|
||||
<li class="tab-row {if isset($categoryFiltered.favorites)}active{/if}">
|
||||
<a class="tab-page" href="{$currentIndex}&token={$token}&filterCategory=favorites">
|
||||
{l s='Favorites'} <span class="badge pull-right">{$nb_modules_favorites}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="tab-row {if count($categoryFiltered) lte 0}active{/if}">
|
||||
<a class="tab-page" href="{$currentIndex}&token={$token}&unfilterCategory=yes">
|
||||
{l s='Total'} <span class="badge pull-right">{$nb_modules}</span>
|
||||
</a>
|
||||
</li>
|
||||
<div class="list-group">
|
||||
<h3>
|
||||
<i class="icon-reorder"></i>
|
||||
{l s='Categories'}
|
||||
</h3>
|
||||
<a class="list-group-item {if isset($categoryFiltered.favorites)}active{/if}" href="{$currentIndex}&token={$token}&filterCategory=favorites">
|
||||
{l s='Favorites'} <span class="badge pull-right">{$nb_modules_favorites}</span>
|
||||
</a>
|
||||
|
||||
<a class="list-group-item {if count($categoryFiltered) lte 0}active{/if}" href="{$currentIndex}&token={$token}&unfilterCategory=yes">
|
||||
{l s='Total'} <span class="badge pull-right">{$nb_modules}</span>
|
||||
</a>
|
||||
{foreach from=$list_modules_categories item=module_category key=module_category_key}
|
||||
<li class="tab-row {if isset($categoryFiltered[$module_category_key])}active{/if}">
|
||||
<a class="tab-page" href="{$currentIndex}&token={$token}&{if isset($categoryFiltered[$module_category_key])}un{/if}filterCategory={$module_category_key}">
|
||||
{$module_category.name} <span class="badge pull-right">{$module_category.nb}</span>
|
||||
</a>
|
||||
</li>
|
||||
<a class="list-group-item {if isset($categoryFiltered[$module_category_key])}active{/if}" href="{$currentIndex}&token={$token}&{if isset($categoryFiltered[$module_category_key])}un{/if}filterCategory={$module_category_key}">
|
||||
{$module_category.name} <span class="badge pull-right">{$module_category.nb}</span>
|
||||
</a>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="moduleContainer" class="col-lg-9">
|
||||
<legend>{l s='Modules list'}</legend>
|
||||
<h3>
|
||||
<i class="icon-list-ul"></i>
|
||||
{l s='Modules list'}
|
||||
</h3>
|
||||
{include file='controllers/modules/list.tpl'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
{$modules_list}
|
||||
{/if}
|
||||
{if $display_restrictions}
|
||||
<legend>{l s='Payment module restrictions'}</legend>
|
||||
{foreach $lists as $list}
|
||||
{include file='controllers/payment/restrictions.tpl'}
|
||||
{/foreach}
|
||||
|
||||
@@ -24,18 +24,21 @@
|
||||
*}
|
||||
|
||||
<form action="{$url_submit}" method="post" id="form_{$list['name_id']}" class="form-horizontal">
|
||||
<fieldset class="well">
|
||||
<legend><img src="../img/admin/{$list['icon']}.gif" /> {$list['title']}</legend>
|
||||
<fieldset>
|
||||
<h3>
|
||||
<i class="{$list['icon']}"></i>
|
||||
{$list['title']}
|
||||
</h3>
|
||||
<p class="help-block">{$list['desc']}</p>
|
||||
<table cellpadding="0" cellspacing="0" class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th width="20%">{$list['title']}</th>
|
||||
<th width="40%">{$list['title']}</th>
|
||||
{foreach $payment_modules as $module}
|
||||
{if $module->active}
|
||||
<th class="center">
|
||||
<th>
|
||||
{if $list['name_id'] != 'currency' || $module->currencies_mode == 'checkbox'}
|
||||
<input type="hidden" id="checkedBox_{$list['name_id']}_{$module->name}" value="checked"/>
|
||||
<a href="javascript:checkPaymentBoxes('{$list['name_id']}', '{$module->name}')" style="text-decoration:none;">
|
||||
<a href="javascript:checkPaymentBoxes('{$list['name_id']}', '{$module->name}')">
|
||||
{/if}
|
||||
<img src="{$ps_base_uri}modules/{$module->name}/logo.gif" alt="{$module->name}" title="{$module->displayName}"/>
|
||||
{if $list['name_id'] != 'currency' || $module->currencies_mode == 'checkbox'}
|
||||
@@ -46,13 +49,13 @@
|
||||
{/foreach}
|
||||
</tr>
|
||||
{foreach $list['items'] as $item}
|
||||
<tr class="{cycle values=",alt_row"}">
|
||||
<tr>
|
||||
<td>
|
||||
<span>{$item['name']}</span>
|
||||
</td>
|
||||
{foreach $payment_modules as $key_module => $module}
|
||||
{if $module->active}
|
||||
<td class="center">
|
||||
<td>
|
||||
{assign var='type' value='null'}
|
||||
{if !$item['check_list'][$key_module]}
|
||||
{* Keep $type to null *}
|
||||
@@ -76,13 +79,13 @@
|
||||
</tr>
|
||||
{/foreach}
|
||||
{if $list['name_id'] === 'currency'}
|
||||
<tr class="{cycle values=",alt_row"}">
|
||||
<tr>
|
||||
<td>
|
||||
<span>{l s='Customer currency'}</span>
|
||||
</td>
|
||||
{foreach $payment_modules as $module}
|
||||
{if $module->active}
|
||||
<td class="center">
|
||||
<td>
|
||||
{if $module->currencies && $module->currencies_mode == 'radio'}
|
||||
<input type="radio" name="{$module->name}_{$list['name_id']}[]" value="-1"{if in_array(-1, $module->$list['name_id'])} checked="checked"
|
||||
{/if} />
|
||||
@@ -93,13 +96,13 @@
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tr>
|
||||
<tr class="{cycle values=",alt_row"}">
|
||||
<tr>
|
||||
<td>
|
||||
<span>{l s='Shop default currency'}</span>
|
||||
</td>
|
||||
{foreach $payment_modules as $module}
|
||||
{if $module->active}
|
||||
<td class="center">
|
||||
<td>
|
||||
{if $module->currencies && $module->currencies_mode == 'radio'}
|
||||
<input type="radio" name="{$module->name}_{$list['name_id']}[]" value="-2"{if in_array(-2, $module->$list['name_id'])} checked="checked"
|
||||
{/if}
|
||||
@@ -114,7 +117,7 @@
|
||||
{/if}
|
||||
</table>
|
||||
<p class="text-right">
|
||||
<button type="submit" class="btn btn-default" name="submitModule{$list['name_id']}">
|
||||
<button type="submit" class="btn btn-primary" name="submitModule{$list['name_id']}">
|
||||
<i class="icon-ok"></i>
|
||||
{l s='Save restrictions'}
|
||||
</button>
|
||||
|
||||
@@ -23,29 +23,33 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<legend>{l s='Modules list'}</legend>
|
||||
<div id="modules_list_container_tab" class="row">
|
||||
<div class="col-lg-12">
|
||||
{if count($modules_list)}
|
||||
<table border="0" cellpadding="0" cellspacing="5" class="table table-striped table-hover">
|
||||
{counter start=1 assign="count"}
|
||||
{foreach from=$modules_list item=module}
|
||||
<div style="width:400px">{include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",row alt"}}</div>
|
||||
{if $count %3 == 0}
|
||||
</li>
|
||||
<li>
|
||||
{/if}
|
||||
{counter}
|
||||
{/foreach}
|
||||
</table>
|
||||
{else}
|
||||
<table border="0" cellpadding="0" cellspacing="5" class="table table-striped table-hover">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="alert alert-block">{l s='No modules available in this section.'}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/if}
|
||||
<fieldset>
|
||||
<h3>
|
||||
<i class="icon-list-ul"></i>
|
||||
{l s='Modules list'}
|
||||
</h3>
|
||||
<div id="modules_list_container_tab" class="row">
|
||||
<div class="col-lg-12">
|
||||
{if count($modules_list)}
|
||||
<table class="table">
|
||||
{counter start=1 assign="count"}
|
||||
{foreach from=$modules_list item=module}
|
||||
<div>{include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",row alt"}}</div>
|
||||
{if $count %3 == 0}
|
||||
{/if}
|
||||
{counter}
|
||||
{/foreach}
|
||||
</table>
|
||||
{else}
|
||||
<table border="0" cellpadding="0" cellspacing="5" class="table table-striped table-hover">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="alert alert-block">{l s='No modules available in this section.'}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
@@ -3003,11 +3003,11 @@ class AdminControllerCore extends Controller
|
||||
if ($option['cond'])
|
||||
{
|
||||
if ($output_type == 'link')
|
||||
$return .= '<span class="'.$option_name.'">
|
||||
<a class="btn btn-default btn-small action_module" href="'.$option['href'].(!is_null($back) ? '&back='.urlencode($back) : '').'" onclick="'.$option['onclick'].'" title="'.$option['title'].'">
|
||||
<i class="icon-'.(isset($option['icon']) && $option['icon'] ? $option['icon']:'cog' ).'"></i> '.$option['text'].'
|
||||
</a>
|
||||
</span>';
|
||||
$return .= '<li>
|
||||
<a class="'.$option_name.' action_module" href="'.$option['href'].(!is_null($back) ? '&back='.urlencode($back) : '').'" onclick="'.$option['onclick'].'" title="'.$option['title'].'">
|
||||
<i class="icon-'.(isset($option['icon']) && $option['icon'] ? $option['icon']:'cog' ).'"></i> '.$option['text'].'
|
||||
</a>
|
||||
</li>';
|
||||
elseif ($output_type == 'select')
|
||||
$return .= '<option id="'.$option_name.'" data-href="'.$option['href'].(!is_null($back) ? '&back='.urlencode($back) : '').'" data-onclick="'.$option['onclick'].'">'.$option['text'].'</option>';
|
||||
}
|
||||
|
||||
@@ -394,21 +394,26 @@ class AdminModulesPositionsControllerCore extends AdminController
|
||||
if (!is_array($file_list))
|
||||
$file_list = ($file_list) ? array($file_list) : array();
|
||||
|
||||
$content = '<input type="text" name="exceptions['.$shop_id.']" size="40" value="'.implode(', ', $file_list).'" id="em_text_'.$shop_id.'">';
|
||||
$content = '<p><input type="text" name="exceptions['.$shop_id.']" size="40" value="'.implode(', ', $file_list).'" id="em_text_'.$shop_id.'"/></p>';
|
||||
if ($shop_id)
|
||||
{
|
||||
$shop = new Shop($shop_id);
|
||||
$content .= ' ('.$shop->name.')';
|
||||
}
|
||||
$content .= '<br /><select id="em_list_'.$shop_id.'">';
|
||||
$content .= '<p>
|
||||
<select id="em_list_'.$shop_id.'">';
|
||||
|
||||
// @todo do something better with controllers
|
||||
$controllers = Dispatcher::getControllers(_PS_FRONT_CONTROLLER_DIR_);
|
||||
ksort($controllers);
|
||||
foreach ($controllers as $k => $v)
|
||||
$content .= '<option value="'.$k.'">'.$k.'</option>';
|
||||
$content .= '</select> <input type="button" class="button" value="'.$this->l('Add').'" onclick="position_exception_add('.$shop_id.')" />
|
||||
<input type="button" class="button" value="'.$this->l('Remove').'" onclick="position_exception_remove('.$shop_id.')" /><br /><br />';
|
||||
$content .= '</select>
|
||||
</p>
|
||||
<p>
|
||||
<input type="button" class="btn btn-default" value="'.$this->l('Add').'" onclick="position_exception_add('.$shop_id.')" />
|
||||
<input type="button" class="btn btn-default" value="'.$this->l('Remove').'" onclick="position_exception_remove('.$shop_id.')" />
|
||||
</p>';
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
@@ -172,21 +172,21 @@ class AdminPaymentControllerCore extends AdminController
|
||||
'desc' => $this->l('Please mark each checkbox for the currency, or currencies, in which you want the payment module(s) to be available.'),
|
||||
'name_id' => 'currency',
|
||||
'identifier' => 'id_currency',
|
||||
'icon' => 'dollar',
|
||||
'icon' => 'icon-money',
|
||||
),
|
||||
array('items' => Group::getGroups($this->context->language->id),
|
||||
'title' => $this->l('Group restrictions'),
|
||||
'desc' => $this->l('Please mark each checkbox for the currency, or currencies, in which you want the payment module(s) to be available.'),
|
||||
'name_id' => 'group',
|
||||
'identifier' => 'id_group',
|
||||
'icon' => 'group',
|
||||
'icon' => 'icon-group',
|
||||
),
|
||||
array('items' =>Country::getCountries($this->context->language->id),
|
||||
'title' => $this->l('Country restrictions'),
|
||||
'desc' => $this->l('Please mark each checkbox for the country, or countries, in which you want the payment module(s) to be available.'),
|
||||
'name_id' => 'country',
|
||||
'identifier' => 'id_country',
|
||||
'icon' => 'world',
|
||||
'icon' => 'icon-globe',
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ class AdminStatesControllerCore extends AdminController
|
||||
'id' => 'id_country',
|
||||
'name' => 'name',
|
||||
),
|
||||
'desc' => $this->l('Country where the state, region or city is located')
|
||||
'hint' => $this->l('Country where the state, region or city is located')
|
||||
),
|
||||
array(
|
||||
'type' => 'select',
|
||||
|
||||
Reference in New Issue
Block a user