@@ -50,9 +50,8 @@ class Module extends BaseAction implements EventSubscriberInterface
|
|||||||
public function toggleActivation(ModuleToggleActivationEvent $event)
|
public function toggleActivation(ModuleToggleActivationEvent $event)
|
||||||
{
|
{
|
||||||
if (null !== $module = ModuleQuery::create()->findPk($event->getModuleId())) {
|
if (null !== $module = ModuleQuery::create()->findPk($event->getModuleId())) {
|
||||||
$moduleClass = new \ReflectionClass($module->getFullNamespace());
|
|
||||||
|
|
||||||
$moduleInstance = $moduleClass->newInstance();
|
$moduleInstance = $module->createInstance();
|
||||||
|
|
||||||
if ( method_exists($moduleInstance, 'setContainer')) {
|
if ( method_exists($moduleInstance, 'setContainer')) {
|
||||||
$moduleInstance->setContainer($this->container);
|
$moduleInstance->setContainer($this->container);
|
||||||
@@ -85,12 +84,11 @@ class Module extends BaseAction implements EventSubscriberInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$reflected = new \ReflectionClass($module->getFullNamespace());
|
$instance = $module->createInstance();
|
||||||
|
|
||||||
$instance = $reflected->newInstance();
|
|
||||||
$instance->setContainer($this->container);
|
$instance->setContainer($this->container);
|
||||||
|
|
||||||
$path = dirname($reflected->getFileName());
|
$path = $module->getAbsoluteBaseDir();
|
||||||
|
|
||||||
$instance->destroy($con, $event->getDeleteData());
|
$instance->destroy($con, $event->getDeleteData());
|
||||||
|
|
||||||
|
|||||||
@@ -52,9 +52,7 @@ class ModuleActivateCommand extends BaseModuleGenerate
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$moduleReflection = new \ReflectionClass($module->getFullNamespace());
|
$moduleInstance = $module->createInstance();
|
||||||
|
|
||||||
$moduleInstance = $moduleReflection->newInstance();
|
|
||||||
|
|
||||||
$moduleInstance->activate();
|
$moduleInstance->activate();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|||||||
@@ -52,9 +52,7 @@ class ModuleDeactivateCommand extends BaseModuleGenerate
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$moduleReflection = new \ReflectionClass($module->getFullNamespace());
|
$moduleInstance = $module->createInstance();
|
||||||
|
|
||||||
$moduleInstance = $moduleReflection->newInstance();
|
|
||||||
|
|
||||||
$moduleInstance->deActivate();
|
$moduleInstance->deActivate();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|||||||
@@ -124,6 +124,9 @@
|
|||||||
<form name="thelia.admin.module.modification" class="Thelia\Form\ModuleModificationForm"/>
|
<form name="thelia.admin.module.modification" class="Thelia\Form\ModuleModificationForm"/>
|
||||||
|
|
||||||
<form name="thelia.cache.flush" class="Thelia\Form\Cache\CacheFlushForm"/>
|
<form name="thelia.cache.flush" class="Thelia\Form\Cache\CacheFlushForm"/>
|
||||||
|
<form name="thelia.assets.flush" class="Thelia\Form\Cache\AssetsFlushForm"/>
|
||||||
|
<form name="thelia.images-and-documents-cache.flush" class="Thelia\Form\Cache\ImagesAndDocumentsCacheFlushForm"/>
|
||||||
|
|
||||||
</forms>
|
</forms>
|
||||||
|
|
||||||
</config>
|
</config>
|
||||||
|
|||||||
@@ -1004,6 +1004,14 @@
|
|||||||
<default key="_controller">Thelia\Controller\Admin\AdvancedConfigurationController::flushCacheAction</default>
|
<default key="_controller">Thelia\Controller\Admin\AdvancedConfigurationController::flushCacheAction</default>
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
|
<route id="admin.configuration.advanced.flush-assets" path="/admin/configuration/advanced/flush-assets">
|
||||||
|
<default key="_controller">Thelia\Controller\Admin\AdvancedConfigurationController::flushAssetsAction</default>
|
||||||
|
</route>
|
||||||
|
|
||||||
|
<route id="admin.configuration.advanced.flush-images-and-documents" path="/admin/configuration/advanced/flush-images-and-documents">
|
||||||
|
<default key="_controller">Thelia\Controller\Admin\AdvancedConfigurationController::flushImagesAndDocumentsAction</default>
|
||||||
|
</route>
|
||||||
|
|
||||||
<!-- and cache route management -->
|
<!-- and cache route management -->
|
||||||
|
|
||||||
<!-- Modules rule management -->
|
<!-- Modules rule management -->
|
||||||
|
|||||||
@@ -16,8 +16,12 @@ use Thelia\Core\Event\Cache\CacheEvent;
|
|||||||
use Thelia\Core\Event\TheliaEvents;
|
use Thelia\Core\Event\TheliaEvents;
|
||||||
use Thelia\Core\Security\AccessManager;
|
use Thelia\Core\Security\AccessManager;
|
||||||
use Thelia\Core\Security\Resource\AdminResources;
|
use Thelia\Core\Security\Resource\AdminResources;
|
||||||
|
use Thelia\Form\Cache\AssetsFlushForm;
|
||||||
use Thelia\Form\Cache\CacheFlushForm;
|
use Thelia\Form\Cache\CacheFlushForm;
|
||||||
|
use Thelia\Form\Cache\ImagesAndDocumentsCacheFlushForm;
|
||||||
use Thelia\Form\Exception\FormValidationException;
|
use Thelia\Form\Exception\FormValidationException;
|
||||||
|
use Thelia\Log\Tlog;
|
||||||
|
use Thelia\Model\ConfigQuery;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CacheController
|
* Class CacheController
|
||||||
@@ -49,12 +53,53 @@ class AdvancedConfigurationController extends BaseAdminController
|
|||||||
$event = new CacheEvent($this->container->getParameter("kernel.cache_dir"));
|
$event = new CacheEvent($this->container->getParameter("kernel.cache_dir"));
|
||||||
$this->dispatch(TheliaEvents::CACHE_CLEAR, $event);
|
$this->dispatch(TheliaEvents::CACHE_CLEAR, $event);
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Tlog::getInstance()->addError(sprintf("Flush cache error: %s", $e->getMessage()));
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->redirectToRoute('admin.configuration.advanced');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function flushAssetsAction()
|
||||||
|
{
|
||||||
|
if (null !== $result = $this->checkAuth(AdminResources::ADVANCED_CONFIGURATION, [], AccessManager::UPDATE)) {
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
$form = new AssetsFlushForm($this->getRequest());
|
||||||
|
try {
|
||||||
|
$this->validateForm($form);
|
||||||
|
|
||||||
$event = new CacheEvent(THELIA_WEB_DIR . "assets");
|
$event = new CacheEvent(THELIA_WEB_DIR . "assets");
|
||||||
$this->dispatch(TheliaEvents::CACHE_CLEAR, $event);
|
$this->dispatch(TheliaEvents::CACHE_CLEAR, $event);
|
||||||
|
|
||||||
$this->redirectToRoute('admin.configuration.advanced');
|
} catch (\Exception $e) {
|
||||||
} catch (FormValidationException $e) {
|
Tlog::getInstance()->addError(sprintf("Flush assets error: %s", $e->getMessage()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
$this->redirectToRoute('admin.configuration.advanced');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function flushImagesAndDocumentsAction()
|
||||||
|
{
|
||||||
|
if (null !== $result = $this->checkAuth(AdminResources::ADVANCED_CONFIGURATION, [], AccessManager::UPDATE)) {
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
$form = new ImagesAndDocumentsCacheFlushForm($this->getRequest());
|
||||||
|
try {
|
||||||
|
$this->validateForm($form);
|
||||||
|
|
||||||
|
$event = new CacheEvent(THELIA_WEB_DIR . ConfigQuery::read('image_cache_dir_from_web_root', 'cache'));
|
||||||
|
$this->dispatch(TheliaEvents::CACHE_CLEAR, $event);
|
||||||
|
|
||||||
|
$event = new CacheEvent(THELIA_WEB_DIR . ConfigQuery::read('document_cache_dir_from_web_root', 'cache'));
|
||||||
|
$this->dispatch(TheliaEvents::CACHE_CLEAR, $event);
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Tlog::getInstance()->addError(sprintf("Flush images and document error: %s", $e->getMessage()));
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->redirectToRoute('admin.configuration.advanced');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,8 +168,21 @@ class Module extends BaseI18nLoop implements PropelSearchLoopInterface
|
|||||||
{
|
{
|
||||||
/** @var \Thelia\Model\Module $module */
|
/** @var \Thelia\Model\Module $module */
|
||||||
foreach ($loopResult->getResultDataCollection() as $module) {
|
foreach ($loopResult->getResultDataCollection() as $module) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
new \ReflectionClass($module->getFullNamespace());
|
||||||
|
|
||||||
|
$exists = true;
|
||||||
|
}
|
||||||
|
catch(\ReflectionException $ex) {
|
||||||
|
$exists = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($exists || $this->getBackendContext()) {
|
||||||
$loopResultRow = new LoopResultRow($module);
|
$loopResultRow = new LoopResultRow($module);
|
||||||
$loopResultRow->set("ID", $module->getId())
|
|
||||||
|
$loopResultRow
|
||||||
|
->set("ID" , $module->getId())
|
||||||
->set("IS_TRANSLATED", $module->getVirtualColumn('IS_TRANSLATED'))
|
->set("IS_TRANSLATED", $module->getVirtualColumn('IS_TRANSLATED'))
|
||||||
->set("LOCALE" , $this->locale)
|
->set("LOCALE" , $this->locale)
|
||||||
->set("TITLE" , $module->getVirtualColumn('i18n_TITLE'))
|
->set("TITLE" , $module->getVirtualColumn('i18n_TITLE'))
|
||||||
@@ -180,7 +193,9 @@ class Module extends BaseI18nLoop implements PropelSearchLoopInterface
|
|||||||
->set("TYPE" , $module->getType())
|
->set("TYPE" , $module->getType())
|
||||||
->set("ACTIVE" , $module->getActivate())
|
->set("ACTIVE" , $module->getActivate())
|
||||||
->set("CLASS" , $module->getFullNamespace())
|
->set("CLASS" , $module->getFullNamespace())
|
||||||
->set("POSITION", $module->getPosition());
|
->set("POSITION" , $module->getPosition())
|
||||||
|
->set("EXISTS" , $exists)
|
||||||
|
;
|
||||||
|
|
||||||
$hasConfigurationInterface = false;
|
$hasConfigurationInterface = false;
|
||||||
|
|
||||||
@@ -227,6 +242,7 @@ class Module extends BaseI18nLoop implements PropelSearchLoopInterface
|
|||||||
|
|
||||||
$loopResult->addRow($loopResultRow);
|
$loopResult->addRow($loopResultRow);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $loopResult;
|
return $loopResult;
|
||||||
|
|
||||||
|
|||||||
40
core/lib/Thelia/Form/Cache/AssetsFlushForm.php
Normal file
40
core/lib/Thelia/Form/Cache/AssetsFlushForm.php
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
/*************************************************************************************/
|
||||||
|
/* This file is part of the Thelia package. */
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) OpenStudio */
|
||||||
|
/* email : dev@thelia.net */
|
||||||
|
/* web : http://www.thelia.net */
|
||||||
|
/* */
|
||||||
|
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||||
|
/* file that was distributed with this source code. */
|
||||||
|
/*************************************************************************************/
|
||||||
|
|
||||||
|
namespace Thelia\Form\Cache;
|
||||||
|
|
||||||
|
use Thelia\Form\BaseForm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class CacheFlushForm
|
||||||
|
* @package Thelia\Form\Cache
|
||||||
|
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||||
|
*/
|
||||||
|
class AssetsFlushForm extends BaseForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
protected function buildForm()
|
||||||
|
{
|
||||||
|
//Nothing, we just want CSRF protection
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return "assets_flush";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -23,24 +23,7 @@ class CacheFlushForm extends BaseForm
|
|||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @inheritdoc
|
||||||
* in this function you add all the fields you need for your Form.
|
|
||||||
* Form this you have to call add method on $this->formBuilder attribute :
|
|
||||||
*
|
|
||||||
* $this->formBuilder->add("name", "text")
|
|
||||||
* ->add("email", "email", array(
|
|
||||||
* "attr" => array(
|
|
||||||
* "class" => "field"
|
|
||||||
* ),
|
|
||||||
* "label" => "email",
|
|
||||||
* "constraints" => array(
|
|
||||||
* new \Symfony\Component\Validator\Constraints\NotBlank()
|
|
||||||
* )
|
|
||||||
* )
|
|
||||||
* )
|
|
||||||
* ->add('age', 'integer');
|
|
||||||
*
|
|
||||||
* @return null
|
|
||||||
*/
|
*/
|
||||||
protected function buildForm()
|
protected function buildForm()
|
||||||
{
|
{
|
||||||
@@ -48,7 +31,7 @@ class CacheFlushForm extends BaseForm
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string the name of you form. This name must be unique
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
public function getName()
|
public function getName()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
/*************************************************************************************/
|
||||||
|
/* This file is part of the Thelia package. */
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) OpenStudio */
|
||||||
|
/* email : dev@thelia.net */
|
||||||
|
/* web : http://www.thelia.net */
|
||||||
|
/* */
|
||||||
|
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||||
|
/* file that was distributed with this source code. */
|
||||||
|
/*************************************************************************************/
|
||||||
|
|
||||||
|
namespace Thelia\Form\Cache;
|
||||||
|
|
||||||
|
use Thelia\Form\BaseForm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class CacheFlushForm
|
||||||
|
* @package Thelia\Form\Cache
|
||||||
|
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||||
|
*/
|
||||||
|
class ImagesAndDocumentsCacheFlushForm extends BaseForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
protected function buildForm()
|
||||||
|
{
|
||||||
|
//Nothing, we just want CSRF protection
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return "images_and_documents_cache_flush";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -74,8 +74,7 @@ class OrderDelivery extends BaseForm
|
|||||||
if (null === $module) {
|
if (null === $module) {
|
||||||
$context->addViolation(Translator::getInstance()->trans("Delivery module ID not found"));
|
$context->addViolation(Translator::getInstance()->trans("Delivery module ID not found"));
|
||||||
} else {
|
} else {
|
||||||
$moduleReflection = new \ReflectionClass($module->getFullNamespace());
|
if (! $module->isDeliveryModule()) {
|
||||||
if ($moduleReflection->isSubclassOf("Thelia\Module\DeliveryModuleInterface") === false) {
|
|
||||||
$context->addViolation(
|
$context->addViolation(
|
||||||
sprintf(Translator::getInstance()->trans("delivery module %s is not a Thelia\Module\DeliveryModuleInterface"), $module->getCode())
|
sprintf(Translator::getInstance()->trans("delivery module %s is not a Thelia\Module\DeliveryModuleInterface"), $module->getCode())
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -75,8 +75,7 @@ class OrderPayment extends BaseForm
|
|||||||
$context->addViolation("Payment module ID not found");
|
$context->addViolation("Payment module ID not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
$moduleReflection = new \ReflectionClass($module->getFullNamespace());
|
if (! $module->isPayementModule()) {
|
||||||
if ($moduleReflection->isSubclassOf("Thelia\Module\PaymentModuleInterface") === false) {
|
|
||||||
$context->addViolation(
|
$context->addViolation(
|
||||||
sprintf(Translator::getInstance()->trans("payment module %s is not a Thelia\Module\PaymentModuleInterface"), $module->getCode())
|
sprintf(Translator::getInstance()->trans("payment module %s is not a Thelia\Module\PaymentModuleInterface"), $module->getCode())
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -162,6 +162,34 @@ class Module extends BaseModule
|
|||||||
return $this->getAbsoluteTemplateBasePath() .DS. $templateSubdirName;
|
return $this->getAbsoluteTemplateBasePath() .DS. $templateSubdirName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if this module is a delivery module
|
||||||
|
*/
|
||||||
|
public function isDeliveryModule() {
|
||||||
|
$moduleReflection = new \ReflectionClass($this->getFullNamespace());
|
||||||
|
|
||||||
|
return $moduleReflection->implementsInterface("Thelia\Module\DeliveryModuleInterface");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if this module is a payment module
|
||||||
|
*/
|
||||||
|
public function isPayementModule() {
|
||||||
|
$moduleReflection = new \ReflectionClass($this->getFullNamespace());
|
||||||
|
|
||||||
|
return $moduleReflection->implementsInterface("Thelia\Module\PaymentModuleInterface");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return BaseModule a new module instance.
|
||||||
|
*/
|
||||||
|
public function createInstance() {
|
||||||
|
$moduleClass = new \ReflectionClass($this->getFullNamespace());
|
||||||
|
|
||||||
|
return $moduleClass->newInstance();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate next position relative to module type
|
* Calculate next position relative to module type
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ return array(
|
|||||||
'Administration profiles' => 'Profils d\'administration',
|
'Administration profiles' => 'Profils d\'administration',
|
||||||
'Administrators' => 'Administrateurs',
|
'Administrators' => 'Administrateurs',
|
||||||
'Advanced configuration' => 'Configuration avancée',
|
'Advanced configuration' => 'Configuration avancée',
|
||||||
|
'Advanced configuration and tools' => 'Outils et configuration avancés',
|
||||||
'Afficher ce profil' => 'Afficher ce profil',
|
'Afficher ce profil' => 'Afficher ce profil',
|
||||||
'All countries are assigned to a shipping zone.' => 'Tous les pays sont assignés à une zone de livraison.',
|
'All countries are assigned to a shipping zone.' => 'Tous les pays sont assignés à une zone de livraison.',
|
||||||
'All orders' => 'Toutes les commandes',
|
'All orders' => 'Toutes les commandes',
|
||||||
@@ -82,7 +83,6 @@ return array(
|
|||||||
'Browse files' => 'Parcourir les fichiers',
|
'Browse files' => 'Parcourir les fichiers',
|
||||||
'Browse this category' => 'Parcourir cette catégorie',
|
'Browse this category' => 'Parcourir cette catégorie',
|
||||||
'Browse this folder' => 'Parcourir ce dossier',
|
'Browse this folder' => 'Parcourir ce dossier',
|
||||||
'Cache' => 'Cache',
|
|
||||||
'Can\'t be cumulative' => 'Ne peut pas se cumuler',
|
'Can\'t be cumulative' => 'Ne peut pas se cumuler',
|
||||||
'Can\'t load documents, please refresh this page.' => 'Impossible de charger les documents. Rechargez la page',
|
'Can\'t load documents, please refresh this page.' => 'Impossible de charger les documents. Rechargez la page',
|
||||||
'Can\'t load images, please refresh this page.' => 'Impossible de charger l\'image. Rechargez la page',
|
'Can\'t load images, please refresh this page.' => 'Impossible de charger l\'image. Rechargez la page',
|
||||||
@@ -477,7 +477,8 @@ return array(
|
|||||||
'FirstName' => 'Prénom',
|
'FirstName' => 'Prénom',
|
||||||
'Firstname' => 'Prénom',
|
'Firstname' => 'Prénom',
|
||||||
'Flush the Thelia internal cache' => 'Vider le cache interne de Thelia',
|
'Flush the Thelia internal cache' => 'Vider le cache interne de Thelia',
|
||||||
'Flush the cache now' => 'Vider le cache maintenant',
|
'Flush the assets cache directory' => 'Vider le cache des assets web',
|
||||||
|
'Flush the images and documents cache' => 'Vider le caches des images et documents',
|
||||||
'Folder created on %date_create. Last modification: %date_change' => 'Dossier créé le %date_create. Dernière modification le %date_change',
|
'Folder created on %date_create. Last modification: %date_change' => 'Dossier créé le %date_create. Dernière modification le %date_change',
|
||||||
'Folder title' => 'Titre du dossier',
|
'Folder title' => 'Titre du dossier',
|
||||||
'Folders' => 'Dossiers',
|
'Folders' => 'Dossiers',
|
||||||
@@ -833,6 +834,7 @@ return array(
|
|||||||
'Thelia Shipping configuration' => 'Configuration des livraisons Thelia',
|
'Thelia Shipping configuration' => 'Configuration des livraisons Thelia',
|
||||||
'Thelia Shipping zones' => 'Zone de livraison de Thelia',
|
'Thelia Shipping zones' => 'Zone de livraison de Thelia',
|
||||||
'Thelia System Variables' => 'Variables Thelia',
|
'Thelia System Variables' => 'Variables Thelia',
|
||||||
|
'Thelia caches flushing' => 'Vidage des caches Thelia',
|
||||||
'Thelia configuration' => 'Configuration thelia',
|
'Thelia configuration' => 'Configuration thelia',
|
||||||
'Thelia contributions' => 'Contributions de Thelia',
|
'Thelia contributions' => 'Contributions de Thelia',
|
||||||
'Thelia core' => 'Coeur de Thelia',
|
'Thelia core' => 'Coeur de Thelia',
|
||||||
@@ -866,6 +868,7 @@ return array(
|
|||||||
'This is the message purpose, such as \'Order confirmation\'.' => 'Titre du message (ex : confirmation de commande)',
|
'This is the message purpose, such as \'Order confirmation\'.' => 'Titre du message (ex : confirmation de commande)',
|
||||||
'This is the subject of the e-mail, such as \'Your order is confirmed\'.' => 'Sujet du message (ex : votre commande est validée)',
|
'This is the subject of the e-mail, such as \'Your order is confirmed\'.' => 'Sujet du message (ex : votre commande est validée)',
|
||||||
'This mailing template could not be changed.' => 'Le template de mailing ne peut pas être changé',
|
'This mailing template could not be changed.' => 'Le template de mailing ne peut pas être changé',
|
||||||
|
'This module cannot be started, some files are probably missing.' => 'Ce module ne peut pas être démarré, il manque sans doute des fichiers.',
|
||||||
'This month' => 'Ce mois',
|
'This month' => 'Ce mois',
|
||||||
'This product contains no accessories' => 'Ce produit n\'a aucun accessoire',
|
'This product contains no accessories' => 'Ce produit n\'a aucun accessoire',
|
||||||
'This product contains no contents' => 'Ce produit n\'a aucun contenu associé',
|
'This product contains no contents' => 'Ce produit n\'a aucun contenu associé',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{extends file="admin-layout.tpl"}
|
{extends file="admin-layout.tpl"}
|
||||||
|
|
||||||
{block name="page-title"}{intl l='Cache'}{/block}
|
{block name="page-title"}{intl l='Advanced configuration'}{/block}
|
||||||
|
|
||||||
{block name="check-resource"}admin.cache{/block}
|
{block name="check-resource"}admin.cache{/block}
|
||||||
{block name="check-access"}view{/block}
|
{block name="check-access"}view{/block}
|
||||||
@@ -13,27 +13,53 @@
|
|||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||||
<li>{intl l="Advanced configuration"}</li>
|
<li>{intl l="Advanced configuration and tools"}</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12 general-block-decorator">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-12 general-block-decorator">
|
||||||
|
|
||||||
|
<div class="row vertical-row-space">
|
||||||
<div class="col-md-12 title title-without-tabs">
|
<div class="col-md-12 title title-without-tabs">
|
||||||
{intl l='Advanced configuration'}
|
{intl l='Thelia caches flushing'}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-container">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-4">
|
||||||
|
|
||||||
{form name="thelia.cache.flush"}
|
{form name="thelia.cache.flush"}
|
||||||
<form method="post" action="{url path="/admin/configuration/advanced/flush-cache"}">
|
<form method="post" action="{url path="/admin/configuration/advanced/flush-cache"}">
|
||||||
{form_hidden_fields form=$form}
|
{form_hidden_fields form=$form}
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label">{intl l="Flush the Thelia internal cache"} : </label>
|
<button type="submit" class="btn btn-warning btn-sm btn-block">{intl l="Flush the Thelia internal cache"}</button>
|
||||||
<button type="submit" class="btn btn-warning btn-sm">{intl l="Flush the cache now"}</button>
|
</div>
|
||||||
|
</form>
|
||||||
|
{/form}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
|
||||||
|
{form name="thelia.assets.flush"}
|
||||||
|
<form method="post" action="{url path="/admin/configuration/advanced/flush-assets"}">
|
||||||
|
{form_hidden_fields form=$form}
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<button type="submit" class="btn btn-warning btn-sm btn-block">{intl l="Flush the assets cache directory"}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{/form}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
|
||||||
|
{form name="thelia.images-and-documents-cache.flush"}
|
||||||
|
<form method="post" action="{url path="/admin/configuration/advanced/flush-images-and-documents"}">
|
||||||
|
{form_hidden_fields form=$form}
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<button type="submit" class="btn btn-warning btn-sm btn-block">{intl l="Flush the images and documents cache"}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{/form}
|
{/form}
|
||||||
@@ -43,5 +69,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -453,3 +453,8 @@ ul.document-list {
|
|||||||
width: 100%;height: 100%;
|
width: 100%;height: 100%;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A vertical spacer between rows
|
||||||
|
.vertical-row-space {
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
{form_field form=$form field='file'}
|
{form_field form=$form field='file'}
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||||
<input type="file" id="{$label_attr.for}" name="{$name}" class="form-control" value="" title="{$label}" placeholder="{intl l='File'}">
|
<input type="file" id="{$label_attr.for}" name="{$name}" value="" title="{$label}" placeholder="{intl l='File'}">
|
||||||
</div>
|
</div>
|
||||||
{/form_field}
|
{/form_field}
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
{form_field form=$form field='file'}
|
{form_field form=$form field='file'}
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||||
<input type="file" id="{$label_attr.for}" name="{$name}" class="form-control" value="" title="{$label}" placeholder="{intl l='File'}">
|
<input type="file" id="{$label_attr.for}" name="{$name}" value="" title="{$label}" placeholder="{intl l='File'}">
|
||||||
</div>
|
</div>
|
||||||
{/form_field}
|
{/form_field}
|
||||||
|
|
||||||
|
|||||||
@@ -79,12 +79,13 @@
|
|||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{loop type="module" name="module.{$module_type}" module_type={$module_type|default:1} order=$module_order backend_context=1}
|
{loop type="module" name="module.{$module_type}" module_type={$module_type|default:1} order=$module_order backend_context=1}
|
||||||
<tr>
|
<tr {if ! $EXISTS}class="warning"{/if}>
|
||||||
<td>{$ID}</td>
|
<td>{$ID}</td>
|
||||||
<td>{$TITLE}</td>
|
<td>{$TITLE}</td>
|
||||||
<td>{$CODE}</td>
|
<td>{$CODE}</td>
|
||||||
<td>{$CHAPO}</td>
|
<td>{$CHAPO}</td>
|
||||||
|
|
||||||
|
{if $EXISTS}
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<div class="make-switch switch-small module-activation" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
|
<div class="make-switch switch-small module-activation" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
|
||||||
<input type="checkbox" {if $ACTIVE}checked{/if}>
|
<input type="checkbox" {if $ACTIVE}checked{/if}>
|
||||||
@@ -109,11 +110,18 @@
|
|||||||
id=$ID
|
id=$ID
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
|
{else}
|
||||||
|
<td colspan="2" class="text-left">
|
||||||
|
<span class="label label-warning">Warning</span>
|
||||||
|
{intl l="This module cannot be started, some files are probably missing."}
|
||||||
|
</td>
|
||||||
|
{/if}
|
||||||
|
|
||||||
{module_include location='modules_table_row'}
|
{module_include location='modules_table_row'}
|
||||||
|
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
|
{if $EXISTS}
|
||||||
{if $CONFIGURABLE == 1}
|
{if $CONFIGURABLE == 1}
|
||||||
{loop type="auth" name="can_change" role="ADMIN" module=$CODE access="VIEW"}
|
{loop type="auth" name="can_change" role="ADMIN" module=$CODE access="VIEW"}
|
||||||
<a class="{if ! $ACTIVE}disabled {/if} btn btn-primary btn-xs" id="config-btn-{$ID}" title="{intl l='Configure this module'}" href="{url path="/admin/module/$CODE"}">{intl l="Configure"}</a>
|
<a class="{if ! $ACTIVE}disabled {/if} btn btn-primary btn-xs" id="config-btn-{$ID}" title="{intl l='Configure this module'}" href="{url path="/admin/module/$CODE"}">{intl l="Configure"}</a>
|
||||||
@@ -127,6 +135,7 @@
|
|||||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.module" access="UPDATE"}
|
{loop type="auth" name="can_change" role="ADMIN" resource="admin.module" access="UPDATE"}
|
||||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||||
{/loop}
|
{/loop}
|
||||||
|
{/if}
|
||||||
|
|
||||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.module" access="DELETE"}
|
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.module" access="DELETE"}
|
||||||
<a class="btn btn-default btn-xs module-delete-action" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
<a class="btn btn-default btn-xs module-delete-action" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||||
|
|||||||
Reference in New Issue
Block a user