From e4c23adba600ddf3e23790a6ea30b531470098d9 Mon Sep 17 00:00:00 2001 From: franck Date: Tue, 3 Sep 2013 11:26:03 +0200 Subject: [PATCH 1/3] Smarty inheritance in admin template. --- core/lib/Thelia/Action/Currency.php | 120 ++++++ core/lib/Thelia/Config/Resources/action.xml | 9 +- core/lib/Thelia/Config/Resources/config.xml | 3 + .../Thelia/Config/Resources/routing/admin.xml | 22 + .../Controller/Admin/BaseAdminController.php | 9 + .../Controller/Admin/CurrencyController.php | 284 +++++++++++++ .../Thelia/Core/Event/CurrencyChangeEvent.php | 47 ++ .../Thelia/Core/Event/CurrencyCreateEvent.php | 93 ++++ .../Thelia/Core/Event/CurrencyDeleteEvent.php | 48 +++ core/lib/Thelia/Core/Event/CurrencyEvent.php | 47 ++ core/lib/Thelia/Core/Event/TheliaEvents.php | 15 +- core/lib/Thelia/Core/Template/Loop/Config.php | 4 +- .../Thelia/Core/Template/Loop/Currency.php | 86 +++- core/lib/Thelia/Core/Template/Loop/Image.php | 134 +++--- core/lib/Thelia/Form/CurrencyCreationForm.php | 65 +++ .../Thelia/Form/CurrencyModificationForm.php | 45 ++ core/lib/Thelia/Model/Currency.php | 60 ++- templates/admin/default/404.html | 16 +- templates/admin/default/admin-layout.tpl | 223 ++++++++++ templates/admin/default/assets/css/admin.less | 4 + templates/admin/default/categories.html | 28 +- templates/admin/default/configuration.html | 12 +- templates/admin/default/currencies.html | 401 ++++++++++++++++++ templates/admin/default/edit_category.html | 14 +- templates/admin/default/general_error.html | 24 +- templates/admin/default/home.html | 26 +- .../admin/default/includes/footer.inc.html | 20 - .../admin/default/includes/header.inc.html | 167 -------- templates/admin/default/includes/js.inc.html | 13 - templates/admin/default/login.html | 100 ++--- templates/admin/default/message-edit.html | 32 +- templates/admin/default/messages.html | 14 +- templates/admin/default/variable-edit.html | 33 +- templates/admin/default/variables.html | 14 +- 34 files changed, 1804 insertions(+), 428 deletions(-) create mode 100644 core/lib/Thelia/Action/Currency.php create mode 100644 core/lib/Thelia/Controller/Admin/CurrencyController.php create mode 100644 core/lib/Thelia/Core/Event/CurrencyChangeEvent.php create mode 100644 core/lib/Thelia/Core/Event/CurrencyCreateEvent.php create mode 100644 core/lib/Thelia/Core/Event/CurrencyDeleteEvent.php create mode 100644 core/lib/Thelia/Core/Event/CurrencyEvent.php create mode 100644 core/lib/Thelia/Form/CurrencyCreationForm.php create mode 100644 core/lib/Thelia/Form/CurrencyModificationForm.php create mode 100644 templates/admin/default/admin-layout.tpl create mode 100644 templates/admin/default/currencies.html delete mode 100755 templates/admin/default/includes/footer.inc.html delete mode 100755 templates/admin/default/includes/header.inc.html delete mode 100755 templates/admin/default/includes/js.inc.html diff --git a/core/lib/Thelia/Action/Currency.php b/core/lib/Thelia/Action/Currency.php new file mode 100644 index 000000000..4e3bb45d4 --- /dev/null +++ b/core/lib/Thelia/Action/Currency.php @@ -0,0 +1,120 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Action; + + +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +use Thelia\Model\CurrencyQuery; +use Thelia\Model\Currency as CurrencyModel; + +use Thelia\Core\Event\TheliaEvents; + +use Thelia\Core\Event\CurrencyChangeEvent; +use Thelia\Core\Event\CurrencyCreateEvent; +use Thelia\Core\Event\CurrencyDeleteEvent; + +class Currency extends BaseAction implements EventSubscriberInterface +{ + /** + * Create a new currencyuration entry + * + * @param CurrencyCreateEvent $event + */ + public function create(CurrencyCreateEvent $event) + { + $currency = new CurrencyModel(); + + $currency + ->setDispatcher($this->getDispatcher()) + + ->setLocale($event->getLocale()) + ->setName($event->getCurrencyName()) + ->setSymbol($event->getSymbol()) + ->setRate($event->getRate()) + ->setCode($event->getCode()) + + ->save() + ; + + $event->setCurrency($currency); + } + + /** + * Change a currency + * + * @param CurrencyChangeEvent $event + */ + public function modify(CurrencyChangeEvent $event) + { + $search = CurrencyQuery::create(); + + if (null !== $currency = CurrencyQuery::create()->findOneById($event->getCurrencyId())) { + + $currency + ->setDispatcher($this->getDispatcher()) + + ->setLocale($event->getLocale()) + ->setName($event->getCurrencyName()) + ->setSymbol($event->getSymbol()) + ->setRate($event->getRate()) + ->setCode($event->getCode()) + + ->save(); + + $event->setCurrency($currency); + } + } + + /** + * Delete a currencyuration entry + * + * @param CurrencyDeleteEvent $event + */ + public function delete(CurrencyDeleteEvent $event) + { + + if (null !== ($currency = CurrencyQuery::create()->findOneById($event->getCurrencyId()))) { + + $currency + ->setDispatcher($this->getDispatcher()) + ->delete() + ; + + $event->setCurrency($currency); + } + } + + /** + * {@inheritDoc} + */ + public static function getSubscribedEvents() + { + return array( + TheliaEvents::CURRENCY_CREATE => array("create", 128), + TheliaEvents::CURRENCY_MODIFY => array("modify", 128), + TheliaEvents::CURRENCY_DELETE => array("delete", 128), + ); + } +} diff --git a/core/lib/Thelia/Config/Resources/action.xml b/core/lib/Thelia/Config/Resources/action.xml index a9638fe04..bcc162e24 100755 --- a/core/lib/Thelia/Config/Resources/action.xml +++ b/core/lib/Thelia/Config/Resources/action.xml @@ -32,12 +32,17 @@ - + - + + + + + + diff --git a/core/lib/Thelia/Config/Resources/config.xml b/core/lib/Thelia/Config/Resources/config.xml index 733e4303a..1210c9949 100755 --- a/core/lib/Thelia/Config/Resources/config.xml +++ b/core/lib/Thelia/Config/Resources/config.xml @@ -53,6 +53,9 @@
+ + + diff --git a/core/lib/Thelia/Config/Resources/routing/admin.xml b/core/lib/Thelia/Config/Resources/routing/admin.xml index d57eb8f95..627fa9bf3 100755 --- a/core/lib/Thelia/Config/Resources/routing/admin.xml +++ b/core/lib/Thelia/Config/Resources/routing/admin.xml @@ -83,6 +83,28 @@ Thelia\Controller\Admin\MessageController::deleteAction + + + + Thelia\Controller\Admin\CurrencyController::defaultAction + + + + Thelia\Controller\Admin\CurrencyController::createAction + + + + Thelia\Controller\Admin\CurrencyController::changeAction + + + + Thelia\Controller\Admin\CurrencyController::saveChangeAction + + + + Thelia\Controller\Admin\CurrencyController::deleteAction + + diff --git a/core/lib/Thelia/Controller/Admin/BaseAdminController.php b/core/lib/Thelia/Controller/Admin/BaseAdminController.php index c4b4c44b0..8160033fe 100755 --- a/core/lib/Thelia/Controller/Admin/BaseAdminController.php +++ b/core/lib/Thelia/Controller/Admin/BaseAdminController.php @@ -199,12 +199,21 @@ class BaseAdminController extends BaseController // Find the current edit language ID $edition_language = $this->getCurrentEditionLangId(); + // Current back-office (not edition) language + $current_lang = LangQuery::create()->findOneById($session->getLangId()); + // Prepare common template variables $args = array_merge($args, array( 'locale' => $session->getLocale(), 'lang_code' => $session->getLang(), 'lang_id' => $session->getLangId(), + + 'datetime_format' => $current_lang->getDateTimeFormat(), + 'date_format' => $current_lang->getDateFormat(), + 'time_format' => $current_lang->getTimeFormat(), + 'edition_language' => $edition_language, + 'current_url' => htmlspecialchars($this->getRequest()->getUri()) )); diff --git a/core/lib/Thelia/Controller/Admin/CurrencyController.php b/core/lib/Thelia/Controller/Admin/CurrencyController.php new file mode 100644 index 000000000..69cc60117 --- /dev/null +++ b/core/lib/Thelia/Controller/Admin/CurrencyController.php @@ -0,0 +1,284 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Controller\Admin; + +use Thelia\Core\Event\CurrencyDeleteEvent; +use Thelia\Core\Event\TheliaEvents; +use Thelia\Tools\URL; +use Thelia\Core\Event\CurrencyChangeEvent; +use Thelia\Core\Event\CurrencyCreateEvent; +use Thelia\Log\Tlog; +use Thelia\Form\Exception\FormValidationException; +use Thelia\Core\Security\Exception\AuthorizationException; +use Thelia\Model\CurrencyQuery; +use Thelia\Form\CurrencyModificationForm; +use Thelia\Form\CurrencyCreationForm; + +/** + * Manages currencies sent by mail + * + * @author Franck Allimant + */ +class CurrencyController extends BaseAdminController +{ + /** + * Render the currencies list, ensuring the sort order is set. + * + * @return Symfony\Component\HttpFoundation\Response the response + */ + protected function renderList() { + + // Find the current order + $order = $this->getRequest()->get( + 'order', + $this->getSession()->get('admin.currency_order', 'manual') + ); + + // Store the current sort order in session + $this->getSession()->set('admin.currency_order', $order); + + return $this->render('currencies', array('order' => $order)); + } + + /** + * The default action is displaying the currencies list. + * + * @return Symfony\Component\HttpFoundation\Response the response + */ + public function defaultAction() { + + if (null !== $response = $this->checkAuth("admin.configuration.currencies.view")) return $response; + + return $this->renderList(); + } + + /** + * Create a new currency object + * + * @return Symfony\Component\HttpFoundation\Response the response + */ + public function createAction() { + + // Check current user authorization + if (null !== $response = $this->checkAuth("admin.configuration.currencies.create")) return $response; + + $currency = false; + + // Create the Creation Form + $creationForm = new CurrencyCreationForm($this->getRequest()); + + try { + + // Validate the form, create the CurrencyCreation event and dispatch it. + $form = $this->validateForm($creationForm, "POST"); + + $data = $form->getData(); + + $createEvent = new CurrencyCreateEvent(); + + $createEvent + ->setCurrencyName($data['name']) + ->setLocale($data["locale"]) + ->setSymbol($data['symbol']) + ; + + $this->dispatch(TheliaEvents::CURRENCY_CREATE, $createEvent); + + $createdObject = $createEvent->getCurrency(); + + // Log currency creation + $this->adminLogAppend(sprintf("Variable %s (ID %s) created", $createdObject->getName(), $createdObject->getId())); + + // Substitute _ID_ in the URL with the ID of the created object + $successUrl = str_replace('_ID_', $createdObject->getId(), $creationForm->getSuccessUrl()); + + // Redirect to the success URL + $this->redirect($successUrl); + } + catch (FormValidationException $ex) { + // Form cannot be validated + $currency = sprintf("Please check your input: %s", $ex->getCurrency()); + } + catch (\Exception $ex) { + // Any other error + $currency = sprintf("Sorry, an error occured: %s", $ex->getCurrency()); + } + + if ($currency !== false) { + // An error has been detected: log it + Tlog::getInstance()->error(sprintf("Error during currency creation process : %s. Exception was %s", $currency, $ex->getCurrency())); + + // Mark the form as errored + $creationForm->setErrorCurrency($currency); + + // Pass it to the parser, along with the error currency + $this->getParserContext() + ->addForm($creationForm) + ->setGeneralError($currency) + ; + } + + // At this point, the form has error, and should be redisplayed. + return $this->renderList(); + } + + /** + * Load a currency object for modification, and display the edit template. + * + * @return Symfony\Component\HttpFoundation\Response the response + */ + public function changeAction() { + + // Check current user authorization + if (null !== $response = $this->checkAuth("admin.configuration.currencies.change")) return $response; + + // Load the currency object + $currency = CurrencyQuery::create() + ->joinWithI18n($this->getCurrentEditionLocale()) + ->findOneById($this->getRequest()->get('currency_id')); + + if ($currency != null) { + + // Prepare the data that will hydrate the form + $data = array( + 'id' => $currency->getId(), + 'name' => $currency->getName(), + 'locale' => $currency->getLocale(), + 'code' => $currency->getCode(), + 'symbol' => $currency->getSymbol(), + 'rate' => $currency->getSubject() + ); + + // Setup the object form + $changeForm = new CurrencyModificationForm($this->getRequest(), "form", $data); + + // Pass it to the parser + $this->getParserContext()->addForm($changeForm); + } + + // Render the edition template. + return $this->render('currency-edit', array('currency_id' => $this->getRequest()->get('currency_id'))); + } + + /** + * Save changes on a modified currency object, and either go back to the currency list, or stay on the edition page. + * + * @return Symfony\Component\HttpFoundation\Response the response + */ + public function saveChangeAction() { + + // Check current user authorization + if (null !== $response = $this->checkAuth("admin.configuration.currencies.change")) return $response; + + $currency = false; + + // Create the form from the request + $changeForm = new CurrencyModificationForm($this->getRequest()); + + // Get the currency ID + $currency_id = $this->getRequest()->get('currency_id'); + + try { + + // Check the form against constraints violations + $form = $this->validateForm($changeForm, "POST"); + + // Get the form field values + $data = $form->getData(); + + $changeEvent = new CurrencyChangeEvent($data['id']); + + // Create and dispatch the change event + $changeEvent + ->setCurrencyName($data['name']) + ->setLocale($data["locale"]) + ->setSymbol($data['symbol']) + ->setCode($data['code']) + ->setRate($data['rate']) + ; + + $this->dispatch(TheliaEvents::CURRENCY_MODIFY, $changeEvent); + + // Log currency modification + $changedObject = $changeEvent->getCurrency(); + + $this->adminLogAppend(sprintf("Variable %s (ID %s) modified", $changedObject->getName(), $changedObject->getId())); + + // If we have to stay on the same page, do not redirect to the succesUrl, + // just redirect to the edit page again. + if ($this->getRequest()->get('save_mode') == 'stay') { + $this->redirect(URL::absoluteUrl( + "admin/configuration/currencies/change", + array('currency_id' => $currency_id) + )); + } + + // Redirect to the success URL + $this->redirect($changeForm->getSuccessUrl()); + } + catch (FormValidationException $ex) { + // Invalid data entered + $currency = sprintf("Please check your input: %s", $ex->getCurrency()); + } + catch (\Exception $ex) { + // Any other error + $currency = sprintf("Sorry, an error occured: %s", $ex->getCurrency()); + } + + if ($currency !== false) { + // Log error currency + Tlog::getInstance()->error(sprintf("Error during currency modification process : %s. Exception was %s", $currency, $ex->getCurrency())); + + // Mark the form as errored + $changeForm->setErrorCurrency($currency); + + // Pas the form and the error to the parser + $this->getParserContext() + ->addForm($changeForm) + ->setGeneralError($currency) + ; + } + + // At this point, the form has errors, and should be redisplayed. + return $this->render('currency-edit', array('currency_id' => $currency_id)); + } + + /** + * Delete a currency object + * + * @return Symfony\Component\HttpFoundation\Response the response + */ + public function deleteAction() { + + // Check current user authorization + if (null !== $response = $this->checkAuth("admin.configuration.currencies.delete")) return $response; + + // Get the currency id, and dispatch the delet request + $event = new CurrencyDeleteEvent($this->getRequest()->get('currency_id')); + + $this->dispatch(TheliaEvents::CURRENCY_DELETE, $event); + + $this->redirect(URL::adminViewUrl('currencies')); + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Event/CurrencyChangeEvent.php b/core/lib/Thelia/Core/Event/CurrencyChangeEvent.php new file mode 100644 index 000000000..f94d71b88 --- /dev/null +++ b/core/lib/Thelia/Core/Event/CurrencyChangeEvent.php @@ -0,0 +1,47 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event; +use Thelia\Model\Currency; + +class CurrencyChangeEvent extends CurrencyCreateEvent +{ + protected $currency_id; + + public function __construct($currency_id) + { + $this->setCurrencyId($currency_id); + } + + public function getCurrencyId() + { + return $this->currency_id; + } + + public function setCurrencyId($currency_id) + { + $this->currency_id = $currency_id; + + return $this; + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Event/CurrencyCreateEvent.php b/core/lib/Thelia/Core/Event/CurrencyCreateEvent.php new file mode 100644 index 000000000..fba23a09b --- /dev/null +++ b/core/lib/Thelia/Core/Event/CurrencyCreateEvent.php @@ -0,0 +1,93 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event; +use Thelia\Model\Currency; + +class CurrencyCreateEvent extends CurrencyEvent +{ + protected $currency_name; + protected $locale; + protected $symbol; + protected $code; + protected $rate; + + // Use currency_name to prevent conflict with Event::name property. + public function getCurrencyName() + { + return $this->currency_name; + } + + public function setCurrencyName($currency_name) + { + $this->currency_name = $currency_name; + + return $this; + } + + public function getLocale() + { + return $this->locale; + } + + public function setLocale($locale) + { + $this->locale = $locale; + + return $this; + } + + public function getSymbol() + { + return $this->symbol; + } + + public function setSymbol($symbol) + { + $this->symbol = $symbol; + } + + public function getCode() + { + return $this->code; + } + + public function setCode($code) + { + $this->code = $code; + + return $this; + } + + public function getRate() + { + return $this->rate; + } + + public function setRate($rate) + { + $this->rate = $rate; + + return $this; + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Event/CurrencyDeleteEvent.php b/core/lib/Thelia/Core/Event/CurrencyDeleteEvent.php new file mode 100644 index 000000000..5b9714b47 --- /dev/null +++ b/core/lib/Thelia/Core/Event/CurrencyDeleteEvent.php @@ -0,0 +1,48 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event; + +use Thelia\Model\Currency; + +class CurrencyDeleteEvent extends CurrencyEvent +{ + protected $currency_id; + + public function __construct($currency_id) + { + $this->setCurrencyId($currency_id); + } + + public function getCurrencyId() + { + return $this->currency_id; + } + + public function setCurrencyId($currency_id) + { + $this->currency_id = $currency_id; + + return $this; + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Event/CurrencyEvent.php b/core/lib/Thelia/Core/Event/CurrencyEvent.php new file mode 100644 index 000000000..e0716da0c --- /dev/null +++ b/core/lib/Thelia/Core/Event/CurrencyEvent.php @@ -0,0 +1,47 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event; +use Thelia\Model\Currency; + +class CurrencyEvent extends ActionEvent +{ + protected $currency; + + public function __construct(Currency $currency = null) + { + $this->currency = $currency; + } + + public function getCurrency() + { + return $this->currency; + } + + public function setCurrency($currency) + { + $this->currency = $currency; + + return $this; + } +} diff --git a/core/lib/Thelia/Core/Event/TheliaEvents.php b/core/lib/Thelia/Core/Event/TheliaEvents.php index ed0a96cdf..8bca60bb4 100755 --- a/core/lib/Thelia/Core/Event/TheliaEvents.php +++ b/core/lib/Thelia/Core/Event/TheliaEvents.php @@ -194,7 +194,6 @@ final class TheliaEvents const BEFORE_DELETECONFIG = "action.before_deleteConfig"; const AFTER_DELETECONFIG = "action.after_deleteConfig"; - // -- Messages management --------------------------------------------- const MESSAGE_CREATE = "action.createMessage"; @@ -210,4 +209,18 @@ final class TheliaEvents const BEFORE_DELETEMESSAGE = "action.before_deleteMessage"; const AFTER_DELETEMESSAGE = "action.after_deleteMessage"; + // -- Currencies management --------------------------------------------- + + const CURRENCY_CREATE = "action.createCurrency"; + const CURRENCY_MODIFY = "action.changeCurrency"; + const CURRENCY_DELETE = "action.deleteCurrency"; + + const BEFORE_CREATECURRENCY = "action.before_createCurrency"; + const AFTER_CREATECURRENCY = "action.after_createCurrency"; + + const BEFORE_CHANGECURRENCY = "action.before_changeCurrency"; + const AFTER_CHANGECURRENCY = "action.after_changeCurrency"; + + const BEFORE_DELETECURRENCY = "action.before_deleteCurrency"; + const AFTER_DELETECURRENCY = "action.after_deleteCurrency"; } diff --git a/core/lib/Thelia/Core/Template/Loop/Config.php b/core/lib/Thelia/Core/Template/Loop/Config.php index 02f39510d..5cc1b2b44 100644 --- a/core/lib/Thelia/Core/Template/Loop/Config.php +++ b/core/lib/Thelia/Core/Template/Loop/Config.php @@ -109,13 +109,13 @@ class Config extends BaseI18nLoop ->set("NAME" , $result->getName()) ->set("VALUE" , $result->getValue()) ->set("IS_TRANSLATED", $result->getVirtualColumn('IS_TRANSLATED')) - ->set("LOCALE",$locale) + ->set("LOCALE" , $locale) ->set("TITLE" , $result->getVirtualColumn('i18n_TITLE')) ->set("CHAPO" , $result->getVirtualColumn('i18n_CHAPO')) ->set("DESCRIPTION" , $result->getVirtualColumn('i18n_DESCRIPTION')) ->set("POSTSCRIPTUM" , $result->getVirtualColumn('i18n_POSTSCRIPTUM')) ->set("HIDDEN" , $result->getHidden()) - ->set("SECURED" , $result->getSecured()) + ->set("SECURED" , $result->getSecured()) ->set("CREATE_DATE" , $result->getCreatedAt()) ->set("UPDATE_DATE" , $result->getUpdatedAt()) ; diff --git a/core/lib/Thelia/Core/Template/Loop/Currency.php b/core/lib/Thelia/Core/Template/Loop/Currency.php index 8076e2276..2fb296070 100755 --- a/core/lib/Thelia/Core/Template/Loop/Currency.php +++ b/core/lib/Thelia/Core/Template/Loop/Currency.php @@ -33,6 +33,8 @@ use Thelia\Core\Template\Loop\Argument\Argument; use Thelia\Model\CurrencyQuery; use Thelia\Model\ConfigQuery; +use Thelia\Type\TypeCollection; +use Thelia\Type\EnumListType; /** * @@ -53,7 +55,22 @@ class Currency extends BaseI18nLoop return new ArgumentCollection( Argument::createIntListTypeArgument('id'), Argument::createIntListTypeArgument('exclude'), - Argument::createBooleanTypeArgument('default_only', false) + Argument::createBooleanTypeArgument('default_only', false), + new Argument( + 'order', + new TypeCollection( + new EnumListType( + array( + 'id', 'id_reverse', + 'name', 'name_reverse', + 'code', 'code_reverse', + 'symbol', 'symbol_reverse', + 'rate', 'rate_reverse', + 'manual', 'manual_reverse') + ) + ), + 'manual' + ) ); } @@ -87,7 +104,53 @@ class Currency extends BaseI18nLoop $search->filterByByDefault(true); } - $search->orderByPosition(); + $orders = $this->getOrder(); + + foreach($orders as $order) { + switch ($order) { + case 'id': + $search->orderById(Criteria::ASC); + break; + case 'id_reverse': + $search->orderById(Criteria::DESC); + break; + + case 'name': + $search->addAscendingOrderByColumn('i18n_NAME'); + break; + case 'name_reverse': + $search->addDescendingOrderByColumn('i18n_NAME'); + break; + + case 'code': + $search->orderByCode(Criteria::ASC); + break; + case 'code_reverse': + $search->orderByCode(Criteria::DESC); + break; + + case 'symbol': + $search->orderBySymbol(Criteria::ASC); + break; + case 'symbol_reverse': + $search->orderBySymbol(Criteria::DESC); + break; + + case 'rate': + $search->orderByRate(Criteria::ASC); + break; + case 'rate_reverse': + $search->orderByRate(Criteria::DESC); + break; + + case 'manual': + $search->orderByPosition(Criteria::ASC); + break; + case 'manual_reverse': + $search->orderByPosition(Criteria::DESC); + break; + } + } /* perform search */ $currencies = $this->search($search, $pagination); @@ -95,15 +158,18 @@ class Currency extends BaseI18nLoop $loopResult = new LoopResult(); foreach ($currencies as $currency) { + $loopResultRow = new LoopResultRow(); - $loopResultRow->set("ID", $currency->getId()) - ->set("IS_TRANSLATED",$currency->getVirtualColumn('IS_TRANSLATED')) - ->set("LOCALE",$locale) - ->set("NAME",$currency->getVirtualColumn('i18n_NAME')) - ->set("ISOCODE", $currency->getCode()) - ->set("SYMBOL", $currency->getSymbol()) - ->set("RATE", $currency->getRate()) - ->set("IS_DEFAULT", $currency->getByDefault()); + $loopResultRow + ->set("ID" , $currency->getId()) + ->set("IS_TRANSLATED" , $currency->getVirtualColumn('IS_TRANSLATED')) + ->set("LOCALE" , $locale) + ->set("NAME" , $currency->getVirtualColumn('i18n_NAME')) + ->set("ISOCODE" , $currency->getCode()) + ->set("SYMBOL" , $currency->getSymbol()) + ->set("RATE" , $currency->getRate()) + ->set("POSITION" , $currency->getPosition()) + ->set("IS_DEFAULT" , $currency->getByDefault()); $loopResult->addRow($loopResultRow); } diff --git a/core/lib/Thelia/Core/Template/Loop/Image.php b/core/lib/Thelia/Core/Template/Loop/Image.php index fc34a40b6..697ce5d73 100755 --- a/core/lib/Thelia/Core/Template/Loop/Image.php +++ b/core/lib/Thelia/Core/Template/Loop/Image.php @@ -50,6 +50,60 @@ class Image extends BaseI18nLoop */ protected $possible_sources = array('category', 'product', 'folder', 'content'); + /** + * @return \Thelia\Core\Template\Loop\Argument\ArgumentCollection + */ + protected function getArgDefinitions() + { + $collection = new ArgumentCollection( + + Argument::createIntListTypeArgument('id'), + Argument::createIntListTypeArgument('exclude'), + new Argument( + 'order', + new TypeCollection( + new EnumListType(array('alpha', 'alpha-reverse', 'manual', 'manual-reverse', 'random')) + ), + 'manual' + ), + Argument::createIntTypeArgument('lang'), + + Argument::createIntTypeArgument('width'), + Argument::createIntTypeArgument('height'), + Argument::createIntTypeArgument('rotation', 0), + Argument::createAnyTypeArgument('background_color'), + Argument::createIntTypeArgument('quality'), + new Argument( + 'resize_mode', + new TypeCollection( + new EnumType(array('crop', 'borders', 'none')) + ), + 'none' + ), + Argument::createAnyTypeArgument('effects'), + + Argument::createIntTypeArgument('category'), + Argument::createIntTypeArgument('product'), + Argument::createIntTypeArgument('folder'), + Argument::createIntTypeArgument('content'), + + new Argument( + 'source', + new TypeCollection( + new EnumType($this->possible_sources) + ) + ), + Argument::createIntTypeArgument('source_id') + ); + + // Add possible image sources + foreach($this->possible_sources as $source) { + $collection->addArgument(Argument::createIntTypeArgument($source)); + } + + return $collection; + } + /** * Dynamically create the search query, and set the proper filter and order * @@ -244,19 +298,19 @@ class Image extends BaseI18nLoop $loopResultRow = new LoopResultRow(); $loopResultRow - ->set("ID", $result->getId()) - ->set("LOCALE",$locale) - ->set("IMAGE_URL", $event->getFileUrl()) - ->set("ORIGINAL_IMAGE_URL", $event->getOriginalFileUrl()) - ->set("IMAGE_PATH", $event->getCacheFilepath()) - ->set("ORIGINAL_IMAGE_PATH", $source_filepath) - ->set("TITLE",$folder->getVirtualColumn('i18n_TITLE')) - ->set("CHAPO", $folder->getVirtualColumn('i18n_CHAPO')) - ->set("DESCRIPTION", $folder->getVirtualColumn('i18n_DESCRIPTION')) - ->set("POSTSCRIPTUM", $folder->getVirtualColumn('i18n_POSTSCRIPTUM')) - ->set("POSITION", $result->getPosition()) - ->set("OBJECT_TYPE", $object_type) - ->set("OBJECT_ID", $object_id) + ->set("ID" , $result->getId()) + ->set("LOCALE" ,$locale) + ->set("IMAGE_URL" , $event->getFileUrl()) + ->set("ORIGINAL_IMAGE_URL" , $event->getOriginalFileUrl()) + ->set("IMAGE_PATH" , $event->getCacheFilepath()) + ->set("ORIGINAL_IMAGE_PATH" , $source_filepath) + ->set("TITLE" , $result->getVirtualColumn('i18n_TITLE')) + ->set("CHAPO" , $result->getVirtualColumn('i18n_CHAPO')) + ->set("DESCRIPTION" , $result->getVirtualColumn('i18n_DESCRIPTION')) + ->set("POSTSCRIPTUM" , $result->getVirtualColumn('i18n_POSTSCRIPTUM')) + ->set("POSITION" , $result->getPosition()) + ->set("OBJECT_TYPE" , $object_type) + ->set("OBJECT_ID" , $object_id) ; $loopResult->addRow($loopResultRow); @@ -269,58 +323,4 @@ class Image extends BaseI18nLoop return $loopResult; } - - /** - * @return \Thelia\Core\Template\Loop\Argument\ArgumentCollection - */ - protected function getArgDefinitions() - { - $collection = new ArgumentCollection( - - Argument::createIntListTypeArgument('id'), - Argument::createIntListTypeArgument('exclude'), - new Argument( - 'order', - new TypeCollection( - new EnumListType(array('alpha', 'alpha-reverse', 'manual', 'manual-reverse', 'random')) - ), - 'manual' - ), - Argument::createIntTypeArgument('lang'), - - Argument::createIntTypeArgument('width'), - Argument::createIntTypeArgument('height'), - Argument::createIntTypeArgument('rotation', 0), - Argument::createAnyTypeArgument('background_color'), - Argument::createIntTypeArgument('quality'), - new Argument( - 'resize_mode', - new TypeCollection( - new EnumType(array('crop', 'borders', 'none')) - ), - 'none' - ), - Argument::createAnyTypeArgument('effects'), - - Argument::createIntTypeArgument('category'), - Argument::createIntTypeArgument('product'), - Argument::createIntTypeArgument('folder'), - Argument::createIntTypeArgument('content'), - - new Argument( - 'source', - new TypeCollection( - new EnumType($this->possible_sources) - ) - ), - Argument::createIntTypeArgument('source_id') - ); - - // Add possible image sources - foreach($this->possible_sources as $source) { - $collection->addArgument(Argument::createIntTypeArgument($source)); - } - - return $collection; - } } \ No newline at end of file diff --git a/core/lib/Thelia/Form/CurrencyCreationForm.php b/core/lib/Thelia/Form/CurrencyCreationForm.php new file mode 100644 index 000000000..11a496582 --- /dev/null +++ b/core/lib/Thelia/Form/CurrencyCreationForm.php @@ -0,0 +1,65 @@ +. */ +/* */ +/*************************************************************************************/ +namespace Thelia\Form; + +use Symfony\Component\Validator\Constraints; +use Thelia\Model\CurrencyQuery; +use Symfony\Component\Validator\ExecutionContextInterface; +use Symfony\Component\Validator\Constraints\NotBlank; + +class CurrencyCreationForm extends BaseForm +{ + protected function buildForm($change_mode = false) + { + $name_constraints = array(new Constraints\NotBlank()); + + if (!$change_mode) { + $name_constraints[] = new Constraints\Callback(array( + "methods" => array(array($this, "checkDuplicateName")) + )); + } + + $this->formBuilder + ->add("name" , "text" , array("constraints" => array($name_constraints))) + ->add("locale" , "text" , array()) + ->add("symbol" , "text" , array("constraints" => array(new NotBlank()))) + ->add("rate" , "text" , array("constraints" => array(new NotBlank()))) + ->add("code" , "text" , array("constraints" => array(new NotBlank()))) + ; + } + + public function getName() + { + return "thelia_currency_creation"; + } + + public function checkDuplicateName($value, ExecutionContextInterface $context) + { + $currency = CurrencyQuery::create()->findOneByName($value); + + if ($currency) { + $context->addViolation(sprintf("A currency with name \"%s\" already exists.", $value)); + } + } + +} diff --git a/core/lib/Thelia/Form/CurrencyModificationForm.php b/core/lib/Thelia/Form/CurrencyModificationForm.php new file mode 100644 index 000000000..6a4279d1b --- /dev/null +++ b/core/lib/Thelia/Form/CurrencyModificationForm.php @@ -0,0 +1,45 @@ +. */ +/* */ +/*************************************************************************************/ +namespace Thelia\Form; + +use Symfony\Component\Validator\Constraints\NotBlank; +use Thelia\Model\LangQuery; +use Propel\Runtime\ActiveQuery\Criteria; +use Symfony\Component\Validator\Constraints\GreaterThan; + +class CurrencyModificationForm extends CurrencyCreationForm +{ + protected function buildForm() + { + parent::buildForm(true); + + $this->formBuilder + ->add("id" , "hidden", array("constraints" => array(new GreaterThan(array('value' => 0))))) + ; + } + + public function getName() + { + return "thelia_currency_modification"; + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Model/Currency.php b/core/lib/Thelia/Model/Currency.php index e9aec3ea0..f2f1175c6 100755 --- a/core/lib/Thelia/Model/Currency.php +++ b/core/lib/Thelia/Model/Currency.php @@ -3,7 +3,65 @@ namespace Thelia\Model; use Thelia\Model\Base\Currency as BaseCurrency; +use Thelia\Core\Event\TheliaEvents; +use Propel\Runtime\Connection\ConnectionInterface; +use Thelia\Core\Event\CurrencyEvent; class Currency extends BaseCurrency { -} + use \Thelia\Model\Tools\ModelEventDispatcherTrait; + + /** + * {@inheritDoc} + */ + public function preInsert(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_CREATECURRENCY, new CurrencyEvent($this)); + + return true; + } + + /** + * {@inheritDoc} + */ + public function postInsert(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_CREATECURRENCY, new CurrencyEvent($this)); + } + + /** + * {@inheritDoc} + */ + public function preUpdate(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_CHANGECURRENCY, new CurrencyEvent($this)); + + return true; + } + + /** + * {@inheritDoc} + */ + public function postUpdate(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_CHANGECURRENCY, new CurrencyEvent($this)); + } + + /** + * {@inheritDoc} + */ + public function preDelete(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_DELETECURRENCY, new CurrencyEvent($this)); + + return true; + } + + /** + * {@inheritDoc} + */ + public function postDelete(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_DELETECURRENCY, new CurrencyEvent($this)); + } +} \ No newline at end of file diff --git a/templates/admin/default/404.html b/templates/admin/default/404.html index 48caf7a12..c72b43b01 100755 --- a/templates/admin/default/404.html +++ b/templates/admin/default/404.html @@ -1,11 +1,9 @@ -{$page_title={intl l='Page not found'}} +{extends file="general_error.html"} -{include file='includes/header.inc.html'} +{block name="page-title"}{intl l='Page not found'}{/block} +{block name="content-title"}{intl l='Page not found'}{/block} -
-

