Merge branch 'master' of github.com:thelia/thelia

This commit is contained in:
Manuel Raynaud
2013-09-20 14:38:46 +02:00
80 changed files with 4859 additions and 2448 deletions

View File

@@ -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();
}
}

View File

@@ -23,15 +23,17 @@
namespace Thelia\Action;
use Propel\Runtime\Exception\PropelException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Core\Event\CartEvent;
use Thelia\Core\Event\OrderEvent;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Model\ProductPrice;
use Thelia\Model\ProductPriceQuery;
use Thelia\Model\CartItem;
use Thelia\Model\CartItemQuery;
use Thelia\Model\Base\AddressQuery;
use Thelia\Model\ModuleQuery;
use Thelia\Model\OrderStatus;
use Thelia\Model\Map\OrderTableMap;
use Thelia\Model\OrderAddress;
use Thelia\Model\OrderStatusQuery;
use Thelia\Model\ConfigQuery;
/**
@@ -67,6 +69,135 @@ class Order extends BaseAction implements EventSubscriberInterface
$event->setOrder($order);
}
/**
* @param \Thelia\Core\Event\OrderEvent $event
*/
public function setInvoiceAddress(OrderEvent $event)
{
$order = $event->getOrder();
$order->chosenInvoiceAddress = $event->getInvoiceAddress();
$event->setOrder($order);
}
/**
* @param \Thelia\Core\Event\OrderEvent $event
*/
public function setPaymentModule(OrderEvent $event)
{
$order = $event->getOrder();
$order->setPaymentModuleId($event->getPaymentModule());
$event->setOrder($order);
}
/**
* @param \Thelia\Core\Event\OrderEvent $event
*/
public function create(OrderEvent $event)
{
$con = \Propel\Runtime\Propel::getConnection(
OrderTableMap::DATABASE_NAME
);
$con->beginTransaction();
$sessionOrder = $event->getOrder();
/* use a copy to avoid errored reccord in session */
$placedOrder = $sessionOrder->copy();
$customer = $this->getSecurityContext()->getCustomerUser();
$currency = $this->getSession()->getCurrency();
$lang = $this->getSession()->getLang();
$deliveryAddress = AddressQuery::create()->findPk($sessionOrder->chosenDeliveryAddress);
$invoiceAddress = AddressQuery::create()->findPk($sessionOrder->chosenInvoiceAddress);
$paymentModule = ModuleQuery::findPk($placedOrder->getPaymentModuleId());
/* fulfill order */
$placedOrder->setCustomerId($customer->getId());
$placedOrder->setCurrencyId($currency->getId());
$placedOrder->setCurrencyRate($currency->getRate());
$placedOrder->setLangId($lang->getId());
/* hard save the delivery and invoice addresses */
$deliveryOrderAddress = new OrderAddress();
$deliveryOrderAddress
->setCustomerTitleId($deliveryAddress->getTitleId())
->setCompany($deliveryAddress->getCompany())
->setFirstname($deliveryAddress->getFirstname())
->setLastname($deliveryAddress->getLastname())
->setAddress1($deliveryAddress->getAddress1())
->setAddress2($deliveryAddress->getAddress2())
->setAddress3($deliveryAddress->getAddress3())
->setZipcode($deliveryAddress->getZipcode())
->setCity($deliveryAddress->getCity())
->setCountryId($deliveryAddress->getCountryId())
->save($con)
;
$invoiceOrderAddress = new OrderAddress();
$invoiceOrderAddress
->setCustomerTitleId($invoiceAddress->getTitleId())
->setCompany($invoiceAddress->getCompany())
->setFirstname($invoiceAddress->getFirstname())
->setLastname($invoiceAddress->getLastname())
->setAddress1($invoiceAddress->getAddress1())
->setAddress2($invoiceAddress->getAddress2())
->setAddress3($invoiceAddress->getAddress3())
->setZipcode($invoiceAddress->getZipcode())
->setCity($invoiceAddress->getCity())
->setCountryId($invoiceAddress->getCountryId())
->save($con)
;
$placedOrder->setDeliveryOrderAddressId($deliveryOrderAddress->getId());
$placedOrder->setInvoiceOrderAddressId($invoiceOrderAddress->getId());
$placedOrder->setStatusId(
OrderStatusQuery::create()->findOneByCode(OrderStatus::CODE_NOT_PAID)->getId()
);
$placedOrder->save($con);
/* fulfill order_products and decrease stock // @todo dispatch event */
/* discount @todo */
$con->commit();
/* T1style : dispatch mail event ? */
/* clear session ? */
/* call pay method */
$paymentModuleReflection = new \ReflectionClass($paymentModule->getFullNamespace());
$paymentModuleInstance = $paymentModuleReflection->newInstance();
$paymentModuleInstance->setRequest($this->request);
$paymentModuleInstance->setDispatcher($this->dispatcher);
$paymentModuleInstance->pay();
}
/**
* @param \Thelia\Core\Event\OrderEvent $event
*/
public function setReference(OrderEvent $event)
{
$x = true;
$this->setRef($this->generateRef());
}
public function generateRef()
{
return sprintf('O', uniqid('', true), $this->getId());
}
/**
* Returns an array of event names this subscriber wants to listen to.
*
@@ -92,6 +223,40 @@ class Order extends BaseAction implements EventSubscriberInterface
return array(
TheliaEvents::ORDER_SET_DELIVERY_ADDRESS => array("setDeliveryAddress", 128),
TheliaEvents::ORDER_SET_DELIVERY_MODULE => array("setDeliveryModule", 128),
TheliaEvents::ORDER_SET_INVOICE_ADDRESS => array("setInvoiceAddress", 128),
TheliaEvents::ORDER_SET_PAYMENT_MODULE => array("setPaymentModule", 128),
TheliaEvents::ORDER_PAY => array("create", 128),
TheliaEvents::ORDER_SET_REFERENCE => array("setReference", 128),
);
}
/**
* Return the security context
*
* @return SecurityContext
*/
protected function getSecurityContext()
{
return $this->container->get('thelia.securityContext');
}
/**
* @return \Symfony\Component\HttpFoundation\Request
*/
protected function getRequest()
{
return $this->container->get('request');
}
/**
* Returns the session from the current request
*
* @return \Thelia\Core\HttpFoundation\Session\Session
*/
protected function getSession()
{
$request = $this->getRequest();
return $request->getSession();
}
}

View File

@@ -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),
);
}
}

View File

@@ -139,4 +139,6 @@ trait CartTrait
return $id;
}
abstract public function getDispatcher();
}

View File

@@ -18,7 +18,7 @@
<loop class="Thelia\Core\Template\Loop\Currency" name="currency"/>
<loop class="Thelia\Core\Template\Loop\Customer" name="customer"/>
<loop class="Thelia\Core\Template\Loop\Feature" name="feature"/>
<loop class="Thelia\Core\Template\Loop\FeatureAvailability" name="feature_availability"/>
<loop class="Thelia\Core\Template\Loop\FeatureAvailability" name="feature-availability"/>
<loop class="Thelia\Core\Template\Loop\FeatureValue" name="feature_value"/>
<loop class="Thelia\Core\Template\Loop\Folder" name="folder"/>
<loop class="Thelia\Core\Template\Loop\Order" name="order"/>
@@ -31,6 +31,7 @@
<loop class="Thelia\Core\Template\Loop\Title" name="title"/>
<loop class="Thelia\Core\Template\Loop\Lang" name="lang"/>
<loop class="Thelia\Core\Template\Loop\CategoryTree" name="category-tree"/>
<loop class="Thelia\Core\Template\Loop\FolderTree" name="folder-tree"/>
<loop class="Thelia\Core\Template\Loop\Cart" name="cart"/>
<loop class="Thelia\Core\Template\Loop\Image" name="image"/>
<loop class="Thelia\Core\Template\Loop\Config" name="config"/>
@@ -101,6 +102,8 @@
<form name="thelia.admin.country.creation" class="Thelia\Form\CountryCreationForm"/>
<form name="thelia.admin.country.modification" class="Thelia\Form\CountryModificationForm"/>
<form name="thelia.admin.profile.modification" class="Thelia\Form\ProfileModificationForm"/>
</forms>
@@ -227,6 +230,7 @@
<argument type="service" id="request" />
<argument type="service" id="thelia.securityContext" />
<argument type="service" id="thelia.parser.context"/>
<argument type="service" id="event_dispatcher"/>
</service>
<service id="smarty.plugin.adminUtilities" class="Thelia\Core\Template\Smarty\Plugins\AdminUtilities" scope="request">

View File

@@ -24,6 +24,12 @@
<default key="_controller">Thelia\Controller\Admin\SessionController::checkLoginAction</default>
</route>
<!-- Route to edit admin profile -->
<route id="admin.profile.update.view" path="/admin/profile/update" methods="get">
<default key="_controller">Thelia\Controller\Admin\AdminController::updateAction</default>
</route>
<!-- Route to the catalog controller -->
@@ -144,6 +150,8 @@
<default key="_controller">Thelia\Controller\Admin\ProductController::updatePositionAction</default>
</route>
<!-- Related content -->
<route id="admin.products.related-content.add" path="/admin/products/related-content/add">
<default key="_controller">Thelia\Controller\Admin\ProductController::addRelatedContentAction</default>
</route>
@@ -156,7 +164,33 @@
<default key="_controller">Thelia\Controller\Admin\ProductController::getAvailableRelatedContentAction</default>
<requirement key="_format">xml|json</requirement>
</route>
<!-- Product accessories -->
<route id="admin.products.accessories.add" path="/admin/products/accessory/add">
<default key="_controller">Thelia\Controller\Admin\ProductController::addAccessoryAction</default>
</route>
<route id="admin.products.accessories.delete" path="/admin/products/accessory/delete">
<default key="_controller">Thelia\Controller\Admin\ProductController::deleteAccessoryAction</default>
</route>
<route id="admin.product.accessories-content" path="/admin/product/{productId}/available-accessories/{categoryId}.{_format}" methods="GET">
<default key="_controller">Thelia\Controller\Admin\ProductController::getAvailableAccessoriesAction</default>
<requirement key="_format">xml|json</requirement>
</route>
<route id="admin.products.update-accessory-position" path="/admin/products/update-accessory-position">
<default key="_controller">Thelia\Controller\Admin\ProductController::updateAccessoryPositionAction</default>
</route>
<!--Features and attributes -->
<route id="admin.products.update-attributes-and-features" path="/admin/product/{productId}/update-attributes-and-features">
<default key="_controller">Thelia\Controller\Admin\ProductController::updateAttributesAndFeaturesAction</default>
</route>
<!-- Folder routes management -->
<route id="admin.folders.default" path="/admin/folders">
<default key="_controller">Thelia\Controller\Admin\FolderController::indexAction</default>

View File

@@ -112,6 +112,9 @@
<default key="_view">cart</default>
</route>
<!-- end cart routes -->
<!-- order management process -->
<route id="order.delivery.process" path="/order/delivery" methods="post">
<default key="_controller">Thelia\Controller\Front\OrderController::deliver</default>
<default key="_view">order_delivery</default>
@@ -123,7 +126,7 @@
</route>
<route id="order.invoice.process" path="/order/invoice" methods="post">
<default key="_controller">Thelia\Controller\Front\OrderController::pay</default>
<default key="_controller">Thelia\Controller\Front\OrderController::invoice</default>
<default key="_view">order_invoice</default>
</route>
@@ -132,12 +135,9 @@
<default key="_view">order_invoice</default>
</route>
<!-- end cart routes -->
<!-- order management process -->
<route id="order.delivery.add" path="/delivery/choose/{delivery_id}">
<default key="_controller">Thelia\Controller\Front\DeliveryController::select</default>
<requirement key="delivery_id">\d+</requirement>
<route id="order.payment.process" path="/order/pay">
<default key="_controller">Thelia\Controller\Front\OrderController::pay</default>
<default key="_view">order_payment</default>
</route>
<!-- end order management process -->

View File

@@ -33,4 +33,9 @@ class AdminController extends BaseAdminController
{
return $this->render("home");
}
public function updateAction()
{
return $this->render("profile-edit");
}
}

View File

@@ -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();
}
}

View File

@@ -72,7 +72,13 @@ class BaseFrontController extends BaseController
if(null === $order || null === $order->chosenDeliveryAddress || null === $order->getDeliveryModuleId()) {
$this->redirectToRoute("order.delivery");
}
}
protected function checkValidInvoice()
{
$order = $this->getSession()->getOrder();
if(null === $order || null === $order->chosenInvoiceAddress || null === $order->getPaymentModuleId()) {
$this->redirectToRoute("order.invoice");
}
}
}

View File

@@ -121,7 +121,7 @@ class OrderController extends BaseFrontController
* set invoice address
* set payment module
*/
public function pay()
public function invoice()
{
$this->checkAuth();
$this->checkCartNotEmpty();
@@ -134,23 +134,23 @@ class OrderController extends BaseFrontController
try {
$form = $this->validateForm($orderPayment, "post");
$deliveryAddressId = $form->get("delivery-address")->getData();
$deliveryModuleId = $form->get("delivery-module")->getData();
$invoiceAddressId = $form->get("invoice-address")->getData();
$paymentModuleId = $form->get("payment-module")->getData();
/* check that the invoice address belongs to the current customer */
$deliveryAddress = AddressQuery::create()->findPk($deliveryAddressId);
if($deliveryAddress->getCustomerId() !== $this->getSecurityContext()->getCustomerUser()->getId()) {
$invoiceAddress = AddressQuery::create()->findPk($invoiceAddressId);
if($invoiceAddress->getCustomerId() !== $this->getSecurityContext()->getCustomerUser()->getId()) {
throw new \Exception("Invoice address does not belong to the current customer");
}
$orderEvent = $this->getOrderEvent();
$orderEvent->setInvoiceAddress($deliveryAddressId);
$orderEvent->setPaymentModule($deliveryModuleId);
$orderEvent->setInvoiceAddress($invoiceAddressId);
$orderEvent->setPaymentModule($paymentModuleId);
$this->getDispatcher()->dispatch(TheliaEvents::ORDER_SET_DELIVERY_ADDRESS, $orderEvent);
$this->getDispatcher()->dispatch(TheliaEvents::ORDER_SET_DELIVERY_MODULE, $orderEvent);
$this->getDispatcher()->dispatch(TheliaEvents::ORDER_SET_INVOICE_ADDRESS, $orderEvent);
$this->getDispatcher()->dispatch(TheliaEvents::ORDER_SET_PAYMENT_MODULE, $orderEvent);
$this->redirectToRoute("order.invoice");
$this->redirectToRoute("order.payment.process");
} catch (FormValidationException $e) {
$message = sprintf("Please check your input: %s", $e->getMessage());
@@ -161,7 +161,7 @@ class OrderController extends BaseFrontController
}
if ($message !== false) {
Tlog::getInstance()->error(sprintf("Error during order delivery process : %s. Exception was %s", $message, $e->getMessage()));
Tlog::getInstance()->error(sprintf("Error during order payment process : %s. Exception was %s", $message, $e->getMessage()));
$orderPayment->setErrorMessage($message);
@@ -173,6 +173,25 @@ class OrderController extends BaseFrontController
}
public function pay()
{
/* check customer */
$this->checkAuth();
/* check cart count */
$this->checkCartNotEmpty();
/* check delivery address and module */
$this->checkValidDelivery();
/* check invoice address and payment module */
$this->checkValidInvoice();
$orderEvent = $this->getOrderEvent();
$this->getDispatcher()->dispatch(TheliaEvents::ORDER_PAY, $orderEvent);
}
protected function getOrderEvent()
{
$order = $this->getOrder($this->getRequest());

View File

@@ -21,35 +21,34 @@
/* */
/*************************************************************************************/
namespace Thelia\Controller\Front;
use Thelia\Model\ModuleQuery;
use Thelia\Tools\URL;
namespace Thelia\Core\Event;
/**
* Class DeliveryController
* @package Thelia\Controller\Front
* @author Manuel Raynaud <mraynaud@openstudio.fr>
*/
class DeliveryController extends BaseFrontController
use Thelia\Model\Accessory;
use Thelia\Core\Event\ActionEvent;
class AccessoryEvent extends ActionEvent
{
public function select($delivery_id)
public $accessory = null;
public function __construct(Accessory $accessory = null)
{
if ($this->getSecurityContext()->hasCustomerUser() === false) {
$this->redirect(URL::getInstance()->getIndexPage());
}
$this->accessory = $accessory;
}
$request = $this->getRequest();
public function hasAccessory()
{
return ! is_null($this->accessory);
}
$deliveryModule = ModuleQuery::create()
->filterById($delivery_id)
->filterByActivate(1)
->findOne()
;
public function getAccessory()
{
return $this->accessory;
}
if ($deliveryModule) {
$request->getSession()->setDelivery($delivery_id);
} else {
$this->pageNotFound();
}
public function setAccessory(Accessory $accessory)
{
$this->accessory = $accessory;
return $this;
}
}

View File

@@ -0,0 +1,54 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
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;
}
}

View File

@@ -33,6 +33,7 @@ class OrderEvent extends ActionEvent
protected $deliveryModule = null;
protected $paymentModule = null;
protected $postage = null;
protected $ref = null;
/**
* @param Order $order
@@ -55,7 +56,7 @@ class OrderEvent extends ActionEvent
*/
public function setInvoiceAddress($address)
{
$this->deliveryAddress = $address;
$this->invoiceAddress = $address;
}
/**
@@ -90,6 +91,14 @@ class OrderEvent extends ActionEvent
$this->postage = $postage;
}
/**
* @param $ref
*/
public function setRef($ref)
{
$this->ref = $ref;
}
/**
* @return null|Order
*/
@@ -137,4 +146,12 @@ class OrderEvent extends ActionEvent
{
return $this->postage;
}
/**
* @return null|int
*/
public function getRef()
{
return $this->ref;
}
}

View File

@@ -0,0 +1,48 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
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;
}
}

View File

@@ -0,0 +1,54 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
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;
}
}

View File

@@ -0,0 +1,48 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
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;
}
}

View File

