Merge pull request #339 from roadster31/various-fixes

Various fixes
This commit is contained in:
Manuel Raynaud
2014-04-24 17:02:16 +02:00
6 changed files with 204 additions and 63 deletions

87
.gitignore vendored
View File

@@ -1,43 +1,44 @@
local/config/build.properties
local/config/config_db.php
local/config/build
local/config/database.yml
local/config/database.yml.sample.save
core/vendor
local/config/runtime-conf.xml
cache/*
log/*
bin/*
local/session/*
coverage
.idea
.buildpath
.project
.settings/
local/media/documents/*
local/media/images/*
web/assets/*
web/cache/*
web/tinymce
web/media
phpdoc*.log
xhprof/
phpunit.phar
.DS_Store
phpmyadmin
composer.phar
web/.htaccess
# Ignore everything in the "modules" directory, except the "default modules"
local/modules/*
!local/modules/Cheque/
!local/modules/Front/
!local/modules/TheliaDebugBar/
!local/modules/Tinymce/
# Ignore everything in the "templates" directory, except the "default template"
templates/*
!templates/backOffice/
!templates/email/
!templates/frontOffice/
!templates/pdf/
local/config/build.properties
local/config/config_db.php
local/config/build
local/config/database.yml
local/config/database.yml.sample.save
core/vendor
local/config/runtime-conf.xml
cache/*
log/*
bin/*
local/session/*
coverage
.idea
.buildpath
.project
.settings/
local/media/documents/*
local/media/images/*
web/assets/*
web/cache/*
web/tinymce
web/media
phpdoc*.log
xhprof/
phpunit.phar
.DS_Store
phpmyadmin
composer.phar
web/.htaccess
# Ignore everything in the "modules" directory, except the "default modules"
local/modules/*
!local/modules/Cheque/
!local/modules/Front/
!local/modules/TheliaDebugBar/
!local/modules/Tinymce/
!local/modules/Colissimo/
# Ignore everything in the "templates" directory, except the "default template"
templates/*
!templates/backOffice/
!templates/email/
!templates/frontOffice/
!templates/pdf/

View File

@@ -0,0 +1,60 @@
<?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 AdvancedConfigurationController extends BaseAdminController
{
public function defaultAction()
{
if (null !== $result = $this->checkAuth(AdminResources::ADVANCED_CONFIGURATION, [], AccessManager::VIEW)) {
return $result;
}
return $this->render('advanced-configuration');
}
public function flushCacheAction()
{
if (null !== $result = $this->checkAuth(AdminResources::ADVANCED_CONFIGURATION, [], 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.advanced');
} catch (FormValidationException $e) {
}
}
}

View File

@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<module>
<fullnamespace>Colissimo\Colissimo</fullnamespace>
<descriptive locale="en_US">
<title>colisimo</title>
</descriptive>
<descriptive locale="fr_FR">
<title>colisimo</title>
</descriptive>
<version>1.0</version>
<author>
<name>Manuel Raynaud</name>
<email>mraynaud@openstudio.fr</email>
</author>
<type>delivery</type>
<thelia>2.0.0</thelia>
<stability>alpha</stability>
</module>
<?xml version="1.0" encoding="UTF-8"?>
<module>
<fullnamespace>Colissimo\Colissimo</fullnamespace>
<descriptive locale="en_US">
<title>Colissimo delivery</title>
</descriptive>
<descriptive locale="fr_FR">
<title>Livraison par Colissimo</title>
</descriptive>
<version>1.0</version>
<author>
<name>Manuel Raynaud</name>
<email>mraynaud@openstudio.fr</email>
</author>
<type>delivery</type>
<thelia>2.0.0</thelia>
<stability>alpha</stability>
</module>

View File

@@ -0,0 +1,33 @@
<?php
return array(
'*If you choose this option, the exported orders would not be available on this page anymore' => '* Si vous choisissez cette option, les commandes exportées ne seront plus affichée sur cette page.',
'Actions' => 'Actions',
'An error occured' => 'Une erreur est survenue',
'Area : ' => 'Zone de livraison : ',
'Cancel' => 'Annuler',
'Change orders status after export' => 'Modification du statut des commande après l\'export',
'Colissimo Module allows to send your products all around the world with La Poste.' => 'Colissimo vous permet dexpédier vos colis dans le monde entier avec La Poste',
'Create' => 'Créer',
'Create a new price slice' => 'Créer une nouvelle tranche de prix',
'Create a price slice' => 'Créer une tranche de prix',
'Date' => 'Date',
'Delete' => 'Supprimer',
'Delete a price slice' => 'Supprimer une tranche de prix',
'Delete this price slice' => 'Supprimer cette tranche de prix',
'Do not change' => 'Ne pas modifier',
'Do you really want to delete this slice ?' => 'Confirmez-vous la suppression de cette tranche de prix',
'Edit' => 'Modifier',
'Edit a price slice' => 'Modifier une tranche de prix',
'Edit this price slice' => 'Modifier cette tranche de prix',
'Export' => 'Export',
'Export expeditor inet file' => 'Exporter le fichier Expeditor INET',
'Please change the access rights' => 'Merci de modifier les droits d\'accès',
'Price (€)' => 'Price (€)',
'Price slices' => 'Prix et poids',
'Processing' => 'Traitement',
'REF' => 'REF',
'Sent' => 'Envoyé',
'Total taxed amount' => 'Total TTC',
'Weight up to ... (kg)' => 'Jusqu\'au poids (Kg)',
);

View File

@@ -2,10 +2,10 @@
<module>
<fullnamespace>Tinymce\Tinymce</fullnamespace>
<descriptive locale="en_US">
<title>Tinymce wysiwyg editor</title>
<title>TinyMCE WYSIWYG editor</title>
</descriptive>
<descriptive locale="fr_FR">
<title>éditeur wysiwyg Tinymce</title>
<title>Editeur visuel TinyMCE</title>
</descriptive>
<version>0.1</version>
<author>

View File

@@ -0,0 +1,47 @@
{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="Advanced configuration"}</li>
</ul>
<div class="row">
<div class="col-md-12 general-block-decorator">
<div class="row">
<div class="col-md-12 title title-without-tabs">
{intl l='Advanced configuration'}
</div>
<div class="form-container">
<div class="col-md-6">
{form name="thelia.cache.flush"}
<form method="post" action="{url path="/admin/configuration/advanced/flush-cache"}">
{form_hidden_fields form=$form}
<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">{intl l="Flush the cache now"}</button>
</div>
</form>
{/form}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{/block}