diff --git a/core/lib/Thelia/Action/Category.php b/core/lib/Thelia/Action/Category.php index 64254d734..25a94711f 100755 --- a/core/lib/Thelia/Action/Category.php +++ b/core/lib/Thelia/Action/Category.php @@ -160,6 +160,7 @@ class Category extends BaseAction implements EventSubscriberInterface $content = new CategoryAssociatedContent(); $content + ->setDispatcher($this->getDispatcher()) ->setCategory($event->getCategory()) ->setContentId($event->getContentId()) ->save() @@ -174,7 +175,11 @@ class Category extends BaseAction implements EventSubscriberInterface ->filterByCategory($event->getCategory())->findOne() ; - if ($content !== null) $content->delete(); + if ($content !== null) { + $content + ->setDispatcher($this->getDispatcher()) + ->delete(); + } } diff --git a/core/lib/Thelia/Action/Product.php b/core/lib/Thelia/Action/Product.php index cb7bb04df..69a07c157 100644 --- a/core/lib/Thelia/Action/Product.php +++ b/core/lib/Thelia/Action/Product.php @@ -44,6 +44,10 @@ use Thelia\Model\ProductCategory; use Thelia\Model\TaxRule; use Thelia\Model\TaxRuleQuery; use Thelia\Model\TaxQuery; +use Thelia\Model\AccessoryQuery; +use Thelia\Model\Accessory; +use Thelia\Core\Event\ProductAddAccessoryEvent; +use Thelia\Core\Event\ProductDeleteAccessoryEvent; class Product extends BaseAction implements EventSubscriberInterface { @@ -167,6 +171,7 @@ class Product extends BaseAction implements EventSubscriberInterface $content = new ProductAssociatedContent(); $content + ->setDispatcher($this->getDispatcher()) ->setProduct($event->getProduct()) ->setContentId($event->getContentId()) ->save() @@ -181,9 +186,66 @@ class Product extends BaseAction implements EventSubscriberInterface ->filterByProduct($event->getProduct())->findOne() ; - if ($content !== null) $content->delete(); + if ($content !== null) + $content + ->setDispatcher($this->getDispatcher()) + ->delete() + ; } + public function addAccessory(ProductAddAccessoryEvent $event) { + + if (AccessoryQuery::create() + ->filterByAccessory($event->getAccessoryId()) + ->filterByProductId($event->getProduct()->getId())->count() <= 0) { + + $accessory = new Accessory(); + + $accessory + ->setDispatcher($this->getDispatcher()) + ->setProductId($event->getProduct()->getId()) + ->setAccessory($event->getAccessoryId()) + ->save() + ; + } + } + + public function removeAccessory(ProductDeleteAccessoryEvent $event) { + + $accessory = AccessoryQuery::create() + ->filterByAccessory($event->getAccessoryId()) + ->filterByProductId($event->getProduct()->getId())->findOne() + ; + + if ($accessory !== null) + $accessory + ->setDispatcher($this->getDispatcher()) + ->delete() + ; + } + + + /** + * Changes position, selecting absolute ou relative change. + * + * @param ProductChangePositionEvent $event + */ + public function updateAccessoryPosition(UpdatePositionEvent $event) + { + if (null !== $accessory = AccessoryQuery::create()->findPk($event->getObjectId())) { + + $accessory->setDispatcher($this->getDispatcher()); + + $mode = $event->getMode(); + + if ($mode == UpdatePositionEvent::POSITION_ABSOLUTE) + return $accessory->changeAbsolutePosition($event->getPosition()); + else if ($mode == UpdatePositionEvent::POSITION_UP) + return $accessory->movePositionUp(); + else if ($mode == UpdatePositionEvent::POSITION_DOWN) + return $accessory->movePositionDown(); + } + } /** * {@inheritDoc} @@ -198,9 +260,12 @@ class Product extends BaseAction implements EventSubscriberInterface TheliaEvents::PRODUCT_UPDATE_POSITION => array("updatePosition", 128), - TheliaEvents::PRODUCT_ADD_CONTENT => array("addContent", 128), - TheliaEvents::PRODUCT_REMOVE_CONTENT => array("removeContent", 128), + TheliaEvents::PRODUCT_ADD_CONTENT => array("addContent", 128), + TheliaEvents::PRODUCT_REMOVE_CONTENT => array("removeContent", 128), + TheliaEvents::PRODUCT_UPDATE_ACCESSORY_POSITION => array("updateAccessoryPosition", 128), + TheliaEvents::PRODUCT_ADD_ACCESSORY => array("addAccessory", 128), + TheliaEvents::PRODUCT_REMOVE_ACCESSORY => array("removeAccessory", 128), ); } } diff --git a/core/lib/Thelia/Config/Resources/routing/admin.xml b/core/lib/Thelia/Config/Resources/routing/admin.xml index 04bac2ee3..284103798 100755 --- a/core/lib/Thelia/Config/Resources/routing/admin.xml +++ b/core/lib/Thelia/Config/Resources/routing/admin.xml @@ -174,6 +174,10 @@ xml|json + + Thelia\Controller\Admin\ProductController::updateAccessoryPositionAction + + diff --git a/core/lib/Thelia/Controller/Admin/ProductController.php b/core/lib/Thelia/Controller/Admin/ProductController.php index 2dc57d3cb..27c559442 100644 --- a/core/lib/Thelia/Controller/Admin/ProductController.php +++ b/core/lib/Thelia/Controller/Admin/ProductController.php @@ -39,6 +39,10 @@ use Thelia\Model\FolderQuery; use Thelia\Model\ContentQuery; use Propel\Runtime\ActiveQuery\Criteria; use Thelia\Model\ProductAssociatedContentQuery; +use Thelia\Model\AccessoryQuery; +use Thelia\Model\CategoryQuery; +use Thelia\Core\Event\ProductAddAccessoryEvent; +use Thelia\Core\Event\ProductDeleteAccessoryEvent; /** * Manages products @@ -175,10 +179,11 @@ class ProductController extends AbstractCrudController protected function getEditionArguments() { return array( - 'category_id' => $this->getCategoryId(), - 'product_id' => $this->getRequest()->get('product_id', 0), - 'folder_id' => $this->getRequest()->get('folder_id', 0), - 'current_tab' => $this->getRequest()->get('current_tab', 'general') + 'category_id' => $this->getCategoryId(), + 'product_id' => $this->getRequest()->get('product_id', 0), + 'folder_id' => $this->getRequest()->get('folder_id', 0), + 'accessory_category_id'=> $this->getRequest()->get('accessory_category_id', 0), + 'current_tab' => $this->getRequest()->get('current_tab', 'general') ); } @@ -275,6 +280,8 @@ class ProductController extends AbstractCrudController ); } + // -- Related content management ------------------------------------------- + public function getAvailableRelatedContentAction($productId, $folderId) { $result = array(); @@ -353,4 +360,118 @@ class ProductController extends AbstractCrudController $this->redirectToEditionTemplate(); } + + + // -- Accessories management ---------------------------------------------- + + public function getAvailableAccessoriesAction($productId, $categoryId) + { + $result = array(); + + $categories = CategoryQuery::create()->filterById($categoryId)->find(); + + if ($categories !== null) { + + $list = ProductQuery::create() + ->joinWithI18n($this->getCurrentEditionLocale()) + ->filterByCategory($categories, Criteria::IN) + ->filterById(AccessoryQuery::create()->select('accessory')->findByProductId($productId), Criteria::NOT_IN) + ->find(); + ; + + if ($list !== null) { + foreach($list as $item) { + $result[] = array('id' => $item->getId(), 'title' => $item->getTitle()); + } + } + } + + return $this->jsonResponse(json_encode($result)); + } + + public function addAccessoryAction() + { + // Check current user authorization + if (null !== $response = $this->checkAuth("admin.products.update")) return $response; + + $accessory_id = intval($this->getRequest()->get('accessory_id')); + + if ($accessory_id > 0) { + + $event = new ProductAddAccessoryEvent( + $this->getExistingObject(), + $accessory_id + ); + + try { + $this->dispatch(TheliaEvents::PRODUCT_ADD_ACCESSORY, $event); + } + catch (\Exception $ex) { + // Any error + return $this->errorPage($ex); + } + } + + $this->redirectToEditionTemplate(); + } + + public function deleteAccessoryAction() + { + + // Check current user authorization + if (null !== $response = $this->checkAuth("admin.products.update")) return $response; + + $accessory_id = intval($this->getRequest()->get('accessory_id')); + + if ($accessory_id > 0) { + + $event = new ProductDeleteAccessoryEvent( + $this->getExistingObject(), + $accessory_id + ); + + try { + $this->dispatch(TheliaEvents::PRODUCT_REMOVE_ACCESSORY, $event); + } + catch (\Exception $ex) { + // Any error + return $this->errorPage($ex); + } + } + + $this->redirectToEditionTemplate(); + } + + /** + * Update accessory position (only for objects whichsupport that) + */ + public function updateAccessoryPositionAction() + { + // Check current user authorization + if (null !== $response = $this->checkAuth('admin.products.update')) return $response; + + try { + $mode = $this->getRequest()->get('mode', null); + + if ($mode == 'up') + $mode = UpdatePositionEvent::POSITION_UP; + else if ($mode == 'down') + $mode = UpdatePositionEvent::POSITION_DOWN; + else + $mode = UpdatePositionEvent::POSITION_ABSOLUTE; + + $position = $this->getRequest()->get('position', null); + + $event = new UpdatePositionEvent($mode, $position); + + $this->dispatch(TheliaEvents::PRODUCT_UPDATE_ACCESSORY_POSITION, $event); + } + catch (\Exception $ex) { + // Any error + return $this->errorPage($ex); + } + + $this->redirectToEditionTemplate(); + } + } diff --git a/core/lib/Thelia/Core/Event/AccessoryEvent.php b/core/lib/Thelia/Core/Event/AccessoryEvent.php new file mode 100644 index 000000000..1e14e6fb7 --- /dev/null +++ b/core/lib/Thelia/Core/Event/AccessoryEvent.php @@ -0,0 +1,54 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event; + +use Thelia\Model\Accessory; +use Thelia\Core\Event\ActionEvent; + +class AccessoryEvent extends ActionEvent +{ + public $accessory = null; + + public function __construct(Accessory $accessory = null) + { + $this->accessory = $accessory; + } + + public function hasAccessory() + { + return ! is_null($this->accessory); + } + + public function getAccessory() + { + return $this->accessory; + } + + public function setAccessory(Accessory $accessory) + { + $this->accessory = $accessory; + + return $this; + } +} diff --git a/core/lib/Thelia/Core/Event/CategoryAssociatedContentEvent.php b/core/lib/Thelia/Core/Event/CategoryAssociatedContentEvent.php new file mode 100644 index 000000000..1984a042c --- /dev/null +++ b/core/lib/Thelia/Core/Event/CategoryAssociatedContentEvent.php @@ -0,0 +1,54 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event; + +use Thelia\Model\CategoryAssociatedContent; +use Thelia\Core\Event\ActionEvent; + +class CategoryAssociatedContentEvent extends ActionEvent +{ + public $content = null; + + public function __construct(CategoryAssociatedContent $content = null) + { + $this->content = $content; + } + + public function hasCategoryAssociatedContent() + { + return ! is_null($this->content); + } + + public function getCategoryAssociatedContent() + { + return $this->content; + } + + public function setCategoryAssociatedContent(CategoryAssociatedContent $content) + { + $this->content = $content; + + return $this; + } +} diff --git a/core/lib/Thelia/Core/Event/ProductAddAccessoryEvent.php b/core/lib/Thelia/Core/Event/ProductAddAccessoryEvent.php new file mode 100644 index 000000000..d3f2ba19b --- /dev/null +++ b/core/lib/Thelia/Core/Event/ProductAddAccessoryEvent.php @@ -0,0 +1,48 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event; + +use Thelia\Model\Product; + +class ProductAddAccessoryEvent extends ProductEvent +{ + protected $accessory_id; + + public function __construct(Product $product, $accessory_id) + { + parent::__construct($product); + + $this->accessory_id = $accessory_id; + } + + public function getAccessoryId() + { + return $this->accessory_id; + } + + public function setAccessoryId($accessory_id) + { + $this->accessory_id = $accessory_id; + } +} diff --git a/core/lib/Thelia/Core/Event/ProductAssociatedContentEvent.php b/core/lib/Thelia/Core/Event/ProductAssociatedContentEvent.php new file mode 100644 index 000000000..ba41b5ede --- /dev/null +++ b/core/lib/Thelia/Core/Event/ProductAssociatedContentEvent.php @@ -0,0 +1,54 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event; + +use Thelia\Model\ProductAssociatedContent; +use Thelia\Core\Event\ActionEvent; + +class ProductAssociatedContentEvent extends ActionEvent +{ + public $content = null; + + public function __construct(ProductAssociatedContent $content = null) + { + $this->content = $content; + } + + public function hasProductAssociatedContent() + { + return ! is_null($this->content); + } + + public function getProductAssociatedContent() + { + return $this->content; + } + + public function setProductAssociatedContent(ProductAssociatedContent $content) + { + $this->content = $content; + + return $this; + } +} diff --git a/core/lib/Thelia/Core/Event/ProductDeleteAccessoryEvent.php b/core/lib/Thelia/Core/Event/ProductDeleteAccessoryEvent.php new file mode 100644 index 000000000..9644cdacc --- /dev/null +++ b/core/lib/Thelia/Core/Event/ProductDeleteAccessoryEvent.php @@ -0,0 +1,48 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event; + +use Thelia\Model\Product; + +class ProductDeleteAccessoryEvent extends ProductEvent +{ + protected $accessory_id; + + public function __construct(Product $product, $accessory_id) + { + parent::__construct($product); + + $this->accessory_id = $accessory_id; + } + + public function getAccessoryId() + { + return $this->accessory_id; + } + + public function setAccessoryId($accessory_id) + { + $this->accessory_id = $accessory_id; + } +} diff --git a/core/lib/Thelia/Core/Template/Loop/Accessory.php b/core/lib/Thelia/Core/Template/Loop/Accessory.php index 69b2e09d9..6dc269b62 100755 --- a/core/lib/Thelia/Core/Template/Loop/Accessory.php +++ b/core/lib/Thelia/Core/Template/Loop/Accessory.php @@ -93,8 +93,10 @@ class Accessory extends Product $accessories = $this->search($search); $accessoryIdList = array(0); + $accessoryPosition = array(); foreach ($accessories as $accessory) { array_push($accessoryIdList, $accessory->getAccessory()); + $accessoryPosition[$accessory->getAccessory()] = $accessory->getPosition(); } $receivedIdList = $this->getId(); @@ -106,7 +108,15 @@ class Accessory extends Product $this->args->get('id')->setValue( implode(',', array_intersect($receivedIdList, $accessoryIdList)) ); } - return parent::exec($pagination); + $loopResult = parent::exec($pagination); + + foreach($loopResult as $loopResultRow) { + $loopResultRow + ->set("POSITION" , $accessoryPosition[$loopResultRow->get('ID')]) + ; + } + + return $loopResult; } } diff --git a/core/lib/Thelia/Core/Template/Loop/AssociatedContent.php b/core/lib/Thelia/Core/Template/Loop/AssociatedContent.php index d85f75fa6..20fe5cb1e 100755 --- a/core/lib/Thelia/Core/Template/Loop/AssociatedContent.php +++ b/core/lib/Thelia/Core/Template/Loop/AssociatedContent.php @@ -97,9 +97,9 @@ class AssociatedContent extends Content $exclude_product = $this->getExcludeProduct(); - // If we have to filter by template, find all attributes assigned to this template, and filter by found IDs + // If we have to filter by product, find all products assigned to this product, and filter by found IDs if (null !== $exclude_product) { - // Exclure tous les attribut qui sont attachés aux templates indiqués + // Exclude all contents related to the given product $search->filterById( ProductAssociatedContentQuery::create()->filterByProductId($exclude_product)->select('product_id')->find(), Criteria::NOT_IN @@ -108,7 +108,7 @@ class AssociatedContent extends Content $exclude_category = $this->getExcludeCategory(); - // If we have to filter by template, find all attributes assigned to this template, and filter by found IDs + // If we have to filter by category, find all contents assigned to this category, and filter by found IDs if (null !== $exclude_category) { // Exclure tous les attribut qui sont attachés aux templates indiqués $search->filterById( diff --git a/core/lib/Thelia/Core/Template/Loop/FolderTree.php b/core/lib/Thelia/Core/Template/Loop/FolderTree.php new file mode 100644 index 000000000..9549f2467 --- /dev/null +++ b/core/lib/Thelia/Core/Template/Loop/FolderTree.php @@ -0,0 +1,118 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Template\Loop; +use Propel\Runtime\ActiveQuery\Criteria; +use Thelia\Core\Template\Element\LoopResult; +use Thelia\Core\Template\Element\LoopResultRow; + +use Thelia\Core\Template\Loop\Argument\ArgumentCollection; +use Thelia\Core\Template\Loop\Argument\Argument; + +use Thelia\Model\FolderQuery; +use Thelia\Type; +use Thelia\Type\BooleanOrBothType; +use Thelia\Core\Template\Element\BaseI18nLoop; + +/** + * + * Folder tree loop, to get a folder tree from a given folder to a given depth. + * + * - folder is the folder id + * - depth is the maximum depth to go, default unlimited + * - visible if true or missing, only visible categories will be displayed. If false, all categories (visible or not) are returned. + * + * @package Thelia\Core\Template\Loop + * @author Franck Allimant + */ +class FolderTree extends BaseI18nLoop +{ + /** + * @return ArgumentCollection + */ + protected function getArgDefinitions() + { + return new ArgumentCollection( + Argument::createIntTypeArgument('folder', null, true), + Argument::createIntTypeArgument('depth', PHP_INT_MAX), + Argument::createBooleanOrBothTypeArgument('visible', true, false), + Argument::createIntListTypeArgument('exclude', array()) + ); + } + + // changement de rubrique + protected function buildFolderTree($parent, $visible, $level, $max_level, $exclude, LoopResult &$loopResult) + { + if ($level > $max_level) return; + + $search = FolderQuery::create(); + + $locale = $this->configureI18nProcessing($search, array( + 'TITLE' + )); + + $search->filterByParent($parent); + + if ($visible != BooleanOrBothType::ANY) $search->filterByVisible($visible); + + if ($exclude != null) $search->filterById($exclude, Criteria::NOT_IN); + + $search->orderByPosition(Criteria::ASC); + + $results = $search->find(); + + foreach ($results as $result) { + + $loopResultRow = new LoopResultRow(); + + $loopResultRow + ->set("ID", $result->getId())->set("TITLE", $result->getVirtualColumn('i18n_TITLE')) + ->set("PARENT", $result->getParent())->set("URL", $result->getUrl($locale)) + ->set("VISIBLE", $result->getVisible() ? "1" : "0")->set("LEVEL", $level) + ; + + $loopResult->addRow($loopResultRow); + + $this->buildFolderTree($result->getId(), $visible, 1 + $level, $max_level, $exclude, $loopResult); + } + } + + /** + * @param $pagination (ignored) + * + * @return \Thelia\Core\Template\Element\LoopResult + */ + public function exec(&$pagination) + { + $id = $this->getFolder(); + $depth = $this->getDepth(); + $visible = $this->getVisible(); + $exclude = $this->getExclude(); + + $loopResult = new LoopResult(); + + $this->buildFolderTree($id, $visible, 0, $depth, $exclude, $loopResult); + + return $loopResult; + } +} diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php index 37801f4c8..bd2c10513 100755 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php @@ -132,6 +132,8 @@ class TheliaLoop extends AbstractSmartyPlugin $loopResults = $loop->exec(self::$pagination[$name]); + $loopResults->rewind(); + $this->loopstack[$name] = $loopResults; // Pas de résultat ? la boucle est terminée, ne pas évaluer le contenu. diff --git a/core/lib/Thelia/Form/ProductCreationForm.php b/core/lib/Thelia/Form/ProductCreationForm.php index a4ffdde32..9329ca2ec 100644 --- a/core/lib/Thelia/Form/ProductCreationForm.php +++ b/core/lib/Thelia/Form/ProductCreationForm.php @@ -43,35 +43,29 @@ class ProductCreationForm extends BaseForm $this->formBuilder ->add("ref", "text", array( "constraints" => $ref_constraints, - "label" => "Product reference *", - "label_attr" => array( - "for" => "ref" - ) + "label" => "Product reference *", + "label_attr" => array("for" => "ref") )) ->add("title", "text", array( "constraints" => array( new NotBlank() ), "label" => "Product title *", - "label_attr" => array( - "for" => "title" - ) + "label_attr" => array("for" => "title") )) ->add("default_category", "integer", array( - "constraints" => array( - new NotBlank() - ) + "constraints" => array(new NotBlank()), + "label" => Translator::getInstance()->trans("Default product category."), + "label_attr" => array("for" => "default_category_field") )) ->add("locale", "text", array( - "constraints" => array( - new NotBlank() - ) + "constraints" => array(new NotBlank()) )) ->add("visible", "integer", array( - "label" => Translator::getInstance()->trans("This product is online."), - "label_attr" => array("for" => "visible_create") + "label" => Translator::getInstance()->trans("This product is online."), + "label_attr" => array("for" => "visible_field") )) - ; + ; } public function checkDuplicateRef($value, ExecutionContextInterface $context) diff --git a/core/lib/Thelia/Model/Accessory.php b/core/lib/Thelia/Model/Accessory.php index 2e927ff7c..f24aab680 100755 --- a/core/lib/Thelia/Model/Accessory.php +++ b/core/lib/Thelia/Model/Accessory.php @@ -3,7 +3,77 @@ namespace Thelia\Model; use Thelia\Model\Base\Accessory as BaseAccessory; +use Thelia\Core\Event\TheliaEvents; +use Propel\Runtime\Connection\ConnectionInterface; +use Thelia\Core\Event\AccessoryEvent; class Accessory extends BaseAccessory { + use \Thelia\Model\Tools\ModelEventDispatcherTrait; + + use \Thelia\Model\Tools\PositionManagementTrait; + + /** + * Calculate next position relative to our product + */ + protected function addCriteriaToPositionQuery($query) { + $query->filterByProductId($this->getProductId()); + } + + /** + * {@inheritDoc} + */ + public function preInsert(ConnectionInterface $con = null) + { + $this->setPosition($this->getNextPosition()); + + $this->dispatchEvent(TheliaEvents::BEFORE_CREATEACCESSORY, new AccessoryEvent($this)); + + return true; + } + + /** + * {@inheritDoc} + */ + public function postInsert(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_CREATEACCESSORY, new AccessoryEvent($this)); + } + + /** + * {@inheritDoc} + */ + public function preUpdate(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_UPDATEACCESSORY, new AccessoryEvent($this)); + + return true; + } + + /** + * {@inheritDoc} + */ + public function postUpdate(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_UPDATEACCESSORY, new AccessoryEvent($this)); + } + + /** + * {@inheritDoc} + */ + public function preDelete(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_DELETEACCESSORY, new AccessoryEvent($this)); + + return true; + } + + /** + * {@inheritDoc} + */ + public function postDelete(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_DELETEACCESSORY, new AccessoryEvent($this)); + } + } diff --git a/core/lib/Thelia/Model/CategoryAssociatedContent.php b/core/lib/Thelia/Model/CategoryAssociatedContent.php index 9296e6274..9154767bc 100644 --- a/core/lib/Thelia/Model/CategoryAssociatedContent.php +++ b/core/lib/Thelia/Model/CategoryAssociatedContent.php @@ -3,7 +3,66 @@ namespace Thelia\Model; use Thelia\Model\Base\CategoryAssociatedContent as BaseCategoryAssociatedContent; +use Thelia\Core\Event\CategoryAssociatedContentEvent; +use Thelia\Core\Event\TheliaEvents; +use Propel\Runtime\Connection\ConnectionInterface; class CategoryAssociatedContent extends BaseCategoryAssociatedContent { + use \Thelia\Model\Tools\ModelEventDispatcherTrait; + + /** + * {@inheritDoc} + */ + public function preInsert(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_CREATECATEGORY_ASSOCIATED_CONTENT, new CategoryAssociatedContentEvent($this)); + + return true; + } + + /** + * {@inheritDoc} + */ + public function postInsert(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_CREATECATEGORY_ASSOCIATED_CONTENT, new CategoryAssociatedContentEvent($this)); + } + + /** + * {@inheritDoc} + */ + public function preUpdate(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_UPDATECATEGORY_ASSOCIATED_CONTENT, new CategoryAssociatedContentEvent($this)); + + return true; + } + + /** + * {@inheritDoc} + */ + public function postUpdate(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_UPDATECATEGORY_ASSOCIATED_CONTENT, new CategoryAssociatedContentEvent($this)); + } + + /** + * {@inheritDoc} + */ + public function preDelete(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_DELETECATEGORY_ASSOCIATED_CONTENT, new CategoryAssociatedContentEvent($this)); + + return true; + } + + /** + * {@inheritDoc} + */ + public function postDelete(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_DELETECATEGORY_ASSOCIATED_CONTENT, new CategoryAssociatedContentEvent($this)); + } + } diff --git a/core/lib/Thelia/Model/ProductAssociatedContent.php b/core/lib/Thelia/Model/ProductAssociatedContent.php index 9b007baf1..e07ee2cd6 100644 --- a/core/lib/Thelia/Model/ProductAssociatedContent.php +++ b/core/lib/Thelia/Model/ProductAssociatedContent.php @@ -3,7 +3,65 @@ namespace Thelia\Model; use Thelia\Model\Base\ProductAssociatedContent as BaseProductAssociatedContent; +use Propel\Runtime\Connection\ConnectionInterface; +use Thelia\Core\Event\ProductAssociatedContentEvent; +use Thelia\Core\Event\TheliaEvents; class ProductAssociatedContent extends BaseProductAssociatedContent { + use \Thelia\Model\Tools\ModelEventDispatcherTrait; + + /** + * {@inheritDoc} + */ + public function preInsert(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_CREATEPRODUCT_ASSOCIATED_CONTENT, new ProductAssociatedContentEvent($this)); + + return true; + } + + /** + * {@inheritDoc} + */ + public function postInsert(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_CREATEPRODUCT_ASSOCIATED_CONTENT, new ProductAssociatedContentEvent($this)); + } + + /** + * {@inheritDoc} + */ + public function preUpdate(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_UPDATEPRODUCT_ASSOCIATED_CONTENT, new ProductAssociatedContentEvent($this)); + + return true; + } + + /** + * {@inheritDoc} + */ + public function postUpdate(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_UPDATEPRODUCT_ASSOCIATED_CONTENT, new ProductAssociatedContentEvent($this)); + } + + /** + * {@inheritDoc} + */ + public function preDelete(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_DELETEPRODUCT_ASSOCIATED_CONTENT, new ProductAssociatedContentEvent($this)); + + return true; + } + + /** + * {@inheritDoc} + */ + public function postDelete(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_DELETEPRODUCT_ASSOCIATED_CONTENT, new ProductAssociatedContentEvent($this)); + } } diff --git a/templates/admin/default/ajax/template-attribute-list.html b/templates/admin/default/ajax/template-attribute-list.html index 772ed5883..a630aaa61 100644 --- a/templates/admin/default/ajax/template-attribute-list.html +++ b/templates/admin/default/ajax/template-attribute-list.html @@ -25,7 +25,8 @@ {/elseloop} - +
+
@@ -72,7 +73,7 @@ {/elseloop}
{intl l='ID'}
- + {* Delete value confirmation dialog *} {capture "delete_attribute_dialog"} diff --git a/templates/admin/default/ajax/template-feature-list.html b/templates/admin/default/ajax/template-feature-list.html index a20ff7125..58bb4cf8b 100644 --- a/templates/admin/default/ajax/template-feature-list.html +++ b/templates/admin/default/ajax/template-feature-list.html @@ -25,7 +25,8 @@ {/elseloop} - +
+
@@ -72,6 +73,7 @@ {/elseloop}
{intl l='ID'}
+ {* Delete value confirmation dialog *} diff --git a/templates/admin/default/attribute-edit.html b/templates/admin/default/attribute-edit.html index 882edd60c..676a99baa 100644 --- a/templates/admin/default/attribute-edit.html +++ b/templates/admin/default/attribute-edit.html @@ -77,95 +77,97 @@
{intl l="Enter here all possible attribute values."}
+ +
+ + + + -
+ {admin_sortable_header + current_order=$attributeav_order + order='id' + reverse_order='id_reverse' + request_parameter_name='attributeav_order' + path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id} + label="{intl l='ID'}" + } +
- - - + - + - + {module_include location='attributes_value_table_header'} - {module_include location='attributes_value_table_header'} + + + - - - + + {loop name="list" type="attribute_availability" attribute=$attribute_id backend_context="1" lang=$edit_language_id order=$attributeav_order} + + - - {loop name="list" type="attribute_availability" attribute=$attribute_id backend_context="1" lang=$edit_language_id order=$attributeav_order} - - + - + - + {module_include location='attributes_value_table_row'} - {module_include location='attributes_value_table_row'} + + + {/loop} - - - {/loop} - - {elseloop rel="list"} - - - - {/elseloop} - -
- {admin_sortable_header - current_order=$attributeav_order - order='id' - reverse_order='id_reverse' - request_parameter_name='attributeav_order' - path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id} - label="{intl l='ID'}" - } - + {admin_sortable_header + current_order=$attributeav_order + order='alpha' + reverse_order='alpha_reverse' + request_parameter_name='attributeav_order' + path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id} + label="{intl l='Value'}" + } + - {admin_sortable_header - current_order=$attributeav_order - order='alpha' - reverse_order='alpha_reverse' - request_parameter_name='attributeav_order' - path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id} - label="{intl l='Value'}" - } - + {admin_sortable_header + current_order=$attributeav_order + order='manual' + reverse_order='manual_reverse' + request_parameter_name='attributeav_order' + path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id} + label="{intl l="Position"}" + } + - {admin_sortable_header - current_order=$attributeav_order - order='manual' - reverse_order='manual_reverse' - request_parameter_name='attributeav_order' - path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id} - label="{intl l="Position"}" - } - {intl l="Actions"}
{intl l="Actions"}
{$ID}
{$ID} + {* FIXME : integrate this in the encolsing form to provide standard form processing *} + + - {* FIXME : integrate this in the encolsing form to provide standard form processing *} - - + {admin_position_block + permission="admin.attributes.edit" + path={url path='/admin/configuration/attributes-av/update-position' attribute_id=$attribute_id} + url_parameter="attributeav_id" + in_place_edit_class="positionChange" + position="$POSITION" + id="$ID" + } + - {admin_position_block - permission="admin.attributes.edit" - path={url path='/admin/configuration/attributes-av/update-position' attribute_id=$attribute_id} - url_parameter="attributeav_id" - in_place_edit_class="positionChange" - position="$POSITION" - id="$ID" - } - +
+ {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attribute-av.delete"} + + + + {/loop} +
+
-
- {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attribute-av.delete"} - - - - {/loop} -
-
-
- {intl l="No value has been created yet. Click the + button to create one."} -
-
+ {elseloop rel="list"} + + +
+ {intl l="No value has been created yet. Click the + button to create one."} +
+ + + {/elseloop} + + +
{/form} diff --git a/templates/admin/default/attributes.html b/templates/admin/default/attributes.html index 348219f5c..c207d02fa 100644 --- a/templates/admin/default/attributes.html +++ b/templates/admin/default/attributes.html @@ -21,117 +21,119 @@
- - + + + {/elseloop} + +
- {intl l='Thelia product attributes'} +
+ + - - - + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attributes.create"} + + + + {/loop} + + + + - + - + - {module_include location='attributes_table_header'} + {module_include location='attributes_table_header'} - - - + + + - - {loop name="list" type="attribute" backend_context="1" lang=$lang_id order=$order} - - + + {loop name="list" type="attribute" backend_context="1" lang=$lang_id order=$order} + + - + - + - {module_include location='attributes_table_row'} + {module_include location='attributes_table_row'} - - - {/loop} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.delete"} + + {/loop} + + + + {/loop} - {elseloop rel="list"} - - - - {/elseloop} - -
+ {intl l='Thelia product attributes'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attributes.create"} - - - - {/loop} -
- {admin_sortable_header - current_order=$order - order='id' - reverse_order='id_reverse' - path='/admin/configuration/attributes' - label="{intl l='ID'}" - } -
+ {admin_sortable_header + current_order=$order + order='id' + reverse_order='id_reverse' + path='/admin/configuration/attributes' + label="{intl l='ID'}" + } + - {admin_sortable_header - current_order=$order - order='alpha' - reverse_order='alpha_reverse' - path='/admin/configuration/attributes' - label="{intl l='Title'}" - } - + {admin_sortable_header + current_order=$order + order='alpha' + reverse_order='alpha_reverse' + path='/admin/configuration/attributes' + label="{intl l='Title'}" + } + - {admin_sortable_header - current_order=$order - order='manual' - reverse_order='manual_reverse' - path='/admin/configuration/attributes' - label="{intl l="Position"}" - } - + {admin_sortable_header + current_order=$order + order='manual' + reverse_order='manual_reverse' + path='/admin/configuration/attributes' + label="{intl l="Position"}" + } + {intl l="Actions"}
{intl l="Actions"}
{$ID}
{$ID} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"} - {$TITLE} - {/loop} - {elseloop rel="can_change"} - {$TITLE} - {/elseloop} - + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"} + {$TITLE} + {/loop} + {elseloop rel="can_change"} + {$TITLE} + {/elseloop} + - {admin_position_block - permission="admin.attributes.edit" - path="/admin/configuration/attributes/update-position" - url_parameter="attribute_id" - in_place_edit_class="positionChange" - position="$POSITION" - id="$ID" - } - + {admin_position_block + permission="admin.attributes.edit" + path="/admin/configuration/attributes/update-position" + url_parameter="attribute_id" + in_place_edit_class="positionChange" + position="$POSITION" + id="$ID" + } + - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"} - - {/loop} + + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"} + + {/loop} -
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"} - - {/loop} +
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"} + + {/loop} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.delete"} - - {/loop} -
-
-
- {intl l="No product attribute has been created yet. Click the + button to create one."} -
-
+ {elseloop rel="list"} +
+
+ {intl l="No product attribute has been created yet. Click the + button to create one."} +
+
+
diff --git a/templates/admin/default/categories.html b/templates/admin/default/categories.html index 68fd220b5..990cafd56 100755 --- a/templates/admin/default/categories.html +++ b/templates/admin/default/categories.html @@ -15,163 +15,164 @@
-
- - - - - {ifloop rel="category_list"} - - - - - - - - - {module_include location='category_list_header'} - - - - - - - - - - - {loop name="category_list" type="category" visible="*" parent=$category_id order=$category_order backend_context="1" lang=$lang_id} - - - - - - - - {module_include location='category_list_row'} - - + + + + + + + + {module_include location='category_list_header'} + + + + + + + + + + + {loop name="category_list" type="category" visible="*" parent=$category_id order=$category_order backend_context="1" lang=$lang_id} + + + + + + + + {module_include location='category_list_row'} + + + + + + + + {/loop} + + {/ifloop} + + {elseloop rel="category_list"} + + + + + + {/elseloop} +
- {* display parent category name, and get current cat ID *} - {loop name="category_title" type="category" visible="*" id=$category_id} - {intl l="Categories in %cat" cat=$TITLE} - {$cat_id = $ID} - {/loop} - {elseloop rel="category_title"} - {intl l="Top level categories"} - {/elseloop} - - {module_include location='category_list_caption'} - - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.categories.create"} - - - - {/loop} -
- {admin_sortable_header - current_order=$category_order - order='id' - reverse_order='id_reverse' - path={url path='/admin/categories' id_category=$category_id} - request_parameter_name='category_order' - label="{intl l='ID'}" - } -   - {admin_sortable_header - current_order=$category_order - order='alpha' - reverse_order='alpha_reverse' - path={url path='/admin/categories' id_category=$category_id} - request_parameter_name='category_order' - label="{intl l='Category title'}" - } - - {admin_sortable_header - current_order=$category_order - order='visible' - reverse_order='visible_reverse' - path={url path='/admin/categories' id_category=$category_id} - request_parameter_name='category_order' - label="{intl l='Online'}" - } - - {admin_sortable_header - current_order=$category_order - order='manual' - reverse_order='manual_reverse' - path={url path='/admin/categories' id_category=$category_id} - request_parameter_name='category_order' - label="{intl l='Position'}" - } - {intl l='Actions'}
{$ID} - {loop type="image" name="cat_image" source="category" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"} - {$TITLE} - {/loop} - - - {$TITLE} - - - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"} -
- -
+
+
+ + + {module_include location='category_list_caption'} - - - {/loop} - - {/ifloop} - - {elseloop rel="category_list"} - - - - - - {/elseloop} -
+ {* display parent category name, and get current cat ID *} + {loop name="category_title" type="category" visible="*" id=$category_id} + {intl l="Categories in %cat" cat=$TITLE} + {$cat_id = $ID} {/loop} - - {elseloop rel="can_change"} -
- -
+ {elseloop rel="category_title"} + {intl l="Top level categories"} {/elseloop} - -
- {admin_position_block - permission="admin.categories.edit" - path={url path='admin/categories/update-position' category_id=$ID} - url_parameter="category_id" - in_place_edit_class="categoryPositionChange" - position=$POSITION - id=$ID - } - -
- - - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"} - - {/loop} - - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.categories.delete"} - - {/loop} -
-
-
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.categories.create"} - {intl l="This category has no sub-categories. To create a new one, click the + button above."} + + + {/loop} + - {elseloop rel="can_create"} - {intl l="This category has no sub-categories."} - {/elseloop} -
-
+ {ifloop rel="category_list"} +
+ {admin_sortable_header + current_order=$category_order + order='id' + reverse_order='id_reverse' + path={url path='/admin/categories' id_category=$category_id} + request_parameter_name='category_order' + label="{intl l='ID'}" + } +   + {admin_sortable_header + current_order=$category_order + order='alpha' + reverse_order='alpha_reverse' + path={url path='/admin/categories' id_category=$category_id} + request_parameter_name='category_order' + label="{intl l='Category title'}" + } + + {admin_sortable_header + current_order=$category_order + order='visible' + reverse_order='visible_reverse' + path={url path='/admin/categories' id_category=$category_id} + request_parameter_name='category_order' + label="{intl l='Online'}" + } + + {admin_sortable_header + current_order=$category_order + order='manual' + reverse_order='manual_reverse' + path={url path='/admin/categories' id_category=$category_id} + request_parameter_name='category_order' + label="{intl l='Position'}" + } + {intl l='Actions'}
{$ID} + {loop type="image" name="cat_image" source="category" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"} + {$TITLE} + {/loop} + + + {$TITLE} + + + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"} +
+ +
+ {/loop} + + {elseloop rel="can_change"} +
+ +
+ {/elseloop} +
+ {admin_position_block + permission="admin.categories.edit" + path={url path='admin/categories/update-position' category_id=$ID} + url_parameter="category_id" + in_place_edit_class="categoryPositionChange" + position=$POSITION + id=$ID + } + +
+ + + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"} + + {/loop} + + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.categories.delete"} + + {/loop} +
+
+
+ {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.categories.create"} + {intl l="This category has no sub-categories. To create a new one, click the + button above."} + {/loop} + + {elseloop rel="can_create"} + {intl l="This category has no sub-categories."} + {/elseloop} +
+
+
@@ -181,7 +182,7 @@
- +
{* display parent category name *} @@ -326,8 +327,7 @@ {/elseloop}
- - +
diff --git a/templates/admin/default/category-edit.html b/templates/admin/default/category-edit.html index a4a69ff3d..b974a4564 100755 --- a/templates/admin/default/category-edit.html +++ b/templates/admin/default/category-edit.html @@ -203,53 +203,55 @@ - - - - +
+
{intl l='ID'}
+ + + - + - {module_include location='category_contents_table_header'} + {module_include location='category_contents_table_header'} - - - + + + - - {loop name="assigned_contents" type="associated_content" category="$category_id" backend_context="1" lang="$edit_language_id"} - - + + {loop name="assigned_contents" type="associated_content" category="$category_id" backend_context="1" lang="$edit_language_id"} + + - + - {module_include location='category_contents_table_row'} + {module_include location='category_contents_table_row'} - - - {/loop} + + + {/loop} - {elseloop rel="assigned_contents"} - - - - {/elseloop} - -
{intl l='ID'}{intl l='Content title'}{intl l='Content title'}{intl l="Actions"}
{intl l="Actions"}
{$ID}
{$ID} - {$TITLE} - + {$TITLE} + -
- {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.category.content.delete"} - - - - {/loop} -
-
+
+ {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.category.content.delete"} + + + + {/loop} +
+
-
- {intl l="This category contains no contents"} -
-
+ {elseloop rel="assigned_contents"} + + +
+ {intl l="This category contains no contents"} +
+ + + {/elseloop} + + + diff --git a/templates/admin/default/configuration.html b/templates/admin/default/configuration.html index 0bf0e9bed..50e9296ac 100644 --- a/templates/admin/default/configuration.html +++ b/templates/admin/default/configuration.html @@ -17,151 +17,156 @@
diff --git a/templates/admin/default/countries.html b/templates/admin/default/countries.html index 982db557f..fe1b614a1 100644 --- a/templates/admin/default/countries.html +++ b/templates/admin/default/countries.html @@ -23,80 +23,80 @@
- - - - - - - - - - - - - {module_include location='countries_table_header'} - - - - - - - {loop name="countries" type="country" backend_context="1" lang=$lang_id order=$order} +
+
- {intl l='Countries'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.countries.create"} - - - - {/loop} -
IDNameDefaultShopN° ISOISO Code{intl l='Actions'}
+ + - - - - - - + + + + + + - {module_include location='countries_table_row'} + {module_include location='countries_table_header'} - + - {/loop} - {elseloop rel="countries"} - - - - {/elseloop} - -
+ {intl l='Countries'} + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.countries.create"} + + + + {/loop} +
{$ID}{$TITLE} -
- -
-
-
- -
-
{$ISOCODE}{$ISOALPHA3}IDNameDefaultShopN° ISOISO Code -
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.countries.change"} - - - - {/loop} - - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.countries.delete"} - - - - {/loop} -
-
{intl l='Actions'}
-
- {intl l="No country has been created yet. Click the + button to create one."} -
-
+ + + {loop name="countries" type="country" backend_context="1" lang=$lang_id order=$order} + + {$ID} + {$TITLE} + +
+ +
+ + +
+ +
+ + {$ISOCODE} + {$ISOALPHA3} + + {module_include location='countries_table_row'} + + +
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.countries.change"} + + + + {/loop} + + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.countries.delete"} + + + + {/loop} +
+ + + {/loop} + {elseloop rel="countries"} + + +
+ {intl l="No country has been created yet. Click the + button to create one."} +
+ + + {/elseloop} + + +
diff --git a/templates/admin/default/coupon-list.html b/templates/admin/default/coupon-list.html index 2eafde586..3abc9268d 100755 --- a/templates/admin/default/coupon-list.html +++ b/templates/admin/default/coupon-list.html @@ -22,73 +22,77 @@
- - - - - - - - - - - - - {loop type="coupon" name="list_coupon" is_enabled="1" backend_context="true"} - - - - - - - - {/loop} - -
- {intl l='Enabled coupons'} -
{block name="coupon-label-code"}{intl l='Code'}{/block}{block name="coupon-label-title"}{intl l='Title'}{/block}{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}{block name="coupon-label-action"}{/block}
{block name="coupon-code"}{$CODE}{/block}{block name="coupon-title"}{$TITLE}{/block}{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}{block name="coupon-usage-left"}{$USAGE_LEFT}{/block} - {block name="coupon-action"} - - {intl l='Edit'} - - {/block} -
+
+ + + + + + + + + + + + + {loop type="coupon" name="list_coupon" is_enabled="1" backend_context="true"} + + + + + + + + {/loop} + +
+ {intl l='Enabled coupons'} +
{block name="coupon-label-code"}{intl l='Code'}{/block}{block name="coupon-label-title"}{intl l='Title'}{/block}{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}{block name="coupon-label-action"}{/block}
{block name="coupon-code"}{$CODE}{/block}{block name="coupon-title"}{$TITLE}{/block}{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}{block name="coupon-usage-left"}{$USAGE_LEFT}{/block} + {block name="coupon-action"} + + {intl l='Edit'} + + {/block} +
+
- - - - - - - - - - - - - {loop type="coupon" name="list_coupon" is_enabled="0" backend_context="true"} - - - - - - - - {/loop} - -
- {intl l='Disabled coupons'} -
{block name="coupon-label-code"}{intl l='Code'}{/block}{block name="coupon-label-title"}{intl l='Title'}{/block}{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}{block name="coupon-label-action"}{/block}
{block name="coupon-code"}{$CODE}{/block}{block name="coupon-title"}{$TITLE}{/block}{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}{block name="coupon-usage-left"}{$USAGE_LEFT}{/block} - {block name="coupon-action"} - - {intl l='Edit'} - - {/block} -
+
+ + + + + + + + + + + + + {loop type="coupon" name="list_coupon" is_enabled="0" backend_context="true"} + + + + + + + + {/loop} + +
+ {intl l='Disabled coupons'} +
{block name="coupon-label-code"}{intl l='Code'}{/block}{block name="coupon-label-title"}{intl l='Title'}{/block}{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}{block name="coupon-label-action"}{/block}
{block name="coupon-code"}{$CODE}{/block}{block name="coupon-title"}{$TITLE}{/block}{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}{block name="coupon-usage-left"}{$USAGE_LEFT}{/block} + {block name="coupon-action"} + + {intl l='Edit'} + + {/block} +
+
diff --git a/templates/admin/default/coupon-read.html b/templates/admin/default/coupon-read.html index 4ae5e5c68..8f14dd44f 100755 --- a/templates/admin/default/coupon-read.html +++ b/templates/admin/default/coupon-read.html @@ -27,120 +27,122 @@ {intl l='This coupon is disabled, you can enable to the bottom of this form.'} {/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{intl l='Title'}{$TITLE}
- {if $IS_ENABLED} - - {intl l="Is enabled"} - - {else} - - {intl l="Is disabled"} - - {/if} -
- {$TOOLTIP} -
{intl l='Amount'}{$AMOUNT}
{intl l='Expiration date'}{$EXPIRATION_DATE} ({$DAY_LEFT_BEFORE_EXPIRATION} {intl l="days left"})
{intl l='Usage left'} - {if $USAGE_LEFT} - - {$USAGE_LEFT} - - {else} - - 0 - - {/if} -
- {if $IS_CUMULATIVE} - - {intl l="May be cumulative"} - - {else} - - {intl l="Can't be cumulative"} - - {/if} -
- {if $IS_REMOVING_POSTAGE} - - {intl l="Will remove postage"} - - {else} - - {intl l="Won't remove postage"} - - {/if} -
- {if $IS_AVAILABLE_ON_SPECIAL_OFFERS} - - {intl l="Will be available on special offers"} - - {else} - - {intl l="Won't be available on special offers"} - - {/if} -
{intl l='Application field'} -
    - {foreach from=$APPLICATION_CONDITIONS item=rule name=rulesForeach} - {if !$smarty.foreach.rulesForeach.first} -
  • {intl l='And'}
  • - {/if} -
  • {$rule nofilter}
  • - {/foreach} -
-
{$SHORT_DESCRIPTION}
{$DESCRIPTION}
- - {intl l='Edit'} - -
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{intl l='Title'}{$TITLE}
+ {if $IS_ENABLED} + + {intl l="Is enabled"} + + {else} + + {intl l="Is disabled"} + + {/if} +
+ {$TOOLTIP} +
{intl l='Amount'}{$AMOUNT}
{intl l='Expiration date'}{$EXPIRATION_DATE} ({$DAY_LEFT_BEFORE_EXPIRATION} {intl l="days left"})
{intl l='Usage left'} + {if $USAGE_LEFT} + + {$USAGE_LEFT} + + {else} + + 0 + + {/if} +
+ {if $IS_CUMULATIVE} + + {intl l="May be cumulative"} + + {else} + + {intl l="Can't be cumulative"} + + {/if} +
+ {if $IS_REMOVING_POSTAGE} + + {intl l="Will remove postage"} + + {else} + + {intl l="Won't remove postage"} + + {/if} +
+ {if $IS_AVAILABLE_ON_SPECIAL_OFFERS} + + {intl l="Will be available on special offers"} + + {else} + + {intl l="Won't be available on special offers"} + + {/if} +
{intl l='Application field'} +
    + {foreach from=$APPLICATION_CONDITIONS item=rule name=rulesForeach} + {if !$smarty.foreach.rulesForeach.first} +
  • {intl l='And'}
  • + {/if} +
  • {$rule nofilter}
  • + {/foreach} +
+
{$SHORT_DESCRIPTION}
{$DESCRIPTION}
+ + {intl l='Edit'} + +
+
{/loop} diff --git a/templates/admin/default/currencies.html b/templates/admin/default/currencies.html index fe4cfe882..11b52cd24 100644 --- a/templates/admin/default/currencies.html +++ b/templates/admin/default/currencies.html @@ -23,166 +23,166 @@
- - - - - - - - - - - - - - - - - - - - {module_include location='currencies_table_header'} - - - - - - - {loop name="currencies" type="currency" backend_context="1" lang=$lang_id order=$order} +
+
- {intl l='Currencies'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.currencies.create"} - - - - - - - {/loop} -
- {admin_sortable_header - current_order=$order - order='id' - reverse_order='id_reverse' - path='/admin/configuration/currencies' - label="{intl l='ID'}" - } - - {admin_sortable_header - current_order=$order - order='name' - reverse_order='name_reverse' - path='/admin/configuration/currencies' - label="{intl l='Name'}" - } - - {admin_sortable_header - current_order=$order - order='code' - reverse_order='code_reverse' - path='/admin/configuration/currencies' - label="{intl l="ISO 4217 Code"}" - } - - - {admin_sortable_header - current_order=$order - order='symbol' - reverse_order='symbol_reverse' - path='/admin/configuration/currencies' - label="{intl l="Symbol"}" - } - - {admin_sortable_header - current_order=$order - order='rate' - reverse_order='rate_reverse' - path='/admin/configuration/currencies' - label="{intl l="Rate in €"}" - } - - {admin_sortable_header - current_order=$order - order='manual' - reverse_order='manual_reverse' - path='/admin/configuration/currencies' - label="{intl l="Position"}" - } - - {admin_sortable_header - current_order=$order - order='is_default' - reverse_order='is_default_reverse' - path='/admin/configuration/currencies' - label="{intl l="Default"}" - } - {intl l='Actions'}
+ + - - - - - - - - - - - - + - {module_include location='currencies_table_row'} + - + + + + + + + + {module_include location='currencies_table_header'} + + + + + + + {loop name="currencies" type="currency" backend_context="1" lang=$lang_id order=$order} + + + + - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.currencies.delete"} - - - - {/loop} - - - - {/loop} - {elseloop rel="currencies"} - - - - {/elseloop} - -
+ {intl l='Currencies'} + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.currencies.create"} + + + + + + + {/loop} +
{$ID} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"} - {$NAME} - {/loop} - {elseloop rel="can_change"} - {$NAME} - {/elseloop} - {$ISOCODE}{$SYMBOL}{format_number number="$RATE" decimals="4"} - {admin_position_block - permission="admin.currencies.edit" - path="/admin/configuration/currencies/update-position" - url_parameter="currency_id" - in_place_edit_class="currencyPositionChange" - position="$POSITION" - id="$ID" + + {admin_sortable_header + current_order=$order + order='id' + reverse_order='id_reverse' + path='/admin/configuration/currencies' + label="{intl l='ID'}" } - + -
- -
-
+ {admin_sortable_header + current_order=$order + order='name' + reverse_order='name_reverse' + path='/admin/configuration/currencies' + label="{intl l='Name'}" + } + + {admin_sortable_header + current_order=$order + order='code' + reverse_order='code_reverse' + path='/admin/configuration/currencies' + label="{intl l="ISO 4217 Code"}" + } + + -
+
+ {admin_sortable_header + current_order=$order + order='symbol' + reverse_order='symbol_reverse' + path='/admin/configuration/currencies' + label="{intl l="Symbol"}" + } + + {admin_sortable_header + current_order=$order + order='rate' + reverse_order='rate_reverse' + path='/admin/configuration/currencies' + label="{intl l="Rate in €"}" + } + + {admin_sortable_header + current_order=$order + order='manual' + reverse_order='manual_reverse' + path='/admin/configuration/currencies' + label="{intl l="Position"}" + } + + {admin_sortable_header + current_order=$order + order='is_default' + reverse_order='is_default_reverse' + path='/admin/configuration/currencies' + label="{intl l="Default"}" + } + {intl l='Actions'}
{$ID} {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"} - - - + {$NAME} {/loop} + {elseloop rel="can_change"} + {$NAME} + {/elseloop} +
-
- {intl l="No currency has been created yet. Click the + button to create one."} -
-
+ {$ISOCODE} + {$SYMBOL} + + {format_number number="$RATE" decimals="4"} + + + {admin_position_block + permission="admin.currencies.edit" + path="/admin/configuration/currencies/update-position" + url_parameter="currency_id" + in_place_edit_class="currencyPositionChange" + position="$POSITION" + id="$ID" + } + + + +
+ +
+ + + {module_include location='currencies_table_row'} + + +
+ {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} +
+ + + {/loop} + {elseloop rel="currencies"} + + +
+ {intl l="No currency has been created yet. Click the + button to create one."} +
+ + + {/elseloop} + + +
diff --git a/templates/admin/default/customer-edit.html b/templates/admin/default/customer-edit.html index 10f4f3abf..9bcba75b9 100644 --- a/templates/admin/default/customer-edit.html +++ b/templates/admin/default/customer-edit.html @@ -142,52 +142,54 @@

+ +
+ + + + + + + + + {loop name="address" type="address" customer="$customer_id" backend_context="1" default="0"} + + + + + {/loop} + +
{intl l="Address"}{intl l="Actions"}
+
+ {loop name="address.title" type="title" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME} {$LASTNAME}
+ {$ADDRESS1}
+ {$ADDRESS2}
+ {$ADDRESS3}
+ {if $PHONE} + P: {$PHONE}
+ {/if} + {if $CELLPHONE} + P: {$CELLPHONE} + {/if} +
+
+
- - - - - - - - - {loop name="address" type="address" customer="$customer_id" backend_context="1" default="0"} - - - - - {/loop} - -
{intl l="Address"}{intl l="Actions"}
-
- {loop name="address.title" type="title" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME} {$LASTNAME}
- {$ADDRESS1}
- {$ADDRESS2}
- {$ADDRESS3}
- {if $PHONE} - P: {$PHONE}
- {/if} - {if $CELLPHONE} - P: {$CELLPHONE} - {/if} -
-
- -
+
+
+
diff --git a/templates/admin/default/customers.html b/templates/admin/default/customers.html index 6a10b7801..9d74835d7 100644 --- a/templates/admin/default/customers.html +++ b/templates/admin/default/customers.html @@ -22,121 +22,123 @@
- -
- {intl l="Customers list"} +
+ + + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.customers.create"} + + + + {/loop} + - {ifloop rel="customer_list"} - - - - - - - {module_include location='category_list_header'} - - - - - - - - - - - - - {loop name="customer_list" type="customer" current="false" visible="*" last_order="1" backend_context="1" page={$customer_page} limit={$display_customer}} + {ifloop rel="customer_list"} + - + - + - + {module_include location='category_list_header'} - {module_include location='customer_list_row'} + - + - - + + - {/loop} - - - - + {loop name="customer_list" type="customer" current="false" visible="*" last_order="1" backend_context="1" page={$customer_page} limit={$display_customer}} + + - {else} -
  • {$PAGE}
  • - {/if} + + + + + {module_include location='customer_list_row'} + + + + + + + + {/loop} + + + + - - - {/ifloop} -
    + {intl l="Customers list"} - {module_include location='customer_list_caption'} + {module_include location='customer_list_caption'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.customers.create"} - - - - {/loop} -
    - {intl l="customer ref"} - - {intl l="company"} - - {intl l="firstname & lastname"} - - {intl l="last order"} - {intl l='order amount'}{intl l='Actions'}
    {$REF} + {intl l="customer ref"} + - {$COMPANY} - + {intl l="company"} + - {$FIRSTNAME} {$LASTNAME} - + {intl l="firstname & lastname"} + - {format_date date=$LASTORDER_DATE} - + {intl l="last order"} + - {format_number number=$LASTORDER_AMOUNT} - -
    - - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.customer.edit"} - - {/loop} - {loop type="auth" name="can_send_mail" roles="ADMIN" permissions="admin.customer.sendMail"} - - {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.customer.delete"} - - {/loop} -
    -
    {intl l='order amount'}{intl l='Actions'}
    - -
    -
      - {if $customer_page != 1} -
    • «
    • - {else} -
    • «
    • - {/if} + - {pageloop rel="customer_list"} - {if $PAGE != $CURRENT} -
    • {$PAGE}
    • +
    {$REF} + {$COMPANY} + + {$FIRSTNAME} {$LASTNAME} + + {format_date date=$LASTORDER_DATE} + + {format_number number=$LASTORDER_AMOUNT} + +
    + + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.customer.edit"} + + {/loop} + {loop type="auth" name="can_send_mail" roles="ADMIN" permissions="admin.customer.sendMail"} + + {/loop} + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.customer.delete"} + + {/loop} +
    +
    + +
    +
      + {if $customer_page != 1} +
    • «
    • + {else} +
    • «
    • + {/if} + + {pageloop rel="customer_list"} + {if $PAGE != $CURRENT} +
    • {$PAGE}
    • + + {else} +
    • {$PAGE}
    • + {/if} - {/pageloop} - {if $PAGE == $LAST && $LAST != $CURRENT} -
    • »
    • - {else} -
    • »
    • - {/if} -
    -
    - -
    + {/pageloop} + {if $PAGE == $LAST && $LAST != $CURRENT} +
  • »
  • + {else} +
  • »
  • + {/if} + +
    + + + + + {/ifloop} +
    +
    diff --git a/templates/admin/default/feature-edit.html b/templates/admin/default/feature-edit.html index 7bbed5965..a21c63f61 100644 --- a/templates/admin/default/feature-edit.html +++ b/templates/admin/default/feature-edit.html @@ -77,95 +77,97 @@
    {intl l="Enter here all possible feature values."}
    + +
    + + + + -
    + {admin_sortable_header + current_order=$featureav_order + order='id' + reverse_order='id_reverse' + request_parameter_name='featureav_order' + path={url path='/admin/configuration/features/update' feature_id=$feature_id} + label="{intl l='ID'}" + } +
    - - - + - + - + {module_include location='features_value_table_header'} - {module_include location='features_value_table_header'} + + + - - - + + {loop name="list" type="feature_availability" feature=$feature_id backend_context="1" lang=$edit_language_id order=$featureav_order} + + - - {loop name="list" type="feature_availability" feature=$feature_id backend_context="1" lang=$edit_language_id order=$featureav_order} - - + - + - + {module_include location='features_value_table_row'} - {module_include location='features_value_table_row'} + + + {/loop} - - - {/loop} - - {elseloop rel="list"} - - - - {/elseloop} - -
    - {admin_sortable_header - current_order=$featureav_order - order='id' - reverse_order='id_reverse' - request_parameter_name='featureav_order' - path={url path='/admin/configuration/features/update' feature_id=$feature_id} - label="{intl l='ID'}" - } - + {admin_sortable_header + current_order=$featureav_order + order='alpha' + reverse_order='alpha_reverse' + request_parameter_name='featureav_order' + path={url path='/admin/configuration/features/update' feature_id=$feature_id} + label="{intl l='Value'}" + } + - {admin_sortable_header - current_order=$featureav_order - order='alpha' - reverse_order='alpha_reverse' - request_parameter_name='featureav_order' - path={url path='/admin/configuration/features/update' feature_id=$feature_id} - label="{intl l='Value'}" - } - + {admin_sortable_header + current_order=$featureav_order + order='manual' + reverse_order='manual_reverse' + request_parameter_name='featureav_order' + path={url path='/admin/configuration/features/update' feature_id=$feature_id} + label="{intl l="Position"}" + } + - {admin_sortable_header - current_order=$featureav_order - order='manual' - reverse_order='manual_reverse' - request_parameter_name='featureav_order' - path={url path='/admin/configuration/features/update' feature_id=$feature_id} - label="{intl l="Position"}" - } - {intl l="Actions"}
    {intl l="Actions"}
    {$ID}
    {$ID} + {* FIXME : integrate this in the encolsing form to provide standard form processing *} + + - {* FIXME : integrate this in the encolsing form to provide standard form processing *} - - + {admin_position_block + permission="admin.features.edit" + path={url path='/admin/configuration/features-av/update-position' feature_id=$feature_id} + url_parameter="featureav_id" + in_place_edit_class="positionChange" + position="$POSITION" + id="$ID" + } + - {admin_position_block - permission="admin.features.edit" - path={url path='/admin/configuration/features-av/update-position' feature_id=$feature_id} - url_parameter="featureav_id" - in_place_edit_class="positionChange" - position="$POSITION" - id="$ID" - } - +
    + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.feature-av.delete"} + + + + {/loop} +
    +
    -
    - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.feature-av.delete"} - - - - {/loop} -
    -
    -
    - {intl l="No value has been created yet. Click the + button to create one."} -
    -
    + {elseloop rel="list"} + + +
    + {intl l="No value has been created yet. Click the + button to create one."} +
    + + + {/elseloop} + + +
    {/form} diff --git a/templates/admin/default/features.html b/templates/admin/default/features.html index 69ed1d5d4..683374aa8 100644 --- a/templates/admin/default/features.html +++ b/templates/admin/default/features.html @@ -21,117 +21,119 @@
    - - + + + {/elseloop} + +
    - {intl l='Thelia product features'} +
    + + - - - + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.features.create"} + + + + {/loop} + + + + - + - + - {module_include location='features_table_header'} + {module_include location='features_table_header'} - - - + + + - - {loop name="list" type="feature" backend_context="1" lang=$lang_id order=$order} - - + + {loop name="list" type="feature" backend_context="1" lang=$lang_id order=$order} + + - + - + - {module_include location='features_table_row'} + {module_include location='features_table_row'} - - - {/loop} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.delete"} + + {/loop} + + + + {/loop} - {elseloop rel="list"} - - - - {/elseloop} - -
    + {intl l='Thelia product features'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.features.create"} - - - - {/loop} -
    - {admin_sortable_header - current_order=$order - order='id' - reverse_order='id_reverse' - path='/admin/configuration/features' - label="{intl l='ID'}" - } -
    + {admin_sortable_header + current_order=$order + order='id' + reverse_order='id_reverse' + path='/admin/configuration/features' + label="{intl l='ID'}" + } + - {admin_sortable_header - current_order=$order - order='alpha' - reverse_order='alpha_reverse' - path='/admin/configuration/features' - label="{intl l='Title'}" - } - + {admin_sortable_header + current_order=$order + order='alpha' + reverse_order='alpha_reverse' + path='/admin/configuration/features' + label="{intl l='Title'}" + } + - {admin_sortable_header - current_order=$order - order='manual' - reverse_order='manual_reverse' - path='/admin/configuration/features' - label="{intl l="Position"}" - } - + {admin_sortable_header + current_order=$order + order='manual' + reverse_order='manual_reverse' + path='/admin/configuration/features' + label="{intl l="Position"}" + } + {intl l="Actions"}
    {intl l="Actions"}
    {$ID}
    {$ID} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"} - {$TITLE} - {/loop} - {elseloop rel="can_change"} - {$TITLE} - {/elseloop} - + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"} + {$TITLE} + {/loop} + {elseloop rel="can_change"} + {$TITLE} + {/elseloop} + - {admin_position_block - permission="admin.features.edit" - path="/admin/configuration/features/update-position" - url_parameter="feature_id" - in_place_edit_class="positionChange" - position="$POSITION" - id="$ID" - } - + {admin_position_block + permission="admin.features.edit" + path="/admin/configuration/features/update-position" + url_parameter="feature_id" + in_place_edit_class="positionChange" + position="$POSITION" + id="$ID" + } + - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"} - - {/loop} + + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"} + + {/loop} -
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"} - - {/loop} +
    + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"} + + {/loop} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.delete"} - - {/loop} -
    -
    -
    - {intl l="No product feature has been created yet. Click the + button to create one."} -
    -
    + {elseloop rel="list"} +
    +
    + {intl l="No product feature has been created yet. Click the + button to create one."} +
    +
    +
    diff --git a/templates/admin/default/folders.html b/templates/admin/default/folders.html index e836770ab..90646c9bc 100644 --- a/templates/admin/default/folders.html +++ b/templates/admin/default/folders.html @@ -15,163 +15,164 @@
    -
    +
    +
    + +
    + {* display parent folder name, and get current folder ID *} + {loop name="folder_title" type="folder" visible="*" id=$folder_id} + {intl l="Folders in %fold" fold=$TITLE} + {$fold_id = $ID} + {/loop} + {elseloop rel="folder_title"} + {intl l="Top level folders"} + {/elseloop} - - - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"} - - - - {/loop} - + {ifloop rel="folder_list"} + + + - {ifloop rel="folder_list"} + + + + + {module_include location='folder_list_header'} + + + + + + + + + + + {loop name="folder_list" type="folder" visible="*" parent=$folder_id order=$folder_order backend_context="1" lang=$lang_id} + + + + + + + + {module_include location='folder_list_row'} + + + + + + + + {/loop} + + {/ifloop} + + {elseloop rel="folder_list"} - + - - - - {module_include location='folder_list_header'} - - - - - - + {elseloop rel="can_create"} + {intl l="This folder has no sub-folders."} + {/elseloop} + + - - - {loop name="folder_list" type="folder" visible="*" parent=$folder_id order=$folder_order backend_context="1" lang=$lang_id} - - - - - - - - {module_include location='folder_list_row'} - - - - - - - - {/loop} - - {/ifloop} - - {elseloop rel="folder_list"} - - - - - - {/elseloop} -
    - {* display parent folder name, and get current folder ID *} - {loop name="folder_title" type="folder" visible="*" id=$folder_id} - {intl l="Folders in %fold" fold=$TITLE} - {$fold_id = $ID} - {/loop} - {elseloop rel="folder_title"} - {intl l="Top level folders"} - {/elseloop} + {module_include location='folder_list_caption'} - {module_include location='folder_list_caption'} + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"} + + + + {/loop} +
    + {admin_sortable_header + current_order=$folder_order + order='id' + reverse_order='id_reverse' + path={url path='/admin/folders' id_folder=$folder_id} + request_parameter_name='folder_order' + label="{intl l='ID'}" + } +   + {admin_sortable_header + current_order=$folder_order + order='alpha' + reverse_order='alpha_reverse' + path={url path='/admin/folders' id_folder=$folder_id} + request_parameter_name='folder_order' + label="{intl l='Folder title'}" + } + + {admin_sortable_header + current_order=$folder_order + order='visible' + reverse_order='visible_reverse' + path={url path='/admin/folders' id_folder=$folder_id} + request_parameter_name='folder_order' + label="{intl l='Online'}" + } + + {admin_sortable_header + current_order=$folder_order + order='manual' + reverse_order='manual_reverse' + path={url path='/admin/folders' id_folder=$folder_id} + request_parameter_name='folder_order' + label="{intl l='Position'}" + } + {intl l='Actions'}
    {$ID} + {loop type="image" name="folder_image" source="folder" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"} + {$TITLE} + {/loop} + + + {$TITLE} + + + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"} +
    + +
    + {/loop} + + {elseloop rel="can_change"} +
    + +
    + {/elseloop} +
    + {admin_position_block + permission="admin.folders.edit" + path={url path='admin/folders/update-position' folder_id=$ID} + url_parameter="folder_id" + in_place_edit_class="folderPositionChange" + position=$POSITION + id=$ID + } + +
    + + + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"} + + {/loop} + + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"} + + {/loop} +
    +
    - {admin_sortable_header - current_order=$folder_order - order='id' - reverse_order='id_reverse' - path={url path='/admin/folders' id_folder=$folder_id} - request_parameter_name='folder_order' - label="{intl l='ID'}" - } - +
    + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"} + {intl l="This folder has no sub-folders. To create a new one, click the + button above."} + {/loop} -
      - {admin_sortable_header - current_order=$folder_order - order='alpha' - reverse_order='alpha_reverse' - path={url path='/admin/folders' id_folder=$folder_id} - request_parameter_name='folder_order' - label="{intl l='Folder title'}" - } - - {admin_sortable_header - current_order=$folder_order - order='visible' - reverse_order='visible_reverse' - path={url path='/admin/folders' id_folder=$folder_id} - request_parameter_name='folder_order' - label="{intl l='Online'}" - } - - {admin_sortable_header - current_order=$folder_order - order='manual' - reverse_order='manual_reverse' - path={url path='/admin/folders' id_folder=$folder_id} - request_parameter_name='folder_order' - label="{intl l='Position'}" - } - {intl l='Actions'}
    {$ID} - {loop type="image" name="folder_image" source="folder" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"} - {$TITLE} - {/loop} - - - {$TITLE} - - - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"} -
    - -
    - {/loop} - - {elseloop rel="can_change"} -
    - -
    - {/elseloop} -
    - {admin_position_block - permission="admin.folders.edit" - path={url path='admin/folders/update-position' folder_id=$ID} - url_parameter="folder_id" - in_place_edit_class="folderPositionChange" - position=$POSITION - id=$ID - } - -
    - - - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"} - - {/loop} - - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"} - - {/loop} -
    -
    -
    - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"} - {intl l="This folder has no sub-folders. To create a new one, click the + button above."} - {/loop} - - {elseloop rel="can_create"} - {intl l="This folder has no sub-folders."} - {/elseloop} -
    -
    + {/elseloop} +
    +
    @@ -181,7 +182,7 @@
    - +
    {* display parent folder name *} @@ -314,7 +315,7 @@ {/elseloop}
    - +
    diff --git a/templates/admin/default/home.html b/templates/admin/default/home.html index c5683620f..ea1bd3392 100755 --- a/templates/admin/default/home.html +++ b/templates/admin/default/home.html @@ -48,50 +48,52 @@
    {intl l="Informations site"}
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {intl l="Customers"}1
    {intl l="Sections"}8
    {intl l="Products"}43
    {intl l="Products online"}43
    {intl l="Products offline"}0
    {intl l="Orders"}1
    {intl l="Orders pending"}1
    {intl l="Orders treatment"}0
    {intl l="Shipped orders"}0
    {intl l="Canceled orders"}0
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {intl l="Customers"}1
    {intl l="Sections"}8
    {intl l="Products"}43
    {intl l="Products online"}43
    {intl l="Products offline"}0
    {intl l="Orders"}1
    {intl l="Orders pending"}1
    {intl l="Orders treatment"}0
    {intl l="Shipped orders"}0
    {intl l="Canceled orders"}0
    +
    @@ -107,106 +109,112 @@
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {intl l="C. A. TTC"}2000.00 €
    {intl l="C. A. TTC hors frais de port"}2500.00 €
    {intl l="C. A. TTC précédent"}1700.00 €
    {intl l="Commandes en instance"}4
    {intl l="Commandes en traitement"}52
    {intl l="Commandes annulées"}3
    {intl l="Panier moyen TTC"}25.00 €
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {intl l="C. A. TTC"}2000.00 €
    {intl l="C. A. TTC hors frais de port"}2500.00 €
    {intl l="C. A. TTC précédent"}1700.00 €
    {intl l="Commandes en instance"}4
    {intl l="Commandes en traitement"}52
    {intl l="Commandes annulées"}3
    {intl l="Panier moyen TTC"}25.00 €
    +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {intl l="C. A. TTC"}2000.00 €
    {intl l="C. A. TTC hors frais de port"}2500.00 €
    {intl l="C. A. TTC précédent"}1700.00 €
    {intl l="Commandes en instance"}4
    {intl l="Commandes en traitement"}52
    {intl l="Commandes annulées"}3
    {intl l="Panier moyen TTC"}25.00 €
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {intl l="C. A. TTC"}2000.00 €
    {intl l="C. A. TTC hors frais de port"}2500.00 €
    {intl l="C. A. TTC précédent"}1700.00 €
    {intl l="Commandes en instance"}4
    {intl l="Commandes en traitement"}52
    {intl l="Commandes annulées"}3
    {intl l="Panier moyen TTC"}25.00 €
    +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {intl l="C. A. TTC"}2000.00 €
    {intl l="C. A. TTC hors frais de port"}2500.00 €
    {intl l="C. A. TTC précédent"}1700.00 €
    {intl l="Commandes en instance"}4
    {intl l="Commandes en traitement"}52
    {intl l="Commandes annulées"}3
    {intl l="Panier moyen TTC"}25.00 €
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {intl l="C. A. TTC"}2000.00 €
    {intl l="C. A. TTC hors frais de port"}2500.00 €
    {intl l="C. A. TTC précédent"}1700.00 €
    {intl l="Commandes en instance"}4
    {intl l="Commandes en traitement"}52
    {intl l="Commandes annulées"}3
    {intl l="Panier moyen TTC"}25.00 €
    +
    @@ -215,22 +223,24 @@
    {intl l="Thelia informations"}
    - +
    +
    - - - - - - - - - - - - - -
    {intl l="Current version"}V2.0.0-beta
    {intl l="Latest version available"}V1.5.4.2
    {intl l="News"}{intl l="Click here"}
    + + {intl l="Current version"} + V2.0.0-beta + + + {intl l="Latest version available"} + V1.5.4.2 + + + {intl l="News"} + {intl l="Click here"} + + + +
    diff --git a/templates/admin/default/includes/catalog-breadcrumb.html b/templates/admin/default/includes/catalog-breadcrumb.html index 8bbe69088..1233d17a3 100644 --- a/templates/admin/default/includes/catalog-breadcrumb.html +++ b/templates/admin/default/includes/catalog-breadcrumb.html @@ -2,11 +2,11 @@ \ No newline at end of file diff --git a/templates/admin/default/messages.html b/templates/admin/default/messages.html index afa7764af..cf2a0d9e1 100644 --- a/templates/admin/default/messages.html +++ b/templates/admin/default/messages.html @@ -21,76 +21,78 @@
    - - + + + {/elseloop} + +
    - {intl l='Thelia mailing templates'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.messages.create"} - - - - {/loop} +
    + + - - - - + + + + + - {module_include location='messages_table_header'} + {module_include location='messages_table_header'} - - - + + + - - {loop name="mailing-templates" type="message" secured="*" backend_context="1" lang="$lang_id"} - + + {loop name="mailing-templates" type="message" secured="*" backend_context="1" lang="$lang_id"} + - + - + {/if} + - {module_include location='messages_table_row'} + {module_include location='messages_table_row'} - - - {/loop} - {elseloop rel="mailing-templates"} - - - - {/elseloop} - -
    + {intl l='Thelia mailing templates'} + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.messages.create"} + + + + {/loop} -
    {intl l="Purpose"}{intl l="Name"}
    {intl l="Purpose"}{intl l="Name"} 
     
    {$TITLE}{$TITLE} - {if ! $SECURED} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"} - {$NAME} - {/loop} - {elseloop rel="can_change"} + + {if ! $SECURED} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"} + {$NAME} + {/loop} + {elseloop rel="can_change"} + {$NAME} + {/elseloop} + {else} {$NAME} - {/elseloop} - {else} - {$NAME} - {/if} - - {if ! $SECURED} -
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"} - - {/loop} +
    + {if ! $SECURED} +
    + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"} + + {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.messages.delete"} - - {/loop} -
    - {else} - - {/if} -
    -
    - {intl l="No mailing template has been created yet. Click the + button to create one."} -
    -
    + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.messages.delete"} + + {/loop} +
    + {else} + + {/if} + + + {/loop} + {elseloop rel="mailing-templates"} +
    +
    + {intl l="No mailing template has been created yet. Click the + button to create one."} +
    +
    +
    diff --git a/templates/admin/default/modules.html b/templates/admin/default/modules.html index 787e00a5b..8c86c349a 100644 --- a/templates/admin/default/modules.html +++ b/templates/admin/default/modules.html @@ -26,215 +26,219 @@
    - - - - - - - +
    +
    - {intl l='Transport modules'} -
    {intl l="Name"}{intl l="Description"}{intl l="Enable/Disable"}
    + + + + + + - {module_include location='modules_table_header'} + {module_include location='modules_table_header'} - - - + + + - - - - - + + + + + - {module_include location='modules_table_row'} + {module_include location='modules_table_row'} - - - - - - + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"} + + {/loop} + + + + + + + - {module_include location='modules_table_row'} + {module_include location='modules_table_row'} - - - - - - + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"} + + {/loop} + + + + + + + - {module_include location='modules_table_row'} + {module_include location='modules_table_row'} - - - -
    + {intl l='Transport modules'} +
    {intl l="Name"}{intl l="Description"}{intl l="Enable/Disable"}{intl l="Actions"}
    {intl l="Actions"}
    TinymceEos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid! Eius, pariatur accusantium odit quidem laboriosam. -
    - -
    -
    TinymceEos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid! Eius, pariatur accusantium odit quidem laboriosam. +
    + +
    +
    -
    - - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"} - - {/loop} +
    +
    + + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"} + + {/loop} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"} - - {/loop} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"} + + {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"} - - {/loop} -
    -
    So colissimoEos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid -
    - -
    -
    So colissimoEos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid +
    + +
    +
    -
    - - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"} - - {/loop} +
    +
    + + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"} + + {/loop} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"} - - {/loop} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"} + + {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"} - - {/loop} -
    -
    Title metaEos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid -
    - -
    -
    Title metaEos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid +
    + +
    +
    -
    - - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"} - - {/loop} +
    +
    + + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"} + + {/loop} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"} - - {/loop} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"} + + {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"} - - {/loop} -
    -
    + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"} + + {/loop} +
    + + + + +
    - - - - - - - +
    +
    - {intl l='Delivery modules'} -
    {intl l="Name"}{intl l="Description"}{intl l="Enable/Disable"}
    + + + + + + - {module_include location='modules_table_header'} + {module_include location='modules_table_header'} - - - + + + - - - - - + + + + + - {module_include location='modules_table_row'} + {module_include location='modules_table_row'} - - - - - - + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"} + + {/loop} + + + + + + + - {module_include location='modules_table_row'} + {module_include location='modules_table_row'} - - - - - - + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"} + + {/loop} + + + + + + + - {module_include location='modules_table_row'} + {module_include location='modules_table_row'} - - - -
    + {intl l='Delivery modules'} +
    {intl l="Name"}{intl l="Description"}{intl l="Enable/Disable"}{intl l="Actions"}
    {intl l="Actions"}
    TinymceEos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid! Eius, pariatur accusantium odit quidem laboriosam. -
    - -
    -
    TinymceEos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid! Eius, pariatur accusantium odit quidem laboriosam. +
    + +
    +
    -
    - - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"} - - {/loop} +
    +
    + + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"} + + {/loop} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"} - - {/loop} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"} + + {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"} - - {/loop} -
    -
    So colissimoEos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid -
    - -
    -
    So colissimoEos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid +
    + +
    +
    -
    - - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"} - - {/loop} +
    +
    + + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"} + + {/loop} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"} - - {/loop} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"} + + {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"} - - {/loop} -
    -
    Title metaEos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid -
    - -
    -
    Title metaEos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid +
    + +
    +
    -
    - - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"} - - {/loop} +
    +
    + + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"} + + {/loop} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"} - - {/loop} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"} + + {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"} - - {/loop} -
    -
    + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"} + + {/loop} +
    + + + + + diff --git a/templates/admin/default/order-edit.html b/templates/admin/default/order-edit.html index 603176fe6..793414afb 100644 --- a/templates/admin/default/order-edit.html +++ b/templates/admin/default/order-edit.html @@ -30,71 +30,75 @@
    - - - - - - - - - - +
    +
    - {intl l='Information about order 01201303540354'} -
    {intl l="Designation"}{intl l="Price"}{intl l="Quantity"}{intl l="Total"}
    + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - -
    + {intl l='Information about order 01201303540354'} +
    {intl l="Designation"}{intl l="Price"}{intl l="Quantity"}{intl l="Total"}
    T-Shirt F T120.00 €360.00 €
    T-Shirt F T120.00 €360.00 €
    T-Shirt F T120.00 €360.00 €
    Total180.00 €
    + + + T-Shirt F T1 + 20.00 € + 3 + 60.00 € + + + T-Shirt F T1 + 20.00 € + 3 + 60.00 € + + + T-Shirt F T1 + 20.00 € + 3 + 60.00 € + + + + + Total + 180.00 € + + + +
    - - - - - - - - - - +
    +
    - {intl l='Information about the bill'} -
    {intl l="Bill n°"}{intl l="Compagny"}{intl l="Firstname & Lastname"}{intl l="Date & Hour"}
    + + + + + + + + + - - - - - - - - -
    + {intl l='Information about the bill'} +
    {intl l="Bill n°"}{intl l="Compagny"}{intl l="Firstname & Lastname"}{intl l="Date & Hour"}
    0001TheliaDupont Jean11/01/2013 14:11:00
    + + + 0001 + Thelia + Dupont Jean + 11/01/2013 14:11:00 + + + +
    @@ -116,214 +120,219 @@
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - {intl l='Information about the settlement'} -
    {intl l="Type of payment"}Unknown
    {intl l="Transaction reference"}141100
    {intl l="Total order before discount"}60 €
    {intl l="Discount"}10%
    {intl l="Coupon code"}
    {intl l="Total with discount"}50 €
    {intl l="Freight"}6 €
    {intl l="Total"}56 €
    - +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + {intl l='Information about the settlement'} +
    {intl l="Type of payment"}Unknown
    {intl l="Transaction reference"}141100
    {intl l="Total order before discount"}60 €
    {intl l="Discount"}10%
    {intl l="Coupon code"}
    {intl l="Total with discount"}50 €
    {intl l="Freight"}6 €
    {intl l="Total"}56 €
    +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - {intl l='Billing address'} - - - -
    {intl l="Title"}Mr
    {intl l="Compagny"}Thelia
    {intl l="Firstname"}Espeche
    {intl l="Lastname"}Michaël
    {intl l="Street address"}5, rue Rochon
    {intl l="Additional address"}Lorem ipsum dolor sit amet
    {intl l="Additional address"}Lorem ipsum dolor sit
    {intl l="Zip code"}63000
    {intl l="City"}Clermont-Fd
    {intl l="Country"}France
    {intl l="Phone"}01 02 03 04 05
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + {intl l='Billing address'} + + + +
    {intl l="Title"}Mr
    {intl l="Compagny"}Thelia
    {intl l="Firstname"}Espeche
    {intl l="Lastname"}Michaël
    {intl l="Street address"}5, rue Rochon
    {intl l="Additional address"}Lorem ipsum dolor sit amet
    {intl l="Additional address"}Lorem ipsum dolor sit
    {intl l="Zip code"}63000
    {intl l="City"}Clermont-Fd
    {intl l="Country"}France
    {intl l="Phone"}01 02 03 04 05
    +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - {intl l='Delivery address'} - - - -
    {intl l="Title"}Mr
    {intl l="Compagny"}Thelia
    {intl l="Firstname"}Espeche
    {intl l="Lastname"}Michaël
    {intl l="Street address"}5, rue Rochon
    {intl l="Additional address"}Lorem ipsum dolor sit amet
    {intl l="Additional address"}Lorem ipsum dolor sit
    {intl l="Zip code"}63000
    {intl l="City"}Clermont-Fd
    {intl l="Country"}France
    {intl l="Phone"}01 02 03 04 05
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + {intl l='Delivery address'} + + + +
    {intl l="Title"}Mr
    {intl l="Compagny"}Thelia
    {intl l="Firstname"}Espeche
    {intl l="Lastname"}Michaël
    {intl l="Street address"}5, rue Rochon
    {intl l="Additional address"}Lorem ipsum dolor sit amet
    {intl l="Additional address"}Lorem ipsum dolor sit
    {intl l="Zip code"}63000
    {intl l="City"}Clermont-Fd
    {intl l="Country"}France
    {intl l="Phone"}01 02 03 04 05
    +
    - - - - - - - - - - - - - - - - - - - - - - -
    - {intl l='Further information'} -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    - -
    - -
    -
    -
    {intl l='Bill'} {intl l='Download bill to pdf'}
    {intl l='Delivery'} {intl l='Download delivery to pdf'}
    +
    + + + + + + + + + + + + + + + + + + + + + +
    + {intl l='Further information'} +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    {intl l='Bill'} {intl l='Download bill to pdf'}
    {intl l='Delivery'} {intl l='Download delivery to pdf'}
    +
    diff --git a/templates/admin/default/orders.html b/templates/admin/default/orders.html index dcf9ef7e3..02bbea458 100644 --- a/templates/admin/default/orders.html +++ b/templates/admin/default/orders.html @@ -19,114 +19,116 @@
    - - - - - - - - - - +
    +
    - {intl l='Orders'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.orders.create"} - - - - {/loop} -
    {intl l="Order n°"}{intl l="Date & Hour"}{intl l="Compagny"}{intl l="Name"}{intl l="Amount"}{intl l="Status"}
    + + + + + + + + + - {module_include location='orders_table_header'} + {module_include location='orders_table_header'} - - - + + + - - + + - - - - - - + + + + + + - {module_include location='orders_table_row'} + {module_include location='orders_table_row'} - - - + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"} + + {/loop} + + + + - - - - - - + + + + + + - {module_include location='orders_table_row'} + {module_include location='orders_table_row'} - - - + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"} + + {/loop} + + + + - - - - - - + + + + + + - {module_include location='orders_table_row'} + {module_include location='orders_table_row'} - - + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"} + + {/loop} + + + - + - -
    + {intl l='Orders'} + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.orders.create"} + + + + {/loop} +
    {intl l="Order n°"}{intl l="Date & Hour"}{intl l="Compagny"}{intl l="Name"}{intl l="Amount"}{intl l="Status"}{intl l="Actions"}
    {intl l="Actions"}
    0123045012304511/09/2013 10:24:31TheliaDupont251 €Paid0123045012304511/09/2013 10:24:31TheliaDupont251 €Paid -
    +
    +
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"} - - {/loop} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"} + + {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"} - - {/loop} -
    -
    0123045012304511/09/2013 10:24:31TheliaDupont251 €Canceled0123045012304511/09/2013 10:24:31TheliaDupont251 €Canceled -
    +
    +
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"} - - {/loop} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"} + + {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"} - - {/loop} -
    -
    0123045012304511/09/2013 10:24:31TheliaDupont251 €Current0123045012304511/09/2013 10:24:31TheliaDupont251 €Current -
    +
    +
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"} - - {/loop} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"} + + {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"} - - {/loop} -
    -
    + + +
    diff --git a/templates/admin/default/product-edit.html b/templates/admin/default/product-edit.html new file mode 100644 index 000000000..d80d9ca0a --- /dev/null +++ b/templates/admin/default/product-edit.html @@ -0,0 +1,599 @@ +{extends file="admin-layout.tpl"} + +{block name="check-permissions"}admin.catalog.view{/block} + +{block name="page-title"}{intl l='Edit product'}{/block} + +{block name="main-content"} +
    +
    + + {include file="includes/catalog-breadcrumb.html" editing_category="false" editing_product="true"} + +
    + {loop name="product_edit" type="product" visible="*" id=$product_id backend_context="1" lang=$edit_language_id} +
    +
    +
    + {intl l='Edit product %title' title=$TITLE} +
    + +
    + + {if $HAS_PREVIOUS != 0} + + {else} + + {/if} + + + + {if $HAS_NEXT != 0} + + {else} + + {/if} +
    +
    + +
    +
    + + + +
    + +
    + +
    + + {form name="thelia.admin.product.modification"} +
    + + {include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/products' product_id=$product_id}"} + + {* Be sure to get the product ID, even if the form could not be validated *} + + + + + {form_hidden_fields form=$form} + + {form_field form=$form field='success_url'} + + {/form_field} + + {form_field form=$form field='locale'} + + {/form_field} + + {if $form_error}
    {$form_error_message}
    {/if} + +
    + + +
    {$REF}
    +
    + + {include file="includes/standard-description-form-fields.html"} + + {form_field form=$form field='url'} +
    + + + +
    + {/form_field} + +
    +
    + + {form_field form=$form field='default_category'} +
    + + + + + {intl l='You can attach this product to more categories in the details tab.'} +
    + {/form_field} + +
    + +
    + {form_field form=$form field='visible'} +
    + +
    + +
    +
    + {/form_field} +
    +
    + +
    +
    +
    +   +
    +

    {intl l='Product created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"}

    +
    +
    +
    +
    + +
    + {/form} +
    +
    + +
    +
    + + {include + file="includes/inner-form-toolbar.html" + hide_submit_buttons=true + close_url="{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}" + } + + {* -- Begin related content management -- *} + +
    +
    + +
    + + + + + + + + + {module_include location='product_contents_table_header'} + + + + + + + {loop name="assigned_contents" type="associated_content" product="$product_id" backend_context="1" lang="$edit_language_id"} + + + + + + {module_include location='product_contents_table_row'} + + + + {/loop} + + {elseloop rel="assigned_contents"} + + + + {/elseloop} + +
    {intl l='ID'}{intl l='Content title'}{intl l="Actions"}
    {$ID} + {$TITLE} + +
    + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.product.content.delete"} + + + + {/loop} +
    +
    +
    + {intl l="This product contains no contents"} +
    +
    +
    + + {* -- End related content management ---- *} + + {* -- Begin accessories management ------ *} + +
    +
    +
    + +

    {intl l='Product accessories'}

    +

    {intl l='Define here this product\'s accessories'}

    + + + + + {ifloop rel="categories"} +
    + + + {intl l='Select a category to get its products'} +
    + +
    +
    + + + + +
    + + {intl l='Select a product and click (+) to add it as an accessory'} +
    + +
    +
    + {intl l="No available product in this category"} +
    +
    + + {/ifloop} + + {elseloop rel="categories"} +
    {intl l="No categories found"}
    + {/elseloop} + +
    +
    + + + + + + + + + + + {module_include location='product_accessories_table_header'} + + + + + + + {loop name="assigned_accessories" order="accessory" type="accessory" product="$product_id" backend_context="1" lang="$edit_language_id"} + + + + + + + + {module_include location='product_accessories_table_row'} + + + + {/loop} + + {elseloop rel="assigned_accessories"} + + + + {/elseloop} + +
    {intl l='ID'}{intl l='Accessory title'}{intl l='Position'}{intl l="Actions"}
    {$ID} + {$TITLE} + + {admin_position_block + permission="admin.products.edit" + path={url path='/admin/products/update-accessory-position' product_id=$ID} + url_parameter="accessory_id" + in_place_edit_class="accessoryPositionChange" + position=$POSITION + id=$ID + } + +
    + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.product.accessory.delete"} + + + + {/loop} +
    +
    +
    + {intl l="This product contains no accessories"} +
    +
    +
    + + {* -- End accessories management -------- *} + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + {/loop} +
    +
    +
    + + +{* Delete related content confirmation dialog *} + +{capture "delete_content_dialog"} + + + + + +{/capture} + +{include + file = "includes/generic-confirm-dialog.html" + + dialog_id = "delete_content_dialog" + dialog_title = {intl l="Remove related content"} + dialog_message = {intl l="Do you really want to remove this related content from the product ?"} + + form_action = {url path='/admin/products/related-content/delete'} + form_content = {$smarty.capture.delete_content_dialog nofilter} +} + +{* Delete accessory confirmation dialog *} + +{capture "delete_accessory_dialog"} + + + + + +{/capture} + +{include + file = "includes/generic-confirm-dialog.html" + + dialog_id = "delete_accessory_dialog" + dialog_title = {intl l="Remove an accessory"} + dialog_message = {intl l="Do you really want to remove this accessory from the product ?"} + + form_action = {url path='/admin/products/accessory/delete'} + form_content = {$smarty.capture.delete_accessory_dialog nofilter} +} +{/block} + +{block name="javascript-initialization"} + +{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'} + +{/javascripts} + + + + + +{/block} \ No newline at end of file diff --git a/templates/admin/default/shipping-configuration-edit.html b/templates/admin/default/shipping-configuration-edit.html index 39b69dcde..b17dc6de4 100644 --- a/templates/admin/default/shipping-configuration-edit.html +++ b/templates/admin/default/shipping-configuration-edit.html @@ -48,56 +48,58 @@
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {intl l="Country"}{intl l="Actions"}
    Wallis-et-Futuna - - - -
    Polynésie française - - - -
    USA - Alabama - - - -
    -
    - -
    - - - - - -
    -
    -
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {intl l="Country"}{intl l="Actions"}
    Wallis-et-Futuna + + + +
    Polynésie française + + + +
    USA - Alabama + + + +
    +
    + +
    + + + + + +
    +
    +
    +
    diff --git a/templates/admin/default/shipping-configuration.html b/templates/admin/default/shipping-configuration.html index ae9090c70..067256d5f 100644 --- a/templates/admin/default/shipping-configuration.html +++ b/templates/admin/default/shipping-configuration.html @@ -20,88 +20,90 @@
    - - - - - +
    +
    - {intl l='Thelia Shipping configuration'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.shipping-configuration.create"} - - - - {/loop} -
    {intl l="Description"}
    + + + + - {module_include location='shipping_configuration_table_header'} + {module_include location='shipping_configuration_table_header'} - - - + + + - - - + + + - {module_include location='shipping_configuration_table_row'} + {module_include location='shipping_configuration_table_row'} - - - - + + + + - {module_include location='shipping_configuration_table_row'} + {module_include location='shipping_configuration_table_row'} - - - - + + + + - {module_include location='shipping_configuration_table_row'} + {module_include location='shipping_configuration_table_row'} - - - -
    + {intl l='Thelia Shipping configuration'} + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.shipping-configuration.create"} + + + + {/loop} +
    {intl l="Description"}{intl l="Actions"}
    {intl l="Actions"}
    France
    France - {if ! $SECURED} -
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"} - - {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"} - - {/loop} -
    - {else} - - {/if} -
    Outre-Mer DOM + {if ! $SECURED} +
    + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"} + + {/loop} + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"} + + {/loop} +
    + {else} + + {/if} +
    Outre-Mer DOM - {if ! $SECURED} -
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"} - - {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"} - - {/loop} -
    - {else} - - {/if} -
    Outre-Mer TOM + {if ! $SECURED} +
    + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"} + + {/loop} + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"} + + {/loop} +
    + {else} + + {/if} +
    Outre-Mer TOM - {if ! $SECURED} -
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"} - - {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"} - - {/loop} -
    - {else} - - {/if} -
    + + {if ! $SECURED} +
    + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"} + + {/loop} + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"} + + {/loop} +
    + {else} + + {/if} + + + + +
    diff --git a/templates/admin/default/shipping-zones-edit.html b/templates/admin/default/shipping-zones-edit.html index 70ee29a35..c330f9064 100644 --- a/templates/admin/default/shipping-zones-edit.html +++ b/templates/admin/default/shipping-zones-edit.html @@ -48,40 +48,42 @@
    - - - - - - - - - - - - - - - - - - - - - -
    {intl l="Zones"}{intl l="Actions"}
    France - - - -
    Zone 1 - - - -
    Zone 2 - - - -
    +
    + + + + + + + + + + + + + + + + + + + + + +
    {intl l="Zones"}{intl l="Actions"}
    France + + + +
    Zone 1 + + + +
    Zone 2 + + + +
    +
    diff --git a/templates/admin/default/shipping-zones.html b/templates/admin/default/shipping-zones.html index e7c624b52..20ffef799 100644 --- a/templates/admin/default/shipping-zones.html +++ b/templates/admin/default/shipping-zones.html @@ -20,74 +20,76 @@
    - - - - - +
    +
    - {intl l='Thelia Shipping zones'} -
    {intl l="Name"}
    + + + + - {module_include location='shipping_zones_table_header'} + {module_include location='shipping_zones_table_header'} - - - + + + - - - + + + - {module_include location='shipping_zones_table_row'} + {module_include location='shipping_zones_table_row'} - - - - + + + + - {module_include location='shipping_zones_table_row'} + {module_include location='shipping_zones_table_row'} - - - - + + + + - {module_include location='shipping_zones_table_row'} + {module_include location='shipping_zones_table_row'} - - - -
    + {intl l='Thelia Shipping zones'} +
    {intl l="Name"}{intl l="Actions"}
    {intl l="Actions"}
    So Colissimo
    So Colissimo - {if ! $SECURED} -
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"} - - {/loop} -
    - {else} - - {/if} -
    Chronopost + {if ! $SECURED} +
    + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"} + + {/loop} +
    + {else} + + {/if} +
    Chronopost - {if ! $SECURED} -
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"} - - {/loop} -
    - {else} - - {/if} -
    Kiala + {if ! $SECURED} +
    + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"} + + {/loop} +
    + {else} + + {/if} +
    Kiala - {if ! $SECURED} -
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"} - - {/loop} -
    - {else} - - {/if} -
    + + {if ! $SECURED} +
    + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"} + + {/loop} +
    + {else} + + {/if} + + + + +
    diff --git a/templates/admin/default/templates.html b/templates/admin/default/templates.html index 6f88bed47..f7e912e9c 100644 --- a/templates/admin/default/templates.html +++ b/templates/admin/default/templates.html @@ -25,86 +25,88 @@ {if ! empty($general_error) }
    {$general_error}
    {/if} + +
    + + + + + {/elseloop} + +
    + {intl l='Thelia product templates'} - - + + + - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.templates.create"} - - - - {/loop} - - - - + - + {module_include location='templates_table_header'} - {module_include location='templates_table_header'} + + + - - - + + {loop name="list" type="template" backend_context="1" lang=$lang_id order=$order} + + - - {loop name="list" type="template" backend_context="1" lang=$lang_id order=$order} - - + - + {module_include location='templates_table_row'} - {module_include location='templates_table_row'} + + + {/loop} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.delete"} - - {/loop} - - - - {/loop} - - {elseloop rel="list"} - - - - {/elseloop} - -
    - {intl l='Thelia product templates'} + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.templates.create"} + + + + {/loop} +
    + {admin_sortable_header + current_order=$order + order='id' + reverse_order='id_reverse' + path='/admin/configuration/templates' + label="{intl l='ID'}" + } +
    - {admin_sortable_header - current_order=$order - order='id' - reverse_order='id_reverse' - path='/admin/configuration/templates' - label="{intl l='ID'}" - } - + {admin_sortable_header + current_order=$order + order='alpha' + reverse_order='alpha_reverse' + path='/admin/configuration/templates' + label="{intl l='Title'}" + } + - {admin_sortable_header - current_order=$order - order='alpha' - reverse_order='alpha_reverse' - path='/admin/configuration/templates' - label="{intl l='Title'}" - } - {intl l="Actions"}
    {intl l="Actions"}
    {$ID}
    {$ID} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"} + {$NAME} + {/loop} + {elseloop rel="can_change"} + {$NAME} + {/elseloop} + - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"} - {$NAME} - {/loop} - {elseloop rel="can_change"} - {$NAME} - {/elseloop} - +
    + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"} + + {/loop} -
    -
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"} - - {/loop} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.delete"} + + {/loop} +
    +
    -
    - {intl l="No product template has been created yet. Click the + button to create one."} -
    -
    + {elseloop rel="list"} +
    +
    + {intl l="No product template has been created yet. Click the + button to create one."} +
    +
    +
    diff --git a/templates/admin/default/variables.html b/templates/admin/default/variables.html index 6100466bd..0ce47727d 100644 --- a/templates/admin/default/variables.html +++ b/templates/admin/default/variables.html @@ -21,6 +21,7 @@
    +
    {intl l='Thelia system variables'} @@ -122,6 +123,7 @@ {/loop}
    +