[+] BO : new display of module list in all BO tabs
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
<div id="productBox">
|
||||
|
||||
{include file='controllers/modules/header.tpl'}
|
||||
<ul class="view-modules">
|
||||
<li class="button normal-view"><a href="index.php?controller={$smarty.get.controller|htmlentities}&token={$smarty.get.token|htmlentities}"><img src="themes/default/img/modules_view_layout_sidebar.png" alt="{l s='Normal view'}" border="0" /><span>{l s='Normal view'}</span></a></li>
|
||||
<li class="button favorites-view-disabled"><img src="themes/default/img/modules_view_table_select_row.png" alt="{l s='Favorites view'}" border="0" /><span>{l s='Favorites view'}</span></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="moduleContainer" style="padding:0px;margin:0px;padding-top:15px">
|
||||
@@ -16,6 +14,7 @@
|
||||
<col width="240px">
|
||||
<col width="">
|
||||
<col width="140px">
|
||||
<col width="250px">
|
||||
<col width="180px">
|
||||
<col width="70px">
|
||||
<col width="70px">
|
||||
@@ -27,6 +26,7 @@
|
||||
<th>{l s='Module Name'}</th>
|
||||
<th>{l s='Description'}</th>
|
||||
<th>{l s='Status'}</th>
|
||||
<th>{l s='Tab'}</th>
|
||||
<th>{l s='Categories:'}</th>
|
||||
<th>{l s='Interest'}</th>
|
||||
<th>{l s='Favorite'}</th>
|
||||
@@ -40,6 +40,22 @@
|
||||
<td><span class="moduleName">{$module->displayName}</span></td>
|
||||
<td><span class="moduleFavDesc">{$module->description|truncate:80:'...'}</span></td>
|
||||
<td>{if isset($module->id) && $module->id gt 0}<span class="setup">{l s='Installed'}</span>{else}<span class="setup non-install">{l s='Not Installed'}</span>{/if}</td>
|
||||
<td>
|
||||
{assign var="module_name" value=$module->name}
|
||||
<select class="chosen" multiple="multiple">
|
||||
{foreach $tabs AS $t}
|
||||
{if $t.active}
|
||||
<option {if isset($tab_modules_preferences.$module_name) && in_array($t.id_tab, $tab_modules_preferences.$module_name)} selected="selected" {/if} class="group" value="{$t.id_tab}">{if $t.name eq ''}{$t.class_name}{else}{$t.name}{/if}</option>
|
||||
{foreach from=$t.sub_tabs item=t2}
|
||||
{if $t2.active}
|
||||
{assign var="id_tab" value=$t.id_tab}
|
||||
<option {if isset($tab_modules_preferences.$module_name) && in_array($t2.id_tab, $tab_modules_preferences.$module_name)} selected="selected" {/if} value="{$t2.id_tab}"> {if $t2.name eq ''}{$t2.class_name}{else}{$t2.name|escape:'htmlall':'UTF-8'}{/if}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
<td>{$module->categoryName}</td>
|
||||
<td>
|
||||
<select name="i_{$module->name}" class="moduleFavorite" style="width:50px">
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
{*
|
||||
* 2007-2013 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-2013 PrestaShop SA
|
||||
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<tr class="{$class_row}">
|
||||
<td>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<img class="imgm" alt="" src="{if isset($module->image)}{$module->image}{else}../modules/{$module->name}/{$module->logo}{/if}">
|
||||
</td>
|
||||
<td>
|
||||
<div class="moduleDesc" id="anchor{$module->name|ucfirst}">
|
||||
<h3>{$module->displayName} {$module->version}
|
||||
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
||||
<span class="setup must-have">{l s='Must Have'}</span>
|
||||
{/if}
|
||||
</h3>
|
||||
<p class="desc">
|
||||
{if isset($module->description) && $module->description ne ''}
|
||||
{$module->description|truncate:100:'…'}
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tab_modules_actions_row">
|
||||
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
||||
<a href="{$module->addons_buy_url}" target="_blank" class="button updated">
|
||||
<span><img src="../img/admin/cart_addons.png"> {displayPrice price=$module->price currency=$module->id_currency}</span></a>
|
||||
{else}
|
||||
<a {if isset($module->id) && $module->id gt 0 && !empty($module->options.uninstall_onclick)}onclick="{$module->options.uninstall_onclick}"{/if} href="{if isset($module->id) && $module->id gt 0}{$module->options.uninstall_url}{else}{$module->options.install_url}{/if}" class="button installed">
|
||||
<span>{if isset($module->id) && $module->id gt 0}{l s='Uninstall'}{else}{l s='Install'}{/if}</span>
|
||||
</a>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="tab_modules_actions_row">
|
||||
<div class="row-actions-module">
|
||||
{if !isset($module->not_on_disk)}
|
||||
{$module->optionsHtml}
|
||||
<a href="#" class="button action_tab_module" data-option="select_{$module->name}" class="button">Valider</a>
|
||||
{else} {/if}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<!--
|
||||
|
||||
<td>
|
||||
<img class="imgm" alt="" src="{if isset($module->image)}{$module->image}{else}../modules/{$module->name}/{$module->logo}{/if}">
|
||||
<div>
|
||||
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
||||
<a href="{$module->addons_buy_url}" target="_blank" class="button updated">
|
||||
<span><img src="../img/admin/cart_addons.png"> {displayPrice price=$module->price currency=$module->id_currency}</span></a>
|
||||
{else}
|
||||
<a {if isset($module->id) && $module->id gt 0 && !empty($module->options.uninstall_onclick)}onclick="{$module->options.uninstall_onclick}"{/if} href="{if isset($module->id) && $module->id gt 0}{$module->options.uninstall_url}{else}{$module->options.install_url}{/if}" class="button installed">
|
||||
<span>{if isset($module->id) && $module->id gt 0}{l s='Uninstall'}{else}{l s='Install'}{/if}</span>
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="moduleDesc" id="anchor{$module->name|ucfirst}">
|
||||
<h3>{$module->displayName} {$module->version}
|
||||
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
||||
<span class="setup must-have">{l s='Must Have'}</span>
|
||||
{/if}
|
||||
</h3>
|
||||
<p class="desc">
|
||||
{if isset($module->description) && $module->description ne ''}
|
||||
{$module->description|truncate:100:'…'}
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
</p>
|
||||
<div class="row-actions-module" style="float:right">
|
||||
{if !isset($module->not_on_disk)}
|
||||
{$module->optionsHtml}
|
||||
<a href="#" class="button action_tab_module" data-option="select_{$module->name}" class="button">Valider</a>
|
||||
{else} {/if}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
-->
|
||||
@@ -0,0 +1,57 @@
|
||||
{*
|
||||
* 2007-2013 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-2013 PrestaShop SA
|
||||
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if isset($tab_modules_list) && !empty($tab_modules_list)}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('.action_tab_module').each( function (){
|
||||
$(this).click(function () {
|
||||
option = $('#'+$(this).data('option')+' :selected');
|
||||
/* if ($(option).data('onclick')) */
|
||||
window.location.href = $(option).data('href');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div id="tab_module_switch">
|
||||
<a href="#" onclick="$('#tab_modules_list_not_installed').hide();$('#tab_modules_list_installed').show();return false;" class="button">{l s='Installed'}</a>
|
||||
<a href="#" onclick="$('#tab_modules_list_installed').hide();$('#tab_modules_list_not_installed').show();return false;" class="button">{l s='Not Installed'}</a>
|
||||
</div>
|
||||
<table id="tab_modules_list_installed">
|
||||
{foreach from=$tab_modules_list.installed item=module}
|
||||
{include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",rowalt"}}
|
||||
{/foreach}
|
||||
</table>
|
||||
<table id="tab_modules_list_not_installed" style="display:none">
|
||||
{foreach from=$tab_modules_list.not_installed item=module}
|
||||
{include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",rowalt"}}
|
||||
{/foreach}
|
||||
</table>
|
||||
{else}
|
||||
<b>{l s='No modules available in this section.'}</b>
|
||||
{/if}
|
||||
<p><b><a href="{$admin_module_favorites_view}" style="color:#666">{l s='Click here to choose which modules to display here'}</a></b></p>
|
||||
Reference in New Issue
Block a user