diff --git a/core/lib/Thelia/Config/Resources/routing/admin.xml b/core/lib/Thelia/Config/Resources/routing/admin.xml index 7173fa8ce..ccf7a5234 100644 --- a/core/lib/Thelia/Config/Resources/routing/admin.xml +++ b/core/lib/Thelia/Config/Resources/routing/admin.xml @@ -16,6 +16,10 @@ Thelia\Controller\Admin\HomeController::defaultAction + + Thelia\Controller\Admin\HomeController::getLatestTheliaVersion + + Thelia\Controller\Admin\HomeController::loadStatsAjaxAction @@ -767,9 +771,9 @@ Thelia\Controller\Admin\ShippingZoneController::indexAction - + Thelia\Controller\Admin\ShippingZoneController::updateAction - \d+ + \d+ diff --git a/core/lib/Thelia/Controller/Admin/HomeController.php b/core/lib/Thelia/Controller/Admin/HomeController.php index eb7a9a2ab..21391ecc3 100644 --- a/core/lib/Thelia/Controller/Admin/HomeController.php +++ b/core/lib/Thelia/Controller/Admin/HomeController.php @@ -23,6 +23,7 @@ namespace Thelia\Controller\Admin; +use Thelia\Core\HttpFoundation\Response; use Thelia\Core\Security\AccessManager; use Thelia\Model\CustomerQuery; use Thelia\Model\OrderQuery; @@ -39,6 +40,26 @@ class HomeController extends BaseAdminController return $this->render('home'); } + /** + * Get the latest available Thelia version from the Thelia web site. + * + * @return Thelia\Core\HttpFoundation\Response the response + */ + public function getLatestTheliaVersion() + { + if (null !== $response = $this->checkAuth(self::RESOURCE_CODE, array(), AccessManager::VIEW)) return $response; + + // get the latest version + $version = @file_get_contents("http://thelia.net/version.php"); + + if ($version === false) + $version = $this->getTranslator()->trans("Not found"); + else if (! preg_match("/^[0-9.]*$/", $version)) + $version = $this->getTranslator()->trans("Unavailable"); + + return Response::create($version); + } + public function loadStatsAjaxAction() { if (null !== $response = $this->checkAuth(self::RESOURCE_CODE, array(), AccessManager::VIEW)) return $response; diff --git a/core/lib/Thelia/Controller/Admin/ShippingZoneController.php b/core/lib/Thelia/Controller/Admin/ShippingZoneController.php index 82b630398..c8b497e14 100644 --- a/core/lib/Thelia/Controller/Admin/ShippingZoneController.php +++ b/core/lib/Thelia/Controller/Admin/ShippingZoneController.php @@ -46,11 +46,11 @@ class ShippingZoneController extends BaseAdminController return $this->render("shipping-zones", array("display_shipping_zone" => 20)); } - public function updateAction($shipping_zones_id) + public function updateAction($delivery_module_id) { if (null !== $response = $this->checkAuth(AdminResources::SHIPPING_ZONE, array(), AccessManager::VIEW)) return $response; return $this->render("shipping-zones-edit", array( - "shipping_zones_id" => $shipping_zones_id + "delivery_module_id" => $delivery_module_id )); } @@ -133,13 +133,13 @@ class ShippingZoneController extends BaseAdminController protected function renderEditionTemplate() { return $this->render("shipping-zones-edit", array( - "shipping_zones_id" => $this->getShippingZoneId() + "delivery_module_id" => $this->getDeliveryModuleId() )); } - protected function getShippingZoneId() + protected function getDeliveryModuleId() { - return $this->getRequest()->get('shipping_zone_id', 0); + return $this->getRequest()->get('delivery_module_id', 0); } } diff --git a/core/lib/Thelia/Core/Security/Resource/AdminResources.php b/core/lib/Thelia/Core/Security/Resource/AdminResources.php index 4d8d8ad90..7ab9e0373 100644 --- a/core/lib/Thelia/Core/Security/Resource/AdminResources.php +++ b/core/lib/Thelia/Core/Security/Resource/AdminResources.php @@ -80,6 +80,8 @@ final class AdminResources const FOLDER = "admin.folder"; + const HOME = "admin.home"; + const LANGUAGE = "admin.configuration.language"; const MAILING_SYSTEM = "admin.configuration.mailing-system"; diff --git a/core/lib/Thelia/Core/Template/Loop/Area.php b/core/lib/Thelia/Core/Template/Loop/Area.php index 6ac3b1518..510fa03f2 100644 --- a/core/lib/Thelia/Core/Template/Loop/Area.php +++ b/core/lib/Thelia/Core/Template/Loop/Area.php @@ -77,7 +77,8 @@ class Area extends BaseLoop implements PropelSearchLoopInterface return new ArgumentCollection( Argument::createIntListTypeArgument('id'), Argument::createIntTypeArgument('with_zone'), - Argument::createIntTypeArgument('without_zone') + Argument::createIntTypeArgument('without_zone'), + Argument::createBooleanOrBothTypeArgument('unassigned') ); } @@ -106,6 +107,14 @@ class Area extends BaseLoop implements PropelSearchLoopInterface ->where('`without_zone`.delivery_module_id '.Criteria::ISNULL); } + $notAssigned = $this->getUnassigned(); + + if ($notAssigned) { + $search + ->joinAreaDeliveryModule('unassigned', Criteria::LEFT_JOIN) + ->where('`unassigned`.delivery_module_id ' . Criteria::ISNULL); + } + return $search; } diff --git a/core/lib/Thelia/Form/Area/AreaCreateForm.php b/core/lib/Thelia/Form/Area/AreaCreateForm.php index 79fc4b2a2..6baea9091 100644 --- a/core/lib/Thelia/Form/Area/AreaCreateForm.php +++ b/core/lib/Thelia/Form/Area/AreaCreateForm.php @@ -62,7 +62,7 @@ class AreaCreateForm extends BaseForm new NotBlank() ), 'label_attr' => array('for' => 'shipping_name'), - 'label' => Translator::getInstance()->trans('shipping area name') + 'label' => Translator::getInstance()->trans('Shipping zone name') )) ; diff --git a/core/lib/Thelia/Form/ShippingZone/ShippingZoneAddArea.php b/core/lib/Thelia/Form/ShippingZone/ShippingZoneAddArea.php index ea31b696b..8930c9cb2 100644 --- a/core/lib/Thelia/Form/ShippingZone/ShippingZoneAddArea.php +++ b/core/lib/Thelia/Form/ShippingZone/ShippingZoneAddArea.php @@ -65,7 +65,7 @@ class ShippingZoneAddArea extends BaseForm new GreaterThan(array('value' => 0)) ), 'label_attr' => array('for' => 'shipping_area'), - 'label' => Translator::getInstance()->trans('Area') + 'label' => Translator::getInstance()->trans('Available shipping zones') )) ->add('shipping_zone_id', 'integer', array( 'constraints' => array( diff --git a/install/insert.sql b/install/insert.sql index 0dd73f6ad..2baa971ad 100644 --- a/install/insert.sql +++ b/install/insert.sql @@ -1270,7 +1270,8 @@ INSERT INTO resource (`id`, `code`, `created_at`, `updated_at`) VALUES (22, 'admin.configuration.tax', NOW(), NOW()), (23, 'admin.configuration.template', NOW(), NOW()), (24, 'admin.configuration.system-log', NOW(), NOW()), -(25, 'admin.cache', NOW(), NOW()); +(25, 'admin.cache', NOW(), NOW()), +(26, 'admin.home', NOW(), NOW()); /** generated with command : php Thelia thelia:generate-resources --output sql-i18n @@ -1325,8 +1326,9 @@ INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES (24, 'en_US', 'Configuration / System Log'), (24, 'fr_FR', 'Configuration / Logs système'), (25, 'en_US', 'Configuration / Cache'), -(25, 'fr_FR', 'Configuration / Cache'); - +(25, 'fr_FR', 'Configuration / Cache'), +(26, 'en_US', 'Back-office home page'), +(26, 'fr_FR', 'Page d''acceuil de l''administration'); INSERT INTO `message` (`id`, `name`, `secured`, `created_at`, `updated_at`, `version`, `version_created_at`, `version_created_by`) VALUES (1, 'order_confirmation', NULL, NOW(), NOW(), 2, NOW(), NULL), diff --git a/install/update/2.0.0.sql b/install/update/2.0.0.sql index aba2a4f0a..b4e84c04b 100644 --- a/install/update/2.0.0.sql +++ b/install/update/2.0.0.sql @@ -17,7 +17,7 @@ ALTER TABLE `product_image` ADD INDEX `idx_product_image_product_id_position` (` ALTER TABLE `category_image` ADD INDEX `idx_category_image_category_id_position` (`category_id`, `position`); ALTER TABLE `content_image` ADD INDEX `idx_content_image_content_id_position` (`content_id`, `position`); ALTER TABLE `folder_image` ADD INDEX `idx_folder_image_folder_id_position` (`folder_id`, `position`); -ALTER TABLE `module_image` ADD INDEX `idx_module_image_module_id_position` (`module_id`, `position`) +ALTER TABLE `module_image` ADD INDEX `idx_module_image_module_id_position` (`module_id`, `position`); ALTER TABLE `rewriting_url` ADD INDEX `idx_rewriting_url_view_updated_at` (`view`, `updated_at`); ALTER TABLE `rewriting_url` ADD INDEX `idx_rewriting_url_view_id_view_view_locale_updated_at` (`view_id`, `view`, `view_locale`, `updated_at`); @@ -38,4 +38,13 @@ INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES (@max, 'en_US', 'Configuration / Cache'), (@max, 'fr_FR', 'Configuration / Cache'); +SET @max := @max+1; + +INSERT INTO resource (`id`, `code`, `created_at`, `updated_at`) VALUES +(@max, 'admin.cache', NOW(), NOW()); + +INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES +(@max, 'en_US', 'Back-office home page'), +(@max, 'fr_FR', 'Page d''acceuil de l''administration'); + SET FOREIGN_KEY_CHECKS = 1; \ No newline at end of file diff --git a/templates/backOffice/default/I18n/fr_FR.php b/templates/backOffice/default/I18n/fr_FR.php index 359241e9a..8f26dd4fd 100755 --- a/templates/backOffice/default/I18n/fr_FR.php +++ b/templates/backOffice/default/I18n/fr_FR.php @@ -2,6 +2,7 @@ return array( ' (default)' => '(défaut)', + '%count more...' => '%count de plus...', '© Thelia 2013' => '© Thelia 2013', '(edit)' => '(modification)', 'Check the list of ISO 639-1 codes' => 'Consulter la liste des codes ISO 639-1', @@ -9,6 +10,7 @@ return array( 'Cannot translate all fields. According to your PHP configuration, forms cannot contains more than %current_max_input_vars input fields, but at least %required_max_input_vars are required. Please change the value of max_input_vars in your PHP configuration of change the translation file by hand.' => 'Limitation système bloquante ! Votre configuration PHP limite le nombre de champs d\'une forme HTML à %current_max_input_vars champs. Au moins %required_max_input_vars champs sont nécessaires pour effectuer les traductions. Merci de modifier en conséquence la variable max_input_vars de votre configuration PHP. Vous pouvez aussi modifier les fichiers de traduction à la main.', 'Congratulations, all text is now translated !' => 'Félicitations, tous les textes ont été traduits !', 'Did not found any text to translate. It\'s probably normal. If not, please be sure to use Smarty\'s "intl" function in templates, or the Translator::trans() method in PHP files.' => 'Aucun texte à traduire. C\'est probablement normal. Si ce n\'est pas le cas vérifiez que vous utilisez bien la fonction Smarty "intl" ou bien le translator Translator::trans dans un fichier php', + 'Warning, some of your shipping zones are not attached to any delivery module:' => 'Attention, les zones de livraison suivantes ne sont associées à aucun module:', 'A content could be attached to more than one folder. Select here the additional folders for this content.' => 'Un contenu peut être rattaché à plusieurs dossiers. Sélectionnez ici les dossiers dans lesquels ce contenu apparaîtra', 'A product could be attached to more than one category. Select here the additional categories for this product.' => 'Un produit peut être associé à plusieurs rubriques. Sélectionner les rubrique pour lesquels le produit sera associé', 'A short description, used when a summary or an introduction is required' => 'Une courte description, utilisée lorsqu\'un résumé ou une introduction est requise', @@ -33,7 +35,7 @@ return array( 'Add a new product attribute' => 'Ajouter une nouvelle déclinaison produit', 'Add a new product feature' => 'Ajouter une nouvelle caractéristique produit', 'Add a new product template' => 'Ajouter un nouveau template produit', - 'Add a new shipping configuration' => 'Ajouter une nouvelle configuration de livraison', + 'Add a new shipping zone' => 'Ajouter une nouvelle zone de livraison', 'Add a new variable' => 'Ajouter une nouvelle variable', 'Add tax to this group' => 'Ajouter une taxe à ce groupe', 'Add this attribute to all product templates' => 'Ajouter cette déclinaison à tous les templates produit', @@ -45,8 +47,10 @@ return array( 'Additional categories' => 'Rubriques supplémentaires', 'Address' => 'Adresse', 'Administration logs' => 'Journal des logs', - 'Administration profiles' => 'Gestion des profils', + 'Administration profiles' => 'Profils d\'administration', 'Administrators' => 'Administrateurs', + 'Afficher ce profil' => 'View this profile', + 'All countries are assigned to a shipping zone.' => 'Tous les pays sont assignés à une zone de livraison.', 'All orders' => 'Toutes les commandes', 'Alpha code 2' => 'Code alpha 2', 'Alpha code 3' => 'Code alpha 3', @@ -55,6 +59,7 @@ return array( 'And' => 'Et', 'Application field' => 'Champs d\'application', 'Apply' => 'Appliquer', + 'Associated countries' => 'Pays dans la zone', 'Associations' => 'Associations', 'Attribute' => 'Déclinaison', 'Attribute Combinations' => 'Combinaison de déclinaisons', @@ -74,6 +79,7 @@ return array( 'Browse files' => 'Parcourir les fichiers', 'Browse this category' => 'Parcourir cette catégorie', 'Browse this folder' => 'Parcourir ce dossier', + 'Cache' => 'Cache', 'Can\'t be cumulative' => 'Ne peut pas se cumuler', 'Can\'t load documents, please refresh this page.' => 'Impossible de charger les documents. Rechargez la page', 'Can\'t load images, please refresh this page.' => 'Impossible de charger l\'image. Rechargez la page', @@ -101,7 +107,6 @@ return array( 'Change this product feature' => 'Modifier cette caractéristique produit', 'Change this product template' => 'Modifier ce template produit', 'Change this profile' => 'Changer ce profil', - 'Change this shipping configuration' => 'Modifier cette configuration de livraison', 'Change this shipping zone' => 'Modifier cette zone de livraison', 'Change this tax' => 'Modifier cette taxe', 'Change this tax rule' => 'Modifier cette règle de taxe', @@ -135,6 +140,7 @@ return array( 'Contents in %fold' => 'Contenus dans %fold', 'Copy source text in input field' => 'Copier la source dans le champs de traduction', 'Countries' => 'Pays', + 'Countries assigned to this zone' => 'Pays inclus dans cette zone', 'Countries that have the same tax rule' => 'Pays qui ont les même règles de taxe', 'Country' => 'Pays', 'Country description' => 'Description du pays', @@ -164,7 +170,7 @@ return array( 'Create a new product' => 'Créer un nouveau produit', 'Create a new product template' => 'Créer un nouveau template produit', 'Create a new profile' => 'Créer un nouveau profil', - 'Create a new shipping configuration' => 'Créer une nouvelle configuration de livraison', + 'Create a new shipping zone' => 'Créer une nouvelle zone de livraison', 'Create a new tax' => 'Créer une nouvelle taxe', 'Create a new tax rule' => 'Créer une nouvelle règle de taxe', 'Create a new variable' => 'Créer une nouvelle variable', @@ -184,7 +190,7 @@ return array( 'Create this mailing template' => 'Créer ce template de mailing', 'Create this product' => 'Créer ce produit', 'Create this product template' => 'Créer ce template produit', - 'Create this shipping configuration' => 'Créer cette nouvelle configuration de livraison', + 'Create this shipping zone' => 'Créer cette zone de livraison', 'Create this value' => 'Créer cette valeur', 'Create this variable' => 'Ajouter cette variable', 'Currencies' => 'Devises', @@ -230,7 +236,7 @@ return array( 'Delete mailing template' => 'Supprimer ce template de mailing', 'Delete product' => 'Supprimer ce produit', 'Delete profile' => 'Supprimer le profil', - 'Delete shipping configuration' => 'Supprimer cette configuration de livraison', + 'Delete shipping zone' => 'Supprimer une zone de livraison', 'Delete tax' => 'Supprimer la taxe', 'Delete tax rule' => 'Supprimer cette règle de taxe', 'Delete template' => 'Supprimer ce template produit', @@ -253,7 +259,7 @@ return array( 'Delete this product feature' => 'Supprimer cette caractéristique produit', 'Delete this product template' => 'Supprimer ce template produit', 'Delete this profile' => 'Supprimer ce profil', - 'Delete this shipping configuration' => 'Supprimer cette configuration de livraison', + 'Delete this shipping zone' => 'Supprimer cette zone de livraison', 'Delete this tax' => 'Supprimer cette taxe', 'Delete this tax rule' => 'Supprimer cette règle de taxe', 'Delete this value' => 'Supprimer cette valeur', @@ -290,7 +296,7 @@ return array( 'Do you really want to delete this module ?' => 'Voulez-vous vraiment supprimer ce module ?', 'Do you really want to delete this product ?' => 'Voulez-vous vraiment supprimer ce produit ?', 'Do you really want to delete this profile ?' => 'Voulez-vous vraiment supprimer ce profil ?', - 'Do you really want to delete this shipping configuration ?' => 'Voulez-vous vraiment supprimer cette configuration de livraison ?', + 'Do you really want to delete this shipping zone ?' => 'Confirmez vous la suppression de cette zone de livraison ?', 'Do you really want to delete this tax ?' => 'Voulez-vous vraiment supprimer cette taxe ?', 'Do you really want to delete this tax rule ?' => 'Voulez-vous vraiment supprimer cette règle de taxe ?', 'Do you really want to delete this template ? It will be removed from all products.' => 'Voulez-vous vraiment supprimer ce template ? Il sera supprimé de tous les produits.', @@ -301,7 +307,7 @@ return array( 'Do you really want to remove this accessory from the product ?' => 'êtes-vous sur de vouloir supprimer cet accessoire ?', 'Do you really want to remove this attribute from all product templates ? You\'ll loose all product related data for this attribute.' => 'Voulez-vous vraiment supprimer cette déclinaison de tous les templates produits ? Vous allez perdre toutes les informations produit liées à cette déclinaison.', 'Do you really want to remove this attribute from the template ?' => 'êtes-vous sur de vouloir retirer cette déclinaison de ce template', - 'Do you really want to remove this country ?' => 'Voulez-vous vraiment enlever ce pays ?', + 'Do you really want to remove this country from this shipping zone ?' => 'Voulez-vous retirer ce pays de la zone de livraison ?', 'Do you really want to remove this feature from all product templates ? You\'ll loose all product related data for this feature.' => 'Voulez-vous vraiment enlever cette caractéristique de tous les templates produit ? Vous allez perdre toutes les informations des produits liées à cette caractéristique.', 'Do you really want to remove this feature from the template ?' => 'Voulez-vous vraiment supprimer cette caractéristique de ce template ?', 'Do you really want to remove this related content ?' => 'Voulez-vous vraiment supprimer ce contenu lié ?', @@ -371,14 +377,13 @@ return array( 'Edit prices in %curr' => 'Modifier les prix en %curr', 'Edit product' => 'Modifier le produit', 'Edit product %title' => 'Modifier le produit %title', - 'Edit shipping configuration %title' => 'Modifier la configuration de livraison %title', - 'Edit shipping zone %title' => 'Modifier la zone de livraison %title', 'Edit tax rule taxes' => 'Modifier les taxes de la règle de taxe', 'Edit template "%name"' => 'Modifier le template "%name"', 'Edit this address' => 'Editer cette adresse', 'Edit this category' => 'Editer cette rubrique', 'Edit this content' => 'Modifier ce contenu', 'Edit this customer' => 'Modifier ce client', + 'Edit this delivery zone' => 'Modifier cette zone de livraison', 'Edit this folder' => 'Modifier ce dossier', 'Edit this module' => 'Modifier ce module', 'Edit this order' => 'Editer cette commande', @@ -397,8 +402,9 @@ return array( 'Editing mailing template "%name"' => 'En cours de modification du template de mailing "%name"', 'Editing module' => 'Module en cours de modification', 'Editing profile' => 'Modification du profil', - 'Editing shipping configuration "%name"' => 'En cours de modification de la configuration de livraison "%name"', - 'Editing shipping zone "%name"' => 'En cours de modification de la zone de livraison "%name"', + 'Editing profile \'%name\'' => 'Edition du profil \'%name\' ', + 'Editing shipping configuration for module "%name"' => 'Configuration des zones de livraison du module "%title" ', + 'Editing shipping zone "%name"' => 'Modification de la zone de livraison "%name"', 'Editing tax' => 'En cours de modification de la taxe', 'Editing tax rule' => 'En cours de modification de la règle de taxe', 'Editing template "%name"' => 'Modification du template "%name"', @@ -428,6 +434,8 @@ return array( 'Enter here the template name in the default language (%title)' => 'Renseignez le nom du template dans la langue par défaut (%title)', 'Enter here the value in the current edit language (%language_name)' => 'Rensignez la valeur dans la langue d\'édition actuelle (%language_name)', 'Enter here the value in the current edit language (%title)' => 'Entrez la valeur dans la langue d\'édition courante (%title)', + 'Enter here the value in the default language (%title)' => 'Indiquez la valeur pour la langue par défaut (%title) ', + 'Enter information in the default language (%title)' => 'Entrez les informations dans la langue par défaut (%title) ', 'Enter new accessory position' => 'Renseigner la nouvelle position pour cet accessoire', 'Enter new attribute position' => 'Modifier la position de la déclinaison', 'Enter new category position' => 'Classement de la catégorie', @@ -462,6 +470,7 @@ return array( 'First orders' => 'Premières commandes', 'FirstName' => 'Prénom', 'Firstname' => 'Prénom', + 'Flush the cache' => 'Vider le cache', 'Folder created on %date_create. Last modification: %date_change' => 'Dossier créé le %date_create. Dernière modification le %date_change', 'Folder title' => 'Titre du dossier', 'Folders' => 'Dossiers', @@ -524,6 +533,7 @@ return array( 'Leave empty to keep current password' => 'Laisser ce champ vide pour ne pas modifier le mot de passe', 'Lire la suite' => 'Lire la suite', 'Loading Thelia lastest news...' => 'Chargement des dernières information Thelia...', + 'Loading...' => 'Chargement...', 'Locale' => 'Paramètre régional', 'Log lines format' => 'Format d\'une ligne de log', 'Log lines header format. You may use the following variables: ' => 'Format d\'une ligne de log. Vous pouvez utiliser ces variables : ', @@ -606,9 +616,9 @@ return array( 'Please select a coupon type' => 'Merci d\'entrer le type de code', 'Please select another condition' => 'Merci de sélectionner une autre condition', 'Please select items to translate' => 'Veuillez sélectionner un élément', - 'Please select the B.O. template to translate' => 'Sélectionnez le template back-office que vous souhaitez traduire', + 'Please select the B.O. template to translate' => 'Sélectionnez le template back-office à traduire', 'Please select the E-mail template to translate' => 'Sélectionnez le template de mail à traduire', - 'Please select the F.O. template to translate' => 'Sélectionnez le template front-office que vous souhaitez traduire', + 'Please select the F.O. template to translate' => 'Sélectionnez le template front-office à traduire', 'Please select the PDF template to translate' => 'Sélectionnez le template PDF à traduire', 'Please select the module to translate' => 'Sélectionnez le module à traduire', 'Please wait, loading' => 'Chargement, veuillez patienter', @@ -697,6 +707,7 @@ return array( 'Save this condition' => 'Enregistrer cette condition', 'Save your modifications' => 'Enregistrer les modifications', 'Search' => 'Recherche', + 'Search for \'%term\'' => 'Recherche de \'%term\'', 'Select a category and click (+) to add it to the additional category list' => 'Sélectionner une rubrique et cliquez sur (+) pour la rajouter dans la liste des rubrique associées', 'Select a category to get its products' => 'Sélectionner une rubrique pour avoir les produits qu\'elle contient', 'Select a category...' => 'Sélectionner une rubrique...', @@ -720,17 +731,22 @@ return array( 'Select here the tax applicable to this product' => 'Sélectionnez ici la taxe applicable sur ce produit', 'Select the E-mail template you want to translate' => 'Sélectionnez le template de mail à traduire', 'Select the PDF template you want to translate' => 'Sélectionnez le template PDF à traduire', - 'Select the back-office template you want to translate' => 'Sélectionnez le template back-office que vous souhaitez traduire', - 'Select the front-office template you want to translate' => 'Sélectionnez le template front-office que vous souhaitez traduire', + 'Select the back-office template you want to translate' => 'Sélectionnez le template back-office à traduire', + 'Select the front-office template you want to translate' => 'Sélectionnez le template front-office à traduire', 'Select the module you want to translate' => 'Sélectionnez le module à traduire', - 'Select which items you want to translate' => 'Sélectionnez l\'élément que vous souhaitez traduire', + 'Select which items you want to translate' => 'Sélectionnez l\'élément à traduire', 'Send a mail to this customer' => 'Contacter ce client par mail', 'Send files' => 'Envoyer des fichiers', 'Sequential number of log line' => 'Sequential number of log line', 'Set as default tax rule' => 'Configurer en tant que règle par défaut', 'Shipping configuration' => 'Configuration du transport', - 'Shipping configuration name' => 'Nom de la configuration de livraison', + 'Shipping configuration of delivery module "%title"' => 'Configuration des zones de livraison du module "%title" ', + 'Shipping zone' => 'Zone de livraison', + 'Shipping zone "%title"' => 'Zone de livraison "%title"', + 'Shipping zone name' => 'Nom de la zone de livraison', 'Shipping zones' => 'Zones de livraison', + 'Shipping zones for this module' => 'Zones de livraison associées à ce module', + 'Shipping zones management' => 'Zones de livraison', 'Shop' => 'Boutique', 'Shop Informations' => 'Informations sur la boutique', 'Short conclusion' => 'Courte conclusion', @@ -811,6 +827,7 @@ return array( 'Thelia support forum' => 'Forum de Thelia', 'Thelia system variables' => 'Variables Thelia', 'Thelia, the open source e-commerce solution' => 'Thelia, la solution e-commerce libre', + 'There are no shipping zones attached to this module.' => 'Ce module de transport n\'est associé à aucune zone de livraison', 'There is currently no active module here.' => 'Il n\'y a aucun module actif ici', 'There is no documents attached to this %type.' => 'Il n\'y a aucun document lié à ce %type.', 'There is no images attached to this %type.' => 'Il n\'y a pas d\'image liée à ce %type.', @@ -822,6 +839,7 @@ return array( 'This category has no sub-categories. To create a new one, click the + button above.' => 'Cette rubrique n\'a pas de sous-rubrique. Pour en créer une nouvelle, cliquez sur le bouton + ci-dessus.', 'This coupon is disabled, you can enable at the bottom of this form.' => 'Le code promo est désactivé. Vous pouvez l\'activer au début de ce formulaire', 'This customer has not defined any delivery address' => 'Ce client n\'a pas saisi aucune adresse de livraison', + 'This delivery module handles all shipping zones.' => 'Ce module livre dans toutes les zones de livraison.', 'This folder doesn\'t contains any contents. To add a new content, click the + button above.' => 'Ce dossier n\'a aucun contenu. Pour ajouter un nouveau contenu, cliquez sur le bouton + ci-dessus.', 'This folder has no sub-folders.' => 'Ce dossier n\'a pas de sous-dossiers.', 'This folder has no sub-folders. To create a new one, click the + button above.' => 'Ce dossier n\'a pas de sous-dossiers. Afin de créer un nouveau, cliquez sur le bouton + ci-dessus.', @@ -834,6 +852,7 @@ return array( 'This product doesn\'t belong to any additional category.' => 'Ce produit n\'est associé à aucune rubrique supplémentaire', 'This product doesn\'t belong to any additional folder.' => 'Ce produit n\'appartient à aucun dossier addoitionnel', 'This product template does not contains any features' => 'Ce gabarit de produit ne comporte aucune caractéristique', + 'This shipping zone does not contains any country.' => 'Cette zone de livraison ne comporte aucun pays', 'This template contains no attributes' => 'Ce template n\'a pas de déclinaison', 'This template contains no features' => 'Ce template ne contient aucune caractéristique', 'This the unique name of this message. Do not change this value unless you understand what you do.' => 'Ceci est le nom unique du message. Ne le modifiez que si vous savez ce que vous faîtes', @@ -860,6 +879,7 @@ return array( 'Translation' => 'Traductions', 'Translations' => 'Traductions', 'Type :' => 'Type : ', + 'Unassigned countries' => 'Pays sans zone de livraison', 'Unit taxed price' => 'Prix unitaire TTC', 'Unit. price' => 'Prix unitaire', 'Unlimited' => 'Illimité', @@ -911,7 +931,7 @@ return array( 'You don\'t need to use commas or other punctuations.' => 'Vous n\'avez pas besoin d\'utiliser de virgules ou d\'autres signes de ponctuation', 'Your current IP address is %ip' => 'Votre adresse IP est %ip', 'Zip code' => 'Code postal', - 'Zones' => 'Zones', + 'Zone name' => 'Nom de la zone', 'activate' => 'activer', 'activate %title module' => 'Activez le module %title', 'activation' => 'Activation', diff --git a/templates/backOffice/default/admin-layout.tpl b/templates/backOffice/default/admin-layout.tpl index 0c054b2ad..e45fad512 100644 --- a/templates/backOffice/default/admin-layout.tpl +++ b/templates/backOffice/default/admin-layout.tpl @@ -190,7 +190,7 @@ {/loop} - {loop name="menu-auth-config" type="auth" role="ADMIN" resource="admin.config" access="VIEW"} + {loop name="menu-auth-config" type="auth" role="ADMIN" resource="admin.configuration.area" access="VIEW"}
  • {intl l="Configuration"}
  • diff --git a/templates/backOffice/default/administrators.html b/templates/backOffice/default/administrators.html index 4814e9af9..9c5b414c0 100644 --- a/templates/backOffice/default/administrators.html +++ b/templates/backOffice/default/administrators.html @@ -48,15 +48,27 @@ {loop type="admin" name="administrators" backend_context="1"} + {* the current current admin can always update its own profile *} + {$can_update = $ID == {admin attr="id"}} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.administrator" access="UPDATE"} + {$can_update = true} + {/loop} + - {$LOGIN} + + {if $can_update} + {$LOGIN} + {else} + {$LOGIN} + {/if} + {$FIRSTNAME} {$LASTNAME} {$LOCALE} - {if $PROFILE} + {if $PROFILE} {loop type="profile" name="admin-profile" id=$PROFILE} - {$TITLE} + {$TITLE} {/loop} {else} {intl l='Superadministrator'} @@ -68,12 +80,11 @@ - can UPDATE anyway - cannot delete himself *} - {if $ID == {admin attr="id"}} + {if $can_update} - {else} - {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.administrator" access="UPDATE"} - - {/loop} + {/if} + + {if $ID != {admin attr="id"}} {loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.administrator" access="DELETE"} {/loop} diff --git a/templates/backOffice/default/configuration.html b/templates/backOffice/default/configuration.html index 4e57584ca..e4d51dda8 100644 --- a/templates/backOffice/default/configuration.html +++ b/templates/backOffice/default/configuration.html @@ -89,14 +89,14 @@ {loop type="auth" name="pcc2" role="ADMIN" resource="admin.configuration.shipping-zone" access="VIEW"} - {intl l='Shipping zones'} + {intl l='Shipping configuration'} {/loop} {loop type="auth" name="pcc3" role="ADMIN" resource="admin.configuration.shipping-configuration" access="VIEW"} - {intl l='Shipping configuration'} + {intl l='Shipping zones management'} {/loop} diff --git a/templates/backOffice/default/countries.html b/templates/backOffice/default/countries.html index 6682097b0..35c6e37a8 100644 --- a/templates/backOffice/default/countries.html +++ b/templates/backOffice/default/countries.html @@ -125,12 +125,24 @@ {/form_field} - {form_field form=$form field='title'} -
    - - -
    - {/form_field} + {loop type="lang" name="current-edit-lang" default_only="1"} + + {form_field form=$form field='title'} +
    + +
    + + {intl l=$TITLE} +
    +
    {intl l="Enter here the value in the default language (%title)" title=$TITLE}
    +
    + {/form_field} + + {form_field form=$form field='locale'} + + {/form_field} + + {/loop} {form_field form=$form field='area'}
    @@ -161,12 +173,6 @@
    {/form_field} - {loop type="lang" name="default-lang" default_only="1"} - - {form_field form=$form field='locale'} - - {/form_field} - {/loop} {module_include location='country_create_form'} diff --git a/templates/backOffice/default/country-edit.html b/templates/backOffice/default/country-edit.html index 0eaa7fd4c..b3177a1ee 100644 --- a/templates/backOffice/default/country-edit.html +++ b/templates/backOffice/default/country-edit.html @@ -32,7 +32,13 @@ {form name="thelia.admin.country.modification"}
    - {include file = "includes/inner-form-toolbar.html"} + {include + file = "includes/inner-form-toolbar.html" + hide_submit_buttons = false + + page_url = {url path="/admin/configuration/country/update/$ID"} + close_url = {url path="/admin/configuration/countries"} + }
    {* Be sure to get the country ID, even if the form could not be validated *} @@ -41,7 +47,7 @@ {form_hidden_fields form=$form} {form_field form=$form field='success_url'} - + {/form_field} {form_field form=$form field='locale'} diff --git a/templates/backOffice/default/home.html b/templates/backOffice/default/home.html index 0204fe4c7..4eefb609a 100644 --- a/templates/backOffice/default/home.html +++ b/templates/backOffice/default/home.html @@ -8,6 +8,7 @@ {module_include location='home_top'} + {loop type="auth" name="can_view" role="ADMIN" resource="admin.order" access="VIEW"}
    @@ -36,57 +37,78 @@
    - + {/loop}
    -
    -
    -
    {intl l="Shop Informations"}
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {intl l="Customers"} - {count type="customer" current="false" backend_context="1"} -
    {intl l="Categories"} - {count type="category" visible="*" backend_context="1"} -
    {intl l="Products"} - {count type="product" visible="*" backend_context="1"} -
    {intl l="Online products"} - {count type="product" visible="true" backend_context="1"} -
    {intl l="Offline products"} - {count type="product" visible="false" backend_context="1"} -
    {intl l="Orders"} - {count type="order" status="*" backend_context="1"} -
    -
    -
    -
    + {* Do not display shop information block if user none of the required authorizations *} + + {capture name="shop_information_block_content"} + {loop type="auth" name="can_view" role="ADMIN" resource="admin.customer" access="VIEW"} + + {intl l="Customers"} + + {count type="customer" current="false" backend_context="1"} + + + {/loop} + + {loop type="auth" name="can_view" role="ADMIN" resource="admin.category" access="VIEW"} + + {intl l="Categories"} + + {count type="category" visible="*" backend_context="1"} + + + {/loop} + + {loop type="auth" name="can_view" role="ADMIN" resource="admin.product" access="VIEW"} + + {intl l="Products"} + + {count type="product" visible="*" backend_context="1"} + + + + {intl l="Online products"} + + {count type="product" visible="true" backend_context="1"} + + + + {intl l="Offline products"} + + {count type="product" visible="false" backend_context="1"} + + + {/loop} + + {loop type="auth" name="can_view" role="ADMIN" resource="admin.order" access="VIEW"} + + {intl l="Orders"} + + {count type="order" status="*" backend_context="1"} + + + {/loop} + {/capture} + + {if trim($smarty.capture.shop_information_block_content) ne ""} +
    +
    +
    {intl l="Shop Informations"}
    +
    + + + {$smarty.capture.shop_information_block_content nofilter} + +
    +
    +
    +
    + {/if} + + {loop type="auth" name="can_view" role="ADMIN" resource="admin.order" access="VIEW"}
    {intl l="Sales statistics"}
    @@ -221,6 +243,7 @@
    + {/loop}
    @@ -234,11 +257,11 @@ {intl l="Latest version available"} - V1.5.4.2 + {intl l="Loading..."} {intl l="News"} - {intl l="Click here"} + {intl l="Click here"} @@ -396,9 +419,14 @@ jQuery(function($){ }); } - {/literal} + // Get the latest Thelia version + $('#latest-thelia-version').load("{url path='/admin/latest-thelia-version'}", function(response, status, xhr) { + if (status == "error") + $('#latest-thelia-version').text("Unavailable"); + }); + }); diff --git a/templates/backOffice/default/profile-edit.html b/templates/backOffice/default/profile-edit.html index 7e4d57a27..7a5bed341 100644 --- a/templates/backOffice/default/profile-edit.html +++ b/templates/backOffice/default/profile-edit.html @@ -8,7 +8,6 @@ {block name="main-content"} {assign oder_tab {$smarty.get.tab|default:$smarty.post.tab|default:'data'}} - {assign asked_country {$smarty.get.country|default:{country ask="default" attr="id"}}}
    @@ -26,8 +25,8 @@
    -
    - {$CODE} +
    +
    {intl l="Editing profile '%name'" name=$TITLE}
    - -
    - {intl l='Edit shipping configuration %title' title=$NAME} + +
    +
    +
    + {intl l='Shipping zone "%title"' title=$NAME} +
    + +
    - + {ifloop rel="country-without-area"} {form name="thelia.admin.area.country"} {form_hidden_fields form=$form} @@ -41,7 +48,7 @@ {/form_field} {form_field form=$form field='country_id'} - +
    +
    {/form_field} @@ -99,10 +116,10 @@ file = "includes/generic-create-dialog.html" dialog_id = "creation_dialog" - dialog_title = {intl l="Create a new shipping configuration"} + dialog_title = {intl l="Create a new shipping zone"} dialog_body = {$smarty.capture.creation_dialog nofilter} - dialog_ok_label = {intl l="Create this shipping configuration"} + dialog_ok_label = {intl l="Create this shipping zone"} dialog_cancel_label = {intl l="Cancel"} form_action = {url path='/admin/configuration/shipping_configuration/create'} @@ -123,8 +140,8 @@ file = "includes/generic-confirm-dialog.html" dialog_id = "delete_dialog" - dialog_title = {intl l="Delete shipping configuration"} - dialog_message = {intl l="Do you really want to delete this shipping configuration ?"} + dialog_title = {intl l="Delete shipping zone"} + dialog_message = {intl l="Do you really want to delete this shipping zone ?"} form_action = {url path='/admin/configuration/shipping_configuration/delete'} form_content = {$smarty.capture.delete_dialog nofilter} diff --git a/templates/backOffice/default/shipping-zones-edit.html b/templates/backOffice/default/shipping-zones-edit.html index 6d76bc5eb..4d75908fd 100644 --- a/templates/backOffice/default/shipping-zones-edit.html +++ b/templates/backOffice/default/shipping-zones-edit.html @@ -10,40 +10,51 @@
    + {loop type="module" id="$delivery_module_id" active="*" name="module.name" backend_context="1"} +
    - -
    - {intl l='Edit shipping zone %title' title=$TITLE} + +
    +
    +
    + {intl l='Shipping configuration of delivery module "%title"' title=$TITLE} +
    + +
    +
    + {ifloop rel="area.module.not_associated"} {form name="thelia.shopping_zone_area"} {form_hidden_fields form=$form} {form_field form=$form field='success_url'} - {* the url the user is redirected to on login success *} + {* the url the user is redirected to on login success *} {/form_field} {form_field form=$form field='shipping_zone_id'} - + {/form_field} {form_field form=$form field='area_id'}
    @@ -54,6 +65,12 @@ {/form_field} {/form} + {/ifloop} + {elseloop rel="area.module.not_associated"} +
    + {intl l="This delivery module handles all shipping zones."} +
    + {/elseloop}
    @@ -61,21 +78,30 @@ - - + + - {loop type="area" name="area.module.associated" with_zone=$shipping_zones_id} + {loop type="area" name="area.module.associated" with_zone=$delivery_module_id} - {/loop} + {elseloop rel="area.module.associated"} + + + + {/elseloop}
    {intl l="Zones"}{intl l="Actions"}{intl l="Shipping zone"}{intl l="Actions"}
    {$NAME} +
    +
    + {intl l="There are no shipping zones attached to this module."} +
    +
    @@ -86,6 +112,7 @@
    + {/loop}
    @@ -96,11 +123,11 @@ {form_hidden_fields form=$form} {form_field form=$form field='success_url'} - {* the url the user is redirected to on login success *} + {* the url the user is redirected to on login success *} {/form_field} {form_field form=$form field='shipping_zone_id'} - + {/form_field} {form_field form=$form field='area_id'} diff --git a/templates/backOffice/default/shipping-zones.html b/templates/backOffice/default/shipping-zones.html index 26f860770..6382930d2 100644 --- a/templates/backOffice/default/shipping-zones.html +++ b/templates/backOffice/default/shipping-zones.html @@ -21,18 +21,35 @@
    + + {ifloop rel="area-not-attached"} +
    +
    +
    + {intl l='Warning, some of your shipping zones are not attached to any delivery module:'} + {loop name="area-not-attached" type="area" unassigned=true} + {$NAME}{if $LOOP_COUNT < $LOOP_TOTAL},{else}.{/if} + {/loop} +
    +
    +
    + {/ifloop} +
    + + - - + + + {module_include location='shipping_zones_table_header'} - + @@ -40,10 +57,23 @@ {loop type="module" module_type="2" active="*" name="delivery.list" backend_context="1"} + {module_include location='shipping_zones_table_row'} -
    - {intl l='Thelia Shipping zones'} + {intl l='Shipping zones'}
    {intl l="Name"}
    {intl l="Delivery module"}{intl l="Shipping zones for this module"}{intl l="Actions"}{intl l="Actions"}
    {$TITLE} + {loop name="area.module.associated" type="area" with_zone=$ID backend_context="1"} + {$countries = ''} + {loop name="country-area" type="country" area=$ID backend_context="1"} + {$countries = "$countries, $TITLE"} + {/loop} + {$countries = ltrim($countries, ', ')} + {$NAME}{if $LOOP_COUNT < $LOOP_TOTAL},{/if} + {/loop} + {elseloop rel="area.module.associated"} + {intl l="There are no shipping zones attached to this module."} + {/elseloop} + +
    {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.shipping-zone" access="UPDATE"}