{intl l="Oops! An Error Occurred"}

-

{intl l='The server returned a "404 Not Found"'}

-

{intl l='The page you\'ve requested was not found. Please check the page address, and try again.'}

-
- -{include file='includes/footer.inc.html'} \ No newline at end of file +{block name="error-message"} +

{intl l='The server returned a "404 Not Found"'}

+

{intl l='The page you\'ve requested was not found. Please check the page address, and try again.'}

+{/block} \ No newline at end of file diff --git a/templates/admin/default/admin-layout.tpl b/templates/admin/default/admin-layout.tpl new file mode 100644 index 000000000..93143d0e6 --- /dev/null +++ b/templates/admin/default/admin-layout.tpl @@ -0,0 +1,223 @@ +{* -- By default, check admin login ----------------------------------------- *} + +{block name="check-auth"} + {check_auth roles="ADMIN" permissions="{block name="check-permissions"}{/block}" login_tpl="/admin/login"} +{/block} + + + + + {block name="page-title"}Default Page Title{/block} - {intl l='Thelia Back Office'} + + {images file='assets/img/favicon.ico'}{/images} + + + + {block name="meta"}{/block} + + {* -- Bootstrap CSS section --------------------------------------------- *} + + {block name="before-bootstrap-css"}{/block} + + {stylesheets file='assets/bootstrap/css/bootstrap.css' filters='cssembed'} + + {/stylesheets} + + {stylesheets file='assets/bootstrap/css/bootstrap-responsive.css' filters='cssembed'} + + {/stylesheets} + + {block name="after-bootstrap-css"}{/block} + + {* -- Admin CSS section ------------------------------------------------- *} + + {block name="before-admin-css"}{/block} + + {stylesheets file='assets/css/*' filters='less,cssembed'} + + {/stylesheets} + + {block name="after-admin-css"}{/block} + + {* Modules css are included here *} + + {module_include location='head_css'} + + + + {* display top bar only if admin is connected *} + + {loop name="top-bar-auth" type="auth" roles="ADMIN"} + + {* -- Brand bar section ------------------------------------------------- *} + + {module_include location='before_topbar'} + +
+
+ +
{intl l='Version %ver' ver="{$THELIA_VERSION}"}
+ + {module_include location='inside_topbar'} + + + + {loop name="top-bar-search" type="auth" roles="ADMIN" permissions="admin.search"} + +
+
+ + +
+
+ + {/loop} + + +
+
+ + {module_include location='after_topbar'} + + {* -- Top menu section -------------------------------------------------- *} + + {module_include location='before_top_menu'} + + + + {module_include location='after_top_menu'} + + {/loop} + + {* A basic brandbar is displayed if user is not connected *} + + {elseloop rel="top-bar-auth"} + + {/elseloop} + + {* -- Main page content section ----------------------------------------- *} + + {block name="main-content"}Put here the content of the template{/block} + + {* -- Footer section ---------------------------------------------------- *} + + {module_include location='before_footer'} + +
+ + + {module_include location='after_footer'} + + + {* -- Javascript section ------------------------------------------------ *} + + {block name="before-javascript-include"}{/block} + + {javascripts file='assets/js/jquery.min.js'} + + {/javascripts} + + {javascripts file='assets/bootstrap/js/bootstrap.min.js'} + + {/javascripts} + + {block name="after-javascript-include"}{/block} + + {block name="javascript-initialization"}{/block} + + {* Modules scripts are included now *} + {module_include location='footer_js'} + + \ No newline at end of file diff --git a/templates/admin/default/assets/css/admin.less b/templates/admin/default/assets/css/admin.less index 6c5c76a8d..85cef27da 100755 --- a/templates/admin/default/assets/css/admin.less +++ b/templates/admin/default/assets/css/admin.less @@ -584,6 +584,10 @@ form .info .input-append .add-on { .actions { text-align: right; } + + .form { + margin-bottom: 0; + } } // Reduce bottom margin of admin tabs. diff --git a/templates/admin/default/categories.html b/templates/admin/default/categories.html index 2cc6b633c..1548140bf 100755 --- a/templates/admin/default/categories.html +++ b/templates/admin/default/categories.html @@ -1,11 +1,16 @@ -{check_auth roles="ADMIN" permissions="admin.catalog.view" login_tpl="/admin/login"} +{extends file="admin-layout.tpl"} -{$page_title={intl l='Catalog'}} +{block name="page-title"}{intl l='Catalog'}{/block} -{$thelia_page_css_file = "assets/bootstrap-editable/css/bootstrap-editable.css"} +{block name="check-permissions"}admin.catalog.view{/block} -{include file='includes/header.inc.html'} +{block name="after-admin-css"} + {stylesheets file='assets/bootstrap-editable/css/bootstrap-editable.css' filters='cssembed'} + + {/stylesheets} +{/block} +{block name="main-content"}
@@ -256,13 +261,15 @@ {include file="includes/add-category-dialog.html"} {include file="includes/delete-category-dialog.html"} +{/block} -{include file='includes/js.inc.html'} - -{javascripts file='assets/bootstrap-editable/js/bootstrap-editable.js'} - -{/javascripts} +{block name="after-javascript-include"} + {javascripts file='assets/bootstrap-editable/js/bootstrap-editable.js'} + + {/javascripts} +{/block} +{block name="javascript-initialization"} - -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file diff --git a/templates/admin/default/configuration.html b/templates/admin/default/configuration.html index 259a0f3d7..848283b5e 100644 --- a/templates/admin/default/configuration.html +++ b/templates/admin/default/configuration.html @@ -1,9 +1,10 @@ -{check_auth roles="ADMIN" permissions="admin.configuration.view" login_tpl="/admin/login"} +{extends file="admin-layout.tpl"} -{$page_title={intl l='Configuration'}} +{block name="page-title"}{intl l='Configuration'}{/block} -{include file='includes/header.inc.html'} +{block name="check-permissions"}admin.configuration.view{/block} +{block name="main-content"}
@@ -168,7 +169,4 @@
- -{include file='includes/js.inc.html'} - -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file diff --git a/templates/admin/default/currencies.html b/templates/admin/default/currencies.html new file mode 100644 index 000000000..762bb47ee --- /dev/null +++ b/templates/admin/default/currencies.html @@ -0,0 +1,401 @@ +{extends file="admin-layout.tpl"} + +{block name="page-title"}{intl l='Currencies'}{/block} + +{block name="check-permissions"}admin.configuration.currencies.view{/block} + +{block name="after-admin-css"} + {stylesheets file='assets/bootstrap-editable/css/bootstrap-editable.css' filters='cssembed'} + + {/stylesheets} +{/block} + +{block name="main-content"} +
+ +
+ + + + {module_include location='currencies_top'} + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + {module_include location='currencies_table_header'} + + + + + {loop name="currencies" type="currency" backend_context="1" lang=$lang_id order=$order} + + + + + + + + + + + + + + + + + {module_include location='currencies_table_row'} + + + + {/loop} + + {elseloop rel="currencies"} + + + + {/elseloop} +
+ {intl l='Currencies'} + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.currencies.create"} + + + + {/loop} + +
+ {if $order == 'id'} + + {$order_change = 'id_reverse'} + {elseif $order == 'id_reverse'} + + {$order_change = 'id'} + {else} + {$order_change = 'id'} + {/if} + + {intl l="ID"} + + + {if $order == 'alpha'} + + {$order_change = 'alpha_reverse'} + {elseif $order == 'alpha_reverse'} + + {$order_change = 'alpha'} + {else} + {$order_change = 'alpha'} + {/if} + + {intl l="Name"} + + + {if $order == 'code'} + + {$order_change = 'code_reverse'} + {elseif $order == 'code_reverse'} + + {$order_change = 'code'} + {else} + {$order_change = 'code'} + {/if} + {intl l="ISO 4217 Code"} + + + {if $order == 'symbol'} + + {$order_change = 'symbol_reverse'} + {elseif $order == 'symbol_reverse'} + + {$order_change = 'symbol'} + {else} + {$order_change = 'symbol'} + {/if} + + {intl l="Symbol"} + + + {if $order == 'rate'} + + {$order_change = 'rate_reverse'} + {elseif $order == 'rate_reverse'} + + {$order_change = 'rate'} + {else} + {$order_change = 'rate'} + {/if} + + {intl l="Rate in €"} + + + {if $order == 'manual'} + + {$order_change = 'manual_reverse'} + {elseif $order == 'manual_reverse'} + + {$order_change = 'manual'} + {else} + {$order_change = 'manual'} + {/if} + + {intl l="Position"} + {intl l="Default"} 
{$ID} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"} + {$NAME} + {/loop} + {elseloop rel="can_change"} + {$NAME} + {/elseloop} + {$ISOCODE}{$SYMBOL}{$RATE|string_format:"%.4f"} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.category.edit"} + + {$POSITION} + + {/loop} + + {elseloop rel="can_change"} + {$POSITION} + {/elseloop} + +
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"} + + {/loop} + + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.currencies.delete"} + + {/loop} +
+
+
+ {intl l="No currency has been created yet. Click the + button to create one."} +
+
+
+
+
+
+ + {module_include location='currencies_bottom'} + +
+
+ + +{* Adding a new currency *} + + + + +{* Delete confirmation dialog *} + + +{/block} + +{block name="after-javascript-include"} + {javascripts file='assets/bootstrap-editable/js/bootstrap-editable.js'} + + {/javascripts} +{/block} + +{block name="javascript-initialization"} + +{/block} \ No newline at end of file diff --git a/templates/admin/default/edit_category.html b/templates/admin/default/edit_category.html index d58c251fd..65c5f9c56 100755 --- a/templates/admin/default/edit_category.html +++ b/templates/admin/default/edit_category.html @@ -1,9 +1,10 @@ -{check_auth roles="ADMIN" permissions="admin.catalog.view" login_tpl="/admin/login"} +{extends file="admin-layout.tpl"} -{$page_title={intl l='Edit category'}} +{block name="check-permissions"}admin.catalog.view{/block} -{include file='includes/header.inc.html'} +{block name="page-title"}{intl l='Edit category'}{/block} +{block name="main-content"}
+{/block} -{include file='includes/js.inc.html'} - +{block name="javascript-initialization"} - -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file diff --git a/templates/admin/default/general_error.html b/templates/admin/default/general_error.html index b8f9e8661..dcbcc80ab 100755 --- a/templates/admin/default/general_error.html +++ b/templates/admin/default/general_error.html @@ -1,10 +1,22 @@ -{$page_title={intl l='An error occured'}} +{extends file="admin-layout.tpl"} -{include file='includes/header.inc.html'} +{* -- We do not check admin login on this page *} +{block name="check-auth"}{/block} +{block name="page-title"}{intl l='An error occured'}{/block} + +{block name="main-content"}
-

