// Move backoffice templates and media

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11899 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2011-12-29 16:01:49 +00:00
parent 14399b4401
commit fe7be46dbe
245 changed files with 149 additions and 71 deletions
@@ -0,0 +1,113 @@
{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision$
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="toolbarBox">
{if $show_toolbar}
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
<div class="pageTitle">
<h3>{block name=pageTitle}
<span id="current_obj" style="font-weight: normal;">{$title|default:'&nbsp;'}</span>
{/block}</h3>
</div>
{/if}
</div>
<form action="{$url_submit}" id={$table}_form method="post">
{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>
</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['title']}</option>
{/foreach}
</select><sup> *</sup>
</div>
<script type="text/javascript">
//<![CDATA
function position_exception_add(shopID)
{
var listValue = $('#em_list_'+shopID).val();
var inputValue = $('#em_text_'+shopID).val();
var r = new RegExp('(^|,) *'+listValue+' *(,|$)');
if (!r.test(inputValue))
$('#em_text_'+shopID).val(inputValue + ((inputValue.trim()) ? ', ' : '') + listValue);
}
function position_exception_remove(shopID)
{
var listValue = $('#em_list_'+shopID).val();
var inputValue = $('#em_text_'+shopID).val();
var r = new RegExp('(^|,) *'+listValue+' *(,|$)');
if (r.test(inputValue))
{
var rep = '';
if (new RegExp(', *'+listValue+' *,').test(inputValue))
$('#em_text_'+shopID).val(inputValue.replace(r, ','));
else if (new RegExp(listValue+' *,').test(inputValue))
$('#em_text_'+shopID).val(inputValue.replace(r, ''));
else
$('#em_text_'+shopID).val(inputValue.replace(r, ''));
}
}
//]]>
</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 those files for which you do not want the module to be displayed'}.<br />
{l s='Please type 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>
@@ -0,0 +1,144 @@
{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision$
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<script type="text/javascript">
var token = '{$token}';
var come_from = 'AdminModulesPositions';
</script>
<script type="text/javascript" src="../js/admin-dnd.js"></script>
{if $show_toolbar}
<div class="toolbar-placeholder">
<div class="toolbarBox {if $toolbar_fix}toolbarHead{/if}">
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
<div class="pageTitle">
<h3>{block name=pageTitle}
<span id="current_obj" style="font-weight: normal;">{$title|default:'&nbsp;'}</span>
{/block}
</h3>
</div>
</div>
</div>
{/if}
<div class="filter-module">
<form>
{l s='Show'} :
<select id="show_modules" onChange="autoUrl('show_modules', '{$url_show_modules}')">
<option value="all">{l s='All modules'}&nbsp;</option>
<option>---------------</option>
{foreach $modules as $module}
<option value="{$module->id|intval}" {if $display_key == $module->id}selected="selected"{/if}>{$module->displayName}</option>
{/foreach}
</select>
<br /><br />
<input type="checkbox" id="hook_position" onclick="autoUrlNoList('hook_position', '{$url_show_invisible}')" {if $hook_position}checked="checked"{/if} />&nbsp;
<label class="t" for="hook_position">{l s='Display non-positionable hook'}</label>
</form>
</div>
<br/>
<div>
<div id="modulePosition">
<div class="blocLiveEdit"><h2>{l s='Live edit'}</h2>
{if $live_edit}
<p>{l s='You have to select a shop to use live edit'}</p>
{else}
<p>{l s='By clicking here you will be redirected to the front office of your shop to move and delete modules directly.'}</p>
<a href="{$url_live_edit}" target="_blank" class="button">{l s='Run LiveEdit'}</a>
{/if}
</div>
<form method="post" action="{$url_submit}">
<div id="unhook_button_position_top">
<input class="button floatr" type="submit" name="unhookform" value="{l s='Unhook the selection'}"/></div>
{if !$can_move}
<br /><div><b>{l s='If you want to order / move following data, please go in shop context (select a shop in shop list)'}</b></div>
{/if}
{foreach $hooks as $hook}
<a name="{$hook['name']}"/>
<table cellpadding="0" cellspacing="0" class="table widthfull space {if $hook['module_count'] >= 2} tableDnD{/if}" id="{$hook['id_hook']}">
<colgroup>
<col width="10"></col>
<col width="30"></col>
<col width="40"></col>
<col width=""></col>
<col width="50"></col>
</colgroup>
<tr class="nodrag nodrop"><th colspan="5"> {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)"/>
{/if}{$hook['title']} - <span style="color: red">{$hook['module_count']}</span> {if $hook['module_count'] > 1}{l s='modules'}{else}{l s='module'}{/if}
{if !empty($hook['description'])}
&nbsp;<span style="font-size:0.8em; font-weight: normal">[{$hook['description']}]</span>
{/if}
<span style="color:grey;">({l s='Technical name: '}{$hook['name']})</span></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",'} style="height: 42px;">
<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}
<img src="../modules/{$module['instance']->name}/logo.png" alt="{$module['instance']->name|stripslashes}" /> <h3>{$module['instance']->displayName|stripslashes}</h3>
<span>{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}</span><p>{$module['instance']->description}</p>
</div></td>
<td>
<a href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&editGraft{if $display_key}&show_modules={$display_key}{/if}&token={$token}">
<img src="../img/admin/edit.gif" border="0" alt="{l s='Edit'}" title="{l s='Edit'}" />
</a>
<a href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&deleteGraft{if $display_key}&show_modules={$display_key}{/if}&token={$token}">
<img src="../img/admin/delete.gif" border="0" alt="{l s='Delete'}" title="{l s='Delete'}" />
</a>
</td>
</tr>
{/if}
{/foreach}
{else}
<tr><td colspan="5">{l s='No module for this hook'}</td></tr>
{/if}
</table>
{/foreach}
<div id="unhook_button_position_bottom"><input class="button floatr" type="submit" name="unhookform" value="{l s='Unhook the selection'}"/></div>
</div>
</div>
</form>