@@ -165,6 +165,17 @@ final class TheliaEvents
const BEFORE_UPDATECATEGORY = "action.before_updateCategory";
const AFTER_UPDATECATEGORY = "action.after_updateCategory";
// -- Categories Associated Content ----------------------------------------
const BEFORE_CREATECATEGORY_ASSOCIATED_CONTENT = "action.before_createCategoryAssociatedContent";
const AFTER_CREATECATEGORY_ASSOCIATED_CONTENT = "action.after_createCategoryAssociatedContent";
const BEFORE_DELETECATEGORY_ASSOCIATED_CONTENT = "action.before_deleteCategoryAssociatedContenty";
const AFTER_DELETECATEGORY_ASSOCIATED_CONTENT = "action.after_deleteproduct_accessory";
const BEFORE_UPDATECATEGORY_ASSOCIATED_CONTENT = "action.before_updateCategoryAssociatedContent";
const AFTER_UPDATECATEGORY_ASSOCIATED_CONTENT = "action.after_updateCategoryAssociatedContent";
// -- Product management -----------------------------------------------
const PRODUCT_CREATE = "action.createProduct";
@@ -176,6 +187,10 @@ final class TheliaEvents
const PRODUCT_ADD_CONTENT = "action.productAddContent";
const PRODUCT_REMOVE_CONTENT = "action.productRemoveContent";
const PRODUCT_ADD_ACCESSORY = "action.productAddAccessory";
const PRODUCT_REMOVE_ACCESSORY = "action.productRemoveAccessory";
const PRODUCT_UPDATE_ACCESSORY_POSITION = "action.updateProductPosition";
const BEFORE_CREATEPRODUCT = "action.before_createproduct";
const AFTER_CREATEPRODUCT = "action.after_createproduct";
@@ -185,6 +200,28 @@ final class TheliaEvents
const BEFORE_UPDATEPRODUCT = "action.before_updateProduct";
const AFTER_UPDATEPRODUCT = "action.after_updateProduct";
// -- Product Accessories --------------------------------------------------
const BEFORE_CREATEACCESSORY = "action.before_createAccessory";
const AFTER_CREATEACCESSORY = "action.after_createAccessory";
const BEFORE_DELETEACCESSORY = "action.before_deleteAccessory";
const AFTER_DELETEACCESSORY = "action.after_deleteAccessory";
const BEFORE_UPDATEACCESSORY = "action.before_updateAccessory";
const AFTER_UPDATEACCESSORY = "action.after_updateAccessory";
// -- Product Associated Content --------------------------------------------------
const BEFORE_CREATEPRODUCT_ASSOCIATED_CONTENT = "action.before_createProductAssociatedContent";
const AFTER_CREATEPRODUCT_ASSOCIATED_CONTENT = "action.after_createProductAssociatedContent";
const BEFORE_DELETEPRODUCT_ASSOCIATED_CONTENT = "action.before_deleteProductAssociatedContenty";
const AFTER_DELETEPRODUCT_ASSOCIATED_CONTENT = "action.after_deleteproduct_accessory";
const BEFORE_UPDATEPRODUCT_ASSOCIATED_CONTENT = "action.before_updateProductAssociatedContent";
const AFTER_UPDATEPRODUCT_ASSOCIATED_CONTENT = "action.after_updateProductAssociatedContent";
/**
* sent when a new existing cat id duplicated. This append when current customer is different from current cart
*/
@@ -215,9 +252,12 @@ final class TheliaEvents
/**
* Order linked event
*/
const ORDER_SET_BILLING_ADDRESS = "action.order.setBillingAddress";
const ORDER_SET_DELIVERY_ADDRESS = "action.order.setDeliveryAddress";
const ORDER_SET_DELIVERY_MODULE = "action.order.setDeliveryModule";
const ORDER_SET_INVOICE_ADDRESS = "action.order.setInvoiceAddress";
const ORDER_SET_PAYMENT_MODULE = "action.order.setPaymentModule";
const ORDER_PAY = "action.order.pay";
const ORDER_SET_REFERENCE = "action.order.setReference";
/**
* Sent on image processing

View File

@@ -65,6 +65,8 @@ abstract class BaseI18nLoop extends BaseLoop
{
/* manage translations */
$fr = $this->getForce_return();
return ModelCriteriaTools::getI18n(
$this->getBackend_context(),
$this->getLang(),

View File

@@ -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;
}
}

View File

@@ -58,7 +58,19 @@ class Argument
public function setValue($value)
{
$this->value = $value === null ? null : (string) $value;
$x = $value === null;
if($value === null) {
$this->value = null;
} else {
if(false === $value) {
/* (string) $value = "" */
$this->value = 0;
} else {
$this->value = (string) $value;
}
}
//$this->value = $value === null ? null : (string) $value;
}
public static function createAnyTypeArgument($name, $default=null, $mandatory=false, $empty=true)

View File

@@ -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(

View File

@@ -110,4 +110,13 @@ class Cart extends BaseLoop
return $result;
}
/**
* Return the event dispatcher,
*
* @return \Symfony\Component\EventDispatcher\EventDispatcher
*/
public function getDispatcher()
{
return $this->dispatcher;
}
}

View File

@@ -0,0 +1,118 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
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 <franck@cqfdev.fr>
*/
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;
}
}

View File

@@ -24,6 +24,7 @@
namespace Thelia\Core\Template\Smarty\Plugins;
use Propel\Runtime\ActiveQuery\ModelCriteria;
use Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher;
use Symfony\Component\HttpFoundation\Request;
use Thelia\Core\Template\Smarty\AbstractSmartyPlugin;
use Thelia\Core\Security\SecurityContext;
@@ -53,12 +54,14 @@ class DataAccessFunctions extends AbstractSmartyPlugin
private $securityContext;
protected $parserContext;
protected $request;
protected $dispatcher;
public function __construct(Request $request, SecurityContext $securityContext, ParserContext $parserContext)
public function __construct(Request $request, SecurityContext $securityContext, ParserContext $parserContext, ContainerAwareEventDispatcher $dispatcher)
{
$this->securityContext = $securityContext;
$this->parserContext = $parserContext;
$this->request = $request;
$this->dispatcher = $dispatcher;
}
/**
@@ -195,6 +198,12 @@ class DataAccessFunctions extends AbstractSmartyPlugin
return $order->getPostage();
case 'delivery_address':
return $order->chosenDeliveryAddress;
case 'invoice_address':
return $order->chosenInvoiceAddress;
case 'delivery_module':
return $order->getDeliveryModuleId();
case 'payment_module':
return $order->getPaymentModuleId();
}
throw new \InvalidArgumentException(sprintf("%s has no '%s' attribute", 'Order', $attribute));
@@ -320,4 +329,14 @@ class DataAccessFunctions extends AbstractSmartyPlugin
new SmartyPluginDescriptor('function', 'order', $this, 'orderDataAccess'),
);
}
/**
* Return the event dispatcher,
*
* @return \Symfony\Component\EventDispatcher\EventDispatcher
*/
public function getDispatcher()
{
return $this->dispatcher;
}
}

View File

@@ -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.

View File

@@ -266,4 +266,14 @@ class CouponBaseAdapter implements CouponAdapterInterface
{
return $this->container->get('thelia.constraint.validator');
}
/**
* Return the event dispatcher,
*
* @return \Symfony\Component\EventDispatcher\EventDispatcher
*/
public function getDispatcher()
{
return $this->container->get('event_dispatcher');
}
}

View File

@@ -85,6 +85,13 @@ class OrderDelivery extends BaseForm
if(null === $module) {
$context->addViolation("Delivery module ID not found");
}
$moduleReflection = new \ReflectionClass($module->getFullNamespace());
if ($moduleReflection->isSubclassOf("Thelia\Module\DeliveryModuleInterface") === false) {
$context->addViolation(
sprintf("delivery module %s is not a Thelia\Module\DeliveryModuleInterface", $module->getCode())
);
}
}
public function getName()

View File

@@ -80,11 +80,18 @@ class OrderPayment extends BaseForm
->filterByType(BaseModule::PAYMENT_MODULE_TYPE)
->filterByActivate(1)
->filterById($value)
->find();
->findOne();
if(null === $module) {
$context->addViolation("Payment module ID not found");
}
$moduleReflection = new \ReflectionClass($module->getFullNamespace());
if ($moduleReflection->isSubclassOf("Thelia\Module\PaymentModuleInterface") === false) {
$context->addViolation(
sprintf("delivery module %s is not a Thelia\Module\PaymentModuleInterface", $module->getCode())
);
}
}
public function getName()

View File

@@ -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)

View File

@@ -0,0 +1,119 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
namespace Thelia\Form;
use Symfony\Component\Validator\Constraints;
use Thelia\Core\Translation\Translator;
use Thelia\Model\ConfigQuery;
/**
* Class ProfileModification
* @package Thelia\Form
* @author Manuel Raynaud <mraynaud@openstudio.fr>
*/
class ProfileModificationForm extends BaseForm
{
protected function buildForm()
{
$this->formBuilder
->add("firstname", "text", array(
"constraints" => array(
new Constraints\NotBlank()
),
"label" => Translator::getInstance()->trans("First Name"),
"label_attr" => array(
"for" => "firstname"
)
))
->add("lastname", "text", array(
"constraints" => array(
new Constraints\NotBlank()
),
"label" => Translator::getInstance()->trans("Last Name"),
"label_attr" => array(
"for" => "lastname"
)
))
->add("default_language", "text", array(
"constraints" => array(
new Constraints\NotBlank()
),
"label" => Translator::getInstance()->trans("Default language"),
"label_attr" => array(
"for" => "default_language"
)
))
->add("editing_language_default", "text", array(
"constraints" => array(
new Constraints\NotBlank()
),
"label" => Translator::getInstance()->trans("Editing language default"),
"label_attr" => array(
"for" => "editing_language_default"
)
))
->add("old_password", "password", array(
"constraints" => array(
new Constraints\NotBlank(),
new Constraints\Length(array("min" => ConfigQuery::read("password.length", 4)))
),
"label" => Translator::getInstance()->trans("Old password"),
"label_attr" => array(
"for" => "old_password"
)
))
->add("password", "password", array(
"constraints" => array(
new Constraints\NotBlank(),
new Constraints\Length(array("min" => ConfigQuery::read("password.length", 4)))
),
"label" => Translator::getInstance()->trans("Password"),
"label_attr" => array(
"for" => "password"
)
))
->add("password_confirm", "password", array(
"constraints" => array(
new Constraints\NotBlank(),
new Constraints\Length(array("min" => ConfigQuery::read("password.length", 4))),
new Constraints\Callback(array("methods" => array(
array($this, "verifyPasswordField")
)))
),
"label" => "Password confirmation",
"label_attr" => array(
"for" => "password_confirmation"
)
))
;
}
public function getName()
{
return "thelia_profile_modification";
}
}

View File

@@ -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));
}
}

View File

@@ -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));
}
}

View File

@@ -150,7 +150,7 @@ class OrderStatusTableMap extends TableMap
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('CODE', 'Code', 'VARCHAR', false, 45, null);
$this->addColumn('CODE', 'Code', 'VARCHAR', true, 45, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
} // initialize()

View File

@@ -215,7 +215,7 @@ class OrderTableMap extends TableMap
$this->addForeignKey('CUSTOMER_ID', 'CustomerId', 'INTEGER', 'customer', 'ID', true, null, null);
$this->addForeignKey('INVOICE_ORDER_ADDRESS_ID', 'InvoiceOrderAddressId', 'INTEGER', 'order_address', 'ID', true, null, null);
$this->addForeignKey('DELIVERY_ORDER_ADDRESS_ID', 'DeliveryOrderAddressId', 'INTEGER', 'order_address', 'ID', true, null, null);
$this->addColumn('INVOICE_DATE', 'InvoiceDate', 'DATE', true, null, null);
$this->addColumn('INVOICE_DATE', 'InvoiceDate', 'DATE', false, null, null);
$this->addForeignKey('CURRENCY_ID', 'CurrencyId', 'INTEGER', 'currency', 'ID', true, null, null);
$this->addColumn('CURRENCY_RATE', 'CurrencyRate', 'FLOAT', true, null, null);
$this->addColumn('TRANSACTION_REF', 'TransactionRef', 'VARCHAR', false, 100, null);

View File