{intl l="Oops! An Error Occurred"}

-

{$error_message}

-
-{include file='includes/footer.inc.html'} \ No newline at end of file +
+
+

{intl l="Oops! An Error Occurred"}

+ + {block name="error-message"}
{$error_message}
{/block} + +

{intl l="Go to administration home"}

+
+
+ + +{/block} \ No newline at end of file diff --git a/templates/admin/default/home.html b/templates/admin/default/home.html index a48e30ec6..e4897eda6 100755 --- a/templates/admin/default/home.html +++ b/templates/admin/default/home.html @@ -1,18 +1,18 @@ -{check_auth roles="ADMIN" login_tpl="/admin/login"} -{$page_title={intl l='Home'}} -{include file='includes/header.inc.html'} +{extends file="admin-layout.tpl"} -
-
+{block name="page-title"}{intl l='Back-office home'}{/block} - {module_include location='home_top'} +{block name="main-content"} +
+
-
- This is the administration home page. Put some interesting statistics here, and display useful information :) + {module_include location='home_top'} + +
+ This is the administration home page. Put some interesting statistics here, and display useful information :) +
+ + {module_include location='home_bottom'}
- - {module_include location='home_bottom'}
-
- -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file diff --git a/templates/admin/default/includes/footer.inc.html b/templates/admin/default/includes/footer.inc.html deleted file mode 100755 index c69b253ad..000000000 --- a/templates/admin/default/includes/footer.inc.html +++ /dev/null @@ -1,20 +0,0 @@ - {module_include location='before_footer'} - -
- - - {module_include location='after_footer'} - - \ No newline at end of file diff --git a/templates/admin/default/includes/header.inc.html b/templates/admin/default/includes/header.inc.html deleted file mode 100755 index 2ee435b4b..000000000 --- a/templates/admin/default/includes/header.inc.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - {intl l='Thelia Back Office'}{if ! empty($page_title)} - {$page_title}{/if} - - {images file='../assets/img/favicon.ico'}{/images} - - - - {stylesheets file='../assets/bootstrap/css/bootstrap.css' filters='cssembed'} - - {/stylesheets} - - {stylesheets file='../assets/bootstrap/css/bootstrap-responsive.css' filters='cssembed'} - - {/stylesheets} - - {* Include here page specifc CSS file, if any *} - - {if ! empty($thelia_page_css_file)} - {stylesheets file="../$thelia_page_css_file" filters='less,cssembed'} - - {/stylesheets} - {/if} - - {stylesheets file='../assets/css/*' filters='less,cssembed'} - - {/stylesheets} - - {* Include here page specifc CSS file, if any *} - - {if ! empty($thelia_page_css_file)} - {stylesheets file="../$thelia_page_css_file" filters='less,cssembed'} - - {/stylesheets} - {/if} - - {* Modules css are included here *} - - {module_include location='head_css'} - - - -{* display top bar once admin is connected *} - -{loop name="top-bar-auth" type="auth" roles="ADMIN"} - -{module_include location='before_topbar'} - -
-
- -
{intl l='Version %ver' ver="{$THELIA_VERSION}"}
- - {module_include location='inside_topbar'} - - - - {loop name="top-bar-search" type="auth" roles="ADMIN" permissions="admin.search"} - - {/loop} - - -
-
- -{module_include location='after_topbar'} - - -{module_include location='before_top_menu'} - - - -{module_include location='after_top_menu'} - -{/loop} - -{elseloop rel="top-bar-auth"} - -{/elseloop} diff --git a/templates/admin/default/includes/js.inc.html b/templates/admin/default/includes/js.inc.html deleted file mode 100755 index 367d966ff..000000000 --- a/templates/admin/default/includes/js.inc.html +++ /dev/null @@ -1,13 +0,0 @@ - -{* Include required JS files *} - -{javascripts file='../assets/js/jquery.min.js'} - -{/javascripts} - -{javascripts file='../assets/bootstrap/js/bootstrap.min.js'} - -{/javascripts} - -{* Modules scripts are included now *} -{module_include location='footer_js'} diff --git a/templates/admin/default/login.html b/templates/admin/default/login.html index 0fa6852a5..13e57a8eb 100755 --- a/templates/admin/default/login.html +++ b/templates/admin/default/login.html @@ -1,66 +1,70 @@ -{$page_title={intl l='Welcome'}} -{include file='includes/header.inc.html'} +{extends file="admin-layout.tpl"} -
+{* -- We do not check admin login on this page *} +{block name="check-auth"}{/block} -
+{block name="page-title"}{intl l='Welcome'}{/block} - {module_include location='index_top'} +{block name="main-content"} +
-
-

{intl l='Thelia Back Office'}

