Merge branch 'release' into development
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
|
||||
{if isset($module_content)}
|
||||
{$module_content}
|
||||
{else}
|
||||
|
||||
@@ -25,36 +25,26 @@
|
||||
|
||||
{if $add_permission eq '1'}
|
||||
{if isset($logged_on_addons)}
|
||||
|
||||
<!--start addons login-->
|
||||
<div class="filter-module" id="addons_login_div">
|
||||
|
||||
<p>{l s='You are logged into PrestaShop Addons.'}</p>
|
||||
|
||||
<div style="float:right">
|
||||
<label><img src="themes/default/img/module-profile.png" /> {l s='Welcome'} {$username_addons}</label>
|
||||
<label>|</label>
|
||||
<label><a href="#" id="addons_logout_button"><img src="themes/default/img/module-logout.png" /> {l s='Log out from PrestaShop Addons.'}</a></label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--end addons login-->
|
||||
|
||||
{else}
|
||||
|
||||
{if $check_url_fopen eq 'ko' OR $check_openssl eq 'ko'}
|
||||
|
||||
<div class="warn">
|
||||
<b>{l s='If you want to be able to fully use the AdminModules panel and have free modules available, you should enable the following configuration on your server:'}</b><br />
|
||||
{if $check_url_fopen eq 'ko'}- {l s='Enable allow_url_fopen'}<br />{/if}
|
||||
{if $check_openssl eq 'ko'}- {l s='Enable php openSSL extension'}<br />{/if}
|
||||
</div>
|
||||
|
||||
{else}
|
||||
|
||||
<!--start addons login-->
|
||||
<div class="filter-module" id="addons_login_div">
|
||||
|
||||
<p>{l s='Do you have a %s account?' sprintf='<a href="http://addons.prestashop.com/">PrestaShop Addons</a>'}</p>
|
||||
<form id="addons_login_form" method="post">
|
||||
<label>{l s='Login to Addons'} :</label> <input type="text" value="" id="username_addons" autocomplete="off" class="ac_input">
|
||||
@@ -62,67 +52,59 @@
|
||||
<input type="submit" class="button" id="addons_login_button" value="{l s='Log in'}">
|
||||
<br /><span id="addons_loading" style="color:red"></span>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--end addons login-->
|
||||
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
<div class="clear"> </div>
|
||||
{/if}
|
||||
|
||||
<!--start filter module-->
|
||||
<style>.ac_results { border:1px solid #C2C4D9; }</style>
|
||||
<div class="filter-module">
|
||||
<form id="filternameForm" method="post">
|
||||
<input type="text" value="" name="filtername" autocomplete="off" class="ac_input">
|
||||
<input type="submit" class="button" value="{l s='Search:'}">
|
||||
</form>
|
||||
<!--start filter module-->
|
||||
<style>.ac_results { border:1px solid #C2C4D9; }</style>
|
||||
<div class="filter-module">
|
||||
<form id="filternameForm" method="post">
|
||||
<input type="text" value="" name="filtername" autocomplete="off" class="ac_input">
|
||||
<input type="submit" class="button" value="{l s='Search:'}">
|
||||
</form>
|
||||
<form method="post">
|
||||
<div class="select-filter">
|
||||
<label class="search-filter">{l s='Sort by'}:</label>
|
||||
|
||||
<form method="post">
|
||||
|
||||
<div class="select-filter">
|
||||
<label class="search-filter">{l s='Sort by'}:</label>
|
||||
|
||||
<select name="module_type" id="module_type_filter" {if $showTypeModules ne 'allModules' && $showTypeModules ne ''}style="background-color:#49B2FF;color:white;"{/if}>
|
||||
<option value="allModules" {if $showTypeModules eq 'allModules'}selected="selected"{/if}>{l s='All Modules'}</option>
|
||||
<option value="nativeModules" {if $showTypeModules eq 'nativeModules'}selected="selected"{/if}>{l s='Free Modules'}</option>
|
||||
<option value="partnerModules" {if $showTypeModules eq 'partnerModules'}selected="selected"{/if}>{l s='Partner Modules (Free)'}</option>
|
||||
<option value="mustHaveModules" {if $showTypeModules eq 'mustHaveModules'}selected="selected"{/if}>{l s='Must Have'}</option>
|
||||
{if isset($logged_on_addons)}<option value="addonsModules" {if $showTypeModules eq 'addonsModules'}selected="selected"{/if}>{l s='Modules purchased on Addons'}</option>{/if}
|
||||
<optgroup label="{l s='Authors'}">
|
||||
{foreach from=$list_modules_authors key=module_author item=status}
|
||||
<option value="authorModules[{$module_author}]" {if $status eq "selected"}selected{/if}>{$module_author|truncate:20:'...'}</option>
|
||||
{/foreach}
|
||||
</optgroup>
|
||||
<option value="otherModules" {if $showTypeModules eq 'otherModules'}selected="selected"{/if}>{l s='Other Modules'}</option>
|
||||
</select>
|
||||
|
||||
<select name="module_install" id="module_install_filter" {if $showInstalledModules ne 'installedUninstalled' && $showInstalledModules ne ''}style="background-color:#49B2FF;color:white;"{/if}>
|
||||
<option value="installedUninstalled" {if $showInstalledModules eq 'installedUninstalled'}selected="selected"{/if}>{l s='Installed & Not Installed'}</option>
|
||||
<option value="installed" {if $showInstalledModules eq 'installed'}selected="selected"{/if}>{l s='Installed Modules'}</option>
|
||||
<option value="uninstalled" {if $showInstalledModules eq 'uninstalled'}selected="selected"{/if}>{l s='Modules Not Installed '}</option>
|
||||
</select>
|
||||
|
||||
<select name="module_status" id="module_status_filter" {if $showEnabledModules ne 'enabledDisabled' && $showEnabledModules ne ''}style="background-color:#49B2FF;color:white;"{/if}>
|
||||
<option value="enabledDisabled" {if $showEnabledModules eq 'enabledDisabled'}selected="selected"{/if}>{l s='Enabled & Disabled'}</option>
|
||||
<option value="enabled" {if $showEnabledModules eq 'enabled'}selected="selected"{/if}>{l s='Enabled Modules'}</option>
|
||||
<option value="disabled" {if $showEnabledModules eq 'disabled'}selected="selected"{/if}>{l s='Disabled Modules'}</option>
|
||||
</select>
|
||||
|
||||
<select name="country_module_value" id="country_module_value_filter" {if $showCountryModules eq 1}style="background-color:#49B2FF;color:white;"{/if}>
|
||||
<option value="0" >{l s='All countries'}</option>
|
||||
<option value="1" {if $showCountryModules eq 1}selected="selected"{/if}>{l s='Current country:'} {$nameCountryDefault}</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="button-filter">
|
||||
<input type="submit" value="{l s='Reset'}" name="resetFilterModules" class="button" />
|
||||
<input type="submit" value="{l s='Filter'}" id="filterModulesButton" name="filterModules" class="button" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--end filter module-->
|
||||
<select name="module_type" id="module_type_filter" {if $showTypeModules ne 'allModules' && $showTypeModules ne ''}style="background-color:#49B2FF;color:white;"{/if}>
|
||||
<option value="allModules" {if $showTypeModules eq 'allModules'}selected="selected"{/if}>{l s='All Modules'}</option>
|
||||
<option value="nativeModules" {if $showTypeModules eq 'nativeModules'}selected="selected"{/if}>{l s='Free Modules'}</option>
|
||||
<option value="partnerModules" {if $showTypeModules eq 'partnerModules'}selected="selected"{/if}>{l s='Partner Modules (Free)'}</option>
|
||||
<option value="mustHaveModules" {if $showTypeModules eq 'mustHaveModules'}selected="selected"{/if}>{l s='Must Have'}</option>
|
||||
{if isset($logged_on_addons)}<option value="addonsModules" {if $showTypeModules eq 'addonsModules'}selected="selected"{/if}>{l s='Modules purchased on Addons'}</option>{/if}
|
||||
<optgroup label="{l s='Authors'}">
|
||||
{foreach from=$list_modules_authors key=module_author item=status}
|
||||
<option value="authorModules[{$module_author}]" {if $status eq "selected"}selected{/if}>{$module_author|truncate:20:'...'}</option>
|
||||
{/foreach}
|
||||
</optgroup>
|
||||
<option value="otherModules" {if $showTypeModules eq 'otherModules'}selected="selected"{/if}>{l s='Other Modules'}</option>
|
||||
</select>
|
||||
|
||||
<select name="module_install" id="module_install_filter" {if $showInstalledModules ne 'installedUninstalled' && $showInstalledModules ne ''}style="background-color:#49B2FF;color:white;"{/if}>
|
||||
<option value="installedUninstalled" {if $showInstalledModules eq 'installedUninstalled'}selected="selected"{/if}>{l s='Installed & Not Installed'}</option>
|
||||
<option value="installed" {if $showInstalledModules eq 'installed'}selected="selected"{/if}>{l s='Installed Modules'}</option>
|
||||
<option value="uninstalled" {if $showInstalledModules eq 'uninstalled'}selected="selected"{/if}>{l s='Modules Not Installed '}</option>
|
||||
</select>
|
||||
|
||||
<select name="module_status" id="module_status_filter" {if $showEnabledModules ne 'enabledDisabled' && $showEnabledModules ne ''}style="background-color:#49B2FF;color:white;"{/if}>
|
||||
<option value="enabledDisabled" {if $showEnabledModules eq 'enabledDisabled'}selected="selected"{/if}>{l s='Enabled & Disabled'}</option>
|
||||
<option value="enabled" {if $showEnabledModules eq 'enabled'}selected="selected"{/if}>{l s='Enabled Modules'}</option>
|
||||
<option value="disabled" {if $showEnabledModules eq 'disabled'}selected="selected"{/if}>{l s='Disabled Modules'}</option>
|
||||
</select>
|
||||
|
||||
<select name="country_module_value" id="country_module_value_filter" {if $showCountryModules eq 1}style="background-color:#49B2FF;color:white;"{/if}>
|
||||
<option value="0" >{l s='All countries'}</option>
|
||||
<option value="1" {if $showCountryModules eq 1}selected="selected"{/if}>{l s='Current country:'} {$nameCountryDefault}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="button-filter">
|
||||
<input type="submit" value="{l s='Reset'}" name="resetFilterModules" class="button" />
|
||||
<input type="submit" value="{l s='Filter'}" id="filterModulesButton" name="filterModules" class="button" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!--end filter module-->
|
||||
|
||||
@@ -23,27 +23,23 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox toolbarHead">
|
||||
|
||||
<ul class="cc_button">
|
||||
{if $add_permission eq '1'}
|
||||
<li>
|
||||
<a id="desc-module-new" class="toolbar_btn" href="#top_container" onclick="$('#module_install').slideToggle();" title="{l s='Add a new module'}">
|
||||
<span class="process-icon-new-module" ></span>
|
||||
<div>{l s='Add a new module'}</div>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="pageTitle">
|
||||
<h3><span id="current_obj" style="font-weight: normal;"><span class="breadcrumb item-0">Module</span> : <span class="breadcrumb item-1">{l s='List of modules'}</span></span></h3>
|
||||
</div>
|
||||
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox toolbarHead">
|
||||
<ul class="cc_button">
|
||||
{if $add_permission eq '1'}
|
||||
<li>
|
||||
<a id="desc-module-new" class="toolbar_btn" href="#top_container" onclick="$('#module_install').slideToggle();" title="{l s='Add a new module'}">
|
||||
<span class="process-icon-new-module" ></span>
|
||||
<div>{l s='Add a new module'}</div>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
<div class="pageTitle">
|
||||
<h3><span id="current_obj" style="font-weight: normal;"><span class="breadcrumb item-0">Module</span> : <span class="breadcrumb item-1">{l s='List of modules'}</span></span></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $add_permission eq '1'}
|
||||
<div id="module_install" style="width:500px;margin-top:5px;{if !isset($smarty.post.downloadflag)}display: none;{/if}">
|
||||
|
||||
@@ -1,373 +1,327 @@
|
||||
{*
|
||||
* 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
|
||||
*}
|
||||
|
||||
<script type="text/javascript">{$autocompleteList}</script>
|
||||
<script type="text/javascript">
|
||||
var token = '{$token}';
|
||||
var currentIndex = '{$currentIndex}';
|
||||
var currentIndexWithToken = '{$currentIndex}&token={$token}';
|
||||
var dirNameCurrentIndex = '{$dirNameCurrentIndex}';
|
||||
var ajaxCurrentIndex = '{$ajaxCurrentIndex}';
|
||||
var installed_modules = {if isset($installed_modules) && count($installed_modules)}{$installed_modules}{else}false{/if};
|
||||
var by = '{l s='by'}';
|
||||
var errorLogin = '{l s='PrestaShop was unable to login to Addons. Please check your credentials and your internet connection.'}';
|
||||
var confirmPreferencesSaved = '{l s='Preferences saved'}';
|
||||
{if isset($smarty.get.anchor) && !isset($error_module)}var anchor = '{$smarty.get.anchor|htmlentities|replace:'(':''|replace:')':''|replace:'{':''|replace:'}':''|replace:'\'':''|replace:'/':''}';{else}var anchor = '';{/if}
|
||||
|
||||
{literal}
|
||||
|
||||
function getPrestaStore(){if(getE("prestastore").style.display!='block')return;$.post(dirNameCurrentIndex+"/ajax.php",{page:"prestastore"},function(a){getE("prestastore-content").innerHTML=a;})}
|
||||
function truncate_author(author){return ((author.length > 20) ? author.substring(0, 20)+"..." : author);}
|
||||
function modules_management(action)
|
||||
{
|
||||
var modules = document.getElementsByName('modules');
|
||||
var module_list = '';
|
||||
for (var i = 0; i < modules.length; i++)
|
||||
{
|
||||
if (modules[i].checked == true)
|
||||
{
|
||||
rel = modules[i].getAttribute('rel');
|
||||
if (rel != "false" && action == "uninstall")
|
||||
{
|
||||
if (!confirm(rel))
|
||||
return false;
|
||||
}
|
||||
module_list += '|'+modules[i].value;
|
||||
}
|
||||
}
|
||||
document.location.href=currentIndex+'&token='+token+'&'+action+'='+module_list.substring(1, module_list.length);
|
||||
}
|
||||
|
||||
$('document').ready( function() {
|
||||
// ScrollTo
|
||||
if (anchor != '')
|
||||
$.scrollTo('#'+anchor, 1200, {offset: -100});
|
||||
|
||||
// AutoComplete Search
|
||||
$('input[name="filtername"]').autocomplete(moduleList, {
|
||||
minChars: 0,
|
||||
width: 310,
|
||||
matchContains: true,
|
||||
highlightItem: true,
|
||||
formatItem: function(row, i, max, term) {
|
||||
var image = '../modules/'+row.name+'/logo.gif';
|
||||
if (row.image != '')
|
||||
image = row.image;
|
||||
return '<img src="'+image+'" style="float:left;margin:5px;width:16px;height:16px"><strong>'+row.displayName+'</strong>'+((row.author != '') ? ' ' + by + ' ' + truncate_author(row.author) : '') + '<br /><span style="font-size: 80%;">'+ row.desc +'</span><br/><div style="height:15px;padding-top:5px">'+ row.option +'</div>';
|
||||
},
|
||||
formatResult: function(row) {
|
||||
return row.displayName;
|
||||
}
|
||||
});
|
||||
$('input[name="filtername"]').result(function(event, data, formatted) {
|
||||
$('#filternameForm').submit();
|
||||
});
|
||||
|
||||
// Method to check / uncheck all modules checkbox
|
||||
$('#checkme').click(function()
|
||||
{
|
||||
if ($(this).attr("rel") == 'false')
|
||||
{
|
||||
$(this).attr("checked", true);
|
||||
$(this).attr("rel", "true");
|
||||
$("input[name=modules]").attr("checked", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).removeAttr("checked");
|
||||
$(this).attr("rel", "false");
|
||||
$("input[name=modules]").removeAttr("checked");
|
||||
}
|
||||
});
|
||||
|
||||
// Method to reload filter in ajax
|
||||
$('.categoryModuleFilterLink').click(function()
|
||||
{
|
||||
$('.categoryModuleFilterLink').css('background-color', 'white');
|
||||
$(this).css('background-color', '#EBEDF4');
|
||||
var ajaxReloadCurrentIndex = $(this).find('a').attr('href').replace('index.php', 'ajax-tab.php');
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxReloadCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "reloadModulesList"
|
||||
},
|
||||
beforeSend: function(xhr)
|
||||
{
|
||||
$('#moduleContainer').html('<img src="../img/loader.gif" alt="" border="0" />');
|
||||
},
|
||||
success : function(data)
|
||||
{
|
||||
$('#moduleContainer').html(data);
|
||||
},
|
||||
error: function(res,textStatus,jqXHR)
|
||||
{
|
||||
//jAlert("TECHNICAL ERROR"+res);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
|
||||
// Method to get modules_list.xml from prestashop.com and default_country_modules_list.xml from addons.prestashop.com
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajaxMode : "1",
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "refreshModuleList"
|
||||
},
|
||||
success : function(data)
|
||||
{
|
||||
// res.status = cache or refresh
|
||||
if (data == '{"status":"refresh"}')
|
||||
window.location.href = window.location.href;
|
||||
},
|
||||
error: function(res,textStatus,jqXHR)
|
||||
{
|
||||
//jAlert("TECHNICAL ERROR"+res);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e) { }
|
||||
|
||||
// Method to log on PrestaShop Addons WebServices
|
||||
$('#addons_login_button').click(function()
|
||||
{
|
||||
var username_addons = $("#username_addons").val();
|
||||
var password_addons = $("#password_addons").val();
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "logOnAddonsWebservices",
|
||||
username_addons : username_addons,
|
||||
password_addons : password_addons
|
||||
},
|
||||
beforeSend: function(xhr)
|
||||
{
|
||||
$('#addons_loading').html('<img src="../img/loader.gif" alt="" border="0" />');
|
||||
},
|
||||
success : function(data)
|
||||
{
|
||||
// res.status = cache or refresh
|
||||
if (data == 'OK')
|
||||
{
|
||||
$('#addons_loading').html('');
|
||||
$('#addons_login_div').fadeOut();
|
||||
window.location.href = currentIndexWithToken;
|
||||
}
|
||||
else
|
||||
$('#addons_loading').html(errorLogin);
|
||||
},
|
||||
error: function(res,textStatus,jqXHR)
|
||||
{
|
||||
//jAlert("TECHNICAL ERROR"+res);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
|
||||
// Method to log out PrestaShop Addons WebServices
|
||||
$('#addons_logout_button').click(function()
|
||||
{
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "logOutAddonsWebservices"
|
||||
},
|
||||
beforeSend: function(xhr)
|
||||
{
|
||||
$('#addons_loading').html('<img src="../img/loader.gif" alt="" border="0" />');
|
||||
},
|
||||
success : function(data)
|
||||
{
|
||||
// res.status = cache or refresh
|
||||
if (data == 'OK')
|
||||
{
|
||||
$('#addons_loading').html('');
|
||||
$('#addons_login_div').fadeOut();
|
||||
window.location.href = currentIndexWithToken;
|
||||
}
|
||||
else
|
||||
$('#addons_loading').html(errorLogin);
|
||||
},
|
||||
error: function(res,textStatus,jqXHR)
|
||||
{
|
||||
//jAlert("TECHNICAL ERROR"+res);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
|
||||
// Method to set filter on modules
|
||||
function setFilter()
|
||||
{
|
||||
var module_type = $("#module_type_filter").val();
|
||||
var module_install = $("#module_install_filter").val();
|
||||
var module_status = $("#module_status_filter").val();
|
||||
var country_module_value = $("#country_module_value_filter").val();
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "setFilter",
|
||||
module_type : module_type,
|
||||
module_install : module_install,
|
||||
module_status : module_status,
|
||||
country_module_value : country_module_value,
|
||||
filterModules : 'Filter'
|
||||
},
|
||||
success : function(data)
|
||||
{
|
||||
// res.status = cache or refresh
|
||||
if (data == 'OK')
|
||||
window.location.href = currentIndexWithToken;
|
||||
},
|
||||
error: function(res,textStatus,jqXHR)
|
||||
{
|
||||
//jAlert("TECHNICAL ERROR"+res);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
return false;
|
||||
}
|
||||
$('#module_type_filter').change(function() { setFilter(); });
|
||||
$('#module_install_filter').change(function() { setFilter(); });
|
||||
$('#module_status_filter').change(function() { setFilter(); });
|
||||
$('#country_module_value_filter').change(function() { setFilter(); });
|
||||
|
||||
|
||||
$('.moduleTabPreferencesChoise').change(function()
|
||||
{
|
||||
var value_pref = $(this).val();
|
||||
var module_pref = $(this).attr('name');
|
||||
module_pref = module_pref.substring(2, module_pref.length);
|
||||
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "saveTabModulePreferences",
|
||||
module_pref : module_pref,
|
||||
value_pref : value_pref
|
||||
},
|
||||
success : function(data)
|
||||
{
|
||||
// res.status = cache or refresh
|
||||
if (data == 'OK')
|
||||
$('#r_' + module_pref).html(confirmPreferencesSaved);
|
||||
},
|
||||
error: function(res,textStatus,jqXHR)
|
||||
{
|
||||
//jAlert("TECHNICAL ERROR"+res);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
// Method to save favorites preferences
|
||||
$('.moduleFavorite').change(function()
|
||||
{
|
||||
var value_pref = $(this).val();
|
||||
var module_pref = $(this).attr('name');
|
||||
var action_pref = module_pref.substring(0, 1);
|
||||
module_pref = module_pref.substring(2, module_pref.length);
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "saveFavoritePreferences",
|
||||
action_pref : action_pref,
|
||||
module_pref : module_pref,
|
||||
value_pref : value_pref
|
||||
},
|
||||
success : function(data)
|
||||
{
|
||||
// res.status = cache or refresh
|
||||
if (data == 'OK')
|
||||
$('#r_' + module_pref).html(confirmPreferencesSaved);
|
||||
},
|
||||
error: function(res,textStatus,jqXHR)
|
||||
{
|
||||
//jAlert("TECHNICAL ERROR"+res);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
{/literal}
|
||||
{*
|
||||
* 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
|
||||
*}
|
||||
|
||||
<script type="text/javascript">{$autocompleteList}</script>
|
||||
<script type="text/javascript">
|
||||
var token = '{$token}';
|
||||
var currentIndex = '{$currentIndex}';
|
||||
var currentIndexWithToken = '{$currentIndex}&token={$token}';
|
||||
var dirNameCurrentIndex = '{$dirNameCurrentIndex}';
|
||||
var ajaxCurrentIndex = '{$ajaxCurrentIndex}';
|
||||
var installed_modules = {if isset($installed_modules) && count($installed_modules)}{$installed_modules}{else}false{/if};
|
||||
var by = '{l s='by'}';
|
||||
var errorLogin = '{l s='PrestaShop was unable to login to Addons. Please check your credentials and your internet connection.'}';
|
||||
var confirmPreferencesSaved = '{l s='Preferences saved'}';
|
||||
{if isset($smarty.get.anchor) && !isset($error_module)}var anchor = '{$smarty.get.anchor|htmlentities|replace:'(':''|replace:')':''|replace:'{':''|replace:'}':''|replace:'\'':''|replace:'/':''}';{else}var anchor = '';{/if}
|
||||
|
||||
{literal}
|
||||
|
||||
function getPrestaStore(){if(getE("prestastore").style.display!='block')return;$.post(dirNameCurrentIndex+"/ajax.php",{page:"prestastore"},function(a){getE("prestastore-content").innerHTML=a;})}
|
||||
function truncate_author(author){return ((author.length > 20) ? author.substring(0, 20)+"..." : author);}
|
||||
function modules_management(action)
|
||||
{
|
||||
var modules = document.getElementsByName('modules');
|
||||
var module_list = '';
|
||||
for (var i = 0; i < modules.length; i++)
|
||||
{
|
||||
if (modules[i].checked == true)
|
||||
{
|
||||
rel = modules[i].getAttribute('rel');
|
||||
if (rel != "false" && action == "uninstall")
|
||||
{
|
||||
if (!confirm(rel))
|
||||
return false;
|
||||
}
|
||||
module_list += '|'+modules[i].value;
|
||||
}
|
||||
}
|
||||
document.location.href=currentIndex+'&token='+token+'&'+action+'='+module_list.substring(1, module_list.length);
|
||||
}
|
||||
|
||||
$('document').ready( function() {
|
||||
// ScrollTo
|
||||
if (anchor != '')
|
||||
$.scrollTo('#'+anchor, 1200, {offset: -100});
|
||||
|
||||
// AutoComplete Search
|
||||
$('input[name="filtername"]').autocomplete(moduleList, {
|
||||
minChars: 0,
|
||||
width: 310,
|
||||
matchContains: true,
|
||||
highlightItem: true,
|
||||
formatItem: function(row, i, max, term) {
|
||||
var image = '../modules/'+row.name+'/logo.gif';
|
||||
if (row.image != '')
|
||||
image = row.image;
|
||||
return '<img src="'+image+'" style="float:left;margin:5px;width:16px;height:16px"><strong>'+row.displayName+'</strong>'+((row.author != '') ? ' ' + by + ' ' + truncate_author(row.author) : '') + '<br /><span style="font-size: 80%;">'+ row.desc +'</span><br/><div style="height:15px;padding-top:5px">'+ row.option +'</div>';
|
||||
},
|
||||
formatResult: function(row) {
|
||||
return row.displayName;
|
||||
}
|
||||
});
|
||||
$('input[name="filtername"]').result(function(event, data, formatted) {
|
||||
$('#filternameForm').submit();
|
||||
});
|
||||
|
||||
// Method to check / uncheck all modules checkbox
|
||||
$('#checkme').click(function()
|
||||
{
|
||||
if ($(this).attr("rel") == 'false')
|
||||
{
|
||||
$(this).attr("checked", true);
|
||||
$(this).attr("rel", "true");
|
||||
$("input[name=modules]").attr("checked", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).removeAttr("checked");
|
||||
$(this).attr("rel", "false");
|
||||
$("input[name=modules]").removeAttr("checked");
|
||||
}
|
||||
});
|
||||
|
||||
// Method to reload filter in ajax
|
||||
$('.categoryModuleFilterLink').click(function()
|
||||
{
|
||||
$('.categoryModuleFilterLink').css('background-color', 'white');
|
||||
$(this).css('background-color', '#EBEDF4');
|
||||
var ajaxReloadCurrentIndex = $(this).find('a').attr('href').replace('index.php', 'ajax-tab.php');
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxReloadCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "reloadModulesList"
|
||||
},
|
||||
beforeSend: function(xhr){
|
||||
$('#moduleContainer').html('<img src="../img/loader.gif" alt="" border="0" />');
|
||||
},
|
||||
success: function(data){
|
||||
$('#moduleContainer').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
|
||||
// Method to get modules_list.xml from prestashop.com and default_country_modules_list.xml from addons.prestashop.com
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url: ajaxCurrentIndex,
|
||||
async: true,
|
||||
data: {
|
||||
ajaxMode : "1",
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "refreshModuleList"
|
||||
},
|
||||
success: function(data){
|
||||
if (data == '{"status":"refresh"}')
|
||||
window.location.href = window.location.href;
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e) { }
|
||||
|
||||
// Method to log on PrestaShop Addons WebServices
|
||||
$('#addons_login_button').click(function()
|
||||
{
|
||||
var username_addons = $("#username_addons").val();
|
||||
var password_addons = $("#password_addons").val();
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "logOnAddonsWebservices",
|
||||
username_addons : username_addons,
|
||||
password_addons : password_addons
|
||||
},
|
||||
beforeSend: function(xhr){
|
||||
$('#addons_loading').html('<img src="../img/loader.gif" alt="" border="0" />');
|
||||
},
|
||||
success : function(data){
|
||||
if (data == 'OK')
|
||||
{
|
||||
$('#addons_loading').html('');
|
||||
$('#addons_login_div').fadeOut();
|
||||
window.location.href = currentIndexWithToken;
|
||||
}
|
||||
else
|
||||
$('#addons_loading').html(errorLogin);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
|
||||
// Method to log out PrestaShop Addons WebServices
|
||||
$('#addons_logout_button').click(function()
|
||||
{
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "logOutAddonsWebservices"
|
||||
},
|
||||
beforeSend: function(xhr){
|
||||
$('#addons_loading').html('<img src="../img/loader.gif" alt="" border="0" />');
|
||||
},
|
||||
success: function(data) {
|
||||
if (data == 'OK')
|
||||
{
|
||||
$('#addons_loading').html('');
|
||||
$('#addons_login_div').fadeOut();
|
||||
window.location.href = currentIndexWithToken;
|
||||
}
|
||||
else
|
||||
$('#addons_loading').html(errorLogin);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
|
||||
// Method to set filter on modules
|
||||
function setFilter()
|
||||
{
|
||||
var module_type = $("#module_type_filter").val();
|
||||
var module_install = $("#module_install_filter").val();
|
||||
var module_status = $("#module_status_filter").val();
|
||||
var country_module_value = $("#country_module_value_filter").val();
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "setFilter",
|
||||
module_type : module_type,
|
||||
module_install : module_install,
|
||||
module_status : module_status,
|
||||
country_module_value : country_module_value,
|
||||
filterModules : 'Filter'
|
||||
},
|
||||
success : function(data){
|
||||
if (data == 'OK')
|
||||
window.location.href = currentIndexWithToken;
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
return false;
|
||||
}
|
||||
$('#module_type_filter').change(function() { setFilter(); });
|
||||
$('#module_install_filter').change(function() { setFilter(); });
|
||||
$('#module_status_filter').change(function() { setFilter(); });
|
||||
$('#country_module_value_filter').change(function() { setFilter(); });
|
||||
|
||||
$('.moduleTabPreferencesChoise').change(function()
|
||||
{
|
||||
var value_pref = $(this).val();
|
||||
var module_pref = $(this).attr('name');
|
||||
module_pref = module_pref.substring(2, module_pref.length);
|
||||
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "saveTabModulePreferences",
|
||||
module_pref : module_pref,
|
||||
value_pref : value_pref
|
||||
},
|
||||
success : function(data){
|
||||
if (data == 'OK')
|
||||
$('#r_' + module_pref).html(confirmPreferencesSaved);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Method to save favorites preferences
|
||||
$('.moduleFavorite').change(function()
|
||||
{
|
||||
var value_pref = $(this).val();
|
||||
var module_pref = $(this).attr('name');
|
||||
var action_pref = module_pref.substring(0, 1);
|
||||
module_pref = module_pref.substring(2, module_pref.length);
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "saveFavoritePreferences",
|
||||
action_pref : action_pref,
|
||||
module_pref : module_pref,
|
||||
value_pref : value_pref
|
||||
},
|
||||
success : function(data){
|
||||
if (data == 'OK')
|
||||
$('#r_' + module_pref).html(confirmPreferencesSaved);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
{/literal}
|
||||
</script>
|
||||
@@ -1,122 +1,115 @@
|
||||
{*
|
||||
* 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 count($modules)}
|
||||
|
||||
<table cellspacing="0" cellpadding="0" style="width: 100%; margin-bottom:10px;" class="table" id="">
|
||||
<col width="20px">
|
||||
<col width="40px">
|
||||
<col>
|
||||
<col width="150px">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="nodrag nodrop">
|
||||
<th class="center">
|
||||
<input type="checkbox" rel="false" class="noborder" id="checkme"><br>
|
||||
</th>
|
||||
<th class="center"></th>
|
||||
<th>{l s='Module name'}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tbody>
|
||||
{foreach from=$modules item=module}
|
||||
<tr>
|
||||
<td>
|
||||
{if (isset($module->id) && $module->id > 0) || !isset($module->type) || $module->type != 'addonsMustHave'}
|
||||
<input type="checkbox" name="modules" value="{$module->name}"
|
||||
{if !isset($module->confirmUninstall) OR empty($module->confirmUninstall)}rel="false"{else}rel="{$module->confirmUninstall|addslashes}"{/if}
|
||||
class="noborder">
|
||||
{/if}
|
||||
</td>
|
||||
<td><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}
|
||||
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
||||
<span class="setup must-have">{l s='Must Have'}</span>
|
||||
{else}
|
||||
{if isset($module->id) && $module->id gt 0}
|
||||
<span class="setup{if isset($module->active) && $module->active eq 0} off{/if}">{l s='Installed'}</span>
|
||||
{else}
|
||||
<span class="setup non-install">{l s='Not installed'}</span>
|
||||
{/if}
|
||||
{/if}
|
||||
</h3>
|
||||
<div class="metadata">
|
||||
{if isset($module->author) && !empty($module->author)}
|
||||
<dl class="">
|
||||
<dt>{l s='Developed by'} :</dt>
|
||||
<dd>{$module->author|truncate:20:'...'}</dd>|
|
||||
</dl>
|
||||
{/if}
|
||||
<dl class="">
|
||||
<dt>{l s='Version'} :</dt>
|
||||
<dd>{$module->version}
|
||||
{if isset($module->version_addons)}({l s='Update'} {$module->version_addons} {l s='Available on PrestaShop Addons'}){/if}
|
||||
</dd>|
|
||||
</dl>
|
||||
<dl class="">
|
||||
<dt>{l s='Category'} :</dt>
|
||||
<dd>{$module->categoryName}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p class="desc">{if isset($module->description) && $module->description ne ''}{l s='Description'} : {$module->description}{else} {/if}</p>
|
||||
{if isset($module->message)}<div class="conf">{$module->message}</div>{/if}
|
||||
<div class="row-actions-module">
|
||||
{if !isset($module->not_on_disk)}{$module->optionsHtml}{else} {/if}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul id="list-action-button">
|
||||
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
||||
<li>
|
||||
<a href="{$module->addons_buy_url}" target="_blank" class="button updated"><span><img src="../img/admin/cart_addons.png"> {if isset($module->id_currency) && isset($module->price)}{displayPrice price=$module->price currency=$module->id_currency}{/if}</span></a>
|
||||
</li>
|
||||
{else}
|
||||
{if $module->id && isset($module->version_addons) && $module->version_addons}
|
||||
<li><a href="{$module->options.update_url}" class="button updated"><span>{l s='Update it!'}</span></a></li>
|
||||
{/if}
|
||||
<li>
|
||||
<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>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div style="margin-top: 12px;">
|
||||
<input type="button" class="button big" value="{l s='Install the selection'}" onclick="modules_management('install')"/>
|
||||
<input type="button" class="button big" value="{l s='Uninstall the selection'}" onclick="modules_management('uninstall')" />
|
||||
</div>
|
||||
{else}
|
||||
<div style="margin-top: 12px;color: #585A69;font-size: 16px;"><p align="center">{l s='No modules available in this section.'}</p></div>
|
||||
{/if}
|
||||
|
||||
{*
|
||||
* 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 count($modules)}
|
||||
<table cellspacing="0" cellpadding="0" style="width: 100%; margin-bottom:10px;" class="table" id="">
|
||||
<thead>
|
||||
<tr class="nodrag nodrop">
|
||||
<th class="center">
|
||||
<input type="checkbox" rel="false" class="noborder" id="checkme"><br>
|
||||
</th>
|
||||
<th class="center"></th>
|
||||
<th>{l s='Module name'}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tbody>
|
||||
{foreach from=$modules item=module}
|
||||
<tr>
|
||||
<td>
|
||||
{if (isset($module->id) && $module->id > 0) || !isset($module->type) || $module->type != 'addonsMustHave'}
|
||||
<input type="checkbox" name="modules" value="{$module->name}"
|
||||
{if !isset($module->confirmUninstall) OR empty($module->confirmUninstall)}rel="false"{else}rel="{$module->confirmUninstall|addslashes}"{/if}
|
||||
class="noborder">
|
||||
{/if}
|
||||
</td>
|
||||
<td><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}
|
||||
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
||||
<span class="setup must-have">{l s='Must Have'}</span>
|
||||
{else}
|
||||
{if isset($module->id) && $module->id gt 0}
|
||||
<span class="setup{if isset($module->active) && $module->active eq 0} off{/if}">{l s='Installed'}</span>
|
||||
{else}
|
||||
<span class="setup non-install">{l s='Not installed'}</span>
|
||||
{/if}
|
||||
{/if}
|
||||
</h3>
|
||||
<div class="metadata">
|
||||
{if isset($module->author) && !empty($module->author)}
|
||||
<dl class="">
|
||||
<dt>{l s='Developed by'} :</dt>
|
||||
<dd>{$module->author|truncate:20:'...'}</dd>|
|
||||
</dl>
|
||||
{/if}
|
||||
<dl class="">
|
||||
<dt>{l s='Version'} :</dt>
|
||||
<dd>{$module->version}
|
||||
{if isset($module->version_addons)}({l s='Update'} {$module->version_addons} {l s='Available on PrestaShop Addons'}){/if}
|
||||
</dd>|
|
||||
</dl>
|
||||
<dl class="">
|
||||
<dt>{l s='Category'} :</dt>
|
||||
<dd>{$module->categoryName}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p class="desc">{if isset($module->description) && $module->description ne ''}{l s='Description'} : {$module->description}{else} {/if}</p>
|
||||
{if isset($module->message)}<div class="conf">{$module->message}</div>{/if}
|
||||
<div class="row-actions-module">
|
||||
{if !isset($module->not_on_disk)}{$module->optionsHtml}{else} {/if}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul id="list-action-button">
|
||||
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
||||
<li>
|
||||
<a href="{$module->addons_buy_url}" target="_blank" class="button updated"><span><img src="../img/admin/cart_addons.png"> {if isset($module->id_currency) && isset($module->price)}{displayPrice price=$module->price currency=$module->id_currency}{/if}</span></a>
|
||||
</li>
|
||||
{else}
|
||||
{if $module->id && isset($module->version_addons) && $module->version_addons}
|
||||
<li><a href="{$module->options.update_url}" class="button updated"><span>{l s='Update it!'}</span></a></li>
|
||||
{/if}
|
||||
<li>
|
||||
<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>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div style="margin-top: 12px;">
|
||||
<input type="button" class="button big" value="{l s='Install the selection'}" onclick="modules_management('install')"/>
|
||||
<input type="button" class="button big" value="{l s='Uninstall the selection'}" onclick="modules_management('uninstall')" />
|
||||
</div>
|
||||
{else}
|
||||
<div style="margin-top: 12px;color: #585A69;font-size: 16px;"><p align="center">{l s='No modules available in this section.'}</p></div>
|
||||
{/if}
|
||||
|
||||
@@ -24,14 +24,12 @@
|
||||
*}
|
||||
|
||||
<div id="productBox">
|
||||
|
||||
{include file='controllers/modules/header.tpl'}
|
||||
{include file='controllers/modules/filters.tpl'}
|
||||
|
||||
<ul class="view-modules">
|
||||
<li class="button normal-view-disabled"><img src="themes/default/img/modules_view_layout_sidebar.png" alt="{l s='Normal view'}" border="0" /><span>{l s='Normal view'}</span></li>
|
||||
<li class="button favorites-view"><a href="index.php?controller={$smarty.get.controller|htmlentities}&token={$smarty.get.token|htmlentities}&select=favorites"><img src="themes/default/img/modules_view_table_select_row.png" alt="{l s='Favorites view'}" border="0" /><span>{l s='Favorites view'}</span></a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div id="container">
|
||||
@@ -58,10 +56,8 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="moduleContainer">
|
||||
{include file='controllers/modules/list.tpl'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user