@@ -2,13 +2,28 @@
namespace Thelia\Model;
use Propel\Runtime\Connection\ConnectionInterface;
use Thelia\Core\Event\OrderEvent;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Model\Base\Order as BaseOrder;
class Order extends BaseOrder
{
use \Thelia\Model\Tools\ModelEventDispatcherTrait;
public $chosenDeliveryAddress = null;
public $chosenInvoiceAddress = null;
/**
* {@inheritDoc}
*/
public function preInsert(ConnectionInterface $con = null)
{
$this->dispatchEvent(TheliaEvents::ORDER_SET_REFERENCE, new OrderEvent($this));
return true;
}
/**
* calculate the total amount
*

View File

@@ -4,6 +4,11 @@ namespace Thelia\Model;
use Thelia\Model\Base\OrderStatus as BaseOrderStatus;
class OrderStatus extends BaseOrderStatus {
class OrderStatus extends BaseOrderStatus
{
const CODE_NOT_PAID = "not_paid";
const CODE_PAID = "paid";
const CODE_PROCESSED = "processed";
const CODE_SENT = "sent";
const CODE_CANCELED = "canceled";
}

View File

@@ -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));
}
}

View File

@@ -105,7 +105,7 @@ abstract class BaseModule extends ContainerAware
$image = new ModuleImage();
$image->setModuleId($module->getId());
$image->setPosition($imagePosition);
$image->save();
$image->save($con);
$imageDirectory = sprintf("%s/../../../../local/media/images/module", __DIR__);
$imageFileName = sprintf("%s-%d-%s", $module->getCode(), $image->getId(), $fileName);
@@ -131,7 +131,7 @@ abstract class BaseModule extends ContainerAware
}
$image->setFile($imageFileName);
$image->save();
$image->save($con);
$con->commit();
$imagePosition++;

View File

@@ -1167,3 +1167,22 @@ INSERT INTO `tax_rule_i18n` (`id`, `locale`, `title`)
INSERT INTO `tax_rule_country` (`tax_rule_id`, `country_id`, `tax_id`, `position`, `created_at`, `updated_at`)
VALUES
(1, 64, 1, 1, NOW(), NOW());
INSERT INTO `order_status`(`id`, `code`, `created_at`, `updated_at`) VALUES
(1, 'not_paid', NOW(), NOW()),
(2, 'paid', NOW(), NOW()),
(3, 'processing', NOW(), NOW()),
(4, 'sent', NOW(), NOW()),
(5, 'canceled', NOW(), NOW());
INSERT INTO `order_status_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
(1, 'en_US', 'Not paid', '', '', ''),
(1, 'fr_FR', 'Non payée', '', '', ''),
(2, 'en_US', 'Paid', '', '', ''),
(2, 'fr_FR', 'Payée', '', '', ''),
(3, 'en_US', 'Processing', '', '', ''),
(3, 'fr_FR', 'Traitement', '', '', ''),
(4, 'en_US', 'Sent', '', '', ''),
(4, 'fr_FR', 'Envoyée', '', '', ''),
(5, 'en_US', 'Canceled', '', '', ''),
(5, 'fr_FR', 'Annulée', '', '', '');

View File

@@ -641,7 +641,7 @@ CREATE TABLE `order`
`customer_id` INTEGER NOT NULL,
`invoice_order_address_id` INTEGER NOT NULL,
`delivery_order_address_id` INTEGER NOT NULL,
`invoice_date` DATE NOT NULL,
`invoice_date` DATE,
`currency_id` INTEGER NOT NULL,
`currency_rate` FLOAT NOT NULL,
`transaction_ref` VARCHAR(100) COMMENT 'transaction reference - usually use to identify a transaction with banking modules',
@@ -788,10 +788,11 @@ DROP TABLE IF EXISTS `order_status`;
CREATE TABLE `order_status`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`code` VARCHAR(45),
`code` VARCHAR(45) NOT NULL,
`created_at` DATETIME,
`updated_at` DATETIME,
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
UNIQUE INDEX `code_UNIQUE` (`code`)
) ENGINE=InnoDB;
-- ---------------------------------------------------------------------

View File

@@ -500,7 +500,7 @@
<column name="customer_id" required="true" type="INTEGER" />
<column name="invoice_order_address_id" required="true" type="INTEGER" />
<column name="delivery_order_address_id" required="true" type="INTEGER" />
<column name="invoice_date" required="true" type="DATE" />
<column name="invoice_date" type="DATE" />
<column name="currency_id" required="true" type="INTEGER" />
<column name="currency_rate" required="true" type="FLOAT" />
<column description="transaction reference - usually use to identify a transaction with banking modules" name="transaction_ref" size="100" type="VARCHAR" />
@@ -613,11 +613,14 @@
</table>
<table name="order_status" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="code" size="45" type="VARCHAR" />
<column name="code" required="true" size="45" type="VARCHAR" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<unique name="code_UNIQUE">
<unique-column name="code" />
</unique>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />

View File

@@ -56,7 +56,7 @@ class Cheque extends BaseModule implements PaymentModuleInterface
public function pay()
{
// TODO: Implement pay() method.
// no special process, waiting for the cheque.
}
public function install()

View File

@@ -51,27 +51,27 @@
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="version-info">{intl l='Version %ver' ver="{$THELIA_VERSION}"}</div>
<div class="col-md-12 clearfix">
<div class="version-info pull-left">{intl l='Version %ver' ver="{$THELIA_VERSION}"}</div>
<div class="clearfix pull-right hidden-xs">
<div class="btn-group pull-right">
<a href="{navigate to="index"}" title="{intl l='View site'}" target="_blank" class="btn btn-default"><span class="glyphicon glyphicon-eye-open"></span> {intl l="View shop"}</a>
<button class="btn btn-default btn-primary"><span class="glyphicon glyphicon-user"></span> {admin attr="firstname"} {admin attr="lastname"}</button>
<button class="btn btn-default btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a class="profile" href="{url path='admin/profile/update'}"><span class="glyphicon glyphicon-edit"></span> {intl l="Profil"}</a></li>
<li><a class="logout" href="{url path='admin/logout'}" title="{intl l='Close administation session'}"><span class="glyphicon glyphicon-off"></span> {intl l="Logout"}</a></li>
</ul>
</div>
</div>
</div>
{module_include location='inside_topbar'}
<div class="col-md-6 clearfix">
<div class="btn-group pull-right">
<a href="{navigate to="index"}" title="{intl l='View site'}" target="_blank" class="btn btn-default"><span class="glyphicon glyphicon-eye-open"></span> {intl l="View shop"}</a>
<button class="btn btn-default btn-primary"><span class="glyphicon glyphicon-user"></span> {admin attr="firstname"} {admin attr="lastname"}</button>
<button class="btn btn-default btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a class="profile" href="{url path='admin/edit_profile'}"><span class="glyphicon glyphicon-edit"></span> {intl l="Profil"}</a></li>
<li><a class="logout" href="{url path='admin/logout'}" title="{intl l='Close administation session'}"><span class="glyphicon glyphicon-off"></span> {intl l="Logout"}</a></li>
</ul>
</div>
</div>
</div>
</div>
@@ -86,96 +86,98 @@
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<div class="row">
<div class="navbar-header">
<button type="button" class="btn navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-header">
<button type="button" class="btn navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse navbar-collapse">
<ul class="nav navbar-nav">
<div class="collapse navbar-collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="{if $admin_current_location == 'home'}active{/if}" id="home_menu">
<a href="{url path='/admin/home'}">{intl l="Home"}</a>
</li>
<li class="{if $admin_current_location == 'home'}active{/if}" id="home_menu">
<a href="{url path='/admin/home'}">{intl l="Home"}</a>
</li>
{loop name="menu-auth-customer" type="auth" roles="ADMIN" permissions="admin.customers.view"}
<li class="{if $admin_current_location == 'customer'}active{/if}" id="customers_menu">
<a href="{url path='/admin/customers'}">{intl l="Customers"}</a>
</li>
{/loop}
{loop name="menu-auth-customer" type="auth" roles="ADMIN" permissions="admin.customers.view"}
<li class="{if $admin_current_location == 'customer'}active{/if}" id="customers_menu">
<a href="{url path='/admin/customers'}">{intl l="Customers"}</a>
</li>
{loop name="menu-auth-order" type="auth" roles="ADMIN" permissions="admin.orders.view"}
<li class="dropdown {if $admin_current_location == 'customer'}active{/if}" id="orders_menu" data-toggle="dropdown">
<a href="#">{intl l="Orders"} <span class="caret"></span></a>
<ul class="dropdown-menu config_menu" role="menu">
<li role="menuitem"><a data-target="{url path='admin/orders'}" href="{url path='admin/orders'}">
{intl l="All orders"}
<span class="badge badge-important">{count type="order"}</span></a>
</li>
{loop name="order-status-list" type="order-status"}
<li role="menuitem">
<a data-target="{url path='admin/orders/$LABEL'}" href="{url path='admin/orders/$LABEL'}">
{$LABEL} <span class="badge badge-important">{count type="order" status="{$ID}"}</span>
</a>
</li>
{/loop}
</ul>
</li>
{/loop}
{loop name="menu-auth-catalog" type="auth" roles="ADMIN" permissions="admin.catalog.view"}
<li class="{if $admin_current_location == 'catalog'}active{/if}" id="catalog_menu">
<a href="{url path='/admin/catalog'}">{intl l="Catalog"}</a>
</li>
{/loop}
{loop name="menu-auth-content" type="auth" roles="ADMIN" permissions="admin.folders.view"}
<li class="{if $admin_current_location == 'folder'}active{/if}" id="folders_menu">
<a href="{url path='/admin/folders'}">{intl l="Folders"}</a>
</li>
{/loop}
{loop name="menu-auth-coupon" type="auth" roles="ADMIN" permissions="admin.coupon.view"}
<li class="{if $admin_current_location == 'coupon'}active{/if}" id="coupon_menu">
<a href="{url path='/admin/coupon/'}">{intl l="Coupons"}</a>
</li>
{/loop}
{loop name="menu-auth-config" type="auth" roles="ADMIN" permissions="admin.config.view"}
<li class="{if $admin_current_location == 'configuration'}active{/if}" id="config_menu">
<a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a>
</li>
{/loop}
{loop name="menu-auth-modules" type="auth" roles="ADMIN" permissions="admin.modules.view"}
<li class="{if $admin_current_location == 'modules'}active{/if}" id="modules_menu">
<a href="{url path='/admin/modules'}">{intl l="Modules"}</a>
</li>
{module_include location='in_top_menu_items'}
{/loop}
</ul>
{loop name="top-bar-search" type="auth" roles="ADMIN" permissions="admin.search"}
<form class="navbar-form pull-right hidden-xs" action="{url path='/admin/search'}">
<div class="form-group">
<input type="text" class="form-control" id="search_term" name="search_term" placeholder="{intl l='Search'}">
</div>
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
</form>
{/loop}
{loop name="menu-auth-order" type="auth" roles="ADMIN" permissions="admin.orders.view"}
<li class="dropdown {if $admin_current_location == 'customer'}active{/if}" id="orders_menu" data-toggle="dropdown">
<a href="#">{intl l="Orders"} <span class="caret"></span></a>
<ul class="dropdown-menu config_menu" role="menu">
<li role="menuitem"><a data-target="{url path='admin/orders'}" href="{url path='admin/orders'}">
{intl l="All orders"}
<span class="badge badge-important">{count type="order"}</span></a>
</li>
{loop name="order-status-list" type="order-status"}
<li role="menuitem">
<a data-target="{url path='admin/orders/$LABEL'}" href="{url path='admin/orders/$LABEL'}">
{$LABEL} <span class="badge badge-important">{count type="order" status="{$ID}"}</span>
</a>
</li>
{/loop}
</ul>
</li>
{/loop}
{loop name="menu-auth-catalog" type="auth" roles="ADMIN" permissions="admin.catalog.view"}
<li class="{if $admin_current_location == 'catalog'}active{/if}" id="catalog_menu">
<a href="{url path='/admin/catalog'}">{intl l="Catalog"}</a>
</li>
{/loop}
{loop name="menu-auth-content" type="auth" roles="ADMIN" permissions="admin.folders.view"}
<li class="{if $admin_current_location == 'folder'}active{/if}" id="folders_menu">
<a href="{url path='/admin/folders'}">{intl l="Folders"}</a>
</li>
{/loop}
{loop name="menu-auth-coupon" type="auth" roles="ADMIN" permissions="admin.coupon.view"}
<li class="{if $admin_current_location == 'coupon'}active{/if}" id="coupon_menu">
<a href="{url path='/admin/coupon/'}">{intl l="Coupons"}</a>
</li>
{/loop}
{loop name="menu-auth-config" type="auth" roles="ADMIN" permissions="admin.config.view"}
<li class="{if $admin_current_location == 'configuration'}active{/if}" id="config_menu">
<a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a>
</li>
{/loop}
{loop name="menu-auth-modules" type="auth" roles="ADMIN" permissions="admin.modules.view"}
<li class="{if $admin_current_location == 'modules'}active{/if}" id="modules_menu">
<a href="{url path='/admin/modules'}">{intl l="Modules"}</a>
</li>
{module_include location='in_top_menu_items'}
{/loop}
</ul>
{loop name="top-bar-search" type="auth" roles="ADMIN" permissions="admin.search"}
<form class="navbar-form pull-right" action="{url path='/admin/search'}">
<div class="form-group">
<input type="text" class="form-control" id="search_term" name="search_term" placeholder="{intl l='Search'}">
</div>
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
</form>
{/loop}
</div>
</div>
</div>
</div>
</nav>

View File

@@ -25,7 +25,8 @@
{/elseloop}
</div>
<table class="table table-striped table-condensed table-left-aligned">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
@@ -72,7 +73,7 @@
{/elseloop}
</tbody>
</table>
</div>
{* Delete value confirmation dialog *}
{capture "delete_attribute_dialog"}

View File

@@ -25,7 +25,8 @@
{/elseloop}
</div>
<table class="table table-striped table-condensed table-left-aligned">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
@@ -72,6 +73,7 @@
{/elseloop}
</tbody>
</table>
</div>
{* Delete value confirmation dialog *}

View File

@@ -0,0 +1,11 @@
@media (max-width: @screen-desktop) {
.navbar-form{
width: 100%;
.form-group{
width: 94%;
}
}
}

View File

@@ -30,4 +30,8 @@
.navbar-default .navbar-toggle .icon-bar{
background-color: @btn-primary-color;
}
.navbar-form{
padding: 0;
}

View File

@@ -1,3 +1,22 @@
// Baseline styles
.table {
// Cells
thead,
tbody,
tfoot {
> tr {
> th,
> td {
vertical-align: middle;
}
}
}
}
tfoot{
.pagination{

View File

@@ -2,6 +2,7 @@
@import "navbar.less";
@import "scaffolding.less";
@import "type.less";
@import "grid.less";
@import "breadcrumbs.less";
@import "forms.less";
@import "datepicker.less";

View File

@@ -77,95 +77,97 @@
<div class="alert alert-info">
{intl l="Enter here all possible attribute values."}
</div>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>
{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'}"
}
</th>
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>
{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'}"
}
</th>
<th>
{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'}"
}
</th>
<th>
{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'}"
}
</th>
<th class="text-center">
{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"}"
}
</th>
<th class="text-center">
{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"}"
}
</th>
{module_include location='attributes_value_table_header'}
{module_include location='attributes_value_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="list" type="attribute_availability" attribute=$attribute_id backend_context="1" lang=$edit_language_id order=$attributeav_order}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="list" type="attribute_availability" attribute=$attribute_id backend_context="1" lang=$edit_language_id order=$attributeav_order}
<tr>
<td>{$ID}</td>
<td>
{* FIXME : integrate this in the encolsing form to provide standard form processing *}
<input class="js-edit form-control" type="text" name="attribute_values[{$ID}]" value="{$TITLE}" />
</td>
<td>
{* FIXME : integrate this in the encolsing form to provide standard form processing *}
<input class="js-edit form-control" type="text" name="attribute_values[{$ID}]" value="{$TITLE}" />
</td>
<td class="text-center">
{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"
}
</td>
<td class="text-center">
{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"
}
</td>
{module_include location='attributes_value_table_row'}
{module_include location='attributes_value_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attribute-av.delete"}
<a class="btn btn-default btn-xs value-delete" title="{intl l='Delete this value'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attribute-av.delete"}
<a class="btn btn-default btn-xs value-delete" title="{intl l='Delete this value'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No value has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No value has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>
{/form}

View File

@@ -21,117 +21,119 @@
<div class="col-md-12">
<form action="#" method="post">
<div class="general-block-decorator">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia product attributes'}
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia product attributes'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attributes.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product attribute'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/attributes'
label="{intl l='ID'}"
}
</th>
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attributes.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product attribute'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/attributes'
label="{intl l='ID'}"
}
</th>
<th>
{admin_sortable_header
current_order=$order
order='alpha'
reverse_order='alpha_reverse'
path='/admin/configuration/attributes'
label="{intl l='Title'}"
}
</th>
<th>
{admin_sortable_header
current_order=$order
order='alpha'
reverse_order='alpha_reverse'
path='/admin/configuration/attributes'
label="{intl l='Title'}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='manual'
reverse_order='manual_reverse'
path='/admin/configuration/attributes'
label="{intl l="Position"}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='manual'
reverse_order='manual_reverse'
path='/admin/configuration/attributes'
label="{intl l="Position"}"
}
</th>
{module_include location='attributes_table_header'}
{module_include location='attributes_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="list" type="attribute" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="list" type="attribute" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
<a title="{intl l='Change this attribute'}" href="{url path='/admin/configuration/attributes/update' attribute_id=$ID}">{$TITLE}</a>
{/loop}
{elseloop rel="can_change"}
{$TITLE}
{/elseloop}
</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
<a title="{intl l='Change this attribute'}" href="{url path='/admin/configuration/attributes/update' attribute_id=$ID}">{$TITLE}</a>
{/loop}
{elseloop rel="can_change"}
{$TITLE}
{/elseloop}
</td>
<td class="text-center">
{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"
}
</td>
<td class="text-center">
{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"
}
</td>
{module_include location='attributes_table_row'}
{module_include location='attributes_table_row'}
<td class="actions">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
<div class="btn-group">
<a class="btn btn-default btn-xs attribute-remove-from-all" title="{intl l='Remove this attribute from all product templates'}" href="#remove_from_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-minus"></span>
</a>
<a class="btn btn-default btn-xs attribute-add-to-all" title="{intl l='Add this attribute to all product templates'}" href="#add_to_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-plus"></span>
</a>
</div>
{/loop}
<td class="actions">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
<div class="btn-group">
<a class="btn btn-default btn-xs attribute-remove-from-all" title="{intl l='Remove this attribute from all product templates'}" href="#remove_from_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-minus"></span>
</a>
<a class="btn btn-default btn-xs attribute-add-to-all" title="{intl l='Add this attribute to all product templates'}" href="#add_to_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-plus"></span>
</a>
</div>
{/loop}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
<a class="btn btn-default btn-xs attribute-change" title="{intl l='Change this product attribute'}" href="{url path='/admin/configuration/attributes/update' attribute_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
<a class="btn btn-default btn-xs attribute-change" title="{intl l='Change this product attribute'}" href="{url path='/admin/configuration/attributes/update' attribute_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.delete"}
<a class="btn btn-default btn-xs attribute-delete" title="{intl l='Delete this product attribute'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.delete"}
<a class="btn btn-default btn-xs attribute-delete" title="{intl l='Delete this product attribute'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No product attribute has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No product attribute has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>
</div>

View File

@@ -15,163 +15,164 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<table class="table table-striped table-condensed" id="category_list">
<caption>
{* 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"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new category'}" href="#category_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{ifloop rel="category_list"}
<thead>
<tr>
<th class="object-title">
{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'}"
}
</th>
<th class="object-image">&nbsp;</th>
<th class="object-title">
{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'}"
}
</th>
{module_include location='category_list_header'}
<th>
{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'}"
}
</th>
<th>
{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'}"
}
</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="category_list" type="category" visible="*" parent=$category_id order=$category_order backend_context="1" lang=$lang_id}
<tr>
<td>{$ID}</td>
<td>
{loop type="image" name="cat_image" source="category" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='admin/catalog' category_id=$ID}" title="{intl l='Browse this category'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
{/loop}
</td>
<td class="object-title">
<a href="{url path='admin/catalog' category_id=$ID}" title="{intl l='Browse this category'}">
{$TITLE}
</a>
</td>
{module_include location='category_list_row'}
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"}
<div class="make-switch switch-small categoryVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="categoryVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed" id="category_list">
<caption>
{* 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"}
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{elseloop rel="category_title"}
{intl l="Top level categories"}
{/elseloop}
</td>
<td>
{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
}
</td>
{module_include location='category_list_caption'}
<td class="actions">
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Browse this category'}" href="{url path='admin/categories' category_id=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this category'}" href="{url path='/admin/categories/update' category_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.categories.delete"}
<a class="btn btn-default btn-xs category-delete" title="{intl l='Delete this category and all its contents'}" href="#category_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{elseloop rel="category_list"}
<thead>
<tr>
<td class="message">
<div class="alert alert-info">
{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."}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new category'}" href="#category_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{elseloop rel="can_create"}
{intl l="This category has no sub-categories."}
{/elseloop}
</div>
</td>
</tr>
</thead>
{/elseloop}
</table>
{ifloop rel="category_list"}
<thead>
<tr>
<th class="object-title">
{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'}"
}
</th>
<th class="object-image">&nbsp;</th>
<th class="object-title">
{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'}"
}
</th>
{module_include location='category_list_header'}
<th>
{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'}"
}
</th>
<th>
{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'}"
}
</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="category_list" type="category" visible="*" parent=$category_id order=$category_order backend_context="1" lang=$lang_id}
<tr>
<td>{$ID}</td>
<td>
{loop type="image" name="cat_image" source="category" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='admin/catalog' category_id=$ID}" title="{intl l='Browse this category'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
{/loop}
</td>
<td class="object-title">
<a href="{url path='admin/catalog' category_id=$ID}" title="{intl l='Browse this category'}">
{$TITLE}
</a>
</td>
{module_include location='category_list_row'}
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"}
<div class="make-switch switch-small categoryVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="categoryVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/loop}
{elseloop rel="can_change"}
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/elseloop}
</td>
<td>
{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
}
</td>
<td class="actions">
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Browse this category'}" href="{url path='admin/categories' category_id=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this category'}" href="{url path='/admin/categories/update' category_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.categories.delete"}
<a class="btn btn-default btn-xs category-delete" title="{intl l='Delete this category and all its contents'}" href="#category_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{elseloop rel="category_list"}
<thead>
<tr>
<td class="message">
<div class="alert alert-info">
{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}
</div>
</td>
</tr>
</thead>
{/elseloop}
</table>
</div>
</div>
</div>
</div>
@@ -181,7 +182,7 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption>
{* display parent category name *}
@@ -266,14 +267,14 @@
<td>
{loop type="image" name="cat_image" source="product" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='admin/product/edit' id=$ID}" title="{intl l='Edit this product'}">
<a href="{url path='/admin/products/update' product_id=$ID}" title="{intl l='Edit this product'}">
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
</a>
{/loop}
<td class="object-title"><a href="{url path="/admin/product/update/$ID"}" title="{intl l='Edit this product'}">{$REF}</a></td>
<td class="object-title"><a href="{url path='/admin/products/update' product_id=$ID}" title="{intl l='Edit this product'}">{$REF}</a></td>
<td class="object-title"><a href="{url path="/admin/product/update/$ID"}" title="{intl l='Edit this product'}">{$TITLE}</a></td>
<td class="object-title"><a href="{url path='/admin/products/update' product_id=$ID}" title="{intl l='Edit this product'}">{$TITLE}</a></td>
{module_include location='product_list_row'}
@@ -305,7 +306,7 @@
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.product.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this product'}" href="{url path="admin/product/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
<a class="btn btn-default btn-xs" title="{intl l='Edit this product'}" href="{url path='/admin/products/update' product_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.product.delete"}
@@ -326,8 +327,7 @@
</thead>
{/elseloop}
</table>
</div>
</div>
</div>
</div>

View File

@@ -40,24 +40,23 @@
<div class="col-md-12">
<ul class="nav nav-tabs" id="tabbed-menu">
<li class="active"><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
<li><a href="#details" data-toggle="tab">{intl l="Details"}</a></li>
<li><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
<li><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
<li><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
<li {if $current_tab == 'general'}class="active"{/if}><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
<li {if $current_tab == 'details'}class="active"{/if}><a href="#details" data-toggle="tab">{intl l="Details"}</a></li>
<li {if $current_tab == 'images'}class="active"{/if}><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
<li {if $current_tab == 'documents'}class="active"{/if}><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
<li {if $current_tab == 'modules'}class="active"{/if}><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane fade active in" id="general">
<div class="tab-pane fade {if $current_tab == 'general'}active in{/if}" id="general">
<div class="form-container">
{form name="thelia.admin.category.modification"}
<form method="POST" action="{url path='/admin/categories/save'}" {form_enctype form=$form} class="clearfix">
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/categories' category_id=$category_id}"}
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/categories' category_id=$PARENT}"}
{* Be sure to get the category ID, even if the form could not be validated *}
<input type="hidden" name="category_id" value="{$category_id}" />
@@ -141,7 +140,7 @@
</div>
</div>
<div class="tab-pane fade" id="details">
<div class="tab-pane fade {if $current_tab == 'details'}active in{/if}" id="details">
<div class="form-container">
<div class="form-group">
<form action="{url path='/admin/categories/related-content/add'}" id="related_content_form">
@@ -149,9 +148,12 @@
{include
file="includes/inner-form-toolbar.html"
hide_submit_buttons=true
close_url="{url path='/admin/categories' category_id=$category_id}"
close_url="{url path='/admin/categories' category_id=$PARENT}"
}
<p class="title title-without-tabs">{intl l='Related content'}</p>
<p>{intl l='You can attach here some content to this product'}</p>
<input type="hidden" name="category_id" value="{$category_id}" />
<input type="hidden" name="current_tab" value="details" />
@@ -162,8 +164,8 @@
<div class="form-group">
<select name="folder_id" id="folder_id" class="form-control">
<option value="">Select a folder...</option>
{loop name="folders" type="folder" backend_context="1" lang="$edit_language_id"}
<option value="{$ID}">{$TITLE}</option>
{loop name="folders" type="folder-tree" folder="0" backend_context="1" lang="$edit_language_id"}
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
{/loop}
</select>
</div>
@@ -183,6 +185,12 @@
<span class="help-block">{intl l='Select a content and click (+) to add it to this category'}</span>
</div>
<div id="content_selector_empty" class="hide">
<div class="alert alert-info">
{intl l="No available content in this folder"}
</div>
</div>
</div>
</div>
@@ -195,63 +203,65 @@
</form>
</div>
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
<th>{intl l='Attribute title'}</th>
<th>{intl l='Content title'}</th>
{module_include location='category_contents_table_header'}
{module_include location='category_contents_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="assigned_contents" type="associated_content" category="$category_id" backend_context="1" lang="$edit_language_id"}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="assigned_contents" type="associated_content" category="$category_id" backend_context="1" lang="$edit_language_id"}
<tr>
<td>{$ID}</td>
<td>
{$TITLE}
</td>
<td>
{$TITLE}
</td>
{module_include location='category_contents_table_row'}
{module_include location='category_contents_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.category.content.delete"}
<a class="btn btn-default btn-xs delete-content" title="{intl l='Delete this content'}" href="#delete_content_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.category.content.delete"}
<a class="btn btn-default btn-xs delete-content" title="{intl l='Delete this content'}" href="#delete_content_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="assigned_contents"}
<tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="This category contains no contents"}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
{elseloop rel="assigned_contents"}
<tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="This category contains no contents"}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</div>
<div class="tab-pane fade" id="images">
<div class="tab-pane fade {if $current_tab == 'images'}active in{/if}" id="images">
</div>
<div class="tab-pane fade" id="documents">
<div class="tab-pane fade {if $current_tab == 'documents'}active in{/if}" id="documents">
</div>
<div class="tab-pane fade" id="modules">
<div class="tab-pane fade {if $current_tab == 'modules'}active in{/if}" id="modules">
</div>
</div>
</div>
@@ -287,7 +297,7 @@
{block name="javascript-initialization"}
<script src="/web/tinymce/tinymce.min.js"></script>
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
<script>
tinymce.init({
selector: ".wysiwyg",
@@ -301,9 +311,9 @@
],
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect | filemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
image_advtab: true ,
external_filemanager_path:"/web/tinymce/plugins/filemanager/",
external_filemanager_path:"{url file='/tinymce/plugins/filemanager/'}'",
filemanager_title:"{intl l='Files manager'}" ,
external_plugins: { "filemanager" : "/web/tinymce/plugins/filemanager/plugin.min.js"}
external_plugins: { "filemanager" : "{url file='/tinymce/plugins/filemanager/plugin.min.js'}"}
});
</script>
@@ -317,12 +327,6 @@ $(function() {
ev.preventDefault();
});
// Show proper tab, if defined
{if ! empty($current_tab)}
$('#tabbed-menu a[href="#{$current_tab}"]').tab('show')
{/if}
// Set proper content ID in delete content from
$('a.delete-content').click(function(ev) {
$('#content_delete_id').val($(this).data('id'));
@@ -331,28 +335,41 @@ $(function() {
// Load content on folder selection
$('#folder_id').change(function(event) {
$.ajax({
url : '{url path="/admin/category/$category_id/available-related-content/"}' + $(this).val() + '.xml',
type : 'get',
dataType : 'json',
success : function(json) {
$('#content_id :not(:first-child)').remove();
var have_content = false;
var val = $(this).val();
$.each(json, function(idx, value) {
$('#content_id').append($('<option>').text(value.title).attr('value', value.id));
if (val != "") {
$.ajax({
url : '{url path="/admin/category/$category_id/available-related-content/"}' + val + '.xml',
type : 'get',
dataType : 'json',
success : function(json) {
$('#content_id :not(:first-child)').remove();
have_content = true; // Lame...
});
var have_content = false;
if (have_content)
$('#content_selector').removeClass('hide');
else
$('#content_selector').addClass('hide');
$.each(json, function(idx, value) {
$('#content_id').append($('<option>').text(value.title).attr('value', value.id));
}
});
have_content = true; // Lame...
});
if (have_content) {
$('#content_selector_empty').addClass('hide');
$('#content_selector').removeClass('hide');
}
else {
$('#content_selector_empty').removeClass('hide');
$('#content_selector').addClass('hide');
}
}
});
}
else {
$('#content_selector_empty').addClass('hide');
$('#content_selector').addClass('hide');
}
});
// Initialize folder (id={$folder_id}) select value

View File

@@ -17,151 +17,156 @@
<div class="col-md-4">
<div class="menu-list-table general-block-decorator">
<table class="table table-striped table-condensed">
<caption>{intl l='Product catalog configuration'}</caption>
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption>{intl l='Product catalog configuration'}</caption>
{module_include location='catalog_configuration_top'}
{module_include location='catalog_configuration_top'}
{loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.templates"}
<tr>
<td><a href="{url path='/admin/configuration/templates'}">{intl l='Product templates'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/templates'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.templates"}
<tr>
<td><a href="{url path='/admin/configuration/templates'}">{intl l='Product templates'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/templates'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.attributes"}
<tr>
<td><a href="{url path='/admin/configuration/attributes'}">{intl l='Product attributes'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/attributes'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.attributes"}
<tr>
<td><a href="{url path='/admin/configuration/attributes'}">{intl l='Product attributes'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/attributes'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.features"}
<tr>
<td><a href="{url path='/admin/configuration/features'}">{intl l='Product features'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/features'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.features"}
<tr>
<td><a href="{url path='/admin/configuration/features'}">{intl l='Product features'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/features'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc4" roles="ADMIN" permissions="admin.configuration.messages"}
<tr>
<td><a href="{url path='/admin/configuration/messages'}">{intl l='Mailing templates'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/messages'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc4" roles="ADMIN" permissions="admin.configuration.messages"}
<tr>
<td><a href="{url path='/admin/configuration/messages'}">{intl l='Mailing templates'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/messages'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc5" roles="ADMIN" permissions="admin.configuration.currencies"}
<tr>
<td><a href="{url path='/admin/configuration/currencies'}">{intl l='Currencies'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/currencies'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc5" roles="ADMIN" permissions="admin.configuration.currencies"}
<tr>
<td><a href="{url path='/admin/configuration/currencies'}">{intl l='Currencies'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/currencies'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{module_include location='catalog_configuration_bottom'}
</table>
{module_include location='catalog_configuration_bottom'}
</table>
</div>
</div>
</div>
<div class="col-md-4">
<div class="menu-list-table general-block-decorator">
<table class="table table-striped table-condensed">
<caption>{intl l='Shipping configuration'}</caption>
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption>{intl l='Shipping configuration'}</caption>
{module_include location='shipping_configuration_top'}
{module_include location='shipping_configuration_top'}
{loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.contries"}
<tr>
<td><a href="{url path='/admin/configuration/countries'}">{intl l='Countries'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/countries'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.contries"}
<tr>
<td><a href="{url path='/admin/configuration/countries'}">{intl l='Countries'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/countries'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.shipping_zones"}
<tr>
<td><a href="{url path='/admin/configuration/shipping_zones'}">{intl l='Shipping zones'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/shipping_zones'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.shipping_zones"}
<tr>
<td><a href="{url path='/admin/configuration/shipping_zones'}">{intl l='Shipping zones'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/shipping_zones'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.shipping_configuration"}
<tr>
<td><a href="{url path='/admin/configuration/shipping_configuration'}">{intl l='Shipping configuration'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/shipping_configuration'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.shipping_configuration"}
<tr>
<td><a href="{url path='/admin/configuration/shipping_configuration'}">{intl l='Shipping configuration'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/shipping_configuration'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{module_include location='shipping_configuration_bottom'}
{module_include location='shipping_configuration_bottom'}
</table>
</table>
</div>
</div>
</div>
<div class="col-md-4">
<div class="menu-list-table general-block-decorator">
<table class="table table-striped table-condensed">
<caption>{intl l='System parameters'}</caption>
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption>{intl l='System parameters'}</caption>
{module_include location='system_configuration_top'}
{module_include location='system_configuration_top'}
{loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.modules"}
<tr>
<td><a href="{url path='/admin/configuration/modules'}">{intl l='Modules activation'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/modules'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.modules"}
<tr>
<td><a href="{url path='/admin/configuration/modules'}">{intl l='Modules activation'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/modules'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.variables"}
<tr>
<td><a href="{url path='/admin/configuration/variables'}">{intl l='System variables'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/variables'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.variables"}
<tr>
<td><a href="{url path='/admin/configuration/variables'}">{intl l='System variables'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/variables'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.admin_profiles"}
<tr>
<td><a href="{url path='/admin/configuration/admin_profiles'}">{intl l='Back-office profiles'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/admin_profiles'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.admin_profiles"}
<tr>
<td><a href="{url path='/admin/configuration/admin_profiles'}">{intl l='Back-office profiles'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/admin_profiles'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc4" roles="ADMIN" permissions="admin.configuration.admin_users"}
<tr>
<td><a href="{url path='/admin/configuration/admin_users'}">{intl l='Back-office users'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/admin_users'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc4" roles="ADMIN" permissions="admin.configuration.admin_users"}
<tr>
<td><a href="{url path='/admin/configuration/admin_users'}">{intl l='Back-office users'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/admin_users'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc5" roles="ADMIN" permissions="admin.configuration.languages"}
<tr>
<td><a href="{url path='/admin/configuration/languages'}">{intl l='Languages &amp; URLs'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/languages'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc5" roles="ADMIN" permissions="admin.configuration.languages"}
<tr>
<td><a href="{url path='/admin/configuration/languages'}">{intl l='Languages &amp; URLs'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/languages'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc6" roles="ADMIN" permissions="admin.configuration.mailing_system"}
<tr>
<td><a href="{url path='/admin/configuration/mailing_system'}">{intl l='Mailing system'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/mailing_system'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc6" roles="ADMIN" permissions="admin.configuration.mailing_system"}
<tr>
<td><a href="{url path='/admin/configuration/mailing_system'}">{intl l='Mailing system'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/mailing_system'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc7" roles="ADMIN" permissions="admin.configuration.admin_logs"}
<tr>
<td><a href="{url path='/admin/configuration/admin_logs'}">{intl l='Administration logs'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/admin_logs'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc7" roles="ADMIN" permissions="admin.configuration.admin_logs"}
<tr>
<td><a href="{url path='/admin/configuration/admin_logs'}">{intl l='Administration logs'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/admin_logs'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc8" roles="ADMIN" permissions="admin.configuration.system_logs"}
<tr>
<td><a href="{url path='/admin/configuration/system_logs'}">{intl l='System logs'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/system_logs'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc8" roles="ADMIN" permissions="admin.configuration.system_logs"}
<tr>
<td><a href="{url path='/admin/configuration/system_logs'}">{intl l='System logs'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/system_logs'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{module_include location='system_configuration_bottom'}
</table>
{module_include location='system_configuration_bottom'}
</table>
</div>
</div>
</div>

View File

@@ -23,80 +23,80 @@
<form action="" method="post">
<div class="general-block-decorator">
<table class="table table-striped table-condensed">
<caption class="clearfix">
{intl l='Countries'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.countries.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new country'}" href="#add_country_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Default</th>
<th>Shop</th>
<th>N° ISO</th>
<th>ISO Code</th>
{module_include location='countries_table_header'}
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="countries" type="country" backend_context="1" lang=$lang_id order=$order}
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption class="clearfix">
{intl l='Countries'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.countries.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new country'}" href="#add_country_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<td>{$ID}</td>
<td>{$TITLE}</td>
<td>
<div class="make-switch switch-small switch-radio" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input class="change-default" type="radio" name="" value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}/>
</div>
</td>
<td>
<div class="make-switch switch-small switch-radio" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input class="change-default" type="radio" name="" value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}/>
</div>
</td>
<td>{$ISOCODE}</td>
<td>{$ISOALPHA3}</td>
<th>ID</th>
<th>Name</th>
<th>Default</th>
<th>Shop</th>
<th>N° ISO</th>
<th>ISO Code</th>
{module_include location='countries_table_row'}
{module_include location='countries_table_header'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.countries.change"}
<a class="btn btn-default btn-xs country-change" title="{intl l='Change this country'}" href="{url path="/admin/configuration/countries/update/{$ID}"}">
<span class="glyphicon glyphicon-edit"></span>
</a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.countries.delete"}
<a class="btn btn-default btn-xs country-delete" title="{intl l='Delete this country'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
<th class="actions">{intl l='Actions'}</th>
</tr>
{/loop}
{elseloop rel="countries"}
<tr>
<td colspan="8">
<div class="alert alert-info">
{intl l="No country has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</thead>
<tbody>
{loop name="countries" type="country" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<td>{$TITLE}</td>
<td>
<div class="make-switch switch-small switch-radio" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input class="change-default" type="radio" name="" value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}/>
</div>
</td>
<td>
<div class="make-switch switch-small switch-radio" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input class="change-default" type="radio" name="" value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}/>
</div>
</td>
<td>{$ISOCODE}</td>
<td>{$ISOALPHA3}</td>
{module_include location='countries_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.countries.change"}
<a class="btn btn-default btn-xs country-change" title="{intl l='Change this country'}" href="{url path="/admin/configuration/countries/update/{$ID}"}">
<span class="glyphicon glyphicon-edit"></span>
</a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.countries.delete"}
<a class="btn btn-default btn-xs country-delete" title="{intl l='Delete this country'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="countries"}
<tr>
<td colspan="8">
<div class="alert alert-info">
{intl l="No country has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>

View File

@@ -22,73 +22,77 @@
<section class="row">
<div class="col-md-12 general-block-decorator">
<table class="table table-striped tablesorter">
<caption>
{intl l='Enabled coupons'}
</caption>
<thead>
<tr>
<th>{block name="coupon-label-code"}{intl l='Code'}{/block}</th>
<th>{block name="coupon-label-title"}{intl l='Title'}{/block}</th>
<th>{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}</th>
<th>{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}</th>
<th class="sorter-false filter-false">{block name="coupon-label-action"}{/block}</th>
</tr>
</thead>
<tbody>
{loop type="coupon" name="list_coupon" is_enabled="1" backend_context="true"}
<tr>
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'couponId':$ID}">{$CODE}</a>{/block}</td>
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
<td>{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}</td>
<td>{block name="coupon-usage-left"}{$USAGE_LEFT}{/block}</td>
<td>
{block name="coupon-action"}
<a href="{$urlEditCoupon|replace:'couponId':$ID}" class="btn btn-default btn-primary btn-medium">
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
</a>
{/block}
</td>
</tr>
{/loop}
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped tablesorter">
<caption>
{intl l='Enabled coupons'}
</caption>
<thead>
<tr>
<th>{block name="coupon-label-code"}{intl l='Code'}{/block}</th>
<th>{block name="coupon-label-title"}{intl l='Title'}{/block}</th>
<th>{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}</th>
<th>{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}</th>
<th class="sorter-false filter-false">{block name="coupon-label-action"}{/block}</th>
</tr>
</thead>
<tbody>
{loop type="coupon" name="list_coupon" is_enabled="1" backend_context="true"}
<tr>
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'couponId':$ID}">{$CODE}</a>{/block}</td>
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
<td>{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}</td>
<td>{block name="coupon-usage-left"}{$USAGE_LEFT}{/block}</td>
<td>
{block name="coupon-action"}
<a href="{$urlEditCoupon|replace:'couponId':$ID}" class="btn btn-default btn-primary btn-medium">
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
</a>
{/block}
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
</section>
<section class="row">
<div class="col-md-12 general-block-decorator">
<table class="table table-striped tablesorter">
<caption>
{intl l='Disabled coupons'}
</caption>
<thead>
<tr>
<th>{block name="coupon-label-code"}{intl l='Code'}{/block}</th>
<th>{block name="coupon-label-title"}{intl l='Title'}{/block}</th>
<th>{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}</th>
<th>{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}</th>
<th class="sorter-false filter-false">{block name="coupon-label-action"}{/block}</th>
</tr>
</thead>
<tbody>
{loop type="coupon" name="list_coupon" is_enabled="0" backend_context="true"}
<tr>
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'couponId':$ID}">{$CODE}</a>{/block}</td>
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
<td>{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}</td>
<td>{block name="coupon-usage-left"}{$USAGE_LEFT}{/block}</td>
<td>
{block name="coupon-action"}
<a href="{$urlEditCoupon|replace:'couponId':$ID}" class="btn btn-default btn-primary btn-medium">
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
</a>
{/block}
</td>
</tr>
{/loop}
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped tablesorter">
<caption>
{intl l='Disabled coupons'}
</caption>
<thead>
<tr>
<th>{block name="coupon-label-code"}{intl l='Code'}{/block}</th>
<th>{block name="coupon-label-title"}{intl l='Title'}{/block}</th>
<th>{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}</th>
<th>{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}</th>
<th class="sorter-false filter-false">{block name="coupon-label-action"}{/block}</th>
</tr>
</thead>
<tbody>
{loop type="coupon" name="list_coupon" is_enabled="0" backend_context="true"}
<tr>
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'couponId':$ID}">{$CODE}</a>{/block}</td>
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
<td>{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}</td>
<td>{block name="coupon-usage-left"}{$USAGE_LEFT}{/block}</td>
<td>
{block name="coupon-action"}
<a href="{$urlEditCoupon|replace:'couponId':$ID}" class="btn btn-default btn-primary btn-medium">
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
</a>
{/block}
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
</section>

View File

@@ -27,120 +27,122 @@
{intl l='This coupon is disabled, you can enable to the bottom of this form.'}
</div>
{/if}
<table class="table table-striped">
<tbody>
<tr>
<td>{intl l='Title'}</td>
<td>{$TITLE}</td>
</tr>
<tr>
<td colspan="2">
{if $IS_ENABLED}
<span class="label label-success">
{intl l="Is enabled"}
</span>
{else}
<span class="label label-warning">
{intl l="Is disabled"}
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{$TOOLTIP}
</td>
</tr>
<tr>
<td>{intl l='Amount'}</td>
<td>{$AMOUNT}</td>
</tr>
<tr>
<td>{intl l='Expiration date'}</td>
<td>{$EXPIRATION_DATE} ({$DAY_LEFT_BEFORE_EXPIRATION} {intl l="days left"})</td>
</tr>
<tr>
<td>{intl l='Usage left'}</td>
<td>
{if $USAGE_LEFT}
<span class="label label-success">
{$USAGE_LEFT}
</span>
{else}
<span class="label label-warning">
0
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{if $IS_CUMULATIVE}
<span class="label label-success">
{intl l="May be cumulative"}
</span>
{else}
<span class="label label-warning">
{intl l="Can't be cumulative"}
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{if $IS_REMOVING_POSTAGE}
<span class="label label-warning">
{intl l="Will remove postage"}
</span>
{else}
<span class="label label-success">
{intl l="Won't remove postage"}
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{if $IS_AVAILABLE_ON_SPECIAL_OFFERS}
<span class="label label-warning">
{intl l="Will be available on special offers"}
</span>
{else}
<span class="label label-success">
{intl l="Won't be available on special offers"}
</span>
{/if}
</td>
</tr>
<tr>
<td>{intl l='Application field'}</td>
<td>
<ul class="list-unstyled">
{foreach from=$APPLICATION_CONDITIONS item=rule name=rulesForeach}
{if !$smarty.foreach.rulesForeach.first}
<li><span class="label label-info">{intl l='And'}</span></li>
{/if}
<li>{$rule nofilter}</li>
{/foreach}
</ul>
</td>
</tr>
<tr>
<td colspan="2">{$SHORT_DESCRIPTION}</td>
</tr>
<tr>
<td colspan="2">{$DESCRIPTION}</td>
</tr>
<tr>
<td colspan="2">
<a href="{$urlEditCoupon}" class="btn btn-default btn-primary btn-medium">
<span class="icon-edit icon-white"></span> {intl l='Edit'}
</a>
</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<td>{intl l='Title'}</td>
<td>{$TITLE}</td>
</tr>
<tr>
<td colspan="2">
{if $IS_ENABLED}
<span class="label label-success">
{intl l="Is enabled"}
</span>
{else}
<span class="label label-warning">
{intl l="Is disabled"}
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{$TOOLTIP}
</td>
</tr>
<tr>
<td>{intl l='Amount'}</td>
<td>{$AMOUNT}</td>
</tr>
<tr>
<td>{intl l='Expiration date'}</td>
<td>{$EXPIRATION_DATE} ({$DAY_LEFT_BEFORE_EXPIRATION} {intl l="days left"})</td>
</tr>
<tr>
<td>{intl l='Usage left'}</td>
<td>
{if $USAGE_LEFT}
<span class="label label-success">
{$USAGE_LEFT}
</span>
{else}
<span class="label label-warning">
0
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{if $IS_CUMULATIVE}
<span class="label label-success">
{intl l="May be cumulative"}
</span>
{else}
<span class="label label-warning">
{intl l="Can't be cumulative"}
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{if $IS_REMOVING_POSTAGE}
<span class="label label-warning">
{intl l="Will remove postage"}
</span>
{else}
<span class="label label-success">
{intl l="Won't remove postage"}
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{if $IS_AVAILABLE_ON_SPECIAL_OFFERS}
<span class="label label-warning">
{intl l="Will be available on special offers"}
</span>
{else}
<span class="label label-success">
{intl l="Won't be available on special offers"}
</span>
{/if}
</td>
</tr>
<tr>
<td>{intl l='Application field'}</td>
<td>
<ul class="list-unstyled">
{foreach from=$APPLICATION_CONDITIONS item=rule name=rulesForeach}
{if !$smarty.foreach.rulesForeach.first}
<li><span class="label label-info">{intl l='And'}</span></li>
{/if}
<li>{$rule nofilter}</li>
{/foreach}
</ul>
</td>
</tr>
<tr>
<td colspan="2">{$SHORT_DESCRIPTION}</td>
</tr>
<tr>
<td colspan="2">{$DESCRIPTION}</td>
</tr>
<tr>
<td colspan="2">
<a href="{$urlEditCoupon}" class="btn btn-default btn-primary btn-medium">
<span class="icon-edit icon-white"></span> {intl l='Edit'}
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</section>
{/loop}

View File

@@ -23,166 +23,166 @@
<form action="{url path='/admin/configuration/currencies/update-rates'}" method="post">
<div class="general-block-decorator">
<table class="table table-striped table-condensed">
<caption class="clearfix">
{intl l='Currencies'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.currencies.create"}
<span class="pull-right">
<button class="btn btn-default btn-info" title="{intl l='Update rates'}">{intl l='Update rates'} <span class="glyphicon glyphicon-globe"></span></button>
<a class="btn btn-default btn-primary" title="{intl l='Add a new currency'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
</span>
{/loop}
</caption>
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/currencies'
label="{intl l='ID'}"
}
</th>
<th>
{admin_sortable_header
current_order=$order
order='name'
reverse_order='name_reverse'
path='/admin/configuration/currencies'
label="{intl l='Name'}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='code'
reverse_order='code_reverse'
path='/admin/configuration/currencies'
label="{intl l="ISO 4217 Code"}"
}
<a title="{intl l='More information about ISO 4217'}" href="http://fr.wikipedia.org/wiki/ISO_4217" target="_blank"><i class="glyphicon glyphicon-question-sign"></i></a>
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='symbol'
reverse_order='symbol_reverse'
path='/admin/configuration/currencies'
label="{intl l="Symbol"}"
}
</th>
<th class="text-right">
{admin_sortable_header
current_order=$order
order='rate'
reverse_order='rate_reverse'
path='/admin/configuration/currencies'
label="{intl l="Rate in &euro;"}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='manual'
reverse_order='manual_reverse'
path='/admin/configuration/currencies'
label="{intl l="Position"}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='is_default'
reverse_order='is_default_reverse'
path='/admin/configuration/currencies'
label="{intl l="Default"}"
}
</th>
{module_include location='currencies_table_header'}
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="currencies" type="currency" backend_context="1" lang=$lang_id order=$order}
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption class="clearfix">
{intl l='Currencies'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.currencies.create"}
<span class="pull-right">
<button class="btn btn-default btn-info" title="{intl l='Update rates'}">{intl l='Update rates'} <span class="glyphicon glyphicon-globe"></span></button>
<a class="btn btn-default btn-primary" title="{intl l='Add a new currency'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
</span>
{/loop}
</caption>
<thead>
<tr>
<td>{$ID}</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"}
<a title="{intl l='Change this currency'}" href="{url path='/admin/configuration/currencies/update' currency_id=$ID}">{$NAME}</a>
{/loop}
{elseloop rel="can_change"}
{$NAME}
{/elseloop}
</td>
<td class="text-center">{$ISOCODE}</td>
<td class="text-center">{$SYMBOL}</td>
<td class="text-right">{format_number number="$RATE" decimals="4"}</td>
<td class="text-center">
{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"
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/currencies'
label="{intl l='ID'}"
}
</td>
</th>
<td class="text-center">
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input class="change-default" type="radio" name="is_default" value="{$ID}" {if $IS_DEFAULT}checked="checked"{/if}/>
</div>
</td>
<th>
{admin_sortable_header
current_order=$order
order='name'
reverse_order='name_reverse'
path='/admin/configuration/currencies'
label="{intl l='Name'}"
}
</th>
{module_include location='currencies_table_row'}
<th class="text-center">
{admin_sortable_header
current_order=$order
order='code'
reverse_order='code_reverse'
path='/admin/configuration/currencies'
label="{intl l="ISO 4217 Code"}"
}
<a title="{intl l='More information about ISO 4217'}" href="http://fr.wikipedia.org/wiki/ISO_4217" target="_blank"><i class="glyphicon glyphicon-question-sign"></i></a>
</th>
<td class="actions">
<div class="btn-group">
<th class="text-center">
{admin_sortable_header
current_order=$order
order='symbol'
reverse_order='symbol_reverse'
path='/admin/configuration/currencies'
label="{intl l="Symbol"}"
}
</th>
<th class="text-right">
{admin_sortable_header
current_order=$order
order='rate'
reverse_order='rate_reverse'
path='/admin/configuration/currencies'
label="{intl l="Rate in &euro;"}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='manual'
reverse_order='manual_reverse'
path='/admin/configuration/currencies'
label="{intl l="Position"}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='is_default'
reverse_order='is_default_reverse'
path='/admin/configuration/currencies'
label="{intl l="Default"}"
}
</th>
{module_include location='currencies_table_header'}
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="currencies" type="currency" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"}
<a class="btn btn-default btn-xs currency-change" title="{intl l='Change this currency'}" href="{url path='/admin/configuration/currencies/update' currency_id="$ID"}">
<span class="glyphicon glyphicon-edit"></span>
</a>
<a title="{intl l='Change this currency'}" href="{url path='/admin/configuration/currencies/update' currency_id=$ID}">{$NAME}</a>
{/loop}
{elseloop rel="can_change"}
{$NAME}
{/elseloop}
</td>
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.currencies.delete"}
<a class="btn btn-default btn-xs currency-delete" title="{intl l='Delete this currency'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="currencies"}
<tr>
<td colspan="8">
<div class="alert alert-info">
{intl l="No currency has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
<td class="text-center">{$ISOCODE}</td>
<td class="text-center">{$SYMBOL}</td>
<td class="text-right">{format_number number="$RATE" decimals="4"}</td>
<td class="text-center">
{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"
}
</td>
<td class="text-center">
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input class="change-default" type="radio" name="is_default" value="{$ID}" {if $IS_DEFAULT}checked="checked"{/if}/>
</div>
</td>
{module_include location='currencies_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"}
<a class="btn btn-default btn-xs currency-change" title="{intl l='Change this currency'}" href="{url path='/admin/configuration/currencies/update' currency_id="$ID"}">
<span class="glyphicon glyphicon-edit"></span>
</a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.currencies.delete"}
<a class="btn btn-default btn-xs currency-delete" title="{intl l='Delete this currency'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="currencies"}
<tr>
<td colspan="8">
<div class="alert alert-info">
{intl l="No currency has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>

View File

@@ -142,52 +142,54 @@
</a>
</span>
</p>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>{intl l="Address"}</th>
<th>{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="address" type="address" customer="$customer_id" backend_context="1" default="0"}
<tr>
<td>
<address>
<strong>{loop name="address.title" type="title" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME} {$LASTNAME}</strong><br>
{$ADDRESS1}<br>
{$ADDRESS2}<br>
{$ADDRESS3}<br>
{if $PHONE}
<abbr title="{intl l="Phone"}">P:</abbr> {$PHONE}<br>
{/if}
{if $CELLPHONE}
<abbr title="{intl l="cell phone"}">P:</abbr> {$CELLPHONE}
{/if}
</address>
</td>
<td>
<div class="btn-group">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>{intl l="Address"}</th>
<th>{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="address" type="address" customer="$customer_id" backend_context="1" default="0"}
<tr>
<td>
<address>
<strong>{loop name="address.title" type="title" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME} {$LASTNAME}</strong><br>
{$ADDRESS1}<br>
{$ADDRESS2}<br>
{$ADDRESS3}<br>
{if $PHONE}
<abbr title="{intl l="Phone"}">P:</abbr> {$PHONE}<br>
{/if}
{if $CELLPHONE}
<abbr title="{intl l="cell phone"}">P:</abbr> {$CELLPHONE}
{/if}
</address>
</td>
<td>
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Edit this address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
<a class="btn btn-default btn-xs" title="{intl l='Edit this address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
<a class="btn btn-default btn-xs" title="{intl l='Use this address by default'}" href="#use_address_dialog" data-toggle="modal" rel="tooltip">
<span class="glyphicon glyphicon-pushpin"></span>
</a>
<a class="btn btn-default btn-xs" title="{intl l='Use this address by default'}" href="#use_address_dialog" data-toggle="modal" rel="tooltip">
<span class="glyphicon glyphicon-pushpin"></span>
</a>
<a class="btn btn-default btn-xs customer-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_address_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
<a class="btn btn-default btn-xs customer-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_address_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</div>
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
</form>

View File

@@ -22,121 +22,123 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<table class="table table-striped table-condensed" id="customer_list">
<caption>
{intl l="Customers list"}
<div class="table-responsive">
<table class="table table-striped table-condensed" id="customer_list">
<caption>
{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"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new Customer'}" href="#add_customer_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.customers.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new Customer'}" href="#add_customer_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{ifloop rel="customer_list"}
<thead>
<tr>
<th class="object-title">
{intl l="customer ref"}
</th>
<th class="object-title">
{intl l="company"}
</th>
{module_include location='category_list_header'}
<th>
{intl l="firstname & lastname"}
</th>
<th>
{intl l="last order"}
</th>
<th>{intl l='order amount'}</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{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"}
<thead>
<tr>
<td>{$REF}</td>
<th class="object-title">
{intl l="customer ref"}
</th>
<td>
{$COMPANY}
</td>
<th class="object-title">
{intl l="company"}
</th>
<td class="object-title">
{$FIRSTNAME} {$LASTNAME}
</td>
{module_include location='category_list_header'}
{module_include location='customer_list_row'}
<th>
{intl l="firstname & lastname"}
</th>
<td>
{format_date date=$LASTORDER_DATE}
</td>
<th>
{intl l="last order"}
</th>
<td>
{format_number number=$LASTORDER_AMOUNT}
</td>
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.customer.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this customer'}" href="{url path="/admin/customer/update/{$ID}" }"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_send_mail" roles="ADMIN" permissions="admin.customer.sendMail"}
<a class="btn btn-default btn-xs" title="{intl l="Send a mail to this customer"}" href="mailto:{$EMAIL}"><span class="glyphicon glyphicon-envelope"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.customer.delete"}
<a class="btn btn-default btn-xs customer-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_customer_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
<th>{intl l='order amount'}</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
{/loop}
</tbody>
<tfoot>
<tr>
<td colspan="6">
<div class="text-center">
<ul class="pagination pagination-centered">
{if $customer_page != 1}
<li><a href="{url path="/admin/customers" page="1"}">&laquo;</a></li>
{else}
<li class="disabled"><a href="#">&laquo;</a></li>
{/if}
</thead>
{pageloop rel="customer_list"}
{if $PAGE != $CURRENT}
<li><a href="{url path="/admin/customers" page="{$PAGE}"}">{$PAGE}</a></li>
<tbody>
{loop name="customer_list" type="customer" current="false" visible="*" last_order="1" backend_context="1" page={$customer_page} limit={$display_customer}}
<tr>
<td><a href="{url path="/admin/customer/update/{$ID}" }">{$REF}</a></td>
{else}
<li class="active"><a href="#">{$PAGE}</a></li>
{/if}
<td>
{$COMPANY}
</td>
<td class="object-title">
{$FIRSTNAME} {$LASTNAME}
</td>
{module_include location='customer_list_row'}
<td>
{format_date date=$LASTORDER_DATE}
</td>
<td>
{format_number number=$LASTORDER_AMOUNT}
</td>
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.customer.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this customer'}" href="{url path="/admin/customer/update/{$ID}" }"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_send_mail" roles="ADMIN" permissions="admin.customer.sendMail"}
<a class="btn btn-default btn-xs" title="{intl l="Send a mail to this customer"}" href="mailto:{$EMAIL}"><span class="glyphicon glyphicon-envelope"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.customer.delete"}
<a class="btn btn-default btn-xs customer-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_customer_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
<tfoot>
<tr>
<td colspan="6">
<div class="text-center">
<ul class="pagination pagination-centered">
{if $customer_page != 1}
<li><a href="{url path="/admin/customers" page="1"}">&laquo;</a></li>
{else}
<li class="disabled"><a href="#">&laquo;</a></li>
{/if}
{pageloop rel="customer_list"}
{if $PAGE != $CURRENT}
<li><a href="{url path="/admin/customers" page="{$PAGE}"}">{$PAGE}</a></li>
{else}
<li class="active"><a href="#">{$PAGE}</a></li>
{/if}
{/pageloop}
{if $PAGE == $LAST && $LAST != $CURRENT}
<li><a href="{url path="/admin/customers" page="$PAGE"}">&raquo;</a></li>
{else}
<li class="disabled"><a href="#">&raquo;</a></li>
{/if}
</ul>
</div>
</td>
</tr>
</tfoot>
{/ifloop}
</table>
{/pageloop}
{if $PAGE == $LAST && $LAST != $CURRENT}
<li><a href="{url path="/admin/customers" page="$PAGE"}">&raquo;</a></li>
{else}
<li class="disabled"><a href="#">&raquo;</a></li>
{/if}
</ul>
</div>
</td>
</tr>
</tfoot>
{/ifloop}
</table>
</div>
</div>
</div>
</div>

View File

@@ -77,95 +77,97 @@
<div class="alert alert-info">
{intl l="Enter here all possible feature values."}
</div>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>
{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'}"
}
</th>
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>
{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'}"
}
</th>
<th>
{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'}"
}
</th>
<th>
{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'}"
}
</th>
<th class="text-center">
{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"}"
}
</th>
<th class="text-center">
{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"}"
}
</th>
{module_include location='features_value_table_header'}
{module_include location='features_value_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="list" type="feature_availability" feature=$feature_id backend_context="1" lang=$edit_language_id order=$featureav_order}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="list" type="feature_availability" feature=$feature_id backend_context="1" lang=$edit_language_id order=$featureav_order}
<tr>
<td>{$ID}</td>
<td>
{* FIXME : integrate this in the encolsing form to provide standard form processing *}
<input class="js-edit form-control" type="text" name="feature_values[{$ID}]" value="{$TITLE}" />
</td>
<td>
{* FIXME : integrate this in the encolsing form to provide standard form processing *}
<input class="js-edit form-control" type="text" name="feature_values[{$ID}]" value="{$TITLE}" />
</td>
<td class="text-center">
{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"
}
</td>
<td class="text-center">
{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"
}
</td>
{module_include location='features_value_table_row'}
{module_include location='features_value_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.feature-av.delete"}
<a class="btn btn-default btn-xs value-delete" title="{intl l='Delete this value'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.feature-av.delete"}
<a class="btn btn-default btn-xs value-delete" title="{intl l='Delete this value'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No value has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No value has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>
{/form}

View File

@@ -21,117 +21,119 @@
<div class="col-md-12">
<form action="#" method="post">
<div class="general-block-decorator">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia product features'}
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia product features'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.features.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product feature'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/features'
label="{intl l='ID'}"
}
</th>
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.features.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product feature'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/features'
label="{intl l='ID'}"
}
</th>
<th>
{admin_sortable_header
current_order=$order
order='alpha'
reverse_order='alpha_reverse'
path='/admin/configuration/features'
label="{intl l='Title'}"
}
</th>
<th>
{admin_sortable_header
current_order=$order
order='alpha'
reverse_order='alpha_reverse'
path='/admin/configuration/features'
label="{intl l='Title'}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='manual'
reverse_order='manual_reverse'
path='/admin/configuration/features'
label="{intl l="Position"}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='manual'
reverse_order='manual_reverse'
path='/admin/configuration/features'
label="{intl l="Position"}"
}
</th>
{module_include location='features_table_header'}
{module_include location='features_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="list" type="feature" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="list" type="feature" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
<a title="{intl l='Change this feature'}" href="{url path='/admin/configuration/features/update' feature_id=$ID}">{$TITLE}</a>
{/loop}
{elseloop rel="can_change"}
{$TITLE}
{/elseloop}
</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
<a title="{intl l='Change this feature'}" href="{url path='/admin/configuration/features/update' feature_id=$ID}">{$TITLE}</a>
{/loop}
{elseloop rel="can_change"}
{$TITLE}
{/elseloop}
</td>
<td class="text-center">
{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"
}
</td>
<td class="text-center">
{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"
}
</td>
{module_include location='features_table_row'}
{module_include location='features_table_row'}
<td class="actions">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
<div class="btn-group">
<a class="btn btn-default btn-xs feature-remove-from-all" title="{intl l='Remove this feature from all product templates'}" href="#remove_from_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-minus"></span>
</a>
<a class="btn btn-default btn-xs feature-add-to-all" title="{intl l='Add this feature to all product templates'}" href="#add_to_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-plus"></span>
</a>
</div>
{/loop}
<td class="actions">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
<div class="btn-group">
<a class="btn btn-default btn-xs feature-remove-from-all" title="{intl l='Remove this feature from all product templates'}" href="#remove_from_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-minus"></span>
</a>
<a class="btn btn-default btn-xs feature-add-to-all" title="{intl l='Add this feature to all product templates'}" href="#add_to_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-plus"></span>
</a>
</div>
{/loop}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
<a class="btn btn-default btn-xs feature-change" title="{intl l='Change this product feature'}" href="{url path='/admin/configuration/features/update' feature_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
<a class="btn btn-default btn-xs feature-change" title="{intl l='Change this product feature'}" href="{url path='/admin/configuration/features/update' feature_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.delete"}
<a class="btn btn-default btn-xs feature-delete" title="{intl l='Delete this product feature'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.delete"}
<a class="btn btn-default btn-xs feature-delete" title="{intl l='Delete this product feature'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No product feature has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No product feature has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>
</div>

View File

@@ -15,163 +15,164 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed" id="folder_list">
<caption>
{* 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}
<table class="table table-striped table-condensed" id="folder_list">
<caption>
{* 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"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new folder'}" href="#folder_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new folder'}" href="#folder_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{ifloop rel="folder_list"}
<thead>
<tr>
<th class="object-title">
{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'}"
}
</th>
{ifloop rel="folder_list"}
<th class="object-image">&nbsp;</th>
<th class="object-title">
{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'}"
}
</th>
{module_include location='folder_list_header'}
<th>
{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'}"
}
</th>
<th>
{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'}"
}
</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="folder_list" type="folder" visible="*" parent=$folder_id order=$folder_order backend_context="1" lang=$lang_id}
<tr>
<td>{$ID}</td>
<td>
{loop type="image" name="folder_image" source="folder" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='admin/folder' folder_id=$ID}" title="{intl l='Browse this folder'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
{/loop}
</td>
<td class="object-title">
<a href="{url path='admin/folder' folder_id=$ID}" title="{intl l='Browse this folder'}">
{$TITLE}
</a>
</td>
{module_include location='folder_list_row'}
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
<div class="make-switch switch-small folderVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="folderVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/loop}
{elseloop rel="can_change"}
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/elseloop}
</td>
<td>
{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
}
</td>
<td class="actions">
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Browse this folder'}" href="{url path='admin/folder' folder_id=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this folder'}" href="{url path='/admin/folders/update' folder_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"}
<a class="btn btn-default btn-xs folder-delete" title="{intl l='Delete this folder and all its contents'}" href="#folder_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{elseloop rel="folder_list"}
<thead>
<tr>
<th class="object-title">
{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'}"
}
</th>
<td class="message">
<div class="alert alert-info">
{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}
<th class="object-image">&nbsp;</th>
<th class="object-title">
{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'}"
}
</th>
{module_include location='folder_list_header'}
<th>
{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'}"
}
</th>
<th>
{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'}"
}
</th>
<th class="actions">{intl l='Actions'}</th>
{elseloop rel="can_create"}
{intl l="This folder has no sub-folders."}
{/elseloop}
</div>
</td>
</tr>
</thead>
<tbody>
{loop name="folder_list" type="folder" visible="*" parent=$folder_id order=$folder_order backend_context="1" lang=$lang_id}
<tr>
<td>{$ID}</td>
<td>
{loop type="image" name="folder_image" source="folder" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='admin/folder' folder_id=$ID}" title="{intl l='Browse this folder'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
{/loop}
</td>
<td class="object-title">
<a href="{url path='admin/folder' folder_id=$ID}" title="{intl l='Browse this folder'}">
{$TITLE}
</a>
</td>
{module_include location='folder_list_row'}
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
<div class="make-switch switch-small folderVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="folderVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/loop}
{elseloop rel="can_change"}
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/elseloop}
</td>
<td>
{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
}
</td>
<td class="actions">
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Browse this folder'}" href="{url path='admin/folder' folder_id=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this folder'}" href="{url path='/admin/folders/update' folder_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"}
<a class="btn btn-default btn-xs folder-delete" title="{intl l='Delete this folder and all its contents'}" href="#folder_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{elseloop rel="folder_list"}
<thead>
<tr>
<td class="message">
<div class="alert alert-info">
{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}
</div>
</td>
</tr>
</thead>
{/elseloop}
</table>
{/elseloop}
</table>
</div>
</div>
</div>
</div>
@@ -181,7 +182,7 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption>
{* display parent folder name *}
@@ -314,7 +315,7 @@
</thead>
{/elseloop}
</table>
</div>
</div>
</div>

View File

@@ -21,8 +21,8 @@
<div class="text-center clearfix">
<div class="btn-group">
<button type="button" class="btn btn-default active" data-toggle="jqplot" data-target="turnover"><span class="glyphicon glyphicon-euro"></span> {intl l="Turnover"}</button>
<button type="button" class="btn btn-primary" data-toggle="jqplot" data-target="registration"><span class="glyphicon glyphicon-user"></span> {intl l="Registrations"}</button>
<button type="button" class="btn btn-default active" data-toggle="jqplot" data-target="sales"><span class="glyphicon glyphicon-euro"></span> {intl l="Sales"}</button>
<button type="button" class="btn btn-primary" data-toggle="jqplot" data-target="registration"><span class="glyphicon glyphicon-user"></span> {intl l="New customers"}</button>
<button type="button" class="btn btn-success" data-toggle="jqplot" data-target="orders"><span class="glyphicon glyphicon-shopping-cart"></span> {intl l="Orders"}</button>
<button type="button" class="btn btn-info" data-toggle="jqplot" data-target="first-orders"><span class="glyphicon glyphicon-thumbs-up"></span> {intl l="First orders"}</button>
<button type="button" class="btn btn-danger" data-toggle="jqplot" data-target="aborted-orders"><span class="glyphicon glyphicon-thumbs-down"></span> {intl l="Aborted orders"}</button>
@@ -34,7 +34,7 @@
<div class="jqplot-content">
<div id="jqplot"></div>
<div id="turnover" data-toggle="jqplot-serie" class="active"></div>
<div id="sales" data-toggle="jqplot-serie" class="active"></div>
<div id="registration" data-toggle="jqplot-serie"></div>
<div id="orders" data-toggle="jqplot-serie"></div>
<div id="first-orders" data-toggle="jqplot-serie"></div>
@@ -47,51 +47,53 @@
<div class="row">
<div class="col-md-4">
<div class="general-block-decorator">
<div class="title title-without-tabs">{intl l="Informations site"}</div>
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="Customers"}</th>
<td>1</td>
</tr>
<tr>
<th>{intl l="Sections"}</th>
<td>8</td>
</tr>
<tr>
<th>{intl l="Products"}</th>
<td>43</td>
</tr>
<tr>
<th>{intl l="Products online"}</th>
<td>43</td>
</tr>
<tr>
<th>{intl l="Products offline"}</th>
<td>0</td>
</tr>
<tr>
<th>{intl l="Orders"}</th>
<td>1</td>
</tr>
<tr>
<th>{intl l="Orders pending"}</th>
<td>1</td>
</tr>
<tr>
<th>{intl l="Orders treatment"}</th>
<td>0</td>
</tr>
<tr>
<th>{intl l="Shipped orders"}</th>
<td>0</td>
</tr>
<tr>
<th>{intl l="Canceled orders"}</th>
<td>0</td>
</tr>
</tbody>
</table>
<div class="title title-without-tabs">{intl l="Shop Informations"}</div>
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="Customers"}</th>
<td>1</td>
</tr>
<tr>
<th>{intl l="Categories"}</th>
<td>8</td>
</tr>
<tr>
<th>{intl l="Products"}</th>
<td>43</td>
</tr>
<tr>
<th>{intl l="Online products"}</th>
<td>43</td>
</tr>
<tr>
<th>{intl l="Offline products"}</th>
<td>0</td>
</tr>
<tr>
<th>{intl l="Orders"}</th>
<td>1</td>
</tr>
<tr>
<th>{intl l="Pending orders"}</th>
<td>1</td>
</tr>
<tr>
<th>{intl l="In process orderst"}</th>
<td>0</td>
</tr>
<tr>
<th>{intl l="Shipped orders"}</th>
<td>0</td>
</tr>
<tr>
<th>{intl l="Canceled orders"}</th>
<td>0</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@@ -107,106 +109,112 @@
<div class="tab-content">
<div class="tab-pane fade active in" id="statjour">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="C. A. TTC"}</th>
<td>2000.00 €</td>
</tr>
<tr>
<th>{intl l="C. A. TTC hors frais de port"}</th>
<td>2500.00 €</td>
</tr>
<tr>
<th>{intl l="C. A. TTC précédent"}</th>
<td>1700.00 €</td>
</tr>
<tr>
<th>{intl l="Commandes en instance"}</th>
<td>4</td>
</tr>
<tr>
<th>{intl l="Commandes en traitement"}</th>
<td>52</td>
</tr>
<tr>
<th>{intl l="Commandes annulées"}</th>
<td>3</td>
</tr>
<tr>
<th>{intl l="Panier moyen TTC"}</th>
<td>25.00 €</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="Overall sales"}</th>
<td>2500.00 €</td>
</tr>
<tr>
<th>{intl l="Sales excluding shipping"}</th>
<td>2000.00 €</td>
</tr>
<tr>
<th>{intl l="Yesterday sales"}</th>
<td>1700.00 €</td>
</tr>
<tr>
<th>{intl l="Waiting orders"}</th>
<td>4</td>
</tr>
<tr>
<th>{intl l="In process orders"}</th>
<td>52</td>
</tr>
<tr>
<th>{intl l="Canceled orders"}</th>
<td>3</td>
</tr>
<tr>
<th>{intl l="Average cart"}</th>
<td>25.00 €</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="statmois">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="C. A. TTC"}</th>
<td>2000.00 €</td>
</tr>
<tr>
<th>{intl l="C. A. TTC hors frais de port"}</th>
<td>2500.00 €</td>
</tr>
<tr>
<th>{intl l="C. A. TTC précédent"}</th>
<td>1700.00 €</td>
</tr>
<tr>
<th>{intl l="Commandes en instance"}</th>
<td>4</td>
</tr>
<tr>
<th>{intl l="Commandes en traitement"}</th>
<td>52</td>
</tr>
<tr>
<th>{intl l="Commandes annulées"}</th>
<td>3</td>
</tr>
<tr>
<th>{intl l="Panier moyen TTC"}</th>
<td>25.00 €</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="Overall sales"}</th>
<td>2500.00 €</td>
</tr>
<tr>
<th>{intl l="Sales excluding shipping"}</th>
<td>2000.00 €</td>
</tr>
<tr>
<th>{intl l="Previous month sales"}</th>
<td>1700.00 €</td>
</tr>
<tr>
<th>{intl l="Waiting orders"}</th>
<td>4</td>
</tr>
<tr>
<th>{intl l="In process orders"}</th>
<td>52</td>
</tr>
<tr>
<th>{intl l="Canceled orders"}</th>
<td>3</td>
</tr>
<tr>
<th>{intl l="Average cart"}</th>
<td>25.00 €</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="statannee">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="C. A. TTC"}</th>
<td>2000.00 €</td>
</tr>
<tr>
<th>{intl l="C. A. TTC hors frais de port"}</th>
<td>2500.00 €</td>
</tr>
<tr>
<th>{intl l="C. A. TTC précédent"}</th>
<td>1700.00 €</td>
</tr>
<tr>
<th>{intl l="Commandes en instance"}</th>
<td>4</td>
</tr>
<tr>
<th>{intl l="Commandes en traitement"}</th>
<td>52</td>
</tr>
<tr>
<th>{intl l="Commandes annulées"}</th>
<td>3</td>
</tr>
<tr>
<th>{intl l="Panier moyen TTC"}</th>
<td>25.00 €</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="Overall sales"}</th>
<td>2500.00 €</td>
</tr>
<tr>
<th>{intl l="Sales excluding shipping"}</th>
<td>2000.00 €</td>
</tr>
<tr>
<th>{intl l="Previous year sales"}</th>
<td>1700.00 €</td>
</tr>
<tr>
<th>{intl l="Waiting orders"}</th>
<td>4</td>
</tr>
<tr>
<th>{intl l="In process orders"}</th>
<td>52</td>
</tr>
<tr>
<th>{intl l="Canceled orders"}</th>
<td>3</td>
</tr>
<tr>
<th>{intl l="Average cart"}</th>
<td>25.00 €</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
@@ -215,22 +223,24 @@
<div class="col-md-4">
<div class="general-block-decorator">
<div class="title title-without-tabs">{intl l="Thelia informations"}</div>
<table class="table table-striped">
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="Current version"}</th>
<td>V2.0.0-beta</td>
</tr>
<tr>
<th>{intl l="Latest version available"}</th>
<td><a href="">V1.5.4.2</a></td>
</tr>
<tr>
<th>{intl l="News"}</th>
<td><a href="" target="_blank">{intl l="Click here"}</a></td>
</tr>
</tbody>
</table>
<tr>
<th>{intl l="Current version"}</th>
<td>V2.0.0-beta</td>
</tr>
<tr>
<th>{intl l="Latest version available"}</th>
<td><a href="">V1.5.4.2</a></td>
</tr>
<tr>
<th>{intl l="News"}</th>
<td><a href="" target="_blank">{intl l="Click here"}</a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@@ -2,11 +2,11 @@
<ul class="breadcrumb">
<li><a href="{url path='admin/home'}">Home</a></li>
<li><a href="{url path='admin/catalog'}">Catalog</a>
<li><a href="{url path='admin/catalog'}">Catalog</a></li>
{ifloop rel="category_path"}</li>
{ifloop rel="category_path"}
{loop name="category_path" type="category-path" visible="*" category=$category_id}
{if $ID == $category_id}
{if $ID == $category_id && $editing_product == false}
<li class="active">
{if $editing_category == true}
{intl l='Editing %cat' cat="{$TITLE}"}
@@ -20,7 +20,9 @@
{/loop}
{/ifloop}
{elseloop rel="category_path"}
</li>
{/elseloop}
{if $editing_product == true}
{loop name="product_path" type="product" visible="*" id=$product_id}
<li>{intl l="Editing %title" title="$TITLE"}</li>
{/loop}
{/if}
</ul>

View File

@@ -21,76 +21,78 @@
<div class="col-md-12">
<form action="{url path='/admin/configuration/messages/update-values'}" method="post">
<div class="general-block-decorator">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia mailing templates'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.messages.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new mailing template'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia mailing templates'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.messages.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new mailing template'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>{intl l="Purpose"}</th>
<th>{intl l="Name"}</th>
</caption>
<thead>
<tr>
<th>{intl l="Purpose"}</th>
<th>{intl l="Name"}</th>
{module_include location='messages_table_header'}
{module_include location='messages_table_header'}
<th>&nbsp;</th>
</tr>
</thead>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{loop name="mailing-templates" type="message" secured="*" backend_context="1" lang="$lang_id"}
<tr>
<tbody>
{loop name="mailing-templates" type="message" secured="*" backend_context="1" lang="$lang_id"}
<tr>
<td>{$TITLE}</td>
<td>{$TITLE}</td>
<td>
{if ! $SECURED}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"}
<a title="{intl l='Change this mailing template'}" href="{url path='/admin/configuration/messages/update' message_id="$ID"}">{$NAME}</a>
{/loop}
{elseloop rel="can_change"}
<td>
{if ! $SECURED}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"}
<a title="{intl l='Change this mailing template'}" href="{url path='/admin/configuration/messages/update' message_id="$ID"}">{$NAME}</a>
{/loop}
{elseloop rel="can_change"}
{$NAME}
{/elseloop}
{else}
{$NAME}
{/elseloop}
{else}
{$NAME}
{/if}
</td>
{/if}
</td>
{module_include location='messages_table_row'}
{module_include location='messages_table_row'}
<td class="actions">
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"}
<a class="btn btn-default btn-xs message-change" title="{intl l='Change this mailing template'}" href="{url path='/admin/configuration/messages/update' message_id="$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
<td class="actions">
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"}
<a class="btn btn-default btn-xs message-change" title="{intl l='Change this mailing template'}" href="{url path='/admin/configuration/messages/update' message_id="$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.messages.delete"}
<a class="btn btn-default btn-xs message-delete" title="{intl l='Delete this mailing template'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This mailing template could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
{/loop}
{elseloop rel="mailing-templates"}
<tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="No mailing template has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.messages.delete"}
<a class="btn btn-default btn-xs message-delete" title="{intl l='Delete this mailing template'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This mailing template could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
{/loop}
{elseloop rel="mailing-templates"}
<tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="No mailing template has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>
</div>

View File

@@ -0,0 +1,276 @@
{extends file="admin-layout.tpl"}
{block name="page-title"}{intl l='Modules'}{/block}
{block name="check-permissions"}admin.modules.view{/block}
{block name="main-content"}
<div class="modules">
<div id="wrapper" class="container">
<div class="clearfix">
<ul class="breadcrumb pull-left">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/modules'}">{intl l="Modules"}</a></li>
</ul>
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.modules.install"}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Install a new module'}" href="#install_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-import"></span> {intl l="Install a new module"}
</a>
{/loop}
</div>
{module_include location='modules_top'}
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Transport modules'}
</caption>
<thead>
<tr>
<th>{intl l="Name"}</th>
<th>{intl l="Description"}</th>
<th>{intl l="Enable/Disable"}</th>
{module_include location='modules_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="">Tinymce</a></td>
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid! Eius, pariatur accusantium odit quidem laboriosam.</td>
<td>
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
<input type="checkbox" checked>
</div>
</td>
{module_include location='modules_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">So colissimo</a></td>
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid</td>
<td>
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
<input type="checkbox">
</div>
</td>
{module_include location='modules_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">Title meta</a></td>
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid</td>
<td>
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
<input type="checkbox">
</div>
</td>
{module_include location='modules_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Delivery modules'}
</caption>
<thead>
<tr>
<th>{intl l="Name"}</th>
<th>{intl l="Description"}</th>
<th>{intl l="Enable/Disable"}</th>
{module_include location='modules_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="">Tinymce</a></td>
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid! Eius, pariatur accusantium odit quidem laboriosam.</td>
<td>
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
<input type="checkbox" checked>
</div>
</td>
{module_include location='modules_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">So colissimo</a></td>
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid</td>
<td>
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
<input type="checkbox">
</div>
</td>
{module_include location='modules_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">Title meta</a></td>
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid</td>
<td>
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
<input type="checkbox">
</div>
</td>
{module_include location='modules_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
{module_include location='modules_bottom'}
</div>
</div>
{* Delete module confirmation dialog *}
{capture "delete_module_dialog"}
<input type="hidden" name="current_module_id" value="{$current_module_id}" />
<input type="hidden" name="module_id" id="delete_module_id" value"" />
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "delete_module_dialog"
dialog_title = {intl l="Delete a module"}
dialog_message = {intl l="Do you really want to delete this module ?"}
form_action = {url path='/admin/modules/delete'}
form_content = {$smarty.capture.delete_module_dialog nofilter}
}
{/block}
{block name="javascript-initialization"}
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{/block}

View File

@@ -30,71 +30,75 @@
<div class="tab-content">
<div class="tab-pane fade active in" id="cart">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Information about order 01201303540354'}
</caption>
<thead>
<tr>
<th>{intl l="Designation"}</th>
<th>{intl l="Price"}</th>
<th>{intl l="Quantity"}</th>
<th>{intl l="Total"}</th>
</tr>
</thead>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Information about order 01201303540354'}
</caption>
<thead>
<tr>
<th>{intl l="Designation"}</th>
<th>{intl l="Price"}</th>
<th>{intl l="Quantity"}</th>
<th>{intl l="Total"}</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
</tbody>
<tfoot>
<tr class="active">
<td colspan="3"><strong>Total</strong></td>
<td><strong>180.00 &euro;</strong></td>
</tr>
</tfoot>
</table>
<tbody>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
</tbody>
<tfoot>
<tr class="active">
<td colspan="3"><strong>Total</strong></td>
<td><strong>180.00 &euro;</strong></td>
</tr>
</tfoot>
</table>
</div>
</div> <!-- #cart -->
<div class="tab-pane fade" id="bill">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Information about the bill'}
</caption>
<thead>
<tr>
<th>{intl l="Bill n°"}</th>
<th>{intl l="Compagny"}</th>
<th>{intl l="Firstname & Lastname"}</th>
<th>{intl l="Date & Hour"}</th>
</tr>
</thead>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Information about the bill'}
</caption>
<thead>
<tr>
<th>{intl l="Bill n°"}</th>
<th>{intl l="Compagny"}</th>
<th>{intl l="Firstname & Lastname"}</th>
<th>{intl l="Date & Hour"}</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#">0001</a></td>
<td>Thelia</td>
<td>Dupont Jean</td>
<td>11/01/2013 14:11:00</td>
</tr>
</tbody>
</table>
<tbody>
<tr>
<td><a href="#">0001</a></td>
<td>Thelia</td>
<td>Dupont Jean</td>
<td>11/01/2013 14:11:00</td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #bill -->
<div class="tab-pane fade" id="carriage">
@@ -116,214 +120,219 @@
</div> <!-- #carriage -->
<div class="tab-pane fade" id="settlement">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Information about the settlement'}
</caption>
<tbody>
<tr>
<th>{intl l="Type of payment"}</th>
<td>Unknown</td>
</tr>
<tr>
<th>{intl l="Transaction reference"}</th>
<td>141100</td>
</tr>
<tr>
<th>{intl l="Total order before discount"}</th>
<td>60 &euro;</td>
</tr>
<tr>
<th>{intl l="Discount"}</th>
<td>10%</td>
</tr>
<tr>
<th>{intl l="Coupon code"}</th>
<td></td>
</tr>
<tr>
<th>{intl l="Total with discount"}</th>
<td>50 &euro;</td>
</tr>
<tr>
<th>{intl l="Freight"}</th>
<td>6 &euro;</td>
</tr>
<tr>
<th>{intl l="Total"}</th>
<td>56 &euro;</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Information about the settlement'}
</caption>
<tbody>
<tr>
<th>{intl l="Type of payment"}</th>
<td>Unknown</td>
</tr>
<tr>
<th>{intl l="Transaction reference"}</th>
<td>141100</td>
</tr>
<tr>
<th>{intl l="Total order before discount"}</th>
<td>60 &euro;</td>
</tr>
<tr>
<th>{intl l="Discount"}</th>
<td>10%</td>
</tr>
<tr>
<th>{intl l="Coupon code"}</th>
<td></td>
</tr>
<tr>
<th>{intl l="Total with discount"}</th>
<td>50 &euro;</td>
</tr>
<tr>
<th>{intl l="Freight"}</th>
<td>6 &euro;</td>
</tr>
<tr>
<th>{intl l="Total"}</th>
<td>56 &euro;</td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #settlement -->
<div class="tab-pane fade clearfix" id="address">
<div class="col-md-6">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Billing address'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this billing address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</caption>
<tbody>
<tr>
<th>{intl l="Title"}</th>
<td>Mr</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>Thelia</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>Espeche</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>Michaël</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>5, rue Rochon</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit amet</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>63000</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>Clermont-Fd</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>France</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>01 02 03 04 05</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Billing address'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this billing address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</caption>
<tbody>
<tr>
<th>{intl l="Title"}</th>
<td>Mr</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>Thelia</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>Espeche</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>Michaël</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>5, rue Rochon</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit amet</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>63000</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>Clermont-Fd</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>France</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>01 02 03 04 05</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Delivery address'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this delivery address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</caption>
<tbody>
<tr>
<th>{intl l="Title"}</th>
<td>Mr</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>Thelia</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>Espeche</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>Michaël</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>5, rue Rochon</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit amet</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>63000</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>Clermont-Fd</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>France</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>01 02 03 04 05</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Delivery address'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this delivery address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</caption>
<tbody>
<tr>
<th>{intl l="Title"}</th>
<td>Mr</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>Thelia</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>Espeche</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>Michaël</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>5, rue Rochon</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit amet</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>63000</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>Clermont-Fd</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>France</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>01 02 03 04 05</td>
</tr>
</tbody>
</table>
</div>
</div>
</div> <!-- #address -->
<div class="tab-pane fade clearfix" id="supplements">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Further information'}
</caption>
<tbody>
<tr>
<th><label for="">{intl l='Status'}</label></th>
<td>
<form action="" method="">
<div class="row">
<div class="col-lg-4">
<select name="" id="" class="form-control">
<option value="">Status 1</option>
<option value="">Status 2</option>
<option value="">Status 3</option>
</select>
</div>
</div>
</form>
</td>
</tr>
<tr>
<th><label for="">{intl l='Order Tracking'}</label></th>
<td>
<form action="" method="">
<div class="row">
<div class="col-lg-4">
<input type="text" id="" name="" class="form-control" value="" title="" placeholder="">
</div>
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span></button>
</div>
</form>
</td>
</tr>
<tr>
<th>{intl l='Bill'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download bill to pdf'}</a></td>
</tr>
<tr>
<th>{intl l='Delivery'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download delivery to pdf'}</a></td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Further information'}
</caption>
<tbody>
<tr>
<th><label for="">{intl l='Status'}</label></th>
<td>
<form action="" method="">
<div class="row">
<div class="col-lg-4">
<select name="" id="" class="form-control">
<option value="">Status 1</option>
<option value="">Status 2</option>
<option value="">Status 3</option>
</select>
</div>
</div>
</form>
</td>
</tr>
<tr>
<th><label for="">{intl l='Order Tracking'}</label></th>
<td>
<form action="" method="">
<div class="row">
<div class="col-lg-4">
<input type="text" id="" name="" class="form-control" value="" title="" placeholder="">
</div>
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span></button>
</div>
</form>
</td>
</tr>
<tr>
<th>{intl l='Bill'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download bill to pdf'}</a></td>
</tr>
<tr>
<th>{intl l='Delivery'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download delivery to pdf'}</a></td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #supplements -->
</div>

View File

@@ -19,114 +19,116 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Orders'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.orders.create"}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Create an order'}" href="#creation_dialog">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>{intl l="Order n°"}</th>
<th>{intl l="Date & Hour"}</th>
<th>{intl l="Compagny"}</th>
<th>{intl l="Name"}</th>
<th>{intl l="Amount"}</th>
<th>{intl l="Status"}</th>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Orders'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.orders.create"}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Create an order'}" href="#creation_dialog">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>{intl l="Order n°"}</th>
<th>{intl l="Date & Hour"}</th>
<th>{intl l="Compagny"}</th>
<th>{intl l="Name"}</th>
<th>{intl l="Amount"}</th>
<th>{intl l="Status"}</th>
{module_include location='orders_table_header'}
{module_include location='orders_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<tbody>
<tr>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-success">Paid</span></td>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-success">Paid</span></td>
{module_include location='orders_table_row'}
{module_include location='orders_table_row'}
<td>
<div class="btn-group">
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-danger">Canceled</span></td>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-danger">Canceled</span></td>
{module_include location='orders_table_row'}
{module_include location='orders_table_row'}
<td>
<div class="btn-group">
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-info">Current</span></td>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-info">Current</span></td>
{module_include location='orders_table_row'}
{module_include location='orders_table_row'}
<td>
<div class="btn-group">
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<!-- <tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="No mailing template has been created yet. Click the + button to create one."}
</div>
</td>
</tr> -->
<!-- <tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="No mailing template has been created yet. Click the + button to create one."}
</div>
</td>
</tr> -->
</tbody>
</table>
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@@ -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"}
<div class="catalog edit-product">
<div id="wrapper" class="container">
{include file="includes/catalog-breadcrumb.html" editing_category="false" editing_product="true"}
<div class="row">
{loop name="product_edit" type="product" visible="*" id=$product_id backend_context="1" lang=$edit_language_id}
<div class="col-md-12 general-block-decorator">
<div class="row">
<div class="col-md-7 title">
{intl l='Edit product %title' title=$TITLE}
</div>
<div class="col-md-5 actions">
{if $HAS_PREVIOUS != 0}
<a href="{url path='/admin/products/update' product_id=$PREVIOUS}" class="btn btn-default" title="{intl l='Edit previous product'}"><span class="glyphicon glyphicon-arrow-left"></span></a>
{else}
<a href="#" disabled="disabled" class="btn btn-default"><span class="glyphicon glyphicon-arrow-left"></span></a>
{/if}
<a href="{$URL}" target="_blank" class="btn btn-default" title="{intl l='Preview product page'}"><span class="glyphicon glyphicon-eye-open"></span></a>
{if $HAS_NEXT != 0}
<a href="{url path='/admin/products/update' product_id=$NEXT}" class="btn btn-default" title="{intl l='Edit next product'}"><span class="glyphicon glyphicon-arrow-right"></span></a>
{else}
<a href="#" disabled="disabled" class="btn btn-default"><span class="glyphicon glyphicon-arrow-right"></span></a>
{/if}
</div>
</div>
<div class="row">
<div class="col-md-12">
<ul class="nav nav-tabs" id="tabbed-menu">
<li {if $current_tab == 'general'}class="active"{/if}><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
<li {if $current_tab == 'details'}class="active"{/if}><a href="#details" data-toggle="tab">{intl l="Details"}</a></li>
<li {if $current_tab == 'images'}class="active"{/if}><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
<li {if $current_tab == 'documents'}class="active"{/if}><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
<li {if $current_tab == 'modules'}class="active"{/if}><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane fade {if $current_tab == 'general'}active in{/if}" id="general">
<div class="form-container">
{form name="thelia.admin.product.modification"}
<form method="POST" action="{url path='/admin/products/save'}" {form_enctype form=$form} class="clearfix">
{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 *}
<input type="hidden" name="product_id" value="{$product_id}" />
<input type="hidden" name="current_tab" value="general" />
{form_hidden_fields form=$form}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path='/admin/product' product_id={$product_d}}" />
{/form_field}
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
{/form_field}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
<div class="form-group">
<label for="product_ref" class="control-label">
{intl l='Product reference'} :
</label>
<div class="well well-sm">{$REF}</div>
</div>
{include file="includes/standard-description-form-fields.html"}
{form_field form=$form field='url'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
</label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Rewritten URL'}" placeholder="{intl l='Rewriten URL'}" class="form-control">
</div>
{/form_field}
<div class="row">
<div class="col-md-6">
{form_field form=$form field='default_category'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
</label>
<select id="{$label_attr.for}" required="required" name="{$name}" class="form-control">
<option value="0">{intl l="Top level"}</option>
{loop name="cat-parent" type="category-tree" category="0" visible="*" product="0"}
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $DEFAULT_CATEGORY == $ID}selected="selected"{/if} {if $product_id == $ID}disabled="disabled"{/if}>{$TITLE}</option>
{/loop}
</select>
<span class="help-block">{intl l='You can attach this product to more categories in the details tab.'}</span>
</div>
{/form_field}
</div>
<div class="col-md-6">
{form_field form=$form field='visible'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l='Visibility'}</label>
<div class="checkbox">
<label>
<input type="checkbox" id="{$label_attr.for}" name="{$name}" value="1" {if $value != 0}checked="checked"{/if}>
{$label}
</label>
</div>
</div>
{/form_field}
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="control-group">
<lablel>&nbsp;</lablel>
<div class="controls">
<p>{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}"}</p>
</div>
</div>
</div>
</div>
</form>
{/form}
</div>
</div>
<div class="tab-pane fade {if $current_tab == 'details'}active in{/if}" id="details">
<div class="form-container">
{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 -- *}
<div class="col-md-6">
<div class="form-group">
<form action="{url path='/admin/products/related-content/add'}" id="related_content_form">
<p class="title title-without-tabs">{intl l='Related content'}</p>
<p>{intl l='You can attach here some content to this product'}</p>
<input type="hidden" name="product_id" value="{$product_id}" />
<input type="hidden" name="current_tab" value="details" />
{ifloop rel="folders"}
<div class="form-group">
<select name="folder_id" id="folder_id" class="form-control">
<option value="">Select a folder...</option>
{loop name="folders" type="folder-tree" folder="0" backend_context="1" lang="$edit_language_id"}
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
{/loop}
</select>
<span class="help-block">{intl l='Select a folder to get its content'}</span>
</div>
<div id="content_selector" class="hide">
<div class="input-group">
<select required="required" name="content_id" id="content_id" class="form-control">
<option value="">Select a folder content...</option>
</select>
<span class="input-group-btn" id="content_add_button">
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
</span>
</div>
<span class="help-block">{intl l='Select a content and click (+) to add it to this product'}</span>
</div>
<div id="content_selector_empty" class="hide">
<div class="alert alert-info">
{intl l="No available content for this folder"}
</div>
</div>
{/ifloop}
{elseloop rel="folders"}
<div class="alert alert-info">{intl l="No folders found"}</div>
{/elseloop}
</form>
</div>
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
<th>{intl l='Content title'}</th>
{module_include location='product_contents_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="assigned_contents" type="associated_content" product="$product_id" backend_context="1" lang="$edit_language_id"}
<tr>
<td>{$ID}</td>
<td>
{$TITLE}
</td>
{module_include location='product_contents_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.product.content.delete"}
<a class="btn btn-default btn-xs delete-content" title="{intl l='Delete this content'}" href="#delete_content_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="assigned_contents"}
<tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="This product contains no contents"}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
{* -- End related content management ---- *}
{* -- Begin accessories management ------ *}
<div class="col-md-6">
<div class="form-group">
<form action="{url path='/admin/products/accessory/add'}" id="accessory_form">
<p class="title title-without-tabs">{intl l='Product accessories'}</p>
<p>{intl l='Define here this product\'s accessories'}</p>
<input type="hidden" name="product_id" value="{$product_id}" />
<input type="hidden" name="current_tab" value="details" />
{ifloop rel="categories"}
<div class="form-group">
<select name="accessory_category_id" id="accessory_category_id" class="form-control">
<option value="">Select a category...</option>
{loop name="categories" type="category-tree" category="0" backend_context="1" lang="$edit_language_id"}
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
{/loop}
</select>
<span class="help-block">{intl l='Select a category to get its products'}</span>
</div>
<div id="accessory_selector" class="hide">
<div class="input-group">
<select required="required" name="accessory_id" id="accessory_id" class="form-control">
<option value="">Select a product...</option>
</select>
<span class="input-group-btn" id="accessory_add_button">
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
</span>
</div>
<span class="help-block">{intl l='Select a product and click (+) to add it as an accessory'}</span>
</div>
<div id="accessory_selector_empty" class="hide">
<div class="alert alert-info">
{intl l="No available product in this category"}
</div>
</div>
{/ifloop}
{elseloop rel="categories"}
<div class="alert alert-info">{intl l="No categories found"}</div>
{/elseloop}
</form>
</div>
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
<th>{intl l='Accessory title'}</th>
<th class="text-center">{intl l='Position'}</th>
{module_include location='product_accessories_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="assigned_accessories" order="accessory" type="accessory" product="$product_id" backend_context="1" lang="$edit_language_id"}
<tr>
<td>{$ID}</td>
<td>
{$TITLE}
</td>
<td class="text-center">
{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
}
</td>
{module_include location='product_accessories_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.product.accessory.delete"}
<a class="btn btn-default btn-xs delete-accessory" title="{intl l='Delete this accessory'}" href="#delete_accessory_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="assigned_accessories"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="This product contains no accessories"}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
{* -- End accessories management -------- *}
</div>
</div>
<div class="tab-pane fade {if $current_tab == 'images'}active in{/if}" id="images">
</div>
<div class="tab-pane fade {if $current_tab == 'documents'}active in{/if}" id="documents">
</div>
<div class="tab-pane fade {if $current_tab == 'modules'}active in{/if}" id="modules">
</div>
</div>
</div>
</div>
</div>
{/loop}
</div>
</div>
</div>
{* Delete related content confirmation dialog *}
{capture "delete_content_dialog"}
<input type="hidden" name="product_id" value="{$product_id}" />
<input type="hidden" name="content_id" id="content_delete_id" value="" />
<input type="hidden" name="folder_id" id="folder_delete_id" value="" />
<input type="hidden" name="current_tab" value="details" />
{/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"}
<input type="hidden" name="product_id" value="{$product_id}" />
<input type="hidden" name="accessory_id" id="accessory_delete_id" value="" />
<input type="hidden" name="accessory_category_id" id="accessory_category_delete_id" value="" />
<input type="hidden" name="current_tab" value="details" />
{/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'}
<script src="{$asset_url}"></script>
{/javascripts}
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
<script>
tinymce.init({
selector: ".wysiwyg",
theme: "modern",
menubar : false,
language: "",
plugins: [
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
"table contextmenu directionality emoticons paste textcolor filemanager"
],
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect | filemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
image_advtab: true ,
external_filemanager_path:"{url file='/tinymce/plugins/filemanager/'}'",
filemanager_title:"{intl l='Files manager'}" ,
external_plugins: { "filemanager" : "{url file='/tinymce/plugins/filemanager/plugin.min.js'}"}
});
</script>
<script>
$(function() {
$('.use_default_rewriten_url').click(function(ev) {
alert("Not functionnal");
ev.preventDefault();
});
// Set proper content ID in delete content from
$('a.delete-content').click(function(ev) {
$('#content_delete_id').val($(this).data('id'));
$('#folder_delete_id').val($('#folder_id').val());
});
// Set proper content ID in accessory delete from
$('a.delete-accessory').click(function(ev) {
$('#accessory_delete_id').val($(this).data('id'));
$('#accessory_category_delete_id').val($('#accessory_category_id').val());
});
// Load content on folder selection
$('#folder_id').change(function(event) {
var val = $(this).val();
if (val != "") {
$.ajax({
url : '{url path="/admin/product/$product_id/available-related-content/"}' + $(this).val() + '.xml',
type : 'get',
dataType : 'json',
success : function(json) {
$('#content_id :not(:first-child)').remove();
var have_content = false;
$.each(json, function(idx, value) {
$('#content_id').append($('<option>').text(value.title).attr('value', value.id));
have_content = true; // Lame...
});
if (have_content) {
$('#content_selector_empty').addClass('hide');
$('#content_selector').removeClass('hide');
}
else {
$('#content_selector_empty').removeClass('hide');
$('#content_selector').addClass('hide');
}
}
});
}
else {
$('#content_selector_empty').addClass('hide');
$('#content_selector').addClass('hide');
}
});
// Load content on folder selection
$('#accessory_category_id').change(function(event) {
var val = $(this).val();
if (val != "") {
$.ajax({
url : '{url path="/admin/product/$product_id/available-accessories/"}' + $(this).val() + '.xml',
type : 'get',
dataType : 'json',
success : function(json) {
$('#accessory_id :not(:first-child)').remove();
var have_content = false;
$.each(json, function(idx, value) {
$('#accessory_id').append($('<option>').text(value.title).attr('value', value.id));
have_content = true; // Lame...
});
if (have_content) {
$('#accessory_selector_empty').addClass('hide');
$('#accessory_selector').removeClass('hide');
}
else {
$('#accessory_selector_empty').removeClass('hide');
$('#accessory_selector').addClass('hide');
}
}
});
}
else {
$('#accessory_selector_empty').addClass('hide');
$('#accessory_selector').addClass('hide');
}
});
{* Inline editing of accessory position using bootstrap-editable *}
$('.accessoryPositionChange').editable({
type : 'text',
title : '{intl l="Enter new accessory position"}',
mode : 'popup',
inputclass : 'input-mini',
placement : 'left',
success : function(response, newValue) {
// The URL template
var url = "{url path='admin/product/update-accessory-position/' accessory_id='__ID__' product_id=$product_id position='__POS__'}";
// Perform subtitutions
url = url.replace('__ID__', $(this).data('id')).replace('__POS__', newValue);
// Reload the page
location.href = url;
}
});
// Initialize folder (id={$folder_id}) select value
{if $folder_id != 0}
$('#folder_id').val("{$folder_id}").change();
{/if}
// Initialize folder (id={$folder_id}) select value
{if $accessory_category_id != 0}
$('#accessory_category_id').val("{$accessory_category_id}").change();
{/if}
});
</script>
{/block}

View File

@@ -0,0 +1,126 @@
{extends file="admin-layout.tpl"}
{block name="page-title"}{intl l='Edit profile'}{/block}
{block name="check-permissions"}admin.profile.edit{/block}
{block name="main-content"}
<div class="profile edit-profile">
<div id="wrapper" class="container">
<ul class="breadcrumb">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li>{intl l='Editing profile "%name"' name="{$NAME}"}</li>
</ul>
<div class="row">
<div class="col-md-12 general-block-decorator">
<div class="col-md-12 title title-without-tabs">
{intl l="Edit profile $NAME"}
</div>
<div class="form-container">
{form name="thelia.admin.profile.modification"}
<form method="POST" action="{url path="/admin/profile/update/{$ID}"}" {form_enctype form=$form} class="clearfix">
{form_hidden_fields form=$form}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="/admin/profile/update/{$ID}"}" />
{/form_field}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
{form_field form=$form field='firstname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$FIRSTNAME}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}">
</div>
{/form_field}
{form_field form=$form field='lastname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$LASTNAME}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}">
</div>
{/form_field}
{form_field form=$form field='default_language'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<select name="{$name}" id="{$label_attr.for}" data-toggle="selectpicker">
{loop type="lang" name="default_language" backend_context="1"}
<option value="{$ID}" {if $ID == $TITLE}selected{/if}>{$TITLE}</option>
{/loop}
</select>
</div>
{/form_field}
{form_field form=$form field='editing_language_default'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<select name="{$name}" id="{$label_attr.for}" data-toggle="selectpicker">
{loop type="lang" name="editing_language_default" backend_context="1"}
<option value="{$ID}" {if $ID == $TITLE}selected{/if}>{$TITLE}</option>
{/loop}
</select>
</div>
{/form_field}
<div class="well">
<div class="title title-without-tabs">{intl l="Change password"}</div>
{form_field form=$form field='old_password'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Old password'}">
</div>
{/form_field}
{form_field form=$form field='password'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Password'}">
</div>
{/form_field}
{form_field form=$form field='password_confirm'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Password confirmation'}">
</div>
{/form_field}
</div>
<div class="text-right">
<button type="submit" class="btn btn-default btn-primary" title="{intl l='Edit profile'}">
{intl l="Edit"}
<span class="glyphicon glyphicon-ok"></span>
</button>
</div>
</form>
{/form}
</div>
</div>
</div>
</div>
</div>
{/block}
{block name="javascript-initialization"}
{javascripts file='assets/js/bootstrap-select/bootstrap-select.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{javascripts file='assets/js/main.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{/block}

View File

@@ -48,56 +48,58 @@
</div>
<div class="col-md-8">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>{intl l="Country"}</th>
<th>{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<td>Wallis-et-Futuna</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this country'}" href="#delete_country_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<tr>
<td>Polynésie française</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this country'}" href="#delete_country_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<tr>
<td>USA - Alabama</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this country'}" href="#delete_zone_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
</tbody>
<tfoot>
<tr class="active">
<td colspan="2">
<form method="POST" action="">
<label for="" class="control-label">{intl l="Freight"}</label>
<div class="input-group">
<input type="text" class="form-control" name="" id="" placeholder="Freight value">
<span class="input-group-addon">&euro;</span>
<span class="input-group-btn">
<button type="submit" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span></button>
</span>
</div>
</form>
</td>
</tr>
</tfoot>
</table>
<div class="table-responsive">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>{intl l="Country"}</th>
<th>{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<td>Wallis-et-Futuna</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this country'}" href="#delete_country_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<tr>
<td>Polynésie française</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this country'}" href="#delete_country_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<tr>
<td>USA - Alabama</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this country'}" href="#delete_zone_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
</tbody>
<tfoot>
<tr class="active">
<td colspan="2">
<form method="POST" action="">
<label for="" class="control-label">{intl l="Freight"}</label>
<div class="input-group">
<input type="text" class="form-control" name="" id="" placeholder="Freight value">
<span class="input-group-addon">&euro;</span>
<span class="input-group-btn">
<button type="submit" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span></button>
</span>
</div>
</form>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>

View File

@@ -20,88 +20,90 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Thelia Shipping configuration'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.shipping-configuration.create"}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Add a new shipping configuration'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>{intl l="Description"}</th>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Thelia Shipping configuration'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.shipping-configuration.create"}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Add a new shipping configuration'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>{intl l="Description"}</th>
{module_include location='shipping_configuration_table_header'}
{module_include location='shipping_configuration_table_header'}
<th>{intl l="Actions"}</th>
</tr>
</thead>
<th>{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<td>France</td>
<tbody>
<tr>
<td>France</td>
{module_include location='shipping_configuration_table_row'}
{module_include location='shipping_configuration_table_row'}
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
<a class="btn btn-default btn-xs shipping-configuration-change" title="{intl l='Change this shipping configuration'}" href="{url path="/admin/configuration/shipping_configuration/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
<a class="btn btn-default btn-xs shipping-configuration-delete" title="{intl l='Delete this shipping configuration'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping configuration could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
<tr>
<td>Outre-Mer DOM</td>
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
<a class="btn btn-default btn-xs shipping-configuration-change" title="{intl l='Change this shipping configuration'}" href="{url path="/admin/configuration/shipping_configuration/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
<a class="btn btn-default btn-xs shipping-configuration-delete" title="{intl l='Delete this shipping configuration'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping configuration could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
<tr>
<td>Outre-Mer DOM</td>
{module_include location='shipping_configuration_table_row'}
{module_include location='shipping_configuration_table_row'}
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
<a class="btn btn-default btn-xs shipping-configuration-change" title="{intl l='Change this shipping configuration'}" href="{url path="/admin/configuration/shipping_configuration/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
<a class="btn btn-default btn-xs shipping-configuration-delete" title="{intl l='Delete this shipping configuration'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping configuration could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
<tr>
<td>Outre-Mer TOM</td>
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
<a class="btn btn-default btn-xs shipping-configuration-change" title="{intl l='Change this shipping configuration'}" href="{url path="/admin/configuration/shipping_configuration/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
<a class="btn btn-default btn-xs shipping-configuration-delete" title="{intl l='Delete this shipping configuration'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping configuration could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
<tr>
<td>Outre-Mer TOM</td>
{module_include location='shipping_configuration_table_row'}
{module_include location='shipping_configuration_table_row'}
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
<a class="btn btn-default btn-xs shipping-configuration-change" title="{intl l='Change this shipping configuration'}" href="{url path="/admin/configuration/shipping_configuration/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
<a class="btn btn-default btn-xs shipping-configuration-delete" title="{intl l='Delete this shipping configuration'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping configuration could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
</tbody>
</table>
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
<a class="btn btn-default btn-xs shipping-configuration-change" title="{intl l='Change this shipping configuration'}" href="{url path="/admin/configuration/shipping_configuration/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
<a class="btn btn-default btn-xs shipping-configuration-delete" title="{intl l='Delete this shipping configuration'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping configuration could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@@ -48,40 +48,42 @@
</div>
<div class="col-md-8">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>{intl l="Zones"}</th>
<th>{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<td>France</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this zone'}" href="#delete_zone_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<tr>
<td>Zone 1</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this zone'}" href="#delete_zone_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<tr>
<td>Zone 2</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this zone'}" href="#delete_zone_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>{intl l="Zones"}</th>
<th>{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<td>France</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this zone'}" href="#delete_zone_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<tr>
<td>Zone 1</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this zone'}" href="#delete_zone_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<tr>
<td>Zone 2</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this zone'}" href="#delete_zone_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@@ -20,74 +20,76 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia Shipping zones'}
</caption>
<thead>
<tr>
<th>{intl l="Name"}</th>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia Shipping zones'}
</caption>
<thead>
<tr>
<th>{intl l="Name"}</th>
{module_include location='shipping_zones_table_header'}
{module_include location='shipping_zones_table_header'}
<th>{intl l="Actions"}</th>
</tr>
</thead>
<th>{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<td>So Colissimo</td>
<tbody>
<tr>
<td>So Colissimo</td>
{module_include location='shipping_zones_table_row'}
{module_include location='shipping_zones_table_row'}
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
<a class="btn btn-default btn-xs shipping-zones-change" title="{intl l='Change this shipping zone'}" href="{url path="/admin/configuration/shipping_zones/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping zone could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
<tr>
<td>Chronopost</td>
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
<a class="btn btn-default btn-xs shipping-zones-change" title="{intl l='Change this shipping zone'}" href="{url path="/admin/configuration/shipping_zones/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping zone could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
<tr>
<td>Chronopost</td>
{module_include location='shipping_zones_table_row'}
{module_include location='shipping_zones_table_row'}
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
<a class="btn btn-default btn-xs shipping-zones-change" title="{intl l='Change this shipping zone'}" href="{url path="/admin/configuration/shipping_zones/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping zone could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
<tr>
<td>Kiala</td>
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
<a class="btn btn-default btn-xs shipping-zones-change" title="{intl l='Change this shipping zone'}" href="{url path="/admin/configuration/shipping_zones/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping zone could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
<tr>
<td>Kiala</td>
{module_include location='shipping_zones_table_row'}
{module_include location='shipping_zones_table_row'}
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
<a class="btn btn-default btn-xs shipping-zones-change" title="{intl l='Change this shipping zone'}" href="{url path="/admin/configuration/shipping_zones/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping zone could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
</tbody>
</table>
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
<a class="btn btn-default btn-xs shipping-zones-change" title="{intl l='Change this shipping zone'}" href="{url path="/admin/configuration/shipping_zones/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping zone could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@@ -25,86 +25,88 @@
{if ! empty($general_error) }
<div class="alert alert-danger">{$general_error}</div>
{/if}
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia product templates'}
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia product templates'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.templates.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product template'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/templates'
label="{intl l='ID'}"
}
</th>
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.templates.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product template'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/templates'
label="{intl l='ID'}"
}
</th>
<th>
{admin_sortable_header
current_order=$order
order='alpha'
reverse_order='alpha_reverse'
path='/admin/configuration/templates'
label="{intl l='Title'}"
}
</th>
<th>
{admin_sortable_header
current_order=$order
order='alpha'
reverse_order='alpha_reverse'
path='/admin/configuration/templates'
label="{intl l='Title'}"
}
</th>
{module_include location='templates_table_header'}
{module_include location='templates_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="list" type="template" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="list" type="template" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
<a title="{intl l='Change this template'}" href="{url path='/admin/configuration/templates/update' template_id=$ID}">{$NAME}</a>
{/loop}
{elseloop rel="can_change"}
{$NAME}
{/elseloop}
</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
<a title="{intl l='Change this template'}" href="{url path='/admin/configuration/templates/update' template_id=$ID}">{$NAME}</a>
{/loop}
{elseloop rel="can_change"}
{$NAME}
{/elseloop}
</td>
{module_include location='templates_table_row'}
{module_include location='templates_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
<a class="btn btn-default btn-xs template-change" title="{intl l='Change this product template'}" href="{url path='/admin/configuration/templates/update' template_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
<a class="btn btn-default btn-xs template-change" title="{intl l='Change this product template'}" href="{url path='/admin/configuration/templates/update' template_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.delete"}
<a class="btn btn-default btn-xs template-delete" title="{intl l='Delete this product template'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.delete"}
<a class="btn btn-default btn-xs template-delete" title="{intl l='Delete this product template'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No product template has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No product template has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>
</div>

View File

@@ -21,6 +21,7 @@
<div class="col-md-12">
<form action="{url path='/admin/configuration/variables/update-values'}" method="post">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Thelia system variables'}
@@ -122,6 +123,7 @@
{/loop}
</tbody>
</table>
</div>
</div>
</form>
</div>

View File

@@ -262,17 +262,24 @@
<div id="payment-method" class="panel">
<div class="panel-heading">Choose your payment method</div>
{if $error}
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
{/if}
<div class="panel-body">
<ul class="list-payment">
{loop type="payment" name="payments" force_return="true"}
{assign "paymentModuleId" $ID}
{loop type="image" name="paymentspicture" source="module" source_id=$ID force_return="true" width="100" height="72"}
<li>
<div class="radio">
<label for="payment_{$ID}">
<input type="radio" name="payment" id="payment_{$ID}" value="test">
<label for="payment_{$paymentModuleId}_{$ID}">
<input type="radio" name="{$name}" id="payment_{$paymentModuleId}_{$ID}" value="{$paymentModuleId}">
<img src="{$IMAGE_URL}">
</label>
</div>
@@ -288,7 +295,7 @@
{/form_field}
<a href="{url path="/order/delivery"}" role="button" class="btn btn-back"><span>Back</span></a>
<button type="submit" class="btn btn-checkout-next"><span>TO REMOVE</span></button>
<button type="submit" class="btn btn-checkout-next"><span>Next Step</span></button>
</form>
{/form}

View File

@@ -0,0 +1,60 @@
{extends file="layout.tpl"}
{block name="breadcrumb"}
<nav class="nav-breadcrumb" role="navigation" aria-labelledby="breadcrumb-label">
<strong id="breadcrumb-label">You are here: </strong>
<ul class="breadcrumb" itemprop="breadcrumb">
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{navigate to="index"}" itemprop="url"><span itemprop="title">Home</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{url path="/cart"}" itemprop="url"><span itemprop="title">Cart</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">Secure Payment</span></li>
</ul>
</nav><!-- /.nav-breadcrumb -->
{/block}
{block name="main-content"}
<div class="main">
<article class="col-main clearfix" role="main" aria-labelledby="main-label">
<h1 id="main-label" class="page-header">Your Cart</h1>
<div class="btn-group checkout-progress">
<a href="cart.php" role="button" class="btn btn-step disabled"><span class="step-nb">1</span> <span class="step-label">Your Cart</span></a>
<a href="cart-step2.php" role="button" class="btn btn-step disabled"><span class="step-nb">2</span> <span class="step-label">Billing and delivery</span></a>
<a href="cart-step3.php" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">Check my order</span></a>
<a href="cart-step4.php" role="button" class="btn btn-step active"><span class="step-nb">4</span> <span class="step-label">Secure payment</span></a>
</div>
<div id="payment-success" class="panel">
<div class="panel-heading">
<h3 class="panel-title">You chose to pay by : <span class="payment-method">Cheque</span></h3>
</div>
<div class="panel-body">
<h3>Thank you for the trust you place in us.</h3>
<p>A summary of your order email has been sent to the following address: email@toto.com</p>
<p>Your order will be confirmed by us upon receipt of your payment.</p>
<dl class="dl-horizontal">
<dt>Order number : </dt>
<dd>PRO123456788978979</dd>
<dt>Date : </dt>
<dd>02/12/2013</dd>
<dt>Total : </dt>
<dd>$216.25</dd>
</dl>
</div>
</div>
<a href="{navigate to="index"}" role="button" class="btn btn-checkout-home"><span>Go home</span></a>
</article>
</div>
{/block}
{block name="javascript-initialization"}
<script type="text/javascript">
jQuery(function($order) {
});
</script>
{/block}