Changed "Cache" by "Advanced configuration"
This commit is contained in:
@@ -992,12 +992,12 @@
|
||||
<!-- end feature and feature routes management -->
|
||||
|
||||
<!-- cache route management -->
|
||||
<route id="admin.configuration.cache" path="/admin/configuration/cache">
|
||||
<default key="_controller">Thelia\Controller\Admin\CacheController::defaultAction</default>
|
||||
<route id="admin.configuration.advanced" path="/admin/configuration/advanced">
|
||||
<default key="_controller">Thelia\Controller\Admin\AdvancedConfigurationController::defaultAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.cache.flush" path="/admin/cache/flush">
|
||||
<default key="_controller">Thelia\Controller\Admin\CacheController::flushAction</default>
|
||||
<route id="admin.configuration.advanced.flush-cache" path="/admin/configuration/advanced/flush-cache">
|
||||
<default key="_controller">Thelia\Controller\Admin\AdvancedConfigurationController::flushCacheAction</default>
|
||||
</route>
|
||||
|
||||
<!-- and cache route management -->
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
<?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\Controller\Admin;
|
||||
|
||||
use Thelia\Core\Event\Cache\CacheEvent;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
use Thelia\Core\Security\AccessManager;
|
||||
use Thelia\Core\Security\Resource\AdminResources;
|
||||
use Thelia\Form\Cache\CacheFlushForm;
|
||||
use Thelia\Form\Exception\FormValidationException;
|
||||
|
||||
/**
|
||||
* Class CacheController
|
||||
* @package Thelia\Controller\Admin
|
||||
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||
*/
|
||||
class CacheController extends BaseAdminController
|
||||
{
|
||||
|
||||
public function defaultAction()
|
||||
{
|
||||
if (null !== $result = $this->checkAuth(AdminResources::CACHE, [], AccessManager::VIEW)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
return $this->render('cache');
|
||||
}
|
||||
|
||||
public function flushAction()
|
||||
{
|
||||
if (null !== $result = $this->checkAuth(AdminResources::CACHE, [], AccessManager::UPDATE)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
$form = new CacheFlushForm($this->getRequest());
|
||||
try {
|
||||
$this->validateForm($form);
|
||||
|
||||
$event = new CacheEvent($this->container->getParameter("kernel.cache_dir"));
|
||||
$this->dispatch(TheliaEvents::CACHE_CLEAR, $event);
|
||||
|
||||
$event = new CacheEvent(THELIA_WEB_DIR . "assets");
|
||||
$this->dispatch(TheliaEvents::CACHE_CLEAR, $event);
|
||||
|
||||
$this->redirectToRoute('admin.configuration.cache');
|
||||
} catch (FormValidationException $e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -45,12 +45,12 @@ final class AdminResources
|
||||
|
||||
const ADMINISTRATOR = "admin.configuration.administrator";
|
||||
|
||||
const ADVANCED_CONFIGURATION = "admin.configuration.advanced";
|
||||
|
||||
const AREA = "admin.configuration.area";
|
||||
|
||||
const ATTRIBUTE = "admin.configuration.attribute";
|
||||
|
||||
const CACHE = "admin.cache";
|
||||
|
||||
const CATEGORY = "admin.category";
|
||||
|
||||
const CONFIG = "admin.configuration";
|
||||
@@ -91,7 +91,9 @@ final class AdminResources
|
||||
|
||||
const TEMPLATE = "admin.configuration.template";
|
||||
|
||||
const SYSTEM_LOG = "admin.configuration.system-log";
|
||||
const SYSTEM_LOG = "admin.configuration.system-logs";
|
||||
|
||||
const ADMIN_LOG = "admin.configuration.admin-logs";
|
||||
|
||||
const STORE = "admin.configuration.store";
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ return array(
|
||||
'Administration logs' => 'Journal des logs',
|
||||
'Administration profiles' => 'Profils d\'administration',
|
||||
'Administrators' => 'Administrateurs',
|
||||
'Advanced configuration' => 'Configuration avancée',
|
||||
'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 orders' => 'Toutes les commandes',
|
||||
@@ -472,7 +473,8 @@ return array(
|
||||
'First orders' => 'Premières commandes',
|
||||
'FirstName' => 'Prénom',
|
||||
'Firstname' => 'Prénom',
|
||||
'Flush the cache' => 'Vider le cache',
|
||||
'Flush the Thelia internal cache' => 'Vider le cache interne de Thelia',
|
||||
'Flush the cache now' => 'Vider le cache maintenant',
|
||||
'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',
|
||||
'Folders' => 'Dossiers',
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Cache'}{/block}
|
||||
|
||||
{block name="check-resource"}admin.cache{/block}
|
||||
{block name="check-access"}view{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="variables edit-variable">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<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>{intl l="Cache"}</li>
|
||||
</ul>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{form name="thelia.cache.flush"}
|
||||
<form method="post" action="{url path="/admin/cache/flush"}">
|
||||
{form_hidden_fields form=$form}
|
||||
<button type="submit" class="btn btn-danger btn-lg btn-block">{intl l="Flush the cache"}</button>
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
@@ -178,10 +178,10 @@
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/system-logs'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
{loop type="auth" name="pcc9" role="ADMIN" resource="admin.configuration.cache" access="VIEW"}
|
||||
{loop type="auth" name="pcc9" role="ADMIN" resource="admin.configuration.advanced" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/cache'}">{intl l='Cache'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/cache'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
<td><a href="{url path='/admin/configuration/advanced'}">{intl l='Advanced configuration'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/advanced'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
{module_include location='system_configuration_bottom'}
|
||||
|
||||
Reference in New Issue
Block a user