+
- {form name="thelia.admin.login"} -
+ {module_include location='index_top'} - {if #form_error}
#form_error_message
{/if} +
+

{intl l='Thelia Back Office'}

- {form_hidden_fields form=$form} + {form name="thelia.admin.login"} + - {form_field form=$form field='success_url'} - {* on success, redirect to /admin *} - {/form_field} + {if #form_error}
#form_error_message
{/if} - {form_field form=$form field='username'} - - - - {/form_field} + {form_hidden_fields form=$form} - {form_field form=$form field='password'} - - - - {/form_field} + {form_field form=$form field='success_url'} + {* on success, redirect to /admin *} + {/form_field} - {form_field form=$form field='remember_me'} - - {/form_field} + {form_field form=$form field='username'} + + + + {/form_field} - - - {/form} -
+ {form_field form=$form field='password'} + + + + {/form_field} - {module_include location='index_middle'} + {form_field form=$form field='remember_me'} + + {/form_field} -
-
-
{intl l="Loading Thelia lastest news..."}
+ + + {/form} +
+ + {module_include location='index_middle'} + +
+
+
{intl l="Loading Thelia lastest news..."}
+
+ + {module_include location='index_bottom'} +
+{/block} - {module_include location='index_bottom'} - -
- -{include file='includes/js.inc.html'} - - - -{include file='includes/footer.inc.html'} \ No newline at end of file +{block name="javascript-initialization"} + +{/block} \ No newline at end of file diff --git a/templates/admin/default/message-edit.html b/templates/admin/default/message-edit.html index 1c4dfe159..3639a8e20 100644 --- a/templates/admin/default/message-edit.html +++ b/templates/admin/default/message-edit.html @@ -1,9 +1,10 @@ -{check_auth roles="ADMIN" permissions="admin.configuration.messages.edit" login_tpl="/admin/login"} +{extends file="admin-layout.tpl"} -{$page_title={intl l='Edit a mailing template'}} +{block name="page-title"}{intl l='Edit a mailing template'}{/block} -{include file='includes/header.inc.html'} +{block name="check-permissions"}admin.configuration.messages.edit{/block} +{block name="main-content"}
@@ -27,11 +28,9 @@
-
- - {form name="thelia.admin.message.modification"} -
- + {form name="thelia.admin.message.modification"} + +
{* Be sure to get the message ID, even if the form could not be validated *} @@ -142,9 +141,15 @@
{/form_field} - - {/form} - + +
+
+

{intl l='Message created on %date_create. Last modification: %date_change' df=$datetime_format date_create=$CREATE_DATE->format($datetime_format) date_change=$UPDATE_DATE->format($datetime_format)}

+
+
+ + + {/form}
@@ -165,7 +170,4 @@
- -{include file='includes/js.inc.html'} - -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file diff --git a/templates/admin/default/messages.html b/templates/admin/default/messages.html index e75cbe8da..3c7a35e86 100644 --- a/templates/admin/default/messages.html +++ b/templates/admin/default/messages.html @@ -1,9 +1,10 @@ -{check_auth roles="ADMIN" permissions="admin.configuration.messages.view" login_tpl="/admin/login"} +{extends file="admin-layout.tpl"} -{$page_title={intl l='Thelia Mailing Templates'}} +{block name="page-title"}{intl l='Thelia Mailing Templates'}{/block} -{include file='includes/header.inc.html'} +{block name="check-permissions"}admin.configuration.messages.view{/block} +{block name="main-content"}
@@ -202,9 +203,9 @@
+{/block} -{include file='includes/js.inc.html'} - +{block name="javascript-initialization"} - -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file diff --git a/templates/admin/default/variable-edit.html b/templates/admin/default/variable-edit.html index 86d13060a..40a70c077 100644 --- a/templates/admin/default/variable-edit.html +++ b/templates/admin/default/variable-edit.html @@ -1,9 +1,10 @@ -{check_auth roles="ADMIN" permissions="admin.configuration.variables.edit" login_tpl="/admin/login"} +{extends file="admin-layout.tpl"} -{$page_title={intl l='Edit a system variable'}} +{block name="page-title"}{intl l='Edit a system variable'}{/block} -{include file='includes/header.inc.html'} +{block name="check-permissions"}admin.configuration.variables.edit{/block} +{block name="main-content"}
@@ -27,11 +28,9 @@
-
- - {form name="thelia.admin.config.modification"} -
- + {form name="thelia.admin.config.modification"} + +
{* Be sure to get the variable ID, even if the form could not be validated *} @@ -107,15 +106,22 @@ {include file="includes/standard-description-form-fields.html"} - - {/form} -
+
+
+

{intl l='Variable created on %date_create. Last modification: %date_change' df=$datetime_format date_create=$CREATE_DATE->format($datetime_format) date_change=$UPDATE_DATE->format($datetime_format)}

+
+
+ +
+ + {/form}
+ {/loop} {elseloop rel="config_edit"} @@ -130,7 +136,4 @@
- -{include file='includes/js.inc.html'} - -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file diff --git a/templates/admin/default/variables.html b/templates/admin/default/variables.html index f47ec53dd..37c8ef4b2 100644 --- a/templates/admin/default/variables.html +++ b/templates/admin/default/variables.html @@ -1,9 +1,10 @@ -{check_auth roles="ADMIN" permissions="admin.configuration.variables.view" login_tpl="/admin/login"} +{extends file="admin-layout.tpl"} -{$page_title={intl l='Thelia System Variables'}} +{block name="page-title"}{intl l='Thelia System Variables'}{/block} -{include file='includes/header.inc.html'} +{block name="check-permissions"}admin.configuration.variables.view{/block} +{block name="main-content"}
@@ -223,9 +224,9 @@
+{/block} -{include file='includes/js.inc.html'} - +{block name="javascript-initialization"} - -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file From 69f88db09051dad35af22d09a106772909fd9b28 Mon Sep 17 00:00:00 2001 From: franck Date: Tue, 3 Sep 2013 11:32:13 +0200 Subject: [PATCH 2/3] en_EN -> en_UK, the "en_EN" locale does not exists. --- install/insert.sql | 540 ++++++++++++++++++++++----------------------- 1 file changed, 270 insertions(+), 270 deletions(-) diff --git a/install/insert.sql b/install/insert.sql index 4336eaa0c..41c63e353 100755 --- a/install/insert.sql +++ b/install/insert.sql @@ -24,11 +24,11 @@ INSERT INTO `customer_title`(`id`, `by_default`, `position`, `created_at`, `upda INSERT INTO `customer_title_i18n` (`id`, `locale`, `short`, `long`) VALUES (1, 'fr_FR', 'Mr', 'Monsieur'), -(1, 'en_EN', 'M', 'Mister'), +(1, 'en_UK', 'M', 'Mister'), (2, 'fr_FR', 'Mrs', 'Madame'), -(2, 'en_EN', 'Mme', 'Misses'), +(2, 'en_UK', 'Mme', 'Misses'), (3, 'fr_FR', 'Miss', 'Madamemoiselle'), -(3, 'en_EN', 'Mlle', 'Miss'); +(3, 'en_UK', 'Mlle', 'Miss'); INSERT INTO `currency` (`id` ,`code` ,`symbol` ,`rate`, `position` ,`by_default` ,`created_at` ,`updated_at`) VALUES @@ -39,11 +39,11 @@ VALUES INSERT INTO `currency_i18n` (`id` ,`locale` ,`name`) VALUES (1, 'fr_FR', 'euro'), -(1, 'en_EN', 'euro'), +(1, 'en_UK', 'euro'), (2, 'fr_FR', 'dollar'), -(2, 'en_EN', 'dollar'), +(2, 'en_UK', 'dollar'), (3, 'fr_FR', 'livre'), -(3, 'en_EN', 'pound'); +(3, 'en_UK', 'pound'); INSERT INTO `country` (`id`, `area_id`, `isocode`, `isoalpha2`, `isoalpha3`, `created_at`, `updated_at`) VALUES @@ -313,795 +313,795 @@ INSERT INTO `country` (`id`, `area_id`, `isocode`, `isoalpha2`, `isoalpha3`, `cr (268, NULL, '840', 'US', 'USA', NOW(), NOW()); INSERT INTO `country_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES -(1, 'en_EN', 'Afghanistan', '', '', ''), +(1, 'en_UK', 'Afghanistan', '', '', ''), (1, 'es_ES', 'Afganistán', '', '', ''), (1, 'fr_FR', 'Afghanistan', '', '', ''), -(2, 'en_EN', 'South Africa', '', '', ''), +(2, 'en_UK', 'South Africa', '', '', ''), (2, 'es_ES', 'Sudáfrica', '', '', ''), (2, 'fr_FR', 'Afrique du Sud', '', '', ''), -(3, 'en_EN', 'Albania', '', '', ''), +(3, 'en_UK', 'Albania', '', '', ''), (3, 'es_ES', 'Albania', '', '', ''), (3, 'fr_FR', 'Albanie', '', '', ''), -(4, 'en_EN', 'Algeria', '', '', ''), +(4, 'en_UK', 'Algeria', '', '', ''), (4, 'es_ES', 'Argelia', '', '', ''), (4, 'fr_FR', 'Algérie', '', '', ''), -(5, 'en_EN', 'Germany', '', '', ''), +(5, 'en_UK', 'Germany', '', '', ''), (5, 'es_ES', 'Alemania', '', '', ''), (5, 'fr_FR', 'Allemagne', '', '', ''), -(6, 'en_EN', 'Andorra', '', '', ''), +(6, 'en_UK', 'Andorra', '', '', ''), (6, 'es_ES', 'Andorra', '', '', ''), (6, 'fr_FR', 'Andorre', '', '', ''), -(7, 'en_EN', 'Angola', '', '', ''), +(7, 'en_UK', 'Angola', '', '', ''), (7, 'es_ES', 'Angola', '', '', ''), (7, 'fr_FR', 'Angola', '', '', ''), -(8, 'en_EN', 'Antigua and Barbuda', '', '', ''), +(8, 'en_UK', 'Antigua and Barbuda', '', '', ''), (8, 'es_ES', 'Antigua y Barbuda', '', '', ''), (8, 'fr_FR', 'Antigua-et-Barbuda', '', '', ''), -(9, 'en_EN', 'Saudi Arabia', '', '', ''), +(9, 'en_UK', 'Saudi Arabia', '', '', ''), (9, 'es_ES', 'Arabia Saudita', '', '', ''), (9, 'fr_FR', 'Arabie saoudite', '', '', ''), -(10, 'en_EN', 'Argentina', '', '', ''), +(10, 'en_UK', 'Argentina', '', '', ''), (10, 'es_ES', 'Argentina', '', '', ''), (10, 'fr_FR', 'Argentine', '', '', ''), -(11, 'en_EN', 'Armenia', '', '', ''), +(11, 'en_UK', 'Armenia', '', '', ''), (11, 'es_ES', 'Armenia', '', '', ''), (11, 'fr_FR', 'Arménie', '', '', ''), -(12, 'en_EN', 'Australia', '', '', ''), +(12, 'en_UK', 'Australia', '', '', ''), (12, 'es_ES', 'Australia', '', '', ''), (12, 'fr_FR', 'Australie', '', '', ''), -(13, 'en_EN', 'Austria', '', '', ''), +(13, 'en_UK', 'Austria', '', '', ''), (13, 'es_ES', 'Austria', '', '', ''), (13, 'fr_FR', 'Autriche', '', '', ''), -(14, 'en_EN', 'Azerbaijan', '', '', ''), +(14, 'en_UK', 'Azerbaijan', '', '', ''), (14, 'es_ES', 'Azerbaiyán', '', '', ''), (14, 'fr_FR', 'Azerbaïdjan', '', '', ''), -(15, 'en_EN', 'Bahamas', '', '', ''), +(15, 'en_UK', 'Bahamas', '', '', ''), (15, 'es_ES', 'Bahamas', '', '', ''), (15, 'fr_FR', 'Bahamas', '', '', ''), -(16, 'en_EN', 'Bahrain', '', '', ''), +(16, 'en_UK', 'Bahrain', '', '', ''), (16, 'es_ES', 'Bahrein', '', '', ''), (16, 'fr_FR', 'Bahreïn', '', '', ''), -(17, 'en_EN', 'Bangladesh', '', '', ''), +(17, 'en_UK', 'Bangladesh', '', '', ''), (17, 'es_ES', 'Bangladesh', '', '', ''), (17, 'fr_FR', 'Bangladesh', '', '', ''), -(18, 'en_EN', 'Barbados', '', '', ''), +(18, 'en_UK', 'Barbados', '', '', ''), (18, 'es_ES', 'Barbados', '', '', ''), (18, 'fr_FR', 'Barbade', '', '', ''), -(19, 'en_EN', 'Belarus', '', '', ''), +(19, 'en_UK', 'Belarus', '', '', ''), (19, 'es_ES', 'Belarús', '', '', ''), (19, 'fr_FR', 'Belau', '', '', ''), -(20, 'en_EN', 'Belgium', '', '', ''), +(20, 'en_UK', 'Belgium', '', '', ''), (20, 'es_ES', 'Bélgica', '', '', ''), (20, 'fr_FR', 'Belgique', '', '', ''), -(21, 'en_EN', 'Belize', '', '', ''), +(21, 'en_UK', 'Belize', '', '', ''), (21, 'es_ES', 'Belice', '', '', ''), (21, 'fr_FR', 'Belize', '', '', ''), -(22, 'en_EN', 'Benin', '', '', ''), +(22, 'en_UK', 'Benin', '', '', ''), (22, 'es_ES', 'Benin', '', '', ''), (22, 'fr_FR', 'Bénin', '', '', ''), -(23, 'en_EN', 'Bhutan', '', '', ''), +(23, 'en_UK', 'Bhutan', '', '', ''), (23, 'es_ES', 'Bhután', '', '', ''), (23, 'fr_FR', 'Bhoutan', '', '', ''), -(24, 'en_EN', 'Bielorussia', '', '', ''), +(24, 'en_UK', 'Bielorussia', '', '', ''), (24, 'es_ES', 'Bielorusia', '', '', ''), (24, 'fr_FR', 'Biélorussie', '', '', ''), -(25, 'en_EN', 'Burma', '', '', ''), +(25, 'en_UK', 'Burma', '', '', ''), (25, 'es_ES', 'Birmania', '', '', ''), (25, 'fr_FR', 'Birmanie', '', '', ''), -(26, 'en_EN', 'Bolivia', '', '', ''), +(26, 'en_UK', 'Bolivia', '', '', ''), (26, 'es_ES', 'Bolivia', '', '', ''), (26, 'fr_FR', 'Bolivie', '', '', ''), -(27, 'en_EN', 'Bosnia and Herzegovina', '', '', ''), +(27, 'en_UK', 'Bosnia and Herzegovina', '', '', ''), (27, 'es_ES', 'Bosnia y Herzegovina', '', '', ''), (27, 'fr_FR', 'Bosnie-Herzégovine', '', '', ''), -(28, 'en_EN', 'Botswana', '', '', ''), +(28, 'en_UK', 'Botswana', '', '', ''), (28, 'es_ES', 'Botswana', '', '', ''), (28, 'fr_FR', 'Botswana', '', '', ''), -(29, 'en_EN', 'Brazil', '', '', ''), +(29, 'en_UK', 'Brazil', '', '', ''), (29, 'es_ES', 'Brasil', '', '', ''), (29, 'fr_FR', 'Brésil', '', '', ''), -(30, 'en_EN', 'Brunei', '', '', ''), +(30, 'en_UK', 'Brunei', '', '', ''), (30, 'es_ES', 'Brunei', '', '', ''), (30, 'fr_FR', 'Brunei', '', '', ''), -(31, 'en_EN', 'Bulgaria', '', '', ''), +(31, 'en_UK', 'Bulgaria', '', '', ''), (31, 'es_ES', 'Bulgaria', '', '', ''), (31, 'fr_FR', 'Bulgarie', '', '', ''), -(32, 'en_EN', 'Burkina', '', '', ''), +(32, 'en_UK', 'Burkina', '', '', ''), (32, 'es_ES', 'Burkina', '', '', ''), (32, 'fr_FR', 'Burkina', '', '', ''), -(33, 'en_EN', 'Burundi', '', '', ''), +(33, 'en_UK', 'Burundi', '', '', ''), (33, 'es_ES', 'Burundi', '', '', ''), (33, 'fr_FR', 'Burundi', '', '', ''), -(34, 'en_EN', 'Cambodia', '', '', ''), +(34, 'en_UK', 'Cambodia', '', '', ''), (34, 'es_ES', 'Camboya', '', '', ''), (34, 'fr_FR', 'Cambodge', '', '', ''), -(35, 'en_EN', 'Cameroon', '', '', ''), +(35, 'en_UK', 'Cameroon', '', '', ''), (35, 'es_ES', 'Camerún', '', '', ''), (35, 'fr_FR', 'Cameroun', '', '', ''), -(37, 'en_EN', 'Cape Verde', '', '', ''), +(37, 'en_UK', 'Cape Verde', '', '', ''), (37, 'es_ES', 'Cabo Verde', '', '', ''), (37, 'fr_FR', 'Cap-Vert', '', '', ''), -(38, 'en_EN', 'Chile', '', '', ''), +(38, 'en_UK', 'Chile', '', '', ''), (38, 'es_ES', 'Chile', '', '', ''), (38, 'fr_FR', 'Chili', '', '', ''), -(39, 'en_EN', 'China', '', '', ''), +(39, 'en_UK', 'China', '', '', ''), (39, 'es_ES', 'China', '', '', ''), (39, 'fr_FR', 'Chine', '', '', ''), -(40, 'en_EN', 'Cyprus', '', '', ''), +(40, 'en_UK', 'Cyprus', '', '', ''), (40, 'es_ES', 'Chipre', '', '', ''), (40, 'fr_FR', 'Chypre', '', '', ''), -(41, 'en_EN', 'Colombia', '', '', ''), +(41, 'en_UK', 'Colombia', '', '', ''), (41, 'es_ES', 'Colombia', '', '', ''), (41, 'fr_FR', 'Colombie', '', '', ''), -(42, 'en_EN', 'Comoros', '', '', ''), +(42, 'en_UK', 'Comoros', '', '', ''), (42, 'es_ES', 'Comoras', '', '', ''), (42, 'fr_FR', 'Comores', '', '', ''), -(43, 'en_EN', 'Congo', '', '', ''), +(43, 'en_UK', 'Congo', '', '', ''), (43, 'es_ES', 'Congo', '', '', ''), (43, 'fr_FR', 'Congo', '', '', ''), -(44, 'en_EN', 'Cook Islands', '', '', ''), +(44, 'en_UK', 'Cook Islands', '', '', ''), (44, 'es_ES', 'Cook', '', '', ''), (44, 'fr_FR', 'Cook', '', '', ''), -(45, 'en_EN', 'North Korea', '', '', ''), +(45, 'en_UK', 'North Korea', '', '', ''), (45, 'es_ES', 'Corea del Norte', '', '', ''), (45, 'fr_FR', 'Corée du Nord', '', '', ''), -(46, 'en_EN', 'South Korea', '', '', ''), +(46, 'en_UK', 'South Korea', '', '', ''), (46, 'es_ES', 'Corea del Sur', '', '', ''), (46, 'fr_FR', 'Corée du Sud', '', '', ''), -(47, 'en_EN', 'Costa Rica', '', '', ''), +(47, 'en_UK', 'Costa Rica', '', '', ''), (47, 'es_ES', 'Costa Rica', '', '', ''), (47, 'fr_FR', 'Costa Rica', '', '', ''), -(48, 'en_EN', 'Ivory Coast', '', '', ''), +(48, 'en_UK', 'Ivory Coast', '', '', ''), (48, 'es_ES', 'Costa de Marfil', '', '', ''), (48, 'fr_FR', 'Côte dIvoire', '', '', ''), -(49, 'en_EN', 'Croatia', '', '', ''), +(49, 'en_UK', 'Croatia', '', '', ''), (49, 'es_ES', 'Croacia', '', '', ''), (49, 'fr_FR', 'Croatie', '', '', ''), -(50, 'en_EN', 'Cuba', '', '', ''), +(50, 'en_UK', 'Cuba', '', '', ''), (50, 'es_ES', 'Cuba', '', '', ''), (50, 'fr_FR', 'Cuba', '', '', ''), -(51, 'en_EN', 'Denmark', '', '', ''), +(51, 'en_UK', 'Denmark', '', '', ''), (51, 'es_ES', 'Dinamarca', '', '', ''), (51, 'fr_FR', 'Danemark', '', '', ''), -(52, 'en_EN', 'Djibouti', '', '', ''), +(52, 'en_UK', 'Djibouti', '', '', ''), (52, 'es_ES', 'Djibouti', '', '', ''), (52, 'fr_FR', 'Djibouti', '', '', ''), -(53, 'en_EN', 'Dominica', '', '', ''), +(53, 'en_UK', 'Dominica', '', '', ''), (53, 'es_ES', 'Dominica', '', '', ''), (53, 'fr_FR', 'Dominique', '', '', ''), -(54, 'en_EN', 'Egypt', '', '', ''), +(54, 'en_UK', 'Egypt', '', '', ''), (54, 'es_ES', 'Egipto', '', '', ''), (54, 'fr_FR', 'Égypte', '', '', ''), -(55, 'en_EN', 'United Arab Emirates', '', '', ''), +(55, 'en_UK', 'United Arab Emirates', '', '', ''), (55, 'es_ES', 'Emiratos Árabes Unidos', '', '', ''), (55, 'fr_FR', 'Émirats arabes unis', '', '', ''), -(56, 'en_EN', 'Ecuador', '', '', ''), +(56, 'en_UK', 'Ecuador', '', '', ''), (56, 'es_ES', 'Ecuador', '', '', ''), (56, 'fr_FR', 'Équateur', '', '', ''), -(57, 'en_EN', 'Eritrea', '', '', ''), +(57, 'en_UK', 'Eritrea', '', '', ''), (57, 'es_ES', 'Eritrea', '', '', ''), (57, 'fr_FR', 'Érythrée', '', '', ''), -(58, 'en_EN', 'Spain', '', '', ''), +(58, 'en_UK', 'Spain', '', '', ''), (58, 'es_ES', 'España', '', '', ''), (58, 'fr_FR', 'Espagne', '', '', ''), -(59, 'en_EN', 'Estonia', '', '', ''), +(59, 'en_UK', 'Estonia', '', '', ''), (59, 'es_ES', 'Estonia', '', '', ''), (59, 'fr_FR', 'Estonie', '', '', ''), -(61, 'en_EN', 'Ethiopia', '', '', ''), +(61, 'en_UK', 'Ethiopia', '', '', ''), (61, 'es_ES', 'Etiopía', '', '', ''), (61, 'fr_FR', 'Éthiopie', '', '', ''), -(62, 'en_EN', 'Fiji', '', '', ''), +(62, 'en_UK', 'Fiji', '', '', ''), (62, 'es_ES', 'Fiji', '', '', ''), (62, 'fr_FR', 'Fidji', '', '', ''), -(63, 'en_EN', 'Finland', '', '', ''), +(63, 'en_UK', 'Finland', '', '', ''), (63, 'es_ES', 'Finlandia', '', '', ''), (63, 'fr_FR', 'Finlande', '', '', ''), -(64, 'en_EN', 'France metropolitan', '', '', ''), +(64, 'en_UK', 'France metropolitan', '', '', ''), (64, 'es_ES', 'Francia', '', '', ''), (64, 'fr_FR', 'France métropolitaine', '', '', ''), -(65, 'en_EN', 'Gabon', '', '', ''), +(65, 'en_UK', 'Gabon', '', '', ''), (65, 'es_ES', 'Gabón', '', '', ''), (65, 'fr_FR', 'Gabon', '', '', ''), -(66, 'en_EN', 'Gambia', '', '', ''), +(66, 'en_UK', 'Gambia', '', '', ''), (66, 'es_ES', 'Gambia', '', '', ''), (66, 'fr_FR', 'Gambie', '', '', ''), -(67, 'en_EN', 'Georgia', '', '', ''), +(67, 'en_UK', 'Georgia', '', '', ''), (67, 'es_ES', 'Georgia', '', '', ''), (67, 'fr_FR', 'Géorgie', '', '', ''), -(68, 'en_EN', 'Ghana', '', '', ''), +(68, 'en_UK', 'Ghana', '', '', ''), (68, 'es_ES', 'Ghana', '', '', ''), (68, 'fr_FR', 'Ghana', '', '', ''), -(69, 'en_EN', 'Greece', '', '', ''), +(69, 'en_UK', 'Greece', '', '', ''), (69, 'es_ES', 'Grecia', '', '', ''), (69, 'fr_FR', 'Grèce', '', '', ''), -(70, 'en_EN', 'Grenada', '', '', ''), +(70, 'en_UK', 'Grenada', '', '', ''), (70, 'es_ES', 'Granada', '', '', ''), (70, 'fr_FR', 'Grenade', '', '', ''), -(71, 'en_EN', 'Guatemala', '', '', ''), +(71, 'en_UK', 'Guatemala', '', '', ''), (71, 'es_ES', 'Guatemala', '', '', ''), (71, 'fr_FR', 'Guatemala', '', '', ''), -(72, 'en_EN', 'Guinea', '', '', ''), +(72, 'en_UK', 'Guinea', '', '', ''), (72, 'es_ES', 'Guinea', '', '', ''), (72, 'fr_FR', 'Guinée', '', '', ''), -(73, 'en_EN', 'Guinea-Bissau', '', '', ''), +(73, 'en_UK', 'Guinea-Bissau', '', '', ''), (73, 'es_ES', 'Guinea-Bissau', '', '', ''), (73, 'fr_FR', 'Guinée-Bissao', '', '', ''), -(74, 'en_EN', 'Equatorial Guinea', '', '', ''), +(74, 'en_UK', 'Equatorial Guinea', '', '', ''), (74, 'es_ES', 'Guinea Ecuatorial', '', '', ''), (74, 'fr_FR', 'Guinée équatoriale', '', '', ''), -(75, 'en_EN', 'Guyana', '', '', ''), +(75, 'en_UK', 'Guyana', '', '', ''), (75, 'es_ES', 'Guyana', '', '', ''), (75, 'fr_FR', 'Guyana', '', '', ''), -(76, 'en_EN', 'Haiti', '', '', ''), +(76, 'en_UK', 'Haiti', '', '', ''), (76, 'es_ES', 'Haití', '', '', ''), (76, 'fr_FR', 'Haïti', '', '', ''), -(77, 'en_EN', 'Honduras', '', '', ''), +(77, 'en_UK', 'Honduras', '', '', ''), (77, 'es_ES', 'Honduras', '', '', ''), (77, 'fr_FR', 'Honduras', '', '', ''), -(78, 'en_EN', 'Hungary', '', '', ''), +(78, 'en_UK', 'Hungary', '', '', ''), (78, 'es_ES', 'Hungría', '', '', ''), (78, 'fr_FR', 'Hongrie', '', '', ''), -(79, 'en_EN', 'India', '', '', ''), +(79, 'en_UK', 'India', '', '', ''), (79, 'es_ES', 'India', '', '', ''), (79, 'fr_FR', 'Inde', '', '', ''), -(80, 'en_EN', 'Indonesia', '', '', ''), +(80, 'en_UK', 'Indonesia', '', '', ''), (80, 'es_ES', 'Indonesia', '', '', ''), (80, 'fr_FR', 'Indonésie', '', '', ''), -(81, 'en_EN', 'Iran', '', '', ''), +(81, 'en_UK', 'Iran', '', '', ''), (81, 'es_ES', 'Irán', '', '', ''), (81, 'fr_FR', 'Iran', '', '', ''), -(82, 'en_EN', 'Iraq', '', '', ''), +(82, 'en_UK', 'Iraq', '', '', ''), (82, 'es_ES', 'Iraq', '', '', ''), (82, 'fr_FR', 'Iraq', '', '', ''), -(83, 'en_EN', 'Ireland', '', '', ''), +(83, 'en_UK', 'Ireland', '', '', ''), (83, 'es_ES', 'Irlanda', '', '', ''), (83, 'fr_FR', 'Irlande', '', '', ''), -(84, 'en_EN', 'Iceland', '', '', ''), +(84, 'en_UK', 'Iceland', '', '', ''), (84, 'es_ES', 'Islandia', '', '', ''), (84, 'fr_FR', 'Islande', '', '', ''), -(85, 'en_EN', 'Israel', '', '', ''), +(85, 'en_UK', 'Israel', '', '', ''), (85, 'es_ES', 'Israel', '', '', ''), (85, 'fr_FR', 'Israël', '', '', ''), -(86, 'en_EN', 'Italy', '', '', ''), +(86, 'en_UK', 'Italy', '', '', ''), (86, 'es_ES', 'Italia', '', '', ''), (86, 'fr_FR', 'Italie', '', '', ''), -(87, 'en_EN', 'Jamaica', '', '', ''), +(87, 'en_UK', 'Jamaica', '', '', ''), (87, 'es_ES', 'Jamaica', '', '', ''), (87, 'fr_FR', 'Jamaïque', '', '', ''), -(88, 'en_EN', 'Japan', '', '', ''), +(88, 'en_UK', 'Japan', '', '', ''), (88, 'es_ES', 'Japón', '', '', ''), (88, 'fr_FR', 'Japon', '', '', ''), -(89, 'en_EN', 'Jordan', '', '', ''), +(89, 'en_UK', 'Jordan', '', '', ''), (89, 'es_ES', 'Jordania', '', '', ''), (89, 'fr_FR', 'Jordanie', '', '', ''), -(90, 'en_EN', 'Kazakhstan', '', '', ''), +(90, 'en_UK', 'Kazakhstan', '', '', ''), (90, 'es_ES', 'Kazajstán', '', '', ''), (90, 'fr_FR', 'Kazakhstan', '', '', ''), -(91, 'en_EN', 'Kenya', '', '', ''), +(91, 'en_UK', 'Kenya', '', '', ''), (91, 'es_ES', 'Kenia', '', '', ''), (91, 'fr_FR', 'Kenya', '', '', ''), -(92, 'en_EN', 'Kyrgyzstan', '', '', ''), +(92, 'en_UK', 'Kyrgyzstan', '', '', ''), (92, 'es_ES', 'Kirguistán', '', '', ''), (92, 'fr_FR', 'Kirghizistan', '', '', ''), -(93, 'en_EN', 'Kiribati', '', '', ''), +(93, 'en_UK', 'Kiribati', '', '', ''), (93, 'es_ES', 'Kiribati', '', '', ''), (93, 'fr_FR', 'Kiribati', '', '', ''), -(94, 'en_EN', 'Kuwait', '', '', ''), +(94, 'en_UK', 'Kuwait', '', '', ''), (94, 'es_ES', 'Kuwait', '', '', ''), (94, 'fr_FR', 'Koweït', '', '', ''), -(95, 'en_EN', 'Laos', '', '', ''), +(95, 'en_UK', 'Laos', '', '', ''), (95, 'es_ES', 'Laos', '', '', ''), (95, 'fr_FR', 'Laos', '', '', ''), -(96, 'en_EN', 'Lesotho', '', '', ''), +(96, 'en_UK', 'Lesotho', '', '', ''), (96, 'es_ES', 'Lesotho', '', '', ''), (96, 'fr_FR', 'Lesotho', '', '', ''), -(97, 'en_EN', 'Latvia', '', '', ''), +(97, 'en_UK', 'Latvia', '', '', ''), (97, 'es_ES', 'Letonia', '', '', ''), (97, 'fr_FR', 'Lettonie', '', '', ''), -(98, 'en_EN', 'Lebanon', '', '', ''), +(98, 'en_UK', 'Lebanon', '', '', ''), (98, 'es_ES', 'Líbano', '', '', ''), (98, 'fr_FR', 'Liban', '', '', ''), -(99, 'en_EN', 'Liberia', '', '', ''), +(99, 'en_UK', 'Liberia', '', '', ''), (99, 'es_ES', 'Liberia', '', '', ''), (99, 'fr_FR', 'Liberia', '', '', ''), -(100, 'en_EN', 'Libya', '', '', ''), +(100, 'en_UK', 'Libya', '', '', ''), (100, 'es_ES', 'Libia', '', '', ''), (100, 'fr_FR', 'Libye', '', '', ''), -(101, 'en_EN', 'Liechtenstein', '', '', ''), +(101, 'en_UK', 'Liechtenstein', '', '', ''), (101, 'es_ES', 'Liechtenstein', '', '', ''), (101, 'fr_FR', 'Liechtenstein', '', '', ''), -(102, 'en_EN', 'Lithuania', '', '', ''), +(102, 'en_UK', 'Lithuania', '', '', ''), (102, 'es_ES', 'Lituania', '', '', ''), (102, 'fr_FR', 'Lituanie', '', '', ''), -(103, 'en_EN', 'Luxembourg', '', '', ''), +(103, 'en_UK', 'Luxembourg', '', '', ''), (103, 'es_ES', 'Luxemburgo', '', '', ''), (103, 'fr_FR', 'Luxembourg', '', '', ''), -(104, 'en_EN', 'Macedonia', '', '', ''), +(104, 'en_UK', 'Macedonia', '', '', ''), (104, 'es_ES', 'Macedonia', '', '', ''), (104, 'fr_FR', 'Macédoine', '', '', ''), -(105, 'en_EN', 'Madagascar', '', '', ''), +(105, 'en_UK', 'Madagascar', '', '', ''), (105, 'es_ES', 'Madagascar', '', '', ''), (105, 'fr_FR', 'Madagascar', '', '', ''), -(106, 'en_EN', 'Malaysia', '', '', ''), +(106, 'en_UK', 'Malaysia', '', '', ''), (106, 'es_ES', 'Malasia', '', '', ''), (106, 'fr_FR', 'Malaisie', '', '', ''), -(107, 'en_EN', 'Malawi', '', '', ''), +(107, 'en_UK', 'Malawi', '', '', ''), (107, 'es_ES', 'Malawi', '', '', ''), (107, 'fr_FR', 'Malawi', '', '', ''), -(108, 'en_EN', 'Maldives', '', '', ''), +(108, 'en_UK', 'Maldives', '', '', ''), (108, 'es_ES', 'Maldivas', '', '', ''), (108, 'fr_FR', 'Maldives', '', '', ''), -(109, 'en_EN', 'Mali', '', '', ''), +(109, 'en_UK', 'Mali', '', '', ''), (109, 'es_ES', 'Malí', '', '', ''), (109, 'fr_FR', 'Mali', '', '', ''), -(110, 'en_EN', 'Malta', '', '', ''), +(110, 'en_UK', 'Malta', '', '', ''), (110, 'es_ES', 'Malta', '', '', ''), (110, 'fr_FR', 'Malte', '', '', ''), -(111, 'en_EN', 'Morocco', '', '', ''), +(111, 'en_UK', 'Morocco', '', '', ''), (111, 'es_ES', 'Marruecos', '', '', ''), (111, 'fr_FR', 'Maroc', '', '', ''), -(112, 'en_EN', 'Marshall Islands', '', '', ''), +(112, 'en_UK', 'Marshall Islands', '', '', ''), (112, 'es_ES', 'Marshall', '', '', ''), (112, 'fr_FR', 'Marshall', '', '', ''), -(113, 'en_EN', 'Mauritius', '', '', ''), +(113, 'en_UK', 'Mauritius', '', '', ''), (113, 'es_ES', 'Mauricio', '', '', ''), (113, 'fr_FR', 'Maurice', '', '', ''), -(114, 'en_EN', 'Mauritania', '', '', ''), +(114, 'en_UK', 'Mauritania', '', '', ''), (114, 'es_ES', 'Mauritania', '', '', ''), (114, 'fr_FR', 'Mauritanie', '', '', ''), -(115, 'en_EN', 'Mexico', '', '', ''), +(115, 'en_UK', 'Mexico', '', '', ''), (115, 'es_ES', 'Méjico', '', '', ''), (115, 'fr_FR', 'Mexique', '', '', ''), -(116, 'en_EN', 'Micronesia', '', '', ''), +(116, 'en_UK', 'Micronesia', '', '', ''), (116, 'es_ES', 'Micronesia', '', '', ''), (116, 'fr_FR', 'Micronésie', '', '', ''), -(117, 'en_EN', 'Moldova', '', '', ''), +(117, 'en_UK', 'Moldova', '', '', ''), (117, 'es_ES', 'Moldova', '', '', ''), (117, 'fr_FR', 'Moldavie', '', '', ''), -(118, 'en_EN', 'Monaco', '', '', ''), +(118, 'en_UK', 'Monaco', '', '', ''), (118, 'es_ES', 'Mónaco', '', '', ''), (118, 'fr_FR', 'Monaco', '', '', ''), -(119, 'en_EN', 'Mongolia', '', '', ''), +(119, 'en_UK', 'Mongolia', '', '', ''), (119, 'es_ES', 'Mongolia', '', '', ''), (119, 'fr_FR', 'Mongolie', '', '', ''), -(120, 'en_EN', 'Mozambique', '', '', ''), +(120, 'en_UK', 'Mozambique', '', '', ''), (120, 'es_ES', 'Mozambique', '', '', ''), (120, 'fr_FR', 'Mozambique', '', '', ''), -(121, 'en_EN', 'Namibia', '', '', ''), +(121, 'en_UK', 'Namibia', '', '', ''), (121, 'es_ES', 'Namibia', '', '', ''), (121, 'fr_FR', 'Namibie', '', '', ''), -(122, 'en_EN', 'Nauru', '', '', ''), +(122, 'en_UK', 'Nauru', '', '', ''), (122, 'es_ES', 'Nauru', '', '', ''), (122, 'fr_FR', 'Nauru', '', '', ''), -(123, 'en_EN', 'Nepal', '', '', ''), +(123, 'en_UK', 'Nepal', '', '', ''), (123, 'es_ES', 'Nepal', '', '', ''), (123, 'fr_FR', 'Népal', '', '', ''), -(124, 'en_EN', 'Nicaragua', '', '', ''), +(124, 'en_UK', 'Nicaragua', '', '', ''), (124, 'es_ES', 'Nicaragua', '', '', ''), (124, 'fr_FR', 'Nicaragua', '', '', ''), -(125, 'en_EN', 'Niger', '', '', ''), +(125, 'en_UK', 'Niger', '', '', ''), (125, 'es_ES', 'Níger', '', '', ''), (125, 'fr_FR', 'Niger', '', '', ''), -(126, 'en_EN', 'Nigeria', '', '', ''), +(126, 'en_UK', 'Nigeria', '', '', ''), (126, 'es_ES', 'Nigeria', '', '', ''), (126, 'fr_FR', 'Nigeria', '', '', ''), -(127, 'en_EN', 'Niue', '', '', ''), +(127, 'en_UK', 'Niue', '', '', ''), (127, 'es_ES', 'Niue', '', '', ''), (127, 'fr_FR', 'Niue', '', '', ''), -(128, 'en_EN', 'Norway', '', '', ''), +(128, 'en_UK', 'Norway', '', '', ''), (128, 'es_ES', 'Noruega', '', '', ''), (128, 'fr_FR', 'Norvège', '', '', ''), -(129, 'en_EN', 'New Zealand', '', '', ''), +(129, 'en_UK', 'New Zealand', '', '', ''), (129, 'es_ES', 'Nueva Zelandia', '', '', ''), (129, 'fr_FR', 'Nouvelle-Zélande', '', '', ''), -(130, 'en_EN', 'Oman', '', '', ''), +(130, 'en_UK', 'Oman', '', '', ''), (130, 'es_ES', 'Omán', '', '', ''), (130, 'fr_FR', 'Oman', '', '', ''), -(131, 'en_EN', 'Uganda', '', '', ''), +(131, 'en_UK', 'Uganda', '', '', ''), (131, 'es_ES', 'Uganda', '', '', ''), (131, 'fr_FR', 'Ouganda', '', '', ''), -(132, 'en_EN', 'Uzbekistan', '', '', ''), +(132, 'en_UK', 'Uzbekistan', '', '', ''), (132, 'es_ES', 'Uzbekistán', '', '', ''), (132, 'fr_FR', 'Ouzbékistan', '', '', ''), -(133, 'en_EN', 'Pakistan', '', '', ''), +(133, 'en_UK', 'Pakistan', '', '', ''), (133, 'es_ES', 'Pakistán', '', '', ''), (133, 'fr_FR', 'Pakistan', '', '', ''), -(134, 'en_EN', 'Panama', '', '', ''), +(134, 'en_UK', 'Panama', '', '', ''), (134, 'es_ES', 'Panamá', '', '', ''), (134, 'fr_FR', 'Panama', '', '', ''), -(135, 'en_EN', 'Papua Nueva Guinea', '', '', ''), +(135, 'en_UK', 'Papua Nueva Guinea', '', '', ''), (135, 'es_ES', 'Papua Nueva Guinea', '', '', ''), (135, 'fr_FR', 'Papouasie', '', '', ''), -(136, 'en_EN', 'Paraguay', '', '', ''), +(136, 'en_UK', 'Paraguay', '', '', ''), (136, 'es_ES', 'Paraguay', '', '', ''), (136, 'fr_FR', 'Paraguay', '', '', ''), -(137, 'en_EN', 'Netherlands', '', '', ''), +(137, 'en_UK', 'Netherlands', '', '', ''), (137, 'es_ES', 'Países Bajos', '', '', ''), (137, 'fr_FR', 'Pays-Bas', '', '', ''), -(138, 'en_EN', 'Peru', '', '', ''), +(138, 'en_UK', 'Peru', '', '', ''), (138, 'es_ES', 'Perú', '', '', ''), (138, 'fr_FR', 'Pérou', '', '', ''), -(139, 'en_EN', 'Philippines', '', '', ''), +(139, 'en_UK', 'Philippines', '', '', ''), (139, 'es_ES', 'Filipinas', '', '', ''), (139, 'fr_FR', 'Philippines', '', '', ''), -(140, 'en_EN', 'Poland', '', '', ''), +(140, 'en_UK', 'Poland', '', '', ''), (140, 'es_ES', 'Polonia', '', '', ''), (140, 'fr_FR', 'Pologne', '', '', ''), -(141, 'en_EN', 'Portugal', '', '', ''), +(141, 'en_UK', 'Portugal', '', '', ''), (141, 'es_ES', 'Portugal', '', '', ''), (141, 'fr_FR', 'Portugal', '', '', ''), -(142, 'en_EN', 'Qatar', '', '', ''), +(142, 'en_UK', 'Qatar', '', '', ''), (142, 'es_ES', 'Qatar', '', '', ''), (142, 'fr_FR', 'Qatar', '', '', ''), -(143, 'en_EN', 'Central African Republic', '', '', ''), +(143, 'en_UK', 'Central African Republic', '', '', ''), (143, 'es_ES', 'República Centroafricana', '', '', ''), (143, 'fr_FR', 'République centrafricaine', '', '', ''), -(144, 'en_EN', 'Dominican Republic', '', '', ''), +(144, 'en_UK', 'Dominican Republic', '', '', ''), (144, 'es_ES', 'República Dominicana', '', '', ''), (144, 'fr_FR', 'République dominicaine', '', '', ''), -(145, 'en_EN', 'Czech Republic', '', '', ''), +(145, 'en_UK', 'Czech Republic', '', '', ''), (145, 'es_ES', 'República Checa', '', '', ''), (145, 'fr_FR', 'République tchèque', '', '', ''), -(146, 'en_EN', 'Romania', '', '', ''), +(146, 'en_UK', 'Romania', '', '', ''), (146, 'es_ES', 'Rumania', '', '', ''), (146, 'fr_FR', 'Roumanie', '', '', ''), -(147, 'en_EN', 'United Kingdom', '', '', ''), +(147, 'en_UK', 'United Kingdom', '', '', ''), (147, 'es_ES', 'Reino Unido', '', '', ''), (147, 'fr_FR', 'Royaume-Uni', '', '', ''), -(148, 'en_EN', 'Russia', '', '', ''), +(148, 'en_UK', 'Russia', '', '', ''), (148, 'es_ES', 'Rusia', '', '', ''), (148, 'fr_FR', 'Russie', '', '', ''), -(149, 'en_EN', 'Rwanda', '', '', ''), +(149, 'en_UK', 'Rwanda', '', '', ''), (149, 'es_ES', 'Ruanda', '', '', ''), (149, 'fr_FR', 'Rwanda', '', '', ''), -(150, 'en_EN', 'Saint Kitts and Nevis', '', '', ''), +(150, 'en_UK', 'Saint Kitts and Nevis', '', '', ''), (150, 'es_ES', 'San Cristóbal', '', '', ''), (150, 'fr_FR', 'Saint-Christophe-et-Niévès', '', '', ''), -(151, 'en_EN', 'Saint Lucia', '', '', ''), +(151, 'en_UK', 'Saint Lucia', '', '', ''), (151, 'es_ES', 'Santa Lucía', '', '', ''), (151, 'fr_FR', 'Sainte-Lucie', '', '', ''), -(152, 'en_EN', 'San Marino', '', '', ''), +(152, 'en_UK', 'San Marino', '', '', ''), (152, 'es_ES', 'San Marino', '', '', ''), (152, 'fr_FR', 'Saint-Marin', '', '', ''), -(153, 'en_EN', 'Saint Vincent and the Grenadines', '', '', ''), +(153, 'en_UK', 'Saint Vincent and the Grenadines', '', '', ''), (153, 'es_ES', 'San Vicente y las Granadinas', '', '', ''), (153, 'fr_FR', 'Saint-Vincent-et-les Grenadines', '', '', ''), -(154, 'en_EN', 'Solomon Islands', '', '', ''), +(154, 'en_UK', 'Solomon Islands', '', '', ''), (154, 'es_ES', 'Salomón', '', '', ''), (154, 'fr_FR', 'Salomon', '', '', ''), -(155, 'en_EN', 'El Salvador', '', '', ''), +(155, 'en_UK', 'El Salvador', '', '', ''), (155, 'es_ES', 'El Salvador', '', '', ''), (155, 'fr_FR', 'Salvador', '', '', ''), -(156, 'en_EN', 'Western Samoa', '', '', ''), +(156, 'en_UK', 'Western Samoa', '', '', ''), (156, 'es_ES', 'Samoa', '', '', ''), (156, 'fr_FR', 'Samoa occidentales', '', '', ''), -(157, 'en_EN', 'Sao Tome and Principe', '', '', ''), +(157, 'en_UK', 'Sao Tome and Principe', '', '', ''), (157, 'es_ES', 'Santo Tomé y Príncipe', '', '', ''), (157, 'fr_FR', 'Sao Tomé-et-Principe', '', '', ''), -(158, 'en_EN', 'Senegal', '', '', ''), +(158, 'en_UK', 'Senegal', '', '', ''), (158, 'es_ES', 'Senegal', '', '', ''), (158, 'fr_FR', 'Sénégal', '', '', ''), -(159, 'en_EN', 'Seychelles', '', '', ''), +(159, 'en_UK', 'Seychelles', '', '', ''), (159, 'es_ES', 'Seychelles', '', '', ''), (159, 'fr_FR', 'Seychelles', '', '', ''), -(160, 'en_EN', 'Sierra Leone', '', '', ''), +(160, 'en_UK', 'Sierra Leone', '', '', ''), (160, 'es_ES', 'Sierra Leona', '', '', ''), (160, 'fr_FR', 'Sierra Leone', '', '', ''), -(161, 'en_EN', 'Singapore', '', '', ''), +(161, 'en_UK', 'Singapore', '', '', ''), (161, 'es_ES', 'Singapur', '', '', ''), (161, 'fr_FR', 'Singapour', '', '', ''), -(162, 'en_EN', 'Slovakia', '', '', ''), +(162, 'en_UK', 'Slovakia', '', '', ''), (162, 'es_ES', 'Eslovaquia', '', '', ''), (162, 'fr_FR', 'Slovaquie', '', '', ''), -(163, 'en_EN', 'Slovenia', '', '', ''), +(163, 'en_UK', 'Slovenia', '', '', ''), (163, 'es_ES', 'Eslovenia', '', '', ''), (163, 'fr_FR', 'Slovénie', '', '', ''), -(164, 'en_EN', 'Somalia', '', '', ''), +(164, 'en_UK', 'Somalia', '', '', ''), (164, 'es_ES', 'Somalia', '', '', ''), (164, 'fr_FR', 'Somalie', '', '', ''), -(165, 'en_EN', 'Sudan', '', '', ''), +(165, 'en_UK', 'Sudan', '', '', ''), (165, 'es_ES', 'Sudán', '', '', ''), (165, 'fr_FR', 'Soudan', '', '', ''), -(166, 'en_EN', 'Sri Lanka', '', '', ''), +(166, 'en_UK', 'Sri Lanka', '', '', ''), (166, 'es_ES', 'Sri Lanka', '', '', ''), (166, 'fr_FR', 'Sri Lanka', '', '', ''), -(167, 'en_EN', 'Sweden', '', '', ''), +(167, 'en_UK', 'Sweden', '', '', ''), (167, 'es_ES', 'Suecia', '', '', ''), (167, 'fr_FR', 'Suède', '', '', ''), -(168, 'en_EN', 'Switzerland', '', '', ''), +(168, 'en_UK', 'Switzerland', '', '', ''), (168, 'es_ES', 'Suiza', '', '', ''), (168, 'fr_FR', 'Suisse', '', '', ''), -(169, 'en_EN', 'Suriname', '', '', ''), +(169, 'en_UK', 'Suriname', '', '', ''), (169, 'es_ES', 'Suriname', '', '', ''), (169, 'fr_FR', 'Suriname', '', '', ''), -(170, 'en_EN', 'Swaziland', '', '', ''), +(170, 'en_UK', 'Swaziland', '', '', ''), (170, 'es_ES', 'Swazilandia', '', '', ''), (170, 'fr_FR', 'Swaziland', '', '', ''), -(171, 'en_EN', 'Syria', '', '', ''), +(171, 'en_UK', 'Syria', '', '', ''), (171, 'es_ES', 'Siria', '', '', ''), (171, 'fr_FR', 'Syrie', '', '', ''), -(172, 'en_EN', 'Tajikistan', '', '', ''), +(172, 'en_UK', 'Tajikistan', '', '', ''), (172, 'es_ES', 'Tayikistán', '', '', ''), (172, 'fr_FR', 'Tadjikistan', '', '', ''), -(173, 'en_EN', 'Tanzania', '', '', ''), +(173, 'en_UK', 'Tanzania', '', '', ''), (173, 'es_ES', 'Tanzanía', '', '', ''), (173, 'fr_FR', 'Tanzanie', '', '', ''), -(174, 'en_EN', 'Chad', '', '', ''), +(174, 'en_UK', 'Chad', '', '', ''), (174, 'es_ES', 'Chad', '', '', ''), (174, 'fr_FR', 'Tchad', '', '', ''), -(175, 'en_EN', 'Thailand', '', '', ''), +(175, 'en_UK', 'Thailand', '', '', ''), (175, 'es_ES', 'Tailandia', '', '', ''), (175, 'fr_FR', 'Thaïlande', '', '', ''), -(176, 'en_EN', 'Togo', '', '', ''), +(176, 'en_UK', 'Togo', '', '', ''), (176, 'es_ES', 'Togo', '', '', ''), (176, 'fr_FR', 'Togo', '', '', ''), -(177, 'en_EN', 'Tonga', '', '', ''), +(177, 'en_UK', 'Tonga', '', '', ''), (177, 'es_ES', 'Tonga', '', '', ''), (177, 'fr_FR', 'Tonga', '', '', ''), -(178, 'en_EN', 'Trinidad and Tobago', '', '', ''), +(178, 'en_UK', 'Trinidad and Tobago', '', '', ''), (178, 'es_ES', 'Trinidad y Tabago', '', '', ''), (178, 'fr_FR', 'Trinité-et-Tobago', '', '', ''), -(179, 'en_EN', 'Tunisia', '', '', ''), +(179, 'en_UK', 'Tunisia', '', '', ''), (179, 'es_ES', 'Túnez', '', '', ''), (179, 'fr_FR', 'Tunisie', '', '', ''), -(180, 'en_EN', 'Turkmenistan', '', '', ''), +(180, 'en_UK', 'Turkmenistan', '', '', ''), (180, 'es_ES', 'Turkmenistán', '', '', ''), (180, 'fr_FR', 'Turkménistan', '', '', ''), -(181, 'en_EN', 'Turkey', '', '', ''), +(181, 'en_UK', 'Turkey', '', '', ''), (181, 'es_ES', 'Turquía', '', '', ''), (181, 'fr_FR', 'Turquie', '', '', ''), -(182, 'en_EN', 'Tuvalu', '', '', ''), +(182, 'en_UK', 'Tuvalu', '', '', ''), (182, 'es_ES', 'Tuvalu', '', '', ''), (182, 'fr_FR', 'Tuvalu', '', '', ''), -(183, 'en_EN', 'Ukraine', '', '', ''), +(183, 'en_UK', 'Ukraine', '', '', ''), (183, 'es_ES', 'Ucrania', '', '', ''), (183, 'fr_FR', 'Ukraine', '', '', ''), -(184, 'en_EN', 'Uruguay', '', '', ''), +(184, 'en_UK', 'Uruguay', '', '', ''), (184, 'es_ES', 'Uruguay', '', '', ''), (184, 'fr_FR', 'Uruguay', '', '', ''), -(185, 'en_EN', 'The Vatican', '', '', ''), +(185, 'en_UK', 'The Vatican', '', '', ''), (185, 'es_ES', 'El Vatican', '', '', ''), (185, 'fr_FR', 'Vatican', '', '', ''), -(186, 'en_EN', 'Vanuatu', '', '', ''), +(186, 'en_UK', 'Vanuatu', '', '', ''), (186, 'es_ES', 'Vanuatu', '', '', ''), (186, 'fr_FR', 'Vanuatu', '', '', ''), -(187, 'en_EN', 'Venezuela', '', '', ''), +(187, 'en_UK', 'Venezuela', '', '', ''), (187, 'es_ES', 'Venezuela', '', '', ''), (187, 'fr_FR', 'Venezuela', '', '', ''), -(188, 'en_EN', 'Vietnam', '', '', ''), +(188, 'en_UK', 'Vietnam', '', '', ''), (188, 'es_ES', 'Viet Nam', '', '', ''), (188, 'fr_FR', 'Viêt Nam', '', '', ''), -(189, 'en_EN', 'Yemen', '', '', ''), +(189, 'en_UK', 'Yemen', '', '', ''), (189, 'es_ES', 'Yemen', '', '', ''), (189, 'fr_FR', 'Yémen', '', '', ''), -(190, 'en_EN', 'Yougoslavia', '', '', ''), +(190, 'en_UK', 'Yougoslavia', '', '', ''), (190, 'es_ES', 'Yugoslavia', '', '', ''), (190, 'fr_FR', 'Yougoslavie', '', '', ''), -(191, 'en_EN', 'Zaire', '', '', ''), +(191, 'en_UK', 'Zaire', '', '', ''), (191, 'es_ES', 'Zaire', '', '', ''), (191, 'fr_FR', 'Zaïre', '', '', ''), -(192, 'en_EN', 'Zambia', '', '', ''), +(192, 'en_UK', 'Zambia', '', '', ''), (192, 'es_ES', 'Zambia', '', '', ''), (192, 'fr_FR', 'Zambie', '', '', ''), -(193, 'en_EN', 'Zimbabwe', '', '', ''), +(193, 'en_UK', 'Zimbabwe', '', '', ''), (193, 'es_ES', 'Zimbabwe', '', '', ''), (193, 'fr_FR', 'Zimbabwe', '', '', ''), -(196, 'en_EN', 'USA - Alaska', '', '', ''), +(196, 'en_UK', 'USA - Alaska', '', '', ''), (196, 'es_ES', 'USA - Alaska', '', '', ''), (196, 'fr_FR', 'USA - Alaska', '', '', ''), -(197, 'en_EN', 'USA - Arizona', '', '', ''), +(197, 'en_UK', 'USA - Arizona', '', '', ''), (197, 'es_ES', 'USA - Arizona', '', '', ''), (197, 'fr_FR', 'USA - Arizona', '', '', ''), -(198, 'en_EN', 'USA - Arkansas', '', '', ''), +(198, 'en_UK', 'USA - Arkansas', '', '', ''), (198, 'es_ES', 'USA - Arkansas', '', '', ''), (198, 'fr_FR', 'USA - Arkansas', '', '', ''), -(199, 'en_EN', 'USA - California', '', '', ''), +(199, 'en_UK', 'USA - California', '', '', ''), (199, 'es_ES', 'USA - California', '', '', ''), (199, 'fr_FR', 'USA - California', '', '', ''), -(200, 'en_EN', 'USA - Colorado', '', '', ''), +(200, 'en_UK', 'USA - Colorado', '', '', ''), (200, 'es_ES', 'USA - Colorado', '', '', ''), (200, 'fr_FR', 'USA - Colorado', '', '', ''), -(201, 'en_EN', 'USA - Connecticut', '', '', ''), +(201, 'en_UK', 'USA - Connecticut', '', '', ''), (201, 'es_ES', 'USA - Connecticut', '', '', ''), (201, 'fr_FR', 'USA - Connecticut', '', '', ''), -(202, 'en_EN', 'USA - Delaware', '', '', ''), +(202, 'en_UK', 'USA - Delaware', '', '', ''), (202, 'es_ES', 'USA - Delaware', '', '', ''), (202, 'fr_FR', 'USA - Delaware', '', '', ''), -(203, 'en_EN', 'USA - District Of Columbia', '', '', ''), +(203, 'en_UK', 'USA - District Of Columbia', '', '', ''), (203, 'es_ES', 'USA - District Of Columbia', '', '', ''), (203, 'fr_FR', 'USA - District Of Columbia', '', '', ''), -(204, 'en_EN', 'USA - Florida', '', '', ''), +(204, 'en_UK', 'USA - Florida', '', '', ''), (204, 'es_ES', 'USA - Florida', '', '', ''), (204, 'fr_FR', 'USA - Florida', '', '', ''), -(205, 'en_EN', 'USA - Georgia', '', '', ''), +(205, 'en_UK', 'USA - Georgia', '', '', ''), (205, 'es_ES', 'USA - Georgia', '', '', ''), (205, 'fr_FR', 'USA - Georgia', '', '', ''), -(206, 'en_EN', 'USA - Hawaii', '', '', ''), +(206, 'en_UK', 'USA - Hawaii', '', '', ''), (206, 'es_ES', 'USA - Hawaii', '', '', ''), (206, 'fr_FR', 'USA - Hawaii', '', '', ''), -(207, 'en_EN', 'USA - Idaho', '', '', ''), +(207, 'en_UK', 'USA - Idaho', '', '', ''), (207, 'es_ES', 'USA - Idaho', '', '', ''), (207, 'fr_FR', 'USA - Idaho', '', '', ''), -(208, 'en_EN', 'USA - Illinois', '', '', ''), +(208, 'en_UK', 'USA - Illinois', '', '', ''), (208, 'es_ES', 'USA - Illinois', '', '', ''), (208, 'fr_FR', 'USA - Illinois', '', '', ''), -(209, 'en_EN', 'USA - Indiana', '', '', ''), +(209, 'en_UK', 'USA - Indiana', '', '', ''), (209, 'es_ES', 'USA - Indiana', '', '', ''), (209, 'fr_FR', 'USA - Indiana', '', '', ''), -(210, 'en_EN', 'USA - Iowa', '', '', ''), +(210, 'en_UK', 'USA - Iowa', '', '', ''), (210, 'es_ES', 'USA - Iowa', '', '', ''), (210, 'fr_FR', 'USA - Iowa', '', '', ''), -(211, 'en_EN', 'USA - Kansas', '', '', ''), +(211, 'en_UK', 'USA - Kansas', '', '', ''), (211, 'es_ES', 'USA - Kansas', '', '', ''), (211, 'fr_FR', 'USA - Kansas', '', '', ''), -(212, 'en_EN', 'USA - Kentucky', '', '', ''), +(212, 'en_UK', 'USA - Kentucky', '', '', ''), (212, 'es_ES', 'USA - Kentucky', '', '', ''), (212, 'fr_FR', 'USA - Kentucky', '', '', ''), -(213, 'en_EN', 'USA - Louisiana', '', '', ''), +(213, 'en_UK', 'USA - Louisiana', '', '', ''), (213, 'es_ES', 'USA - Louisiana', '', '', ''), (213, 'fr_FR', 'USA - Louisiana', '', '', ''), -(214, 'en_EN', 'USA - Maine', '', '', ''), +(214, 'en_UK', 'USA - Maine', '', '', ''), (214, 'es_ES', 'USA - Maine', '', '', ''), (214, 'fr_FR', 'USA - Maine', '', '', ''), -(215, 'en_EN', 'USA - Maryland', '', '', ''), +(215, 'en_UK', 'USA - Maryland', '', '', ''), (215, 'es_ES', 'USA - Maryland', '', '', ''), (215, 'fr_FR', 'USA - Maryland', '', '', ''), -(216, 'en_EN', 'USA - Massachusetts', '', '', ''), +(216, 'en_UK', 'USA - Massachusetts', '', '', ''), (216, 'es_ES', 'USA - Massachusetts', '', '', ''), (216, 'fr_FR', 'USA - Massachusetts', '', '', ''), -(217, 'en_EN', 'USA - Michigan', '', '', ''), +(217, 'en_UK', 'USA - Michigan', '', '', ''), (217, 'es_ES', 'USA - Michigan', '', '', ''), (217, 'fr_FR', 'USA - Michigan', '', '', ''), -(218, 'en_EN', 'USA - Minnesota', '', '', ''), +(218, 'en_UK', 'USA - Minnesota', '', '', ''), (218, 'es_ES', 'USA - Minnesota', '', '', ''), (218, 'fr_FR', 'USA - Minnesota', '', '', ''), -(219, 'en_EN', 'USA - Mississippi', '', '', ''), +(219, 'en_UK', 'USA - Mississippi', '', '', ''), (219, 'es_ES', 'USA - Mississippi', '', '', ''), (219, 'fr_FR', 'USA - Mississippi', '', '', ''), -(220, 'en_EN', 'USA - Missouri', '', '', ''), +(220, 'en_UK', 'USA - Missouri', '', '', ''), (220, 'es_ES', 'USA - Missouri', '', '', ''), (220, 'fr_FR', 'USA - Missouri', '', '', ''), -(221, 'en_EN', 'USA - Montana', '', '', ''), +(221, 'en_UK', 'USA - Montana', '', '', ''), (221, 'es_ES', 'USA - Montana', '', '', ''), (221, 'fr_FR', 'USA - Montana', '', '', ''), -(222, 'en_EN', 'USA - Nebraska', '', '', ''), +(222, 'en_UK', 'USA - Nebraska', '', '', ''), (222, 'es_ES', 'USA - Nebraska', '', '', ''), (222, 'fr_FR', 'USA - Nebraska', '', '', ''), -(223, 'en_EN', 'USA - Nevada', '', '', ''), +(223, 'en_UK', 'USA - Nevada', '', '', ''), (223, 'es_ES', 'USA - Nevada', '', '', ''), (223, 'fr_FR', 'USA - Nevada', '', '', ''), -(224, 'en_EN', 'USA - New Hampshire', '', '', ''), +(224, 'en_UK', 'USA - New Hampshire', '', '', ''), (224, 'es_ES', 'USA - New Hampshire', '', '', ''), (224, 'fr_FR', 'USA - New Hampshire', '', '', ''), -(225, 'en_EN', 'USA - New Jersey', '', '', ''), +(225, 'en_UK', 'USA - New Jersey', '', '', ''), (225, 'es_ES', 'USA - New Jersey', '', '', ''), (225, 'fr_FR', 'USA - New Jersey', '', '', ''), -(226, 'en_EN', 'USA - New Mexico', '', '', ''), +(226, 'en_UK', 'USA - New Mexico', '', '', ''), (226, 'es_ES', 'USA - New Mexico', '', '', ''), (226, 'fr_FR', 'USA - New Mexico', '', '', ''), -(227, 'en_EN', 'USA - New York', '', '', ''), +(227, 'en_UK', 'USA - New York', '', '', ''), (227, 'es_ES', 'USA - New York', '', '', ''), (227, 'fr_FR', 'USA - New York', '', '', ''), -(228, 'en_EN', 'USA - North Carolina', '', '', ''), +(228, 'en_UK', 'USA - North Carolina', '', '', ''), (228, 'es_ES', 'USA - North Carolina', '', '', ''), (228, 'fr_FR', 'USA - North Carolina', '', '', ''), -(229, 'en_EN', 'USA - North Dakota', '', '', ''), +(229, 'en_UK', 'USA - North Dakota', '', '', ''), (229, 'es_ES', 'USA - North Dakota', '', '', ''), (229, 'fr_FR', 'USA - North Dakota', '', '', ''), -(230, 'en_EN', 'USA - Ohio', '', '', ''), +(230, 'en_UK', 'USA - Ohio', '', '', ''), (230, 'es_ES', 'USA - Ohio', '', '', ''), (230, 'fr_FR', 'USA - Ohio', '', '', ''), -(231, 'en_EN', 'USA - Oklahoma', '', '', ''), +(231, 'en_UK', 'USA - Oklahoma', '', '', ''), (231, 'es_ES', 'USA - Oklahoma', '', '', ''), (231, 'fr_FR', 'USA - Oklahoma', '', '', ''), -(232, 'en_EN', 'USA - Oregon', '', '', ''), +(232, 'en_UK', 'USA - Oregon', '', '', ''), (232, 'es_ES', 'USA - Oregon', '', '', ''), (232, 'fr_FR', 'USA - Oregon', '', '', ''), -(233, 'en_EN', 'USA - Pennsylvania', '', '', ''), +(233, 'en_UK', 'USA - Pennsylvania', '', '', ''), (233, 'es_ES', 'USA - Pennsylvania', '', '', ''), (233, 'fr_FR', 'USA - Pennsylvania', '', '', ''), -(234, 'en_EN', 'USA - Rhode Island', '', '', ''), +(234, 'en_UK', 'USA - Rhode Island', '', '', ''), (234, 'es_ES', 'USA - Rhode Island', '', '', ''), (234, 'fr_FR', 'USA - Rhode Island', '', '', ''), -(235, 'en_EN', 'USA - South Carolina', '', '', ''), +(235, 'en_UK', 'USA - South Carolina', '', '', ''), (235, 'es_ES', 'USA - South Carolina', '', '', ''), (235, 'fr_FR', 'USA - South Carolina', '', '', ''), -(236, 'en_EN', 'USA - South Dakota', '', '', ''), +(236, 'en_UK', 'USA - South Dakota', '', '', ''), (236, 'es_ES', 'USA - South Dakota', '', '', ''), (236, 'fr_FR', 'USA - South Dakota', '', '', ''), -(237, 'en_EN', 'USA - Tennessee', '', '', ''), +(237, 'en_UK', 'USA - Tennessee', '', '', ''), (237, 'es_ES', 'USA - Tennessee', '', '', ''), (237, 'fr_FR', 'USA - Tennessee', '', '', ''), -(238, 'en_EN', 'USA - Texas', '', '', ''), +(238, 'en_UK', 'USA - Texas', '', '', ''), (238, 'es_ES', 'USA - Texas', '', '', ''), (238, 'fr_FR', 'USA - Texas', '', '', ''), -(239, 'en_EN', 'USA - Utah', '', '', ''), +(239, 'en_UK', 'USA - Utah', '', '', ''), (239, 'es_ES', 'USA - Utah', '', '', ''), (239, 'fr_FR', 'USA - Utah', '', '', ''), -(240, 'en_EN', 'USA - Vermont', '', '', ''), +(240, 'en_UK', 'USA - Vermont', '', '', ''), (240, 'es_ES', 'USA - Vermont', '', '', ''), (240, 'fr_FR', 'USA - Vermont', '', '', ''), -(241, 'en_EN', 'USA - Virginia', '', '', ''), +(241, 'en_UK', 'USA - Virginia', '', '', ''), (241, 'es_ES', 'USA - Virginia', '', '', ''), (241, 'fr_FR', 'USA - Virginia', '', '', ''), -(242, 'en_EN', 'USA - Washington', '', '', ''), +(242, 'en_UK', 'USA - Washington', '', '', ''), (242, 'es_ES', 'USA - Washington', '', '', ''), (242, 'fr_FR', 'USA - Washington', '', '', ''), -(243, 'en_EN', 'USA - West Virginia', '', '', ''), +(243, 'en_UK', 'USA - West Virginia', '', '', ''), (243, 'es_ES', 'USA - West Virginia', '', '', ''), (243, 'fr_FR', 'USA - West Virginia', '', '', ''), -(244, 'en_EN', 'USA - Wisconsin', '', '', ''), +(244, 'en_UK', 'USA - Wisconsin', '', '', ''), (244, 'es_ES', 'USA - Wisconsin', '', '', ''), (244, 'fr_FR', 'USA - Wisconsin', '', '', ''), -(245, 'en_EN', 'USA - Wyoming', '', '', ''), +(245, 'en_UK', 'USA - Wyoming', '', '', ''), (245, 'es_ES', 'USA - Wyoming', '', '', ''), (245, 'fr_FR', 'USA - Wyoming', '', '', ''), -(246, 'en_EN', 'Canada - Colombie-Britannique', '', '', ''), +(246, 'en_UK', 'Canada - Colombie-Britannique', '', '', ''), (246, 'es_ES', 'Canada - Colombie-Britannique', '', '', ''), (246, 'fr_FR', 'Canada - Colombie-Britannique', '', '', ''), -(247, 'en_EN', 'Canada - Alberta', '', '', ''), +(247, 'en_UK', 'Canada - Alberta', '', '', ''), (247, 'es_ES', 'Canada - Alberta', '', '', ''), (247, 'fr_FR', 'Canada - Alberta', '', '', ''), -(248, 'en_EN', 'Canada - Saskatchewan', '', '', ''), +(248, 'en_UK', 'Canada - Saskatchewan', '', '', ''), (248, 'es_ES', 'Canada - Saskatchewan', '', '', ''), (248, 'fr_FR', 'Canada - Saskatchewan', '', '', ''), -(249, 'en_EN', 'Canada - Manitoba', '', '', ''), +(249, 'en_UK', 'Canada - Manitoba', '', '', ''), (249, 'es_ES', 'Canada - Manitoba', '', '', ''), (249, 'fr_FR', 'Canada - Manitoba', '', '', ''), -(250, 'en_EN', 'Canada - Ontario', '', '', ''), +(250, 'en_UK', 'Canada - Ontario', '', '', ''), (250, 'es_ES', 'Canada - Ontario', '', '', ''), (250, 'fr_FR', 'Canada - Ontario', '', '', ''), -(251, 'en_EN', 'Canada - Québec', '', '', ''), +(251, 'en_UK', 'Canada - Québec', '', '', ''), (251, 'es_ES', 'Canada - Québec', '', '', ''), (251, 'fr_FR', 'Canada - Québec', '', '', ''), -(252, 'en_EN', 'Canada - Nouveau-Brunswick', '', '', ''), +(252, 'en_UK', 'Canada - Nouveau-Brunswick', '', '', ''), (252, 'es_ES', 'Canada - Nouveau-Brunswick', '', '', ''), (252, 'fr_FR', 'Canada - Nouveau-Brunswick', '', '', ''), -(253, 'en_EN', 'Canada - Nouvelle-Écosse', '', '', ''), +(253, 'en_UK', 'Canada - Nouvelle-Écosse', '', '', ''), (253, 'es_ES', 'Canada - Nouvelle-Écosse', '', '', ''), (253, 'fr_FR', 'Canada - Nouvelle-Écosse', '', '', ''), -(254, 'en_EN', 'Canada - Île-du-Prince-Édouard ', '', '', ''), +(254, 'en_UK', 'Canada - Île-du-Prince-Édouard ', '', '', ''), (254, 'es_ES', 'Canada - Île-du-Prince-Édouard ', '', '', ''), (254, 'fr_FR', 'Canada - Île-du-Prince-Édouard ', '', '', ''), -(255, 'en_EN', 'Canada - Terre-Neuve-et-Labrador ', '', '', ''), +(255, 'en_UK', 'Canada - Terre-Neuve-et-Labrador ', '', '', ''), (255, 'es_ES', 'Canada - Terre-Neuve-et-Labrador ', '', '', ''), (255, 'fr_FR', 'Canada - Terre-Neuve-et-Labrador ', '', '', ''), -(256, 'en_EN', 'Canada - Yukon', '', '', ''), +(256, 'en_UK', 'Canada - Yukon', '', '', ''), (256, 'es_ES', 'Canada - Yukon', '', '', ''), (256, 'fr_FR', 'Canada - Yukon', '', '', ''), -(257, 'en_EN', 'Canada - Territoires-du-Nord-Ouest', '', '', ''), +(257, 'en_UK', 'Canada - Territoires-du-Nord-Ouest', '', '', ''), (257, 'es_ES', 'Canada - Territoires-du-Nord-Ouest', '', '', ''), (257, 'fr_FR', 'Canada - Territoires-du-Nord-Ouest', '', '', ''), -(258, 'en_EN', 'Canada - Nunavut', '', '', ''), +(258, 'en_UK', 'Canada - Nunavut', '', '', ''), (258, 'es_ES', 'Canada - Nunavut', '', '', ''), (258, 'fr_FR', 'Canada - Nunavut', '', '', ''), -(259, 'en_EN', 'Guadeloupe', '', '', ''), +(259, 'en_UK', 'Guadeloupe', '', '', ''), (259, 'es_ES', 'Guadeloupe', '', '', ''), (259, 'fr_FR', 'Guadeloupe', '', '', ''), -(260, 'en_EN', 'Guyane Française', '', '', ''), +(260, 'en_UK', 'Guyane Française', '', '', ''), (260, 'es_ES', 'Guyane Française', '', '', ''), (260, 'fr_FR', 'Guyane Française', '', '', ''), -(261, 'en_EN', 'Martinique', '', '', ''), +(261, 'en_UK', 'Martinique', '', '', ''), (261, 'es_ES', 'Martinique', '', '', ''), (261, 'fr_FR', 'Martinique', '', '', ''), -(262, 'en_EN', 'Mayotte', '', '', ''), +(262, 'en_UK', 'Mayotte', '', '', ''), (262, 'es_ES', 'Mayotte', '', '', ''), (262, 'fr_FR', 'Mayotte', '', '', ''), -(263, 'en_EN', 'Réunion(La)', '', '', ''), +(263, 'en_UK', 'Réunion(La)', '', '', ''), (263, 'es_ES', 'Réunion(La)', '', '', ''), (263, 'fr_FR', 'Réunion(La)', '', '', ''), -(264, 'en_EN', 'St Pierre et Miquelon', '', '', ''), +(264, 'en_UK', 'St Pierre et Miquelon', '', '', ''), (264, 'es_ES', 'St Pierre et Miquelon', '', '', ''), (264, 'fr_FR', 'St Pierre et Miquelon', '', '', ''), -(265, 'en_EN', 'Nouvelle-Calédonie', '', '', ''), +(265, 'en_UK', 'Nouvelle-Calédonie', '', '', ''), (265, 'es_ES', 'Nouvelle-Calédonie', '', '', ''), (265, 'fr_FR', 'Nouvelle-Calédonie', '', '', ''), -(266, 'en_EN', 'Polynésie française', '', '', ''), +(266, 'en_UK', 'Polynésie française', '', '', ''), (266, 'es_ES', 'Polynésie française', '', '', ''), (266, 'fr_FR', 'Polynésie française', '', '', ''), -(267, 'en_EN', 'Wallis-et-Futuna', '', '', ''), +(267, 'en_UK', 'Wallis-et-Futuna', '', '', ''), (267, 'es_ES', 'Wallis-et-Futuna', '', '', ''), (267, 'fr_FR', 'Wallis-et-Futuna', '', '', ''), -(268, 'en_EN', 'USA - Alabama', '', '', ''), +(268, 'en_UK', 'USA - Alabama', '', '', ''), (268, 'es_ES', 'USA - Alabama', '', '', ''), (268, 'fr_FR', 'USA - Alabama', '', '', ''); From fce528c41f718874ec68f05972244139b8f5c0fa Mon Sep 17 00:00:00 2001 From: franck Date: Tue, 3 Sep 2013 15:43:05 +0200 Subject: [PATCH 3/3] Added AdminUtilities Smarty plugin, optimized templates --- core/lib/Thelia/Config/Resources/config.xml | 10 +- .../Controller/Admin/BaseAdminController.php | 27 +-- .../Controller/Admin/CategoryController.php | 2 +- .../Controller/Admin/ConfigController.php | 27 ++- .../Controller/Admin/CurrencyController.php | 4 +- core/lib/Thelia/Core/Template/Loop/Config.php | 52 +++++- .../Thelia/Core/Template/Loop/Currency.php | 10 +- .../Smarty/Plugins/AdminUtilities.php | 144 ++++++++++++++++ templates/admin/default/assets/css/admin.less | 12 ++ templates/admin/default/categories.html | 125 ++++++++------ templates/admin/default/currencies.html | 160 ++++++++---------- templates/admin/default/edit_category.html | 2 +- .../default/includes/inner-form-toolbar.html | 4 +- templates/admin/default/message-edit.html | 4 +- templates/admin/default/messages.html | 4 + templates/admin/default/variable-edit.html | 4 +- templates/admin/default/variables.html | 38 ++++- 17 files changed, 452 insertions(+), 177 deletions(-) create mode 100644 core/lib/Thelia/Core/Template/Smarty/Plugins/AdminUtilities.php diff --git a/core/lib/Thelia/Config/Resources/config.xml b/core/lib/Thelia/Config/Resources/config.xml index 07e0a1d07..ddc17111b 100755 --- a/core/lib/Thelia/Config/Resources/config.xml +++ b/core/lib/Thelia/Config/Resources/config.xml @@ -166,17 +166,23 @@
- + - + + + + + + + diff --git a/core/lib/Thelia/Controller/Admin/BaseAdminController.php b/core/lib/Thelia/Controller/Admin/BaseAdminController.php index 8160033fe..b4b10e9be 100755 --- a/core/lib/Thelia/Controller/Admin/BaseAdminController.php +++ b/core/lib/Thelia/Controller/Admin/BaseAdminController.php @@ -155,7 +155,7 @@ class BaseAdminController extends BaseController */ protected function getCurrentEditionLangId() { return $this->getRequest()->get( - 'edition_language', + 'edit_language_id', $this->getSession()->getAdminEditionLangId() ); } @@ -196,29 +196,32 @@ class BaseAdminController extends BaseController $session = $this->getSession(); - // Find the current edit language ID $edition_language = $this->getCurrentEditionLangId(); // Current back-office (not edition) language - $current_lang = LangQuery::create()->findOneById($session->getLangId()); + $current_lang = LangQuery::create()->findOneById($session->getLangId()); + + // Find the current edit language ID + $edition_language = LangQuery::create()->findOneById($this->getCurrentEditionLangId()); // Prepare common template variables $args = array_merge($args, array( - 'locale' => $session->getLocale(), - 'lang_code' => $session->getLang(), - 'lang_id' => $session->getLangId(), + 'locale' => $session->getLocale(), + 'lang_code' => $session->getLang(), + 'lang_id' => $session->getLangId(), - 'datetime_format' => $current_lang->getDateTimeFormat(), - 'date_format' => $current_lang->getDateFormat(), - 'time_format' => $current_lang->getTimeFormat(), + 'datetime_format' => $current_lang->getDateTimeFormat(), + 'date_format' => $current_lang->getDateFormat(), + 'time_format' => $current_lang->getTimeFormat(), - 'edition_language' => $edition_language, + 'edit_language_id' => $edition_language->getId(), + 'edit_language_locale' => $edition_language->getLocale(), - 'current_url' => htmlspecialchars($this->getRequest()->getUri()) + 'current_url' => htmlspecialchars($this->getRequest()->getUri()) )); // Update the current edition language in session - $this->getSession()->setAdminEditionLangId($edition_language); + $this->getSession()->setAdminEditionLangId($edition_language->getId()); // Render the template. try { diff --git a/core/lib/Thelia/Controller/Admin/CategoryController.php b/core/lib/Thelia/Controller/Admin/CategoryController.php index 9966034f8..6cba34e39 100755 --- a/core/lib/Thelia/Controller/Admin/CategoryController.php +++ b/core/lib/Thelia/Controller/Admin/CategoryController.php @@ -188,7 +188,7 @@ class CategoryController extends BaseAdminController // Find the current order $category_order = $this->getRequest()->get( - 'category_order', + 'order', $this->getSession()->get('admin.category_order', 'manual') ); diff --git a/core/lib/Thelia/Controller/Admin/ConfigController.php b/core/lib/Thelia/Controller/Admin/ConfigController.php index 8f761ed7e..c6fab6b1b 100644 --- a/core/lib/Thelia/Controller/Admin/ConfigController.php +++ b/core/lib/Thelia/Controller/Admin/ConfigController.php @@ -42,6 +42,25 @@ use Thelia\Form\ConfigCreationForm; */ class ConfigController extends BaseAdminController { + /** + * Render the currencies list, ensuring the sort order is set. + * + * @return Symfony\Component\HttpFoundation\Response the response + */ + protected function renderList() { + + // Find the current order + $order = $this->getRequest()->get( + 'order', + $this->getSession()->get('admin.variables_order', 'name') + ); + + // Store the current sort order in session + $this->getSession()->set('admin.variables_order', $order); + + return $this->render('variables', array('order' => $order)); + } + /** * The default action is displaying the variables list. * @@ -51,7 +70,7 @@ class ConfigController extends BaseAdminController if (null !== $response = $this->checkAuth("admin.configuration.variables.view")) return $response; - return $this->render('variables'); + return $this->renderList(); } /** @@ -124,7 +143,7 @@ class ConfigController extends BaseAdminController } // At this point, the form has error, and should be redisplayed. - return $this->render('variables'); + return $this->renderList(); } /** @@ -276,7 +295,7 @@ class ConfigController extends BaseAdminController $this->dispatch(TheliaEvents::CONFIG_SETVALUE, $event); } - $this->redirect(URL::adminViewUrl('variables')); + $this->redirect(URL::absoluteUrl('/admin/configuration/variables')); } /** @@ -294,6 +313,6 @@ class ConfigController extends BaseAdminController $this->dispatch(TheliaEvents::CONFIG_DELETE, $event); - $this->redirect(URL::adminViewUrl('variables')); + $this->redirect(URL::absoluteUrl('/admin/configuration/variables')); } } \ No newline at end of file diff --git a/core/lib/Thelia/Controller/Admin/CurrencyController.php b/core/lib/Thelia/Controller/Admin/CurrencyController.php index 69cc60117..b9ca98083 100644 --- a/core/lib/Thelia/Controller/Admin/CurrencyController.php +++ b/core/lib/Thelia/Controller/Admin/CurrencyController.php @@ -101,7 +101,9 @@ class CurrencyController extends BaseAdminController ->setCurrencyName($data['name']) ->setLocale($data["locale"]) ->setSymbol($data['symbol']) - ; + ->setCode($data['code']) + ->setRate($data['rate']) + ; $this->dispatch(TheliaEvents::CURRENCY_CREATE, $createEvent); diff --git a/core/lib/Thelia/Core/Template/Loop/Config.php b/core/lib/Thelia/Core/Template/Loop/Config.php index 5cc1b2b44..684803385 100644 --- a/core/lib/Thelia/Core/Template/Loop/Config.php +++ b/core/lib/Thelia/Core/Template/Loop/Config.php @@ -34,6 +34,8 @@ use Thelia\Model\LangQuery; use Thelia\Core\Template\Loop\Argument\ArgumentCollection; use Thelia\Model\ConfigQuery; use Thelia\Type\BooleanOrBothType; +use Thelia\Type\TypeCollection; +use Thelia\Type\EnumListType; /** * Config loop, to access configuration variables @@ -59,7 +61,21 @@ class Config extends BaseI18nLoop Argument::createIntListTypeArgument('exclude'), Argument::createAnyTypeArgument('variable'), Argument::createBooleanOrBothTypeArgument('hidden'), - Argument::createBooleanOrBothTypeArgument('secured') + Argument::createBooleanOrBothTypeArgument('secured'), + new Argument( + 'order', + new TypeCollection( + new EnumListType( + array( + 'id', 'id_reverse', + 'name', 'name_reverse', + 'title', 'title_reverse', + 'value', 'value_reverse', + ) + ) + ), + 'name' + ) ); } @@ -94,7 +110,39 @@ class Config extends BaseI18nLoop if (! is_null($secured) && $secured != BooleanOrBothType::ANY) $search->filterBySecured($secured ? 1 : 0); - $search->orderByName(Criteria::ASC); + $orders = $this->getOrder(); + + foreach($orders as $order) { + switch ($order) { + case 'id': + $search->orderById(Criteria::ASC); + break; + case 'id_reverse': + $search->orderById(Criteria::DESC); + break; + + case 'name': + $search->orderByName(Criteria::ASC); + break; + case 'name_reverse': + $search->orderByName(Criteria::DESC); + break; + + case 'title': + $search->addAscendingOrderByColumn('i18n_TITLE'); + break; + case 'title_reverse': + $search->addDescendingOrderByColumn('i18n_TITLE'); + break; + + case 'value': + $search->orderByValue(Criteria::ASC); + break; + case 'value_reverse': + $search->orderByValue(Criteria::DESC); + break; + } + } $results = $this->search($search, $pagination); diff --git a/core/lib/Thelia/Core/Template/Loop/Currency.php b/core/lib/Thelia/Core/Template/Loop/Currency.php index 2fb296070..b6756fbe6 100755 --- a/core/lib/Thelia/Core/Template/Loop/Currency.php +++ b/core/lib/Thelia/Core/Template/Loop/Currency.php @@ -66,8 +66,9 @@ class Currency extends BaseI18nLoop 'code', 'code_reverse', 'symbol', 'symbol_reverse', 'rate', 'rate_reverse', + 'is_default', 'is_default_reverse', 'manual', 'manual_reverse') - ) + ) ), 'manual' ) @@ -143,6 +144,13 @@ class Currency extends BaseI18nLoop $search->orderByRate(Criteria::DESC); break; + case 'is_default': + $search->orderByByDefault(Criteria::ASC); + break; + case 'is_default_reverse': + $search->orderByByDefault(Criteria::DESC); + break; + case 'manual': $search->orderByPosition(Criteria::ASC); break; diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/AdminUtilities.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/AdminUtilities.php new file mode 100644 index 000000000..aab63177a --- /dev/null +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/AdminUtilities.php @@ -0,0 +1,144 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Template\Smarty\Plugins; + +use Thelia\Core\Template\Smarty\SmartyPluginDescriptor; +use Thelia\Core\Template\Smarty\AbstractSmartyPlugin; +use Thelia\Tools\URL; +use Thelia\Core\HttpFoundation\Request; +use Thelia\Core\Security\SecurityContext; + +/** + * This class implements variour admin template utilities + * + * @author Franck Allimant + */ +class AdminUtilities extends AbstractSmartyPlugin +{ + private $securityContext; + + public function __construct(SecurityContext $securityContext) + { + $this->securityContext = $securityContext; + } + + public function generatePositionChangeBlock($params, &$smarty) { + // The required permissions + $permission = $this->getParam($params, 'permission'); + + // The base position change path + $path = $this->getParam($params, 'path'); + + // The URL parameter the object ID is assigned + $url_parameter = $this->getParam($params, 'url_parameter'); + + // The current object position + $position = $this->getParam($params, 'position'); + + // The object ID + $id = $this->getParam($params, 'id'); + + // The in place dition class + $in_place_edit_class = $this->getParam($params, 'in_place_edit_class'); + + /* + + {$POSITION} + + */ + + if ($permissions == null || $this->securityContext->isGranted("ADMIN", array($permission))) { + return sprintf( + '%s', + URL::absoluteUrl("$path/positionUp", array($url_parameter => $id)), + $in_place_edit_class, + $id, + $position, + URL::absoluteUrl("$path/positionDown", array($url_parameter => $id)) + ); + } + else { + return $position; + } + } + + + /** + * Generates the link of a sortable column header + * + * @param array $params + * @param unknown $smarty + * @return string no text is returned. + */ + public function generateSortableColumnHeader($params, &$smarty) + { + // The current order of the table + $current_order = $this->getParam($params, 'current_order'); + + // The column ascending order + $order = $this->getParam($params, 'order'); + + // The column descending order label + $reverse_order = $this->getParam($params, 'reverse_order'); + + // The order change path + $path = $this->getParam($params, 'path'); + + // The column label + $label = $this->getParam($params, 'label'); + + if ($current_order == $order) { + $icon = 'up'; + $order_change = $reverse_order; + } + else if ($current_order == $reverse_order) { + $icon = 'down'; + $order_change = $order; + } + else { + $order_change = $order; + } + + if (! empty($icon)) + $output = sprintf(' ', $icon); + else + $output = ''; + + return sprintf('%s%s', $output, URL::absoluteUrl($path, array('order' => $order_change)), $label); + } + + + /** + * Define the various smarty plugins handled by this class + * + * @return an array of smarty plugin descriptors + */ + public function getPluginDescriptors() + { + return array( + new SmartyPluginDescriptor('function', 'admin_sortable_header', $this, 'generateSortableColumnHeader'), + new SmartyPluginDescriptor('function', 'admin_position_block' , $this, 'generatePositionChangeBlock'), + ); + } +} \ No newline at end of file diff --git a/templates/admin/default/assets/css/admin.less b/templates/admin/default/assets/css/admin.less index 85cef27da..9a01cfb67 100755 --- a/templates/admin/default/assets/css/admin.less +++ b/templates/admin/default/assets/css/admin.less @@ -621,6 +621,7 @@ form .info .input-append .add-on { li.active a { opacity: 1; background-color: #E7E7E7; + border: 1px solid #E9720F; } } } @@ -725,6 +726,17 @@ label { td, th { text-align: center; + + &.text-center { + text-align: center; + } + &.text-left { + text-align: left; + } + &.text-right { + text-align: right; + } + } td.object-title, th.object-title { diff --git a/templates/admin/default/categories.html b/templates/admin/default/categories.html index 1548140bf..65902e5d7 100755 --- a/templates/admin/default/categories.html +++ b/templates/admin/default/categories.html @@ -47,54 +47,40 @@   + - {if $category_order == 'alpha'} - - {$order_change = 'alpha_reverse'} - {elseif $category_order == 'alpha_reverse'} - - {$order_change = 'alpha'} - {else} - {$order_change = 'alpha'} - {/if} - - {intl l="Category title"} - - + {admin_sortable_header + current_order=$category_order + order='alpha' + reverse_order='alpha_reverse' + path={url path='/admin/catalog/category' id="{$current_category_id}"} + label={intl l='Category title'} + } + {module_include location='category_list_header'} - {if $category_order == 'visible'} - - {$order_change = 'visible_reverse'} - {elseif $category_order == 'visible_reverse'} - - {$order_change = 'visible'} - {else} - {$order_change = 'visible'} - {/if} - - - {intl l="Online"} - + {admin_sortable_header + current_order=$category_order + order='visible' + reverse_order='visible_reverse' + path={url path='/admin/catalog/category' id="{$current_category_id}"} + label={intl l='Online'} + } - {if $category_order == 'manual'} - - {$order_change = 'manual_reverse'} - {elseif $category_order == 'manual_reverse'} - - {$order_change = 'manual'} - {else} - {$order_change = 'manual'} - {/if} - - {intl l="Position"} + {admin_sortable_header + current_order=$category_order + order='manual' + reverse_order='manual_reverse' + path={url path='/admin/catalog/category' id="{$current_category_id}"} + label={intl l='Position'} + } - {intl l="Actions"} +   @@ -126,15 +112,14 @@ - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.category.edit"} - - {$POSITION} - - {/loop} - - {elseloop rel="can_change"} - {$POSITION} - {/elseloop} + {admin_position_block + permission="admin.category.edit" + path={url path='admin/catalog/category' category_id="{$ID}"} + url_parameter="category_id" + in_place_edit_class="categoryPositionChange" + position="$POSITION" + id="$ID" + } @@ -200,13 +185,38 @@   - {intl l="Product title"} + + {admin_sortable_header + current_order=$product_order + order='alpha' + reverse_order='alpha_reverse' + path={url path='/admin/catalog/product' id="{$current_category_id}"} + label={intl l='Product title'} + } {module_include location='product_list_header'} - {intl l="Online"} - {intl l="Position"} - {intl l="Actions"} + + {admin_sortable_header + current_order=$product_order + order='visible' + reverse_order='visible_reverse' + path={url path='/admin/catalog/product' id="{$current_category_id}"} + label={intl l='Online'} + } + + + + {admin_sortable_header + current_order=$product_order + order='manual' + reverse_order='manual_reverse' + path={url path='/admin/catalog/product' id="{$current_category_id}"} + label={intl l='Position'} + } + + +   @@ -229,13 +239,18 @@ - - {$POSITION} - + {admin_position_block + permission="admin.product.edit" + path={url path='admin/catalog/product' category_id="{$ID}"} + url_parameter="product_id" + in_place_edit_class="productPositionChange" + position="$POSITION" + id="$ID" + } - + diff --git a/templates/admin/default/currencies.html b/templates/admin/default/currencies.html index 762bb47ee..6671c131f 100644 --- a/templates/admin/default/currencies.html +++ b/templates/admin/default/currencies.html @@ -40,94 +40,75 @@ - {if $order == 'id'} - - {$order_change = 'id_reverse'} - {elseif $order == 'id_reverse'} - - {$order_change = 'id'} - {else} - {$order_change = 'id'} - {/if} - - {intl l="ID"} - + {admin_sortable_header + current_order=$order + order='id' + reverse_order='id_reverse' + path='/admin/configuration/currencies' + label="{intl l='ID'}" + } - {if $order == 'alpha'} - - {$order_change = 'alpha_reverse'} - {elseif $order == 'alpha_reverse'} - - {$order_change = 'alpha'} - {else} - {$order_change = 'alpha'} - {/if} - - {intl l="Name"} - + {admin_sortable_header + current_order=$order + order='alpha' + reverse_order='alpha_reverse' + path='/admin/configuration/currencies' + label="{intl l='Name'}" + } - - {if $order == 'code'} - - {$order_change = 'code_reverse'} - {elseif $order == 'code_reverse'} - - {$order_change = 'code'} - {else} - {$order_change = 'code'} - {/if} - {intl l="ISO 4217 Code"} + + {admin_sortable_header + current_order=$order + order='code' + reverse_order='code_reverse' + path='/admin/configuration/currencies' + label="{intl l="ISO 4217 Code"}" + } - - {if $order == 'symbol'} - - {$order_change = 'symbol_reverse'} - {elseif $order == 'symbol_reverse'} - - {$order_change = 'symbol'} - {else} - {$order_change = 'symbol'} - {/if} - - {intl l="Symbol"} - + + {admin_sortable_header + current_order=$order + order='symbol' + reverse_order='symbol_reverse' + path='/admin/configuration/currencies' + label="{intl l="Symbol"}" + } - - {if $order == 'rate'} - - {$order_change = 'rate_reverse'} - {elseif $order == 'rate_reverse'} - - {$order_change = 'rate'} - {else} - {$order_change = 'rate'} - {/if} - - {intl l="Rate in €"} - + + {admin_sortable_header + current_order=$order + order='rate' + reverse_order='rate_reverse' + path='/admin/configuration/currencies' + label="{intl l="Rate in €"}" + } - - {if $order == 'manual'} - - {$order_change = 'manual_reverse'} - {elseif $order == 'manual_reverse'} - - {$order_change = 'manual'} - {else} - {$order_change = 'manual'} - {/if} - - {intl l="Position"} + + {admin_sortable_header + current_order=$order + order='manual' + reverse_order='manual_reverse' + path='/admin/configuration/currencies' + label="{intl l="Position"}" + } - {intl l="Default"} + + {admin_sortable_header + current_order=$order + order='is_default' + reverse_order='is_default_reverse' + path='/admin/configuration/currencies' + label="{intl l="Default"}" + } + {module_include location='currencies_table_header'} @@ -148,25 +129,24 @@ {/elseloop} - {$ISOCODE} + {$ISOCODE} - {$SYMBOL} + {$SYMBOL} - {$RATE|string_format:"%.4f"} + {$RATE|string_format:"%.4f"} - - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.category.edit"} - - {$POSITION} - - {/loop} - - {elseloop rel="can_change"} - {$POSITION} - {/elseloop} + + {admin_position_block + permission="admin.currencies.edit" + path="/admin/configuration/currencies" + url_parameter="currency_id" + in_place_edit_class="currencyPositionChange" + position="$POSITION" + id="$ID" + } - + {module_include location='currencies_table_row'} @@ -238,6 +218,10 @@
{loop type="lang" name="default-lang" default_only="1"} + + {* Switch edition to the current locale *} + + {form_field form=$form field='locale'} {/form_field} diff --git a/templates/admin/default/edit_category.html b/templates/admin/default/edit_category.html index 65c5f9c56..3d70e5cdb 100755 --- a/templates/admin/default/edit_category.html +++ b/templates/admin/default/edit_category.html @@ -12,7 +12,7 @@
- {loop name="category_edit" type="category" visible="*" id="{$current_category_id}" backend_context="1" lang="$edition_language"} + {loop name="category_edit" type="category" visible="*" id="{$current_category_id}" backend_context="1" lang="$edit_language_id"}
diff --git a/templates/admin/default/includes/inner-form-toolbar.html b/templates/admin/default/includes/inner-form-toolbar.html index 082ad34e2..3edcbf794 100755 --- a/templates/admin/default/includes/inner-form-toolbar.html +++ b/templates/admin/default/includes/inner-form-toolbar.html @@ -11,8 +11,8 @@