Merge branch 'master' into template
Conflicts: core/lib/Thelia/Core/Template/Loop/Product.php
This commit is contained in:
@@ -54,6 +54,13 @@ class ReloadDatabaseCommand extends BaseModuleGenerate
|
||||
$connection = Propel::getConnection(\Thelia\Model\Map\ProductTableMap::DATABASE_NAME);
|
||||
$connection = $connection->getWrappedConnection();
|
||||
|
||||
$tables = $connection->query("SHOW TABLES");
|
||||
$connection->query("SET FOREIGN_KEY_CHECKS = 0");
|
||||
foreach($tables as $table) {
|
||||
$connection->query(sprintf("DROP TABLE `%s`", $table[0]));
|
||||
}
|
||||
$connection->query("SET FOREIGN_KEY_CHECKS = 1");
|
||||
|
||||
$database = new Database($connection);
|
||||
$output->writeln(array(
|
||||
'',
|
||||
|
||||
@@ -63,6 +63,12 @@
|
||||
<form name="thelia.admin.product.creation" class="Thelia\Form\ProductCreationForm"/>
|
||||
<form name="thelia.admin.product.deletion" class="Thelia\Form\ProductModificationForm"/>
|
||||
|
||||
<form name="thelia.admin.folder.creation" class="Thelia\Form\FolderCreationForm"/>
|
||||
<form name="thelia.admin.folder.modification" class="Thelia\Form\FolderModificationForm"/>
|
||||
|
||||
<form name="thelia.admin.content.creation" class="Thelia\Form\ContentCreationForm"/>
|
||||
<form name="thelia.admin.content.modification" class="Thelia\Form\ContentModificationForm"/>
|
||||
|
||||
<form name="thelia.cart.add" class="Thelia\Form\CartAdd"/>
|
||||
|
||||
<form name="thelia.order.delivery" class="Thelia\Form\OrderDelivery"/>
|
||||
|
||||
@@ -156,7 +156,20 @@
|
||||
<default key="_controller">Thelia\Controller\Admin\ProductController::getAvailableRelatedContentAction</default>
|
||||
<requirement key="_format">xml|json</requirement>
|
||||
</route>
|
||||
|
||||
<!-- Folder routes management -->
|
||||
<route id="admin.folders.default" path="/admin/folders">
|
||||
<default key="_controller">Thelia\Controller\Admin\FolderController::indexAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.folders.create" path="/admin/folders/create">
|
||||
<default key="_controller">Thelia\Controller\Admin\FolderController::createAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.folders.update" path="/admin/folders/update/{folder_id}" methods="get">
|
||||
<default key="_controller">Thelia\Controller\Admin\FolderController::updateAction</default>
|
||||
<requirement key="folder_id">\d+</requirement>
|
||||
</route>
|
||||
|
||||
<!-- Route to the Coupon controller (process Coupon browsing) -->
|
||||
|
||||
@@ -388,7 +401,25 @@
|
||||
<requirement key="country_id">\d+</requirement>
|
||||
</route>
|
||||
|
||||
<!-- end countries routes management -->
|
||||
<!-- end countries routes management -->
|
||||
|
||||
<!-- Shipping zones routes management -->
|
||||
|
||||
<route id="admin.configuration.shipping-zones.default" path="/admin/configuration/shipping-zones">
|
||||
<default key="_controller">Thelia\Controller\Admin\ShippingZoneController::indexAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.shipping-zones.create" path="/admin/configuration/shipping-zones/create">
|
||||
<default key="_controller">Thelia\Controller\Admin\ShippingZoneController::createAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.shipping-zones.update.view" path="/admin/configuration/shipping-zones/update/{shipping_zones_id}" methods="get">
|
||||
<default key="_controller">Thelia\Controller\Admin\ShippingZoneController::updateAction</default>
|
||||
<requirement key="country_id">\d+</requirement>
|
||||
</route>
|
||||
|
||||
<!-- end shipping routes management -->
|
||||
|
||||
|
||||
<!-- feature and features value management -->
|
||||
|
||||
|
||||
46
core/lib/Thelia/Controller/Admin/FolderController.php
Normal file
46
core/lib/Thelia/Controller/Admin/FolderController.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?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\Controller\Admin;
|
||||
|
||||
/**
|
||||
* Class FolderController
|
||||
* @package Thelia\Controller\Admin
|
||||
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||
*/
|
||||
class FolderController extends BaseAdminController
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
if (null !== $response = $this->checkAuth("admin.folder.view")) return $response;
|
||||
return $this->render("folders", array("display_folder" => 20));
|
||||
}
|
||||
|
||||
public function updateAction($folder_id)
|
||||
{
|
||||
|
||||
return $this->render("folder-edit", array(
|
||||
"folder_id" => $folder_id
|
||||
));
|
||||
}
|
||||
}
|
||||
46
core/lib/Thelia/Controller/Admin/ShippingZoneController.php
Normal file
46
core/lib/Thelia/Controller/Admin/ShippingZoneController.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?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\Controller\Admin;
|
||||
|
||||
/**
|
||||
* Class FolderController
|
||||
* @package Thelia\Controller\Admin
|
||||
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||
*/
|
||||
class ShippingZoneController extends BaseAdminController
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
if (null !== $response = $this->checkAuth("admin.shipping-zones.view")) return $response;
|
||||
return $this->render("shipping-zones", array("display_shipping_zone" => 20));
|
||||
}
|
||||
|
||||
public function updateAction($shipping_zones_id)
|
||||
{
|
||||
|
||||
return $this->render("shipping-zones-edit", array(
|
||||
"shipping_zones_id" => $shipping_zones_id
|
||||
));
|
||||
}
|
||||
}
|
||||
60
core/lib/Thelia/Core/Event/GenerateRewrittenUrlEvent.php
Normal file
60
core/lib/Thelia/Core/Event/GenerateRewrittenUrlEvent.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?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;
|
||||
|
||||
|
||||
/**
|
||||
* Class GenerateRewrittenUrlEvent
|
||||
* @package Thelia\Core\Event
|
||||
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||
*/
|
||||
class GenerateRewrittenUrlEvent extends ActionEvent {
|
||||
|
||||
protected $object;
|
||||
protected $locale;
|
||||
|
||||
protected $url;
|
||||
|
||||
public function __construct($object, $locale)
|
||||
{
|
||||
$this->object;
|
||||
$this->locale;
|
||||
}
|
||||
|
||||
public function setUrl($url)
|
||||
{
|
||||
$this->url = $url;
|
||||
}
|
||||
|
||||
public function isRewritten()
|
||||
{
|
||||
return null !== $this->url;
|
||||
}
|
||||
|
||||
public function getUrl()
|
||||
{
|
||||
return $this->url;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -441,4 +441,9 @@ final class TheliaEvents
|
||||
*/
|
||||
const MAILTRANSPORTER_CONFIG = 'action.mailertransporter.config';
|
||||
|
||||
/**
|
||||
* sent when Thelia try to generate a rewriten url
|
||||
*/
|
||||
const GENERATE_REWRITTENURL = 'action.generate_rewritenurl';
|
||||
|
||||
}
|
||||
|
||||
@@ -598,6 +598,8 @@ class Product extends BaseI18nLoop
|
||||
|
||||
$loopResult = new LoopResult($products);
|
||||
|
||||
$taxCountry = CountryQuery::create()->findPk(64); // @TODO : make it magic
|
||||
|
||||
foreach ($products as $product) {
|
||||
|
||||
$loopResultRow = new LoopResultRow($loopResult, $product, $this->versionable, $this->timestampable, $this->countable);
|
||||
@@ -606,7 +608,7 @@ class Product extends BaseI18nLoop
|
||||
|
||||
try {
|
||||
$taxedPrice = $product->getTaxedPrice(
|
||||
CountryQuery::create()->findOneById(64) // @TODO : make it magic
|
||||
$taxCountry
|
||||
);
|
||||
} catch(TaxEngineException $e) {
|
||||
$taxedPrice = null;
|
||||
|
||||
@@ -31,6 +31,7 @@ use Thelia\Core\Template\Element\LoopResultRow;
|
||||
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||
|
||||
use Thelia\Exception\TaxEngineException;
|
||||
use Thelia\Model\Base\ProductSaleElementsQuery;
|
||||
use Thelia\Model\CountryQuery;
|
||||
use Thelia\Model\CurrencyQuery;
|
||||
@@ -147,13 +148,15 @@ class ProductSaleElements extends BaseLoop
|
||||
|
||||
$loopResult = new LoopResult($PSEValues);
|
||||
|
||||
$taxCountry = CountryQuery::create()->findPk(64); // @TODO : make it magic
|
||||
|
||||
foreach ($PSEValues as $PSEValue) {
|
||||
$loopResultRow = new LoopResultRow($loopResult, $PSEValue, $this->versionable, $this->timestampable, $this->countable);
|
||||
|
||||
$price = $PSEValue->getPrice();
|
||||
try {
|
||||
$taxedPrice = $PSEValue->getTaxedPrice(
|
||||
CountryQuery::create()->findOneById(64) // @TODO : make it magic
|
||||
$taxCountry
|
||||
);
|
||||
} catch(TaxEngineException $e) {
|
||||
$taxedPrice = null;
|
||||
@@ -161,7 +164,7 @@ class ProductSaleElements extends BaseLoop
|
||||
$promoPrice = $PSEValue->getPromoPrice();
|
||||
try {
|
||||
$taxedPromoPrice = $PSEValue->getTaxedPromoPrice(
|
||||
CountryQuery::create()->findOneById(64) // @TODO : make it magic
|
||||
$taxCountry
|
||||
);
|
||||
} catch(TaxEngineException $e) {
|
||||
$taxedPromoPrice = null;
|
||||
|
||||
@@ -27,6 +27,7 @@ use Thelia\Core\Template\Smarty\SmartyPluginDescriptor;
|
||||
use Thelia\Core\Template\Smarty\AbstractSmartyPlugin;
|
||||
use Thelia\Tools\URL;
|
||||
use Thelia\Core\HttpFoundation\Request;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
|
||||
class UrlGenerator extends AbstractSmartyPlugin
|
||||
{
|
||||
@@ -47,11 +48,27 @@ class UrlGenerator extends AbstractSmartyPlugin
|
||||
public function generateUrlFunction($params, &$smarty)
|
||||
{
|
||||
// the path to process
|
||||
$path = $this->getParam($params, 'path');
|
||||
$path = $this->getParam($params, 'path', null);
|
||||
$file = $this->getParam($params, 'file', null);
|
||||
|
||||
if ($file !== null) {
|
||||
$path = $file;
|
||||
$mode = URL::PATH_TO_FILE;
|
||||
}
|
||||
else if ($path !== null) {
|
||||
$mode = URL::WITH_INDEX_PAGE;
|
||||
}
|
||||
else {
|
||||
throw \InvalidArgumentException(Translator::getInstance()->trans("Please specify either 'path' or 'file' parameter in {url} function."));
|
||||
}
|
||||
|
||||
$target = $this->getParam($params, 'target', null);
|
||||
|
||||
$url = URL::getInstance()->absoluteUrl($path, $this->getArgsFromParam($params, array('path', 'target')));
|
||||
$url = URL::getInstance()->absoluteUrl(
|
||||
$path,
|
||||
$this->getArgsFromParam($params, array('path', 'file', 'target')),
|
||||
$mode
|
||||
);
|
||||
|
||||
if ($target != null) $url .= '#'.$target;
|
||||
|
||||
|
||||
63
core/lib/Thelia/Form/ContentCreationForm.php
Normal file
63
core/lib/Thelia/Form/ContentCreationForm.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?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\NotBlank;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
|
||||
class ContentCreationForm extends BaseForm
|
||||
{
|
||||
protected function buildForm($change_mode = false)
|
||||
{
|
||||
$this->formBuilder
|
||||
->add("title", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => "Content title *",
|
||||
"label_attr" => array(
|
||||
"for" => "title"
|
||||
)
|
||||
))
|
||||
->add("default_folder", "integer", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
)
|
||||
))
|
||||
->add("locale", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
)
|
||||
))
|
||||
->add("visible", "integer", array(
|
||||
"label" => Translator::getInstance()->trans("This content is online."),
|
||||
"label_attr" => array("for" => "visible_create")
|
||||
))
|
||||
;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return "thelia_content_creation";
|
||||
}
|
||||
}
|
||||
66
core/lib/Thelia/Form/FolderCreationForm.php
Normal file
66
core/lib/Thelia/Form/FolderCreationForm.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?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\NotBlank;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
|
||||
class FolderCreationForm extends BaseForm
|
||||
{
|
||||
protected function buildForm()
|
||||
{
|
||||
$this->formBuilder
|
||||
->add("title", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Folder title *"),
|
||||
"label_attr" => array(
|
||||
"for" => "title"
|
||||
)
|
||||
))
|
||||
->add("parent", "text", array(
|
||||
"label" => Translator::getInstance()->trans("Parent folder *"),
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label_attr" => array("for" => "parent_create")
|
||||
))
|
||||
->add("locale", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label_attr" => array("for" => "locale_create")
|
||||
))
|
||||
->add("visible", "integer", array(
|
||||
"label" => Translator::getInstance()->trans("This folder is online."),
|
||||
"label_attr" => array("for" => "visible_create")
|
||||
))
|
||||
;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return "thelia_folder_creation";
|
||||
}
|
||||
}
|
||||
55
core/lib/Thelia/Form/FolderModificationForm.php
Normal file
55
core/lib/Thelia/Form/FolderModificationForm.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?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\GreaterThan;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
|
||||
class FolderModificationForm extends FolderCreationForm
|
||||
{
|
||||
use StandardDescriptionFieldsTrait;
|
||||
|
||||
protected function buildForm()
|
||||
{
|
||||
parent::buildForm(true);
|
||||
|
||||
$this->formBuilder
|
||||
->add("id", "hidden", array("constraints" => array(new GreaterThan(array('value' => 0)))))
|
||||
|
||||
->add("url", "text", array(
|
||||
"label" => Translator::getInstance()->trans("Rewriten URL *"),
|
||||
"constraints" => array(new NotBlank()),
|
||||
"label_attr" => array("for" => "rewriten_url")
|
||||
))
|
||||
;
|
||||
|
||||
// Add standard description fields, excluding title and locale, which a re defined in parent class
|
||||
$this->addStandardDescFields(array('title', 'locale'));
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return "thelia_folder_modification";
|
||||
}
|
||||
}
|
||||
@@ -44,12 +44,14 @@ class CheckPermission extends BaseInstall
|
||||
const DIR_CONF = 'local/config';
|
||||
const DIR_LOG = 'log';
|
||||
const DIR_CACHE = 'cache';
|
||||
const DIR_WEB = 'web';
|
||||
|
||||
/** @var array Directory needed to be writable */
|
||||
protected $directoriesToBeWritable = array(
|
||||
self::DIR_CONF,
|
||||
self::DIR_LOG,
|
||||
self::DIR_CACHE,
|
||||
self::DIR_WEB,
|
||||
);
|
||||
|
||||
/** @var array Minimum server configuration necessary */
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model;
|
||||
|
||||
use Thelia\Model\Base\AttributeCategory as BaseAttributeCategory;
|
||||
|
||||
class AttributeCategory extends BaseAttributeCategory {
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model;
|
||||
|
||||
use Thelia\Model\Base\AttributeCategoryQuery as BaseAttributeCategoryQuery;
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'attribute_category' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
*/
|
||||
class AttributeCategoryQuery extends BaseAttributeCategoryQuery {
|
||||
|
||||
} // AttributeCategoryQuery
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,759 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model\Base;
|
||||
|
||||
use \Exception;
|
||||
use \PDO;
|
||||
use Propel\Runtime\Propel;
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelJoin;
|
||||
use Propel\Runtime\Collection\Collection;
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Thelia\Model\AttributeCategory as ChildAttributeCategory;
|
||||
use Thelia\Model\AttributeCategoryQuery as ChildAttributeCategoryQuery;
|
||||
use Thelia\Model\Map\AttributeCategoryTableMap;
|
||||
|
||||
/**
|
||||
* Base class that represents a query for the 'attribute_category' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @method ChildAttributeCategoryQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildAttributeCategoryQuery orderByCategoryId($order = Criteria::ASC) Order by the category_id column
|
||||
* @method ChildAttributeCategoryQuery orderByAttributeId($order = Criteria::ASC) Order by the attribute_id column
|
||||
* @method ChildAttributeCategoryQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildAttributeCategoryQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
* @method ChildAttributeCategoryQuery groupById() Group by the id column
|
||||
* @method ChildAttributeCategoryQuery groupByCategoryId() Group by the category_id column
|
||||
* @method ChildAttributeCategoryQuery groupByAttributeId() Group by the attribute_id column
|
||||
* @method ChildAttributeCategoryQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildAttributeCategoryQuery groupByUpdatedAt() Group by the updated_at column
|
||||
*
|
||||
* @method ChildAttributeCategoryQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildAttributeCategoryQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildAttributeCategoryQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method ChildAttributeCategoryQuery leftJoinCategory($relationAlias = null) Adds a LEFT JOIN clause to the query using the Category relation
|
||||
* @method ChildAttributeCategoryQuery rightJoinCategory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Category relation
|
||||
* @method ChildAttributeCategoryQuery innerJoinCategory($relationAlias = null) Adds a INNER JOIN clause to the query using the Category relation
|
||||
*
|
||||
* @method ChildAttributeCategoryQuery leftJoinAttribute($relationAlias = null) Adds a LEFT JOIN clause to the query using the Attribute relation
|
||||
* @method ChildAttributeCategoryQuery rightJoinAttribute($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Attribute relation
|
||||
* @method ChildAttributeCategoryQuery innerJoinAttribute($relationAlias = null) Adds a INNER JOIN clause to the query using the Attribute relation
|
||||
*
|
||||
* @method ChildAttributeCategory findOne(ConnectionInterface $con = null) Return the first ChildAttributeCategory matching the query
|
||||
* @method ChildAttributeCategory findOneOrCreate(ConnectionInterface $con = null) Return the first ChildAttributeCategory matching the query, or a new ChildAttributeCategory object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method ChildAttributeCategory findOneById(int $id) Return the first ChildAttributeCategory filtered by the id column
|
||||
* @method ChildAttributeCategory findOneByCategoryId(int $category_id) Return the first ChildAttributeCategory filtered by the category_id column
|
||||
* @method ChildAttributeCategory findOneByAttributeId(int $attribute_id) Return the first ChildAttributeCategory filtered by the attribute_id column
|
||||
* @method ChildAttributeCategory findOneByCreatedAt(string $created_at) Return the first ChildAttributeCategory filtered by the created_at column
|
||||
* @method ChildAttributeCategory findOneByUpdatedAt(string $updated_at) Return the first ChildAttributeCategory filtered by the updated_at column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildAttributeCategory objects filtered by the id column
|
||||
* @method array findByCategoryId(int $category_id) Return ChildAttributeCategory objects filtered by the category_id column
|
||||
* @method array findByAttributeId(int $attribute_id) Return ChildAttributeCategory objects filtered by the attribute_id column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildAttributeCategory objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildAttributeCategory objects filtered by the updated_at column
|
||||
*
|
||||
*/
|
||||
abstract class AttributeCategoryQuery extends ModelCriteria
|
||||
{
|
||||
|
||||
/**
|
||||
* Initializes internal state of \Thelia\Model\Base\AttributeCategoryQuery object.
|
||||
*
|
||||
* @param string $dbName The database name
|
||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||
*/
|
||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\AttributeCategory', $modelAlias = null)
|
||||
{
|
||||
parent::__construct($dbName, $modelName, $modelAlias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new ChildAttributeCategoryQuery object.
|
||||
*
|
||||
* @param string $modelAlias The alias of a model in the query
|
||||
* @param Criteria $criteria Optional Criteria to build the query from
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery
|
||||
*/
|
||||
public static function create($modelAlias = null, $criteria = null)
|
||||
{
|
||||
if ($criteria instanceof \Thelia\Model\AttributeCategoryQuery) {
|
||||
return $criteria;
|
||||
}
|
||||
$query = new \Thelia\Model\AttributeCategoryQuery();
|
||||
if (null !== $modelAlias) {
|
||||
$query->setModelAlias($modelAlias);
|
||||
}
|
||||
if ($criteria instanceof Criteria) {
|
||||
$query->mergeWith($criteria);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
* Propel uses the instance pool to skip the database if the object exists.
|
||||
* Go fast if the query is untouched.
|
||||
*
|
||||
* <code>
|
||||
* $obj = $c->findPk(12, $con);
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ChildAttributeCategory|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
public function findPk($key, $con = null)
|
||||
{
|
||||
if ($key === null) {
|
||||
return null;
|
||||
}
|
||||
if ((null !== ($obj = AttributeCategoryTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
||||
// the object is already in the instance pool
|
||||
return $obj;
|
||||
}
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection(AttributeCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|
||||
|| $this->map || $this->having || $this->joins) {
|
||||
return $this->findPkComplex($key, $con);
|
||||
} else {
|
||||
return $this->findPkSimple($key, $con);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key using raw SQL to go fast.
|
||||
* Bypass doSelect() and the object formatter by using generated code.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildAttributeCategory A model object, or null if the key is not found
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, CATEGORY_ID, ATTRIBUTE_ID, CREATED_AT, UPDATED_AT FROM attribute_category WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
} catch (Exception $e) {
|
||||
Propel::log($e->getMessage(), Propel::LOG_ERR);
|
||||
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e);
|
||||
}
|
||||
$obj = null;
|
||||
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||
$obj = new ChildAttributeCategory();
|
||||
$obj->hydrate($row);
|
||||
AttributeCategoryTableMap::addInstanceToPool($obj, (string) $key);
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildAttributeCategory|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
protected function findPkComplex($key, $con)
|
||||
{
|
||||
// As the query uses a PK condition, no limit(1) is necessary.
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$dataFetcher = $criteria
|
||||
->filterByPrimaryKey($key)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find objects by primary key
|
||||
* <code>
|
||||
* $objs = $c->findPks(array(12, 56, 832), $con);
|
||||
* </code>
|
||||
* @param array $keys Primary keys to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
|
||||
*/
|
||||
public function findPks($keys, $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$dataFetcher = $criteria
|
||||
->filterByPrimaryKeys($keys)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->format($dataFetcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by primary key
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKey($key)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(AttributeCategoryTableMap::ID, $key, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a list of primary keys
|
||||
*
|
||||
* @param array $keys The list of primary key to use for the query
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKeys($keys)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(AttributeCategoryTableMap::ID, $keys, Criteria::IN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterById(1234); // WHERE id = 1234
|
||||
* $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
|
||||
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $id The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterById($id = null, $comparison = null)
|
||||
{
|
||||
if (is_array($id)) {
|
||||
$useMinMax = false;
|
||||
if (isset($id['min'])) {
|
||||
$this->addUsingAlias(AttributeCategoryTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($id['max'])) {
|
||||
$this->addUsingAlias(AttributeCategoryTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(AttributeCategoryTableMap::ID, $id, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the category_id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByCategoryId(1234); // WHERE category_id = 1234
|
||||
* $query->filterByCategoryId(array(12, 34)); // WHERE category_id IN (12, 34)
|
||||
* $query->filterByCategoryId(array('min' => 12)); // WHERE category_id > 12
|
||||
* </code>
|
||||
*
|
||||
* @see filterByCategory()
|
||||
*
|
||||
* @param mixed $categoryId The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCategoryId($categoryId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($categoryId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($categoryId['min'])) {
|
||||
$this->addUsingAlias(AttributeCategoryTableMap::CATEGORY_ID, $categoryId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($categoryId['max'])) {
|
||||
$this->addUsingAlias(AttributeCategoryTableMap::CATEGORY_ID, $categoryId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(AttributeCategoryTableMap::CATEGORY_ID, $categoryId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the attribute_id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByAttributeId(1234); // WHERE attribute_id = 1234
|
||||
* $query->filterByAttributeId(array(12, 34)); // WHERE attribute_id IN (12, 34)
|
||||
* $query->filterByAttributeId(array('min' => 12)); // WHERE attribute_id > 12
|
||||
* </code>
|
||||
*
|
||||
* @see filterByAttribute()
|
||||
*
|
||||
* @param mixed $attributeId The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByAttributeId($attributeId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($attributeId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($attributeId['min'])) {
|
||||
$this->addUsingAlias(AttributeCategoryTableMap::ATTRIBUTE_ID, $attributeId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($attributeId['max'])) {
|
||||
$this->addUsingAlias(AttributeCategoryTableMap::ATTRIBUTE_ID, $attributeId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(AttributeCategoryTableMap::ATTRIBUTE_ID, $attributeId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the created_at column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14'
|
||||
* $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14'
|
||||
* $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13'
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $createdAt The value to use as filter.
|
||||
* Values can be integers (unix timestamps), DateTime objects, or strings.
|
||||
* Empty strings are treated as NULL.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCreatedAt($createdAt = null, $comparison = null)
|
||||
{
|
||||
if (is_array($createdAt)) {
|
||||
$useMinMax = false;
|
||||
if (isset($createdAt['min'])) {
|
||||
$this->addUsingAlias(AttributeCategoryTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($createdAt['max'])) {
|
||||
$this->addUsingAlias(AttributeCategoryTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(AttributeCategoryTableMap::CREATED_AT, $createdAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the updated_at column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14'
|
||||
* $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14'
|
||||
* $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13'
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $updatedAt The value to use as filter.
|
||||
* Values can be integers (unix timestamps), DateTime objects, or strings.
|
||||
* Empty strings are treated as NULL.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByUpdatedAt($updatedAt = null, $comparison = null)
|
||||
{
|
||||
if (is_array($updatedAt)) {
|
||||
$useMinMax = false;
|
||||
if (isset($updatedAt['min'])) {
|
||||
$this->addUsingAlias(AttributeCategoryTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($updatedAt['max'])) {
|
||||
$this->addUsingAlias(AttributeCategoryTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(AttributeCategoryTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\Category object
|
||||
*
|
||||
* @param \Thelia\Model\Category|ObjectCollection $category The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCategory($category, $comparison = null)
|
||||
{
|
||||
if ($category instanceof \Thelia\Model\Category) {
|
||||
return $this
|
||||
->addUsingAlias(AttributeCategoryTableMap::CATEGORY_ID, $category->getId(), $comparison);
|
||||
} elseif ($category instanceof ObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(AttributeCategoryTableMap::CATEGORY_ID, $category->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByCategory() only accepts arguments of type \Thelia\Model\Category or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the Category relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCategory($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('Category');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'Category');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the Category relation Category object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return \Thelia\Model\CategoryQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCategory($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'Category', '\Thelia\Model\CategoryQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\Attribute object
|
||||
*
|
||||
* @param \Thelia\Model\Attribute|ObjectCollection $attribute The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByAttribute($attribute, $comparison = null)
|
||||
{
|
||||
if ($attribute instanceof \Thelia\Model\Attribute) {
|
||||
return $this
|
||||
->addUsingAlias(AttributeCategoryTableMap::ATTRIBUTE_ID, $attribute->getId(), $comparison);
|
||||
} elseif ($attribute instanceof ObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(AttributeCategoryTableMap::ATTRIBUTE_ID, $attribute->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByAttribute() only accepts arguments of type \Thelia\Model\Attribute or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the Attribute relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinAttribute($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('Attribute');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'Attribute');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the Attribute relation Attribute object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return \Thelia\Model\AttributeQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useAttributeQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinAttribute($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'Attribute', '\Thelia\Model\AttributeQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
* @param ChildAttributeCategory $attributeCategory Object to remove from the list of results
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function prune($attributeCategory = null)
|
||||
{
|
||||
if ($attributeCategory) {
|
||||
$this->addUsingAlias(AttributeCategoryTableMap::ID, $attributeCategory->getId(), Criteria::NOT_EQUAL);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all rows from the attribute_category table.
|
||||
*
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver).
|
||||
*/
|
||||
public function doDeleteAll(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(AttributeCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||
$con->beginTransaction();
|
||||
$affectedRows += parent::doDeleteAll($con);
|
||||
// Because this db requires some delete cascade/set null emulation, we have to
|
||||
// clear the cached instance *after* the emulation has happened (since
|
||||
// instances get re-added by the select statement contained therein).
|
||||
AttributeCategoryTableMap::clearInstancePool();
|
||||
AttributeCategoryTableMap::clearRelatedInstancePool();
|
||||
|
||||
$con->commit();
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return $affectedRows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a DELETE on the database, given a ChildAttributeCategory or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ChildAttributeCategory object or primary key or array of primary keys
|
||||
* which is used to create the DELETE statement
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||
* if supported by native driver or if emulated using Propel.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public function delete(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(AttributeCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = $this;
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(AttributeCategoryTableMap::DATABASE_NAME);
|
||||
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||
$con->beginTransaction();
|
||||
|
||||
|
||||
AttributeCategoryTableMap::removeInstanceFromPool($criteria);
|
||||
|
||||
$affectedRows += ModelCriteria::delete($con);
|
||||
AttributeCategoryTableMap::clearRelatedInstancePool();
|
||||
$con->commit();
|
||||
|
||||
return $affectedRows;
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
|
||||
/**
|
||||
* Filter by the latest updated
|
||||
*
|
||||
* @param int $nbDays Maximum age of the latest update in days
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function recentlyUpdated($nbDays = 7)
|
||||
{
|
||||
return $this->addUsingAlias(AttributeCategoryTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter by the latest created
|
||||
*
|
||||
* @param int $nbDays Maximum age of in days
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function recentlyCreated($nbDays = 7)
|
||||
{
|
||||
return $this->addUsingAlias(AttributeCategoryTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by update date desc
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function lastUpdatedFirst()
|
||||
{
|
||||
return $this->addDescendingOrderByColumn(AttributeCategoryTableMap::UPDATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by update date asc
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function firstUpdatedFirst()
|
||||
{
|
||||
return $this->addAscendingOrderByColumn(AttributeCategoryTableMap::UPDATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by create date desc
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function lastCreatedFirst()
|
||||
{
|
||||
return $this->addDescendingOrderByColumn(AttributeCategoryTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by create date asc
|
||||
*
|
||||
* @return ChildAttributeCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function firstCreatedFirst()
|
||||
{
|
||||
return $this->addAscendingOrderByColumn(AttributeCategoryTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
} // AttributeCategoryQuery
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,759 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model\Base;
|
||||
|
||||
use \Exception;
|
||||
use \PDO;
|
||||
use Propel\Runtime\Propel;
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelJoin;
|
||||
use Propel\Runtime\Collection\Collection;
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Thelia\Model\FeatureCategory as ChildFeatureCategory;
|
||||
use Thelia\Model\FeatureCategoryQuery as ChildFeatureCategoryQuery;
|
||||
use Thelia\Model\Map\FeatureCategoryTableMap;
|
||||
|
||||
/**
|
||||
* Base class that represents a query for the 'feature_category' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @method ChildFeatureCategoryQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildFeatureCategoryQuery orderByFeatureId($order = Criteria::ASC) Order by the feature_id column
|
||||
* @method ChildFeatureCategoryQuery orderByCategoryId($order = Criteria::ASC) Order by the category_id column
|
||||
* @method ChildFeatureCategoryQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildFeatureCategoryQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
* @method ChildFeatureCategoryQuery groupById() Group by the id column
|
||||
* @method ChildFeatureCategoryQuery groupByFeatureId() Group by the feature_id column
|
||||
* @method ChildFeatureCategoryQuery groupByCategoryId() Group by the category_id column
|
||||
* @method ChildFeatureCategoryQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildFeatureCategoryQuery groupByUpdatedAt() Group by the updated_at column
|
||||
*
|
||||
* @method ChildFeatureCategoryQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildFeatureCategoryQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildFeatureCategoryQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method ChildFeatureCategoryQuery leftJoinCategory($relationAlias = null) Adds a LEFT JOIN clause to the query using the Category relation
|
||||
* @method ChildFeatureCategoryQuery rightJoinCategory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Category relation
|
||||
* @method ChildFeatureCategoryQuery innerJoinCategory($relationAlias = null) Adds a INNER JOIN clause to the query using the Category relation
|
||||
*
|
||||
* @method ChildFeatureCategoryQuery leftJoinFeature($relationAlias = null) Adds a LEFT JOIN clause to the query using the Feature relation
|
||||
* @method ChildFeatureCategoryQuery rightJoinFeature($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Feature relation
|
||||
* @method ChildFeatureCategoryQuery innerJoinFeature($relationAlias = null) Adds a INNER JOIN clause to the query using the Feature relation
|
||||
*
|
||||
* @method ChildFeatureCategory findOne(ConnectionInterface $con = null) Return the first ChildFeatureCategory matching the query
|
||||
* @method ChildFeatureCategory findOneOrCreate(ConnectionInterface $con = null) Return the first ChildFeatureCategory matching the query, or a new ChildFeatureCategory object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method ChildFeatureCategory findOneById(int $id) Return the first ChildFeatureCategory filtered by the id column
|
||||
* @method ChildFeatureCategory findOneByFeatureId(int $feature_id) Return the first ChildFeatureCategory filtered by the feature_id column
|
||||
* @method ChildFeatureCategory findOneByCategoryId(int $category_id) Return the first ChildFeatureCategory filtered by the category_id column
|
||||
* @method ChildFeatureCategory findOneByCreatedAt(string $created_at) Return the first ChildFeatureCategory filtered by the created_at column
|
||||
* @method ChildFeatureCategory findOneByUpdatedAt(string $updated_at) Return the first ChildFeatureCategory filtered by the updated_at column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildFeatureCategory objects filtered by the id column
|
||||
* @method array findByFeatureId(int $feature_id) Return ChildFeatureCategory objects filtered by the feature_id column
|
||||
* @method array findByCategoryId(int $category_id) Return ChildFeatureCategory objects filtered by the category_id column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildFeatureCategory objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildFeatureCategory objects filtered by the updated_at column
|
||||
*
|
||||
*/
|
||||
abstract class FeatureCategoryQuery extends ModelCriteria
|
||||
{
|
||||
|
||||
/**
|
||||
* Initializes internal state of \Thelia\Model\Base\FeatureCategoryQuery object.
|
||||
*
|
||||
* @param string $dbName The database name
|
||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||
*/
|
||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\FeatureCategory', $modelAlias = null)
|
||||
{
|
||||
parent::__construct($dbName, $modelName, $modelAlias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new ChildFeatureCategoryQuery object.
|
||||
*
|
||||
* @param string $modelAlias The alias of a model in the query
|
||||
* @param Criteria $criteria Optional Criteria to build the query from
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery
|
||||
*/
|
||||
public static function create($modelAlias = null, $criteria = null)
|
||||
{
|
||||
if ($criteria instanceof \Thelia\Model\FeatureCategoryQuery) {
|
||||
return $criteria;
|
||||
}
|
||||
$query = new \Thelia\Model\FeatureCategoryQuery();
|
||||
if (null !== $modelAlias) {
|
||||
$query->setModelAlias($modelAlias);
|
||||
}
|
||||
if ($criteria instanceof Criteria) {
|
||||
$query->mergeWith($criteria);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
* Propel uses the instance pool to skip the database if the object exists.
|
||||
* Go fast if the query is untouched.
|
||||
*
|
||||
* <code>
|
||||
* $obj = $c->findPk(12, $con);
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ChildFeatureCategory|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
public function findPk($key, $con = null)
|
||||
{
|
||||
if ($key === null) {
|
||||
return null;
|
||||
}
|
||||
if ((null !== ($obj = FeatureCategoryTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
||||
// the object is already in the instance pool
|
||||
return $obj;
|
||||
}
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection(FeatureCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|
||||
|| $this->map || $this->having || $this->joins) {
|
||||
return $this->findPkComplex($key, $con);
|
||||
} else {
|
||||
return $this->findPkSimple($key, $con);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key using raw SQL to go fast.
|
||||
* Bypass doSelect() and the object formatter by using generated code.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildFeatureCategory A model object, or null if the key is not found
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, FEATURE_ID, CATEGORY_ID, CREATED_AT, UPDATED_AT FROM feature_category WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
} catch (Exception $e) {
|
||||
Propel::log($e->getMessage(), Propel::LOG_ERR);
|
||||
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e);
|
||||
}
|
||||
$obj = null;
|
||||
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||
$obj = new ChildFeatureCategory();
|
||||
$obj->hydrate($row);
|
||||
FeatureCategoryTableMap::addInstanceToPool($obj, (string) $key);
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildFeatureCategory|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
protected function findPkComplex($key, $con)
|
||||
{
|
||||
// As the query uses a PK condition, no limit(1) is necessary.
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$dataFetcher = $criteria
|
||||
->filterByPrimaryKey($key)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find objects by primary key
|
||||
* <code>
|
||||
* $objs = $c->findPks(array(12, 56, 832), $con);
|
||||
* </code>
|
||||
* @param array $keys Primary keys to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
|
||||
*/
|
||||
public function findPks($keys, $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$dataFetcher = $criteria
|
||||
->filterByPrimaryKeys($keys)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->format($dataFetcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by primary key
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKey($key)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(FeatureCategoryTableMap::ID, $key, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a list of primary keys
|
||||
*
|
||||
* @param array $keys The list of primary key to use for the query
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKeys($keys)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(FeatureCategoryTableMap::ID, $keys, Criteria::IN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterById(1234); // WHERE id = 1234
|
||||
* $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
|
||||
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $id The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterById($id = null, $comparison = null)
|
||||
{
|
||||
if (is_array($id)) {
|
||||
$useMinMax = false;
|
||||
if (isset($id['min'])) {
|
||||
$this->addUsingAlias(FeatureCategoryTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($id['max'])) {
|
||||
$this->addUsingAlias(FeatureCategoryTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(FeatureCategoryTableMap::ID, $id, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the feature_id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByFeatureId(1234); // WHERE feature_id = 1234
|
||||
* $query->filterByFeatureId(array(12, 34)); // WHERE feature_id IN (12, 34)
|
||||
* $query->filterByFeatureId(array('min' => 12)); // WHERE feature_id > 12
|
||||
* </code>
|
||||
*
|
||||
* @see filterByFeature()
|
||||
*
|
||||
* @param mixed $featureId The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByFeatureId($featureId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($featureId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($featureId['min'])) {
|
||||
$this->addUsingAlias(FeatureCategoryTableMap::FEATURE_ID, $featureId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($featureId['max'])) {
|
||||
$this->addUsingAlias(FeatureCategoryTableMap::FEATURE_ID, $featureId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(FeatureCategoryTableMap::FEATURE_ID, $featureId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the category_id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByCategoryId(1234); // WHERE category_id = 1234
|
||||
* $query->filterByCategoryId(array(12, 34)); // WHERE category_id IN (12, 34)
|
||||
* $query->filterByCategoryId(array('min' => 12)); // WHERE category_id > 12
|
||||
* </code>
|
||||
*
|
||||
* @see filterByCategory()
|
||||
*
|
||||
* @param mixed $categoryId The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCategoryId($categoryId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($categoryId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($categoryId['min'])) {
|
||||
$this->addUsingAlias(FeatureCategoryTableMap::CATEGORY_ID, $categoryId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($categoryId['max'])) {
|
||||
$this->addUsingAlias(FeatureCategoryTableMap::CATEGORY_ID, $categoryId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(FeatureCategoryTableMap::CATEGORY_ID, $categoryId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the created_at column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14'
|
||||
* $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14'
|
||||
* $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13'
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $createdAt The value to use as filter.
|
||||
* Values can be integers (unix timestamps), DateTime objects, or strings.
|
||||
* Empty strings are treated as NULL.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCreatedAt($createdAt = null, $comparison = null)
|
||||
{
|
||||
if (is_array($createdAt)) {
|
||||
$useMinMax = false;
|
||||
if (isset($createdAt['min'])) {
|
||||
$this->addUsingAlias(FeatureCategoryTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($createdAt['max'])) {
|
||||
$this->addUsingAlias(FeatureCategoryTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(FeatureCategoryTableMap::CREATED_AT, $createdAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the updated_at column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14'
|
||||
* $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14'
|
||||
* $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13'
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $updatedAt The value to use as filter.
|
||||
* Values can be integers (unix timestamps), DateTime objects, or strings.
|
||||
* Empty strings are treated as NULL.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByUpdatedAt($updatedAt = null, $comparison = null)
|
||||
{
|
||||
if (is_array($updatedAt)) {
|
||||
$useMinMax = false;
|
||||
if (isset($updatedAt['min'])) {
|
||||
$this->addUsingAlias(FeatureCategoryTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($updatedAt['max'])) {
|
||||
$this->addUsingAlias(FeatureCategoryTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(FeatureCategoryTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\Category object
|
||||
*
|
||||
* @param \Thelia\Model\Category|ObjectCollection $category The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCategory($category, $comparison = null)
|
||||
{
|
||||
if ($category instanceof \Thelia\Model\Category) {
|
||||
return $this
|
||||
->addUsingAlias(FeatureCategoryTableMap::CATEGORY_ID, $category->getId(), $comparison);
|
||||
} elseif ($category instanceof ObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(FeatureCategoryTableMap::CATEGORY_ID, $category->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByCategory() only accepts arguments of type \Thelia\Model\Category or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the Category relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCategory($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('Category');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'Category');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the Category relation Category object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return \Thelia\Model\CategoryQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCategory($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'Category', '\Thelia\Model\CategoryQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\Feature object
|
||||
*
|
||||
* @param \Thelia\Model\Feature|ObjectCollection $feature The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByFeature($feature, $comparison = null)
|
||||
{
|
||||
if ($feature instanceof \Thelia\Model\Feature) {
|
||||
return $this
|
||||
->addUsingAlias(FeatureCategoryTableMap::FEATURE_ID, $feature->getId(), $comparison);
|
||||
} elseif ($feature instanceof ObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(FeatureCategoryTableMap::FEATURE_ID, $feature->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByFeature() only accepts arguments of type \Thelia\Model\Feature or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the Feature relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinFeature($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('Feature');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'Feature');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the Feature relation Feature object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return \Thelia\Model\FeatureQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useFeatureQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinFeature($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'Feature', '\Thelia\Model\FeatureQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
* @param ChildFeatureCategory $featureCategory Object to remove from the list of results
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function prune($featureCategory = null)
|
||||
{
|
||||
if ($featureCategory) {
|
||||
$this->addUsingAlias(FeatureCategoryTableMap::ID, $featureCategory->getId(), Criteria::NOT_EQUAL);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all rows from the feature_category table.
|
||||
*
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver).
|
||||
*/
|
||||
public function doDeleteAll(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(FeatureCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||
$con->beginTransaction();
|
||||
$affectedRows += parent::doDeleteAll($con);
|
||||
// Because this db requires some delete cascade/set null emulation, we have to
|
||||
// clear the cached instance *after* the emulation has happened (since
|
||||
// instances get re-added by the select statement contained therein).
|
||||
FeatureCategoryTableMap::clearInstancePool();
|
||||
FeatureCategoryTableMap::clearRelatedInstancePool();
|
||||
|
||||
$con->commit();
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return $affectedRows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a DELETE on the database, given a ChildFeatureCategory or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ChildFeatureCategory object or primary key or array of primary keys
|
||||
* which is used to create the DELETE statement
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||
* if supported by native driver or if emulated using Propel.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public function delete(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(FeatureCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = $this;
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(FeatureCategoryTableMap::DATABASE_NAME);
|
||||
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||
$con->beginTransaction();
|
||||
|
||||
|
||||
FeatureCategoryTableMap::removeInstanceFromPool($criteria);
|
||||
|
||||
$affectedRows += ModelCriteria::delete($con);
|
||||
FeatureCategoryTableMap::clearRelatedInstancePool();
|
||||
$con->commit();
|
||||
|
||||
return $affectedRows;
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
|
||||
/**
|
||||
* Filter by the latest updated
|
||||
*
|
||||
* @param int $nbDays Maximum age of the latest update in days
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function recentlyUpdated($nbDays = 7)
|
||||
{
|
||||
return $this->addUsingAlias(FeatureCategoryTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter by the latest created
|
||||
*
|
||||
* @param int $nbDays Maximum age of in days
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function recentlyCreated($nbDays = 7)
|
||||
{
|
||||
return $this->addUsingAlias(FeatureCategoryTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by update date desc
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function lastUpdatedFirst()
|
||||
{
|
||||
return $this->addDescendingOrderByColumn(FeatureCategoryTableMap::UPDATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by update date asc
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function firstUpdatedFirst()
|
||||
{
|
||||
return $this->addAscendingOrderByColumn(FeatureCategoryTableMap::UPDATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by create date desc
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function lastCreatedFirst()
|
||||
{
|
||||
return $this->addDescendingOrderByColumn(FeatureCategoryTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by create date asc
|
||||
*
|
||||
* @return ChildFeatureCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function firstCreatedFirst()
|
||||
{
|
||||
return $this->addAscendingOrderByColumn(FeatureCategoryTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
} // FeatureCategoryQuery
|
||||
@@ -2,8 +2,13 @@
|
||||
|
||||
namespace Thelia\Model;
|
||||
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Thelia\Model\Base\CategoryI18n as BaseCategoryI18n;
|
||||
|
||||
class CategoryI18n extends BaseCategoryI18n {
|
||||
|
||||
public function postInsert(ConnectionInterface $con = null)
|
||||
{
|
||||
$category = $this->getCategory();
|
||||
$category->generateRewrittenUrl($this->getLocale());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,9 +56,15 @@ class ConfigQuery extends BaseConfigQuery {
|
||||
|
||||
public static function getPageNotFoundView()
|
||||
{
|
||||
return self::read("page_not_found_view", '404.html');
|
||||
return self::read("page_not_found_view", '404');
|
||||
}
|
||||
|
||||
public static function getPassedUrlView()
|
||||
{
|
||||
return self::read('passed_url_view', 'passed-url');
|
||||
}
|
||||
|
||||
|
||||
public static function getActiveTemplate()
|
||||
{
|
||||
return self::read('active-template', 'default');
|
||||
|
||||
@@ -2,8 +2,13 @@
|
||||
|
||||
namespace Thelia\Model;
|
||||
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Thelia\Model\Base\ContentI18n as BaseContentI18n;
|
||||
|
||||
class ContentI18n extends BaseContentI18n {
|
||||
|
||||
public function postInsert(ConnectionInterface $con = null)
|
||||
{
|
||||
$content = $this->getContent();
|
||||
$content->generateRewrittenUrl($this->getLocale());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model;
|
||||
|
||||
use Thelia\Model\Base\CouponRule as BaseCouponRule;
|
||||
|
||||
class CouponRule extends BaseCouponRule {
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model;
|
||||
|
||||
use Thelia\Model\Base\CouponRuleQuery as BaseCouponRuleQuery;
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'coupon_rule' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
*/
|
||||
class CouponRuleQuery extends BaseCouponRuleQuery {
|
||||
|
||||
} // CouponRuleQuery
|
||||
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model;
|
||||
|
||||
use Thelia\Model\Base\FeatureCategory as BaseFeatureCategory;
|
||||
|
||||
class FeatureCategory extends BaseFeatureCategory {
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model;
|
||||
|
||||
use Thelia\Model\Base\FeatureCategoryQuery as BaseFeatureCategoryQuery;
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'feature_category' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
*/
|
||||
class FeatureCategoryQuery extends BaseFeatureCategoryQuery {
|
||||
|
||||
} // FeatureCategoryQuery
|
||||
@@ -67,7 +67,6 @@ class Folder extends BaseFolder
|
||||
{
|
||||
$this->setPosition($this->getNextPosition());
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,449 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model\Map;
|
||||
|
||||
use Propel\Runtime\Propel;
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\ActiveQuery\InstancePoolTrait;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Propel\Runtime\Map\RelationMap;
|
||||
use Propel\Runtime\Map\TableMap;
|
||||
use Propel\Runtime\Map\TableMapTrait;
|
||||
use Thelia\Model\AttributeCategory;
|
||||
use Thelia\Model\AttributeCategoryQuery;
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'attribute_category' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
*/
|
||||
class AttributeCategoryTableMap extends TableMap
|
||||
{
|
||||
use InstancePoolTrait;
|
||||
use TableMapTrait;
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'Thelia.Model.Map.AttributeCategoryTableMap';
|
||||
|
||||
/**
|
||||
* The default database name for this class
|
||||
*/
|
||||
const DATABASE_NAME = 'thelia';
|
||||
|
||||
/**
|
||||
* The table name for this class
|
||||
*/
|
||||
const TABLE_NAME = 'attribute_category';
|
||||
|
||||
/**
|
||||
* The related Propel class for this table
|
||||
*/
|
||||
const OM_CLASS = '\\Thelia\\Model\\AttributeCategory';
|
||||
|
||||
/**
|
||||
* A class that can be returned by this tableMap
|
||||
*/
|
||||
const CLASS_DEFAULT = 'Thelia.Model.AttributeCategory';
|
||||
|
||||
/**
|
||||
* The total number of columns
|
||||
*/
|
||||
const NUM_COLUMNS = 5;
|
||||
|
||||
/**
|
||||
* The number of lazy-loaded columns
|
||||
*/
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
||||
/**
|
||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||
*/
|
||||
const NUM_HYDRATE_COLUMNS = 5;
|
||||
|
||||
/**
|
||||
* the column name for the ID field
|
||||
*/
|
||||
const ID = 'attribute_category.ID';
|
||||
|
||||
/**
|
||||
* the column name for the CATEGORY_ID field
|
||||
*/
|
||||
const CATEGORY_ID = 'attribute_category.CATEGORY_ID';
|
||||
|
||||
/**
|
||||
* the column name for the ATTRIBUTE_ID field
|
||||
*/
|
||||
const ATTRIBUTE_ID = 'attribute_category.ATTRIBUTE_ID';
|
||||
|
||||
/**
|
||||
* the column name for the CREATED_AT field
|
||||
*/
|
||||
const CREATED_AT = 'attribute_category.CREATED_AT';
|
||||
|
||||
/**
|
||||
* the column name for the UPDATED_AT field
|
||||
*/
|
||||
const UPDATED_AT = 'attribute_category.UPDATED_AT';
|
||||
|
||||
/**
|
||||
* The default string format for model objects of the related table
|
||||
*/
|
||||
const DEFAULT_STRING_FORMAT = 'YAML';
|
||||
|
||||
/**
|
||||
* holds an array of fieldnames
|
||||
*
|
||||
* first dimension keys are the type constants
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
self::TYPE_PHPNAME => array('Id', 'CategoryId', 'AttributeId', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'categoryId', 'attributeId', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(AttributeCategoryTableMap::ID, AttributeCategoryTableMap::CATEGORY_ID, AttributeCategoryTableMap::ATTRIBUTE_ID, AttributeCategoryTableMap::CREATED_AT, AttributeCategoryTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'CATEGORY_ID', 'ATTRIBUTE_ID', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'category_id', 'attribute_id', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
||||
);
|
||||
|
||||
/**
|
||||
* holds an array of keys for quick access to the fieldnames array
|
||||
*
|
||||
* first dimension keys are the type constants
|
||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'CategoryId' => 1, 'AttributeId' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'categoryId' => 1, 'attributeId' => 2, 'createdAt' => 3, 'updatedAt' => 4, ),
|
||||
self::TYPE_COLNAME => array(AttributeCategoryTableMap::ID => 0, AttributeCategoryTableMap::CATEGORY_ID => 1, AttributeCategoryTableMap::ATTRIBUTE_ID => 2, AttributeCategoryTableMap::CREATED_AT => 3, AttributeCategoryTableMap::UPDATED_AT => 4, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'CATEGORY_ID' => 1, 'ATTRIBUTE_ID' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'category_id' => 1, 'attribute_id' => 2, 'created_at' => 3, 'updated_at' => 4, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
||||
);
|
||||
|
||||
/**
|
||||
* Initialize the table attributes and columns
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('attribute_category');
|
||||
$this->setPhpName('AttributeCategory');
|
||||
$this->setClassName('\\Thelia\\Model\\AttributeCategory');
|
||||
$this->setPackage('Thelia.Model');
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setIsCrossRef(true);
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||
$this->addForeignKey('CATEGORY_ID', 'CategoryId', 'INTEGER', 'category', 'ID', true, null, null);
|
||||
$this->addForeignKey('ATTRIBUTE_ID', 'AttributeId', 'INTEGER', 'attribute', 'ID', true, null, null);
|
||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('Category', '\\Thelia\\Model\\Category', RelationMap::MANY_TO_ONE, array('category_id' => 'id', ), 'CASCADE', 'RESTRICT');
|
||||
$this->addRelation('Attribute', '\\Thelia\\Model\\Attribute', RelationMap::MANY_TO_ONE, array('attribute_id' => 'id', ), 'CASCADE', 'RESTRICT');
|
||||
} // buildRelations()
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the list of behaviors registered for this table
|
||||
*
|
||||
* @return array Associative array (name => parameters) of behaviors
|
||||
*/
|
||||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
|
||||
);
|
||||
} // getBehaviors()
|
||||
|
||||
/**
|
||||
* Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
|
||||
*
|
||||
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
|
||||
* a multi-column primary key, a serialize()d version of the primary key will be returned.
|
||||
*
|
||||
* @param array $row resultset row.
|
||||
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
|
||||
*/
|
||||
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||
{
|
||||
// If the PK cannot be derived from the row, return NULL.
|
||||
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the primary key from the DB resultset row
|
||||
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
|
||||
* a multi-column primary key, an array of the primary key columns will be returned.
|
||||
*
|
||||
* @param array $row resultset row.
|
||||
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
|
||||
*
|
||||
* @return mixed The primary key of the row
|
||||
*/
|
||||
public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||
{
|
||||
|
||||
return (int) $row[
|
||||
$indexType == TableMap::TYPE_NUM
|
||||
? 0 + $offset
|
||||
: self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* The class that the tableMap will make instances of.
|
||||
*
|
||||
* If $withPrefix is true, the returned path
|
||||
* uses a dot-path notation which is translated into a path
|
||||
* relative to a location on the PHP include_path.
|
||||
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
|
||||
*
|
||||
* @param boolean $withPrefix Whether or not to return the path with the class name
|
||||
* @return string path.to.ClassName
|
||||
*/
|
||||
public static function getOMClass($withPrefix = true)
|
||||
{
|
||||
return $withPrefix ? AttributeCategoryTableMap::CLASS_DEFAULT : AttributeCategoryTableMap::OM_CLASS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates an object of the default type or an object that inherit from the default.
|
||||
*
|
||||
* @param array $row row returned by DataFetcher->fetch().
|
||||
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||
* @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
|
||||
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
|
||||
*
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
* @return array (AttributeCategory object, last column rank)
|
||||
*/
|
||||
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||
{
|
||||
$key = AttributeCategoryTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
|
||||
if (null !== ($obj = AttributeCategoryTableMap::getInstanceFromPool($key))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj->hydrate($row, $offset, true); // rehydrate
|
||||
$col = $offset + AttributeCategoryTableMap::NUM_HYDRATE_COLUMNS;
|
||||
} else {
|
||||
$cls = AttributeCategoryTableMap::OM_CLASS;
|
||||
$obj = new $cls();
|
||||
$col = $obj->hydrate($row, $offset, false, $indexType);
|
||||
AttributeCategoryTableMap::addInstanceToPool($obj, $key);
|
||||
}
|
||||
|
||||
return array($obj, $col);
|
||||
}
|
||||
|
||||
/**
|
||||
* The returned array will contain objects of the default type or
|
||||
* objects that inherit from the default.
|
||||
*
|
||||
* @param DataFetcherInterface $dataFetcher
|
||||
* @return array
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function populateObjects(DataFetcherInterface $dataFetcher)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// set the class once to avoid overhead in the loop
|
||||
$cls = static::getOMClass(false);
|
||||
// populate the object(s)
|
||||
while ($row = $dataFetcher->fetch()) {
|
||||
$key = AttributeCategoryTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
|
||||
if (null !== ($obj = AttributeCategoryTableMap::getInstanceFromPool($key))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj->hydrate($row, 0, true); // rehydrate
|
||||
$results[] = $obj;
|
||||
} else {
|
||||
$obj = new $cls();
|
||||
$obj->hydrate($row);
|
||||
$results[] = $obj;
|
||||
AttributeCategoryTableMap::addInstanceToPool($obj, $key);
|
||||
} // if key exists
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
/**
|
||||
* Add all the columns needed to create a new object.
|
||||
*
|
||||
* Note: any columns that were marked with lazyLoad="true" in the
|
||||
* XML schema will not be added to the select list and only loaded
|
||||
* on demand.
|
||||
*
|
||||
* @param Criteria $criteria object containing the columns to add.
|
||||
* @param string $alias optional table alias
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
||||
{
|
||||
if (null === $alias) {
|
||||
$criteria->addSelectColumn(AttributeCategoryTableMap::ID);
|
||||
$criteria->addSelectColumn(AttributeCategoryTableMap::CATEGORY_ID);
|
||||
$criteria->addSelectColumn(AttributeCategoryTableMap::ATTRIBUTE_ID);
|
||||
$criteria->addSelectColumn(AttributeCategoryTableMap::CREATED_AT);
|
||||
$criteria->addSelectColumn(AttributeCategoryTableMap::UPDATED_AT);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.CATEGORY_ID');
|
||||
$criteria->addSelectColumn($alias . '.ATTRIBUTE_ID');
|
||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the TableMap related to this object.
|
||||
* This method is not needed for general use but a specific application could have a need.
|
||||
* @return TableMap
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function getTableMap()
|
||||
{
|
||||
return Propel::getServiceContainer()->getDatabaseMap(AttributeCategoryTableMap::DATABASE_NAME)->getTable(AttributeCategoryTableMap::TABLE_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a TableMap instance to the database for this tableMap class.
|
||||
*/
|
||||
public static function buildTableMap()
|
||||
{
|
||||
$dbMap = Propel::getServiceContainer()->getDatabaseMap(AttributeCategoryTableMap::DATABASE_NAME);
|
||||
if (!$dbMap->hasTable(AttributeCategoryTableMap::TABLE_NAME)) {
|
||||
$dbMap->addTableObject(new AttributeCategoryTableMap());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a DELETE on the database, given a AttributeCategory or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or AttributeCategory object or primary key or array of primary keys
|
||||
* which is used to create the DELETE statement
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||
* if supported by native driver or if emulated using Propel.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doDelete($values, ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(AttributeCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
if ($values instanceof Criteria) {
|
||||
// rename for clarity
|
||||
$criteria = $values;
|
||||
} elseif ($values instanceof \Thelia\Model\AttributeCategory) { // it's a model object
|
||||
// create criteria based on pk values
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else { // it's a primary key, or an array of pks
|
||||
$criteria = new Criteria(AttributeCategoryTableMap::DATABASE_NAME);
|
||||
$criteria->add(AttributeCategoryTableMap::ID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
$query = AttributeCategoryQuery::create()->mergeWith($criteria);
|
||||
|
||||
if ($values instanceof Criteria) { AttributeCategoryTableMap::clearInstancePool();
|
||||
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
|
||||
foreach ((array) $values as $singleval) { AttributeCategoryTableMap::removeInstanceFromPool($singleval);
|
||||
}
|
||||
}
|
||||
|
||||
return $query->delete($con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all rows from the attribute_category table.
|
||||
*
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver).
|
||||
*/
|
||||
public static function doDeleteAll(ConnectionInterface $con = null)
|
||||
{
|
||||
return AttributeCategoryQuery::create()->doDeleteAll($con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs an INSERT on the database, given a AttributeCategory or Criteria object.
|
||||
*
|
||||
* @param mixed $criteria Criteria or AttributeCategory object containing data that is used to create the INSERT statement.
|
||||
* @param ConnectionInterface $con the ConnectionInterface connection to use
|
||||
* @return mixed The new primary key.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doInsert($criteria, ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(AttributeCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
if ($criteria instanceof Criteria) {
|
||||
$criteria = clone $criteria; // rename for clarity
|
||||
} else {
|
||||
$criteria = $criteria->buildCriteria(); // build Criteria from AttributeCategory object
|
||||
}
|
||||
|
||||
if ($criteria->containsKey(AttributeCategoryTableMap::ID) && $criteria->keyContainsValue(AttributeCategoryTableMap::ID) ) {
|
||||
throw new PropelException('Cannot insert a value for auto-increment primary key ('.AttributeCategoryTableMap::ID.')');
|
||||
}
|
||||
|
||||
|
||||
// Set the correct dbName
|
||||
$query = AttributeCategoryQuery::create()->mergeWith($criteria);
|
||||
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table (I guess, conceivably)
|
||||
$con->beginTransaction();
|
||||
$pk = $query->doInsert($con);
|
||||
$con->commit();
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return $pk;
|
||||
}
|
||||
|
||||
} // AttributeCategoryTableMap
|
||||
// This is the static code needed to register the TableMap for this table with the main Propel class.
|
||||
//
|
||||
AttributeCategoryTableMap::buildTableMap();
|
||||
@@ -1,449 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model\Map;
|
||||
|
||||
use Propel\Runtime\Propel;
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\ActiveQuery\InstancePoolTrait;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Propel\Runtime\Map\RelationMap;
|
||||
use Propel\Runtime\Map\TableMap;
|
||||
use Propel\Runtime\Map\TableMapTrait;
|
||||
use Thelia\Model\FeatureCategory;
|
||||
use Thelia\Model\FeatureCategoryQuery;
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'feature_category' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
*/
|
||||
class FeatureCategoryTableMap extends TableMap
|
||||
{
|
||||
use InstancePoolTrait;
|
||||
use TableMapTrait;
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'Thelia.Model.Map.FeatureCategoryTableMap';
|
||||
|
||||
/**
|
||||
* The default database name for this class
|
||||
*/
|
||||
const DATABASE_NAME = 'thelia';
|
||||
|
||||
/**
|
||||
* The table name for this class
|
||||
*/
|
||||
const TABLE_NAME = 'feature_category';
|
||||
|
||||
/**
|
||||
* The related Propel class for this table
|
||||
*/
|
||||
const OM_CLASS = '\\Thelia\\Model\\FeatureCategory';
|
||||
|
||||
/**
|
||||
* A class that can be returned by this tableMap
|
||||
*/
|
||||
const CLASS_DEFAULT = 'Thelia.Model.FeatureCategory';
|
||||
|
||||
/**
|
||||
* The total number of columns
|
||||
*/
|
||||
const NUM_COLUMNS = 5;
|
||||
|
||||
/**
|
||||
* The number of lazy-loaded columns
|
||||
*/
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
||||
/**
|
||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||
*/
|
||||
const NUM_HYDRATE_COLUMNS = 5;
|
||||
|
||||
/**
|
||||
* the column name for the ID field
|
||||
*/
|
||||
const ID = 'feature_category.ID';
|
||||
|
||||
/**
|
||||
* the column name for the FEATURE_ID field
|
||||
*/
|
||||
const FEATURE_ID = 'feature_category.FEATURE_ID';
|
||||
|
||||
/**
|
||||
* the column name for the CATEGORY_ID field
|
||||
*/
|
||||
const CATEGORY_ID = 'feature_category.CATEGORY_ID';
|
||||
|
||||
/**
|
||||
* the column name for the CREATED_AT field
|
||||
*/
|
||||
const CREATED_AT = 'feature_category.CREATED_AT';
|
||||
|
||||
/**
|
||||
* the column name for the UPDATED_AT field
|
||||
*/
|
||||
const UPDATED_AT = 'feature_category.UPDATED_AT';
|
||||
|
||||
/**
|
||||
* The default string format for model objects of the related table
|
||||
*/
|
||||
const DEFAULT_STRING_FORMAT = 'YAML';
|
||||
|
||||
/**
|
||||
* holds an array of fieldnames
|
||||
*
|
||||
* first dimension keys are the type constants
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
self::TYPE_PHPNAME => array('Id', 'FeatureId', 'CategoryId', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'featureId', 'categoryId', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(FeatureCategoryTableMap::ID, FeatureCategoryTableMap::FEATURE_ID, FeatureCategoryTableMap::CATEGORY_ID, FeatureCategoryTableMap::CREATED_AT, FeatureCategoryTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'FEATURE_ID', 'CATEGORY_ID', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'feature_id', 'category_id', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
||||
);
|
||||
|
||||
/**
|
||||
* holds an array of keys for quick access to the fieldnames array
|
||||
*
|
||||
* first dimension keys are the type constants
|
||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'FeatureId' => 1, 'CategoryId' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'featureId' => 1, 'categoryId' => 2, 'createdAt' => 3, 'updatedAt' => 4, ),
|
||||
self::TYPE_COLNAME => array(FeatureCategoryTableMap::ID => 0, FeatureCategoryTableMap::FEATURE_ID => 1, FeatureCategoryTableMap::CATEGORY_ID => 2, FeatureCategoryTableMap::CREATED_AT => 3, FeatureCategoryTableMap::UPDATED_AT => 4, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'FEATURE_ID' => 1, 'CATEGORY_ID' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'feature_id' => 1, 'category_id' => 2, 'created_at' => 3, 'updated_at' => 4, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
||||
);
|
||||
|
||||
/**
|
||||
* Initialize the table attributes and columns
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('feature_category');
|
||||
$this->setPhpName('FeatureCategory');
|
||||
$this->setClassName('\\Thelia\\Model\\FeatureCategory');
|
||||
$this->setPackage('Thelia.Model');
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setIsCrossRef(true);
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||
$this->addForeignKey('FEATURE_ID', 'FeatureId', 'INTEGER', 'feature', 'ID', true, null, null);
|
||||
$this->addForeignKey('CATEGORY_ID', 'CategoryId', 'INTEGER', 'category', 'ID', true, null, null);
|
||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('Category', '\\Thelia\\Model\\Category', RelationMap::MANY_TO_ONE, array('category_id' => 'id', ), 'CASCADE', 'RESTRICT');
|
||||
$this->addRelation('Feature', '\\Thelia\\Model\\Feature', RelationMap::MANY_TO_ONE, array('feature_id' => 'id', ), 'CASCADE', 'RESTRICT');
|
||||
} // buildRelations()
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the list of behaviors registered for this table
|
||||
*
|
||||
* @return array Associative array (name => parameters) of behaviors
|
||||
*/
|
||||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
|
||||
);
|
||||
} // getBehaviors()
|
||||
|
||||
/**
|
||||
* Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
|
||||
*
|
||||
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
|
||||
* a multi-column primary key, a serialize()d version of the primary key will be returned.
|
||||
*
|
||||
* @param array $row resultset row.
|
||||
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
|
||||
*/
|
||||
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||
{
|
||||
// If the PK cannot be derived from the row, return NULL.
|
||||
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the primary key from the DB resultset row
|
||||
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
|
||||
* a multi-column primary key, an array of the primary key columns will be returned.
|
||||
*
|
||||
* @param array $row resultset row.
|
||||
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
|
||||
*
|
||||
* @return mixed The primary key of the row
|
||||
*/
|
||||
public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||
{
|
||||
|
||||
return (int) $row[
|
||||
$indexType == TableMap::TYPE_NUM
|
||||
? 0 + $offset
|
||||
: self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* The class that the tableMap will make instances of.
|
||||
*
|
||||
* If $withPrefix is true, the returned path
|
||||
* uses a dot-path notation which is translated into a path
|
||||
* relative to a location on the PHP include_path.
|
||||
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
|
||||
*
|
||||
* @param boolean $withPrefix Whether or not to return the path with the class name
|
||||
* @return string path.to.ClassName
|
||||
*/
|
||||
public static function getOMClass($withPrefix = true)
|
||||
{
|
||||
return $withPrefix ? FeatureCategoryTableMap::CLASS_DEFAULT : FeatureCategoryTableMap::OM_CLASS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates an object of the default type or an object that inherit from the default.
|
||||
*
|
||||
* @param array $row row returned by DataFetcher->fetch().
|
||||
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||
* @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
|
||||
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
|
||||
*
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
* @return array (FeatureCategory object, last column rank)
|
||||
*/
|
||||
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||
{
|
||||
$key = FeatureCategoryTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
|
||||
if (null !== ($obj = FeatureCategoryTableMap::getInstanceFromPool($key))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj->hydrate($row, $offset, true); // rehydrate
|
||||
$col = $offset + FeatureCategoryTableMap::NUM_HYDRATE_COLUMNS;
|
||||
} else {
|
||||
$cls = FeatureCategoryTableMap::OM_CLASS;
|
||||
$obj = new $cls();
|
||||
$col = $obj->hydrate($row, $offset, false, $indexType);
|
||||
FeatureCategoryTableMap::addInstanceToPool($obj, $key);
|
||||
}
|
||||
|
||||
return array($obj, $col);
|
||||
}
|
||||
|
||||
/**
|
||||
* The returned array will contain objects of the default type or
|
||||
* objects that inherit from the default.
|
||||
*
|
||||
* @param DataFetcherInterface $dataFetcher
|
||||
* @return array
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function populateObjects(DataFetcherInterface $dataFetcher)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// set the class once to avoid overhead in the loop
|
||||
$cls = static::getOMClass(false);
|
||||
// populate the object(s)
|
||||
while ($row = $dataFetcher->fetch()) {
|
||||
$key = FeatureCategoryTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
|
||||
if (null !== ($obj = FeatureCategoryTableMap::getInstanceFromPool($key))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj->hydrate($row, 0, true); // rehydrate
|
||||
$results[] = $obj;
|
||||
} else {
|
||||
$obj = new $cls();
|
||||
$obj->hydrate($row);
|
||||
$results[] = $obj;
|
||||
FeatureCategoryTableMap::addInstanceToPool($obj, $key);
|
||||
} // if key exists
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
/**
|
||||
* Add all the columns needed to create a new object.
|
||||
*
|
||||
* Note: any columns that were marked with lazyLoad="true" in the
|
||||
* XML schema will not be added to the select list and only loaded
|
||||
* on demand.
|
||||
*
|
||||
* @param Criteria $criteria object containing the columns to add.
|
||||
* @param string $alias optional table alias
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
||||
{
|
||||
if (null === $alias) {
|
||||
$criteria->addSelectColumn(FeatureCategoryTableMap::ID);
|
||||
$criteria->addSelectColumn(FeatureCategoryTableMap::FEATURE_ID);
|
||||
$criteria->addSelectColumn(FeatureCategoryTableMap::CATEGORY_ID);
|
||||
$criteria->addSelectColumn(FeatureCategoryTableMap::CREATED_AT);
|
||||
$criteria->addSelectColumn(FeatureCategoryTableMap::UPDATED_AT);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.FEATURE_ID');
|
||||
$criteria->addSelectColumn($alias . '.CATEGORY_ID');
|
||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the TableMap related to this object.
|
||||
* This method is not needed for general use but a specific application could have a need.
|
||||
* @return TableMap
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function getTableMap()
|
||||
{
|
||||
return Propel::getServiceContainer()->getDatabaseMap(FeatureCategoryTableMap::DATABASE_NAME)->getTable(FeatureCategoryTableMap::TABLE_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a TableMap instance to the database for this tableMap class.
|
||||
*/
|
||||
public static function buildTableMap()
|
||||
{
|
||||
$dbMap = Propel::getServiceContainer()->getDatabaseMap(FeatureCategoryTableMap::DATABASE_NAME);
|
||||
if (!$dbMap->hasTable(FeatureCategoryTableMap::TABLE_NAME)) {
|
||||
$dbMap->addTableObject(new FeatureCategoryTableMap());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a DELETE on the database, given a FeatureCategory or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or FeatureCategory object or primary key or array of primary keys
|
||||
* which is used to create the DELETE statement
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||
* if supported by native driver or if emulated using Propel.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doDelete($values, ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(FeatureCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
if ($values instanceof Criteria) {
|
||||
// rename for clarity
|
||||
$criteria = $values;
|
||||
} elseif ($values instanceof \Thelia\Model\FeatureCategory) { // it's a model object
|
||||
// create criteria based on pk values
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else { // it's a primary key, or an array of pks
|
||||
$criteria = new Criteria(FeatureCategoryTableMap::DATABASE_NAME);
|
||||
$criteria->add(FeatureCategoryTableMap::ID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
$query = FeatureCategoryQuery::create()->mergeWith($criteria);
|
||||
|
||||
if ($values instanceof Criteria) { FeatureCategoryTableMap::clearInstancePool();
|
||||
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
|
||||
foreach ((array) $values as $singleval) { FeatureCategoryTableMap::removeInstanceFromPool($singleval);
|
||||
}
|
||||
}
|
||||
|
||||
return $query->delete($con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all rows from the feature_category table.
|
||||
*
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver).
|
||||
*/
|
||||
public static function doDeleteAll(ConnectionInterface $con = null)
|
||||
{
|
||||
return FeatureCategoryQuery::create()->doDeleteAll($con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs an INSERT on the database, given a FeatureCategory or Criteria object.
|
||||
*
|
||||
* @param mixed $criteria Criteria or FeatureCategory object containing data that is used to create the INSERT statement.
|
||||
* @param ConnectionInterface $con the ConnectionInterface connection to use
|
||||
* @return mixed The new primary key.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doInsert($criteria, ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(FeatureCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
if ($criteria instanceof Criteria) {
|
||||
$criteria = clone $criteria; // rename for clarity
|
||||
} else {
|
||||
$criteria = $criteria->buildCriteria(); // build Criteria from FeatureCategory object
|
||||
}
|
||||
|
||||
if ($criteria->containsKey(FeatureCategoryTableMap::ID) && $criteria->keyContainsValue(FeatureCategoryTableMap::ID) ) {
|
||||
throw new PropelException('Cannot insert a value for auto-increment primary key ('.FeatureCategoryTableMap::ID.')');
|
||||
}
|
||||
|
||||
|
||||
// Set the correct dbName
|
||||
$query = FeatureCategoryQuery::create()->mergeWith($criteria);
|
||||
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table (I guess, conceivably)
|
||||
$con->beginTransaction();
|
||||
$pk = $query->doInsert($con);
|
||||
$con->commit();
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return $pk;
|
||||
}
|
||||
|
||||
} // FeatureCategoryTableMap
|
||||
// This is the static code needed to register the TableMap for this table with the main Propel class.
|
||||
//
|
||||
FeatureCategoryTableMap::buildTableMap();
|
||||
@@ -200,6 +200,12 @@ class Product extends BaseProduct
|
||||
*/
|
||||
public function postDelete(ConnectionInterface $con = null)
|
||||
{
|
||||
RewritingUrlQuery::create()
|
||||
->filterByView($this->getRewrittenUrlViewName())
|
||||
->filterByViewId($this->getId())
|
||||
->update(array(
|
||||
"View" => ConfigQuery::getPassedUrlView()
|
||||
));
|
||||
$this->dispatchEvent(TheliaEvents::AFTER_DELETEPRODUCT, new ProductEvent($this));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
namespace Thelia\Model\Tools;
|
||||
|
||||
use Thelia\Core\Event\GenerateRewrittenUrlEvent;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
use Thelia\Exception\UrlRewritingException;
|
||||
use Thelia\Model\RewritingUrlQuery;
|
||||
use Thelia\Model\RewritingUrl;
|
||||
@@ -61,14 +63,28 @@ trait UrlRewritingTrait {
|
||||
|
||||
$this->setLocale($locale);
|
||||
|
||||
$title = $this->getTitle() ?: $this->getRef();
|
||||
$generateEvent = new GenerateRewrittenUrlEvent($this, $locale);
|
||||
|
||||
$this->dispatchEvent(TheliaEvents::GENERATE_REWRITTENURL, $generateEvent);
|
||||
|
||||
|
||||
if($generateEvent->isRewritten())
|
||||
{
|
||||
return $generateEvent->getUrl();
|
||||
}
|
||||
|
||||
$title = $this->getTitle();
|
||||
|
||||
if(null == $title) {
|
||||
throw new \RuntimeException('Impossible to create an url if title is null');
|
||||
}
|
||||
// Replace all weird characters with dashes
|
||||
$string = preg_replace('/[^\w\-~_\.]+/u', '-', $title);
|
||||
|
||||
// Only allow one dash separator at a time (and make string lowercase)
|
||||
$cleanString = mb_strtolower(preg_replace('/--+/u', '-', $string), 'UTF-8');
|
||||
|
||||
$urlFilePart = $cleanString . ".html";
|
||||
$urlFilePart = rtrim($cleanString, '.-~_') . ".html";
|
||||
|
||||
// TODO :
|
||||
// check if URL url already exists, and add a numeric suffix, or the like
|
||||
@@ -104,7 +120,7 @@ trait UrlRewritingTrait {
|
||||
->filterByViewLocale($locale)
|
||||
->filterByView($this->getRewrittenUrlViewName())
|
||||
->filterByViewId($this->getId())
|
||||
->filterByRedirected(0)
|
||||
->filterByRedirected(null)
|
||||
->findOne()
|
||||
;
|
||||
|
||||
|
||||
108
core/lib/Thelia/Tests/Rewriting/BaseRewritingObject.php
Normal file
108
core/lib/Thelia/Tests/Rewriting/BaseRewritingObject.php
Normal file
@@ -0,0 +1,108 @@
|
||||
<?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\Tests\Rewriting;
|
||||
|
||||
|
||||
/**
|
||||
* Class BaseRewritingObject
|
||||
* @package Thelia\Tests\Rewriting
|
||||
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||
*/
|
||||
abstract class BaseRewritingObject extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @return mixed an instance of Product, Folder, Content or Category Model
|
||||
*/
|
||||
abstract function getObject();
|
||||
|
||||
/**
|
||||
* @covers Thelia\Model\Tools\UrlRewritingTrait::generateRewrittenUrl
|
||||
*/
|
||||
public function testSimpleFrenchRewrittenUrl()
|
||||
{
|
||||
$object = $this->getObject();
|
||||
$object->setVisible(1)
|
||||
->setPosition(1)
|
||||
->setLocale('fr_FR')
|
||||
->setTitle('Mon super titre en français')
|
||||
->save();
|
||||
|
||||
$this->assertRegExp('/^mon-super-titre-en-français(-[0-9]+)?\.html$/', $object->getRewrittenUrl('fr_FR'));
|
||||
|
||||
$rewrittenUrl = $object->generateRewrittenUrl('fr_FR');
|
||||
$this->assertNotNull($rewrittenUrl, "rewritten url can not be null");
|
||||
$this->assertRegExp('/^mon-super-titre-en-français(-[0-9]+)?\.html$/', $rewrittenUrl);
|
||||
//mon-super-titre-en-français-2.html
|
||||
|
||||
$object->delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Thelia\Model\Tools\UrlRewritingTrait::generateRewrittenUrl
|
||||
*/
|
||||
public function testSimpleEnglishRewrittenUrl()
|
||||
{
|
||||
$object = $this->getObject();
|
||||
$object->setVisible(1)
|
||||
->setPosition(1)
|
||||
->setLocale('en_US')
|
||||
->setTitle('My english super Title')
|
||||
->save();
|
||||
|
||||
$this->assertRegExp('/^my-english-super-title(-[0-9]+)?\.html$/', $object->getRewrittenUrl('en_US'));
|
||||
|
||||
$rewrittenUrl = $object->generateRewrittenUrl('en_US');
|
||||
$this->assertNotNull($rewrittenUrl, "rewritten url can not be null");
|
||||
$this->assertRegExp('/^my-english-super-title(-[0-9]+)?\.html$/', $rewrittenUrl);
|
||||
|
||||
$object->delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Thelia\Model\Tools\UrlRewritingTrait::generateRewrittenUrl
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage Impossible to create an url if title is null
|
||||
*/
|
||||
public function testRewrittenWithoutTitle()
|
||||
{
|
||||
$object = $this->getObject();
|
||||
$object->setVisible(1)
|
||||
->setPosition(1)
|
||||
->setLocale('en_US')
|
||||
->setDescription('My english super Description')
|
||||
->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Thelia\Model\Tools\UrlRewritingTrait::generateRewrittenUrl
|
||||
* @expectedException \RuntimeException
|
||||
*/
|
||||
public function testOnNotSavedObject()
|
||||
{
|
||||
$object = $this->getObject();
|
||||
|
||||
$object->generateRewrittenUrl('fr_FR');
|
||||
}
|
||||
}
|
||||
43
core/lib/Thelia/Tests/Rewriting/CategoryRewritingTest.php
Normal file
43
core/lib/Thelia/Tests/Rewriting/CategoryRewritingTest.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?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\Tests\Rewriting;
|
||||
use Thelia\Model\Category;
|
||||
|
||||
|
||||
/**
|
||||
* Class CategoryRewritingTest
|
||||
* @package Thelia\Tests\Rewriting
|
||||
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||
*/
|
||||
class CategoryRewritingTest extends BaseRewritingObject
|
||||
{
|
||||
|
||||
/**
|
||||
* @return \Thelia\Model\Category
|
||||
*/
|
||||
function getObject()
|
||||
{
|
||||
return new Category();
|
||||
}
|
||||
}
|
||||
43
core/lib/Thelia/Tests/Rewriting/ContentRewritingTest.php
Normal file
43
core/lib/Thelia/Tests/Rewriting/ContentRewritingTest.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?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\Tests\Rewriting;
|
||||
use Thelia\Model\Content;
|
||||
|
||||
|
||||
/**
|
||||
* Class ContentRewritingTest
|
||||
* @package Thelia\Tests\Rewriting
|
||||
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||
*/
|
||||
class ContentRewritingTest extends BaseRewritingObject
|
||||
{
|
||||
|
||||
/**
|
||||
* @return \Thelia\Model\Content
|
||||
*/
|
||||
function getObject()
|
||||
{
|
||||
return new Content();
|
||||
}
|
||||
}
|
||||
43
core/lib/Thelia/Tests/Rewriting/FolderRewritingTest.php
Normal file
43
core/lib/Thelia/Tests/Rewriting/FolderRewritingTest.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?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\Tests\Rewriting;
|
||||
use Thelia\Model\Folder;
|
||||
|
||||
|
||||
/**
|
||||
* Class FolderRewritingTest
|
||||
* @package Thelia\Tests\Rewriting
|
||||
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||
*/
|
||||
class FolderRewritingTest extends BaseRewritingObject
|
||||
{
|
||||
|
||||
/**
|
||||
* @return mixed an instance of Product, Folder, Content or Category Model
|
||||
*/
|
||||
function getObject()
|
||||
{
|
||||
return new Folder();
|
||||
}
|
||||
}
|
||||
@@ -31,59 +31,14 @@ use Thelia\Model\ProductQuery;
|
||||
* @package Thelia\Tests\Rewriting
|
||||
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||
*/
|
||||
class ProductRewriteTest extends \PHPUnit_Framework_TestCase
|
||||
class ProductRewriteTest extends BaseRewritingObject
|
||||
{
|
||||
protected static $productId;
|
||||
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
$product = new Product();
|
||||
$product->setRef(sprintf("TestRewrittenProduct%s",uniqid()))
|
||||
->setPosition(1)
|
||||
->setVisible(1)
|
||||
->setLocale('en_US')
|
||||
->setTitle('My english super Title')
|
||||
->setLocale('fr_FR')
|
||||
->setTitle('Mon super titre en français')
|
||||
->save();
|
||||
|
||||
self::$productId = $product->getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Thelia\Model\Tools\UrlRewritingTrait::generateRewrittenUrl
|
||||
* @return mixed an instance of Product, Folder, Content or Category Model
|
||||
*/
|
||||
public function testFrenchRewrittenUrl()
|
||||
function getObject()
|
||||
{
|
||||
$product = ProductQuery::create()->findPk(self::$productId);
|
||||
|
||||
$rewrittenUrl = $product->generateRewrittenUrl('fr_FR');
|
||||
$this->assertNotNull($rewrittenUrl, "rewritten url can not be null");
|
||||
$this->assertRegExp('/^mon-super-titre-en-français(-[0-9]+)?\.html$/', $rewrittenUrl);
|
||||
//mon-super-titre-en-français-2.html
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Thelia\Model\Tools\UrlRewritingTrait::generateRewrittenUrl
|
||||
*/
|
||||
public function testEnglishRewrittenUrl()
|
||||
{
|
||||
$product = ProductQuery::create()->findPk(self::$productId);
|
||||
|
||||
$rewrittenUrl = $product->generateRewrittenUrl('en_US');
|
||||
$this->assertNotNull($rewrittenUrl, "rewritten url can not be null");
|
||||
$this->assertRegExp('/^my-english-super-title(-[0-9]+)?\.html$/', $rewrittenUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Thelia\Model\Tools\UrlRewritingTrait::generateRewrittenUrl
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage Object product must be saved before generating url
|
||||
*/
|
||||
public function testOnNotSavedProduct()
|
||||
{
|
||||
$product = new Product();
|
||||
|
||||
$product->generateRewrittenUrl('fr_FR');
|
||||
return new Product();
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,8 @@ INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updat
|
||||
('image_cache_dir_from_web_root', 'cache/images', 0, 0, NOW(), NOW()),
|
||||
('document_cache_dir_from_web_root', 'cache/documents', 0, 0, NOW(), NOW()),
|
||||
('currency_rate_update_url', 'http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml', 0, 0, NOW(), NOW()),
|
||||
('page_not_found_view', '404.html', 0, 0, NOW(), NOW()),
|
||||
('page_not_found_view', '404', 0, 0, NOW(), NOW()),
|
||||
('passed_url_view', 'passed-url', 0, 0, NOW(), NOW()),
|
||||
('use_tax_free_amounts', 0, 0, 0, NOW(), NOW()),
|
||||
('process_assets', '1', 0, 0, NOW(), NOW()),
|
||||
('thelia_admin_remember_me_cookie_name', 'tarmcn', 0, 0, NOW(), NOW()),
|
||||
|
||||
@@ -71,7 +71,11 @@ class DebugBar extends AbstractSmartyPlugin
|
||||
}
|
||||
}
|
||||
|
||||
file_put_contents($cssFile, $assetCss->dump());
|
||||
if(!file_exists(THELIA_WEB_DIR . "/cache")) {
|
||||
@mkdir(THELIA_WEB_DIR . "/cache");
|
||||
}
|
||||
|
||||
@file_put_contents($cssFile, $assetCss->dump());
|
||||
}
|
||||
$render = sprintf('<link rel="stylesheet" href="%s">', URL::getInstance()->absoluteUrl($webFile, array(), URL::PATH_TO_FILE));
|
||||
}
|
||||
@@ -96,7 +100,11 @@ class DebugBar extends AbstractSmartyPlugin
|
||||
}
|
||||
}
|
||||
|
||||
file_put_contents($cacheFile, $assetJs->dump());
|
||||
if(!file_exists(THELIA_WEB_DIR . "/cache")) {
|
||||
@mkdir(THELIA_WEB_DIR . "/cache");
|
||||
}
|
||||
|
||||
@file_put_contents($cacheFile, $assetJs->dump());
|
||||
}
|
||||
|
||||
$render = sprintf('<script src="%s"></script>', URL::getInstance()->absoluteUrl($webFile, array(), URL::PATH_TO_FILE));
|
||||
|
||||
@@ -138,9 +138,9 @@
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
{loop name="menu-auth-content" type="auth" roles="ADMIN" permissions="admin.content.view"}
|
||||
<li class="{if $admin_current_location == 'content'}active{/if}" id="content_menu">
|
||||
<a href="{url path='/admin/content'}">{intl l="Content"}</a>
|
||||
{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}
|
||||
|
||||
|
||||
3
templates/admin/default/assets/js/jqplot/jquery.jqplot.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/jquery.jqplot.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.BezierCurveRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.BezierCurveRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.barRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.barRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.blockRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.blockRenderer.min.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||
jsDate | (c) 2010-2013 Chris Leonello
|
||||
*/(function(a){a.jqplot.BlockRenderer=function(){a.jqplot.LineRenderer.call(this)};a.jqplot.BlockRenderer.prototype=new a.jqplot.LineRenderer();a.jqplot.BlockRenderer.prototype.constructor=a.jqplot.BlockRenderer;a.jqplot.BlockRenderer.prototype.init=function(b){this.css={padding:"2px",border:"1px solid #999",textAlign:"center"};this.escapeHtml=false;this.insertBreaks=true;this.varyBlockColors=false;a.extend(true,this,b);if(this.css.backgroundColor){this.color=this.css.backgroundColor}else{if(this.css.background){this.color=this.css.background}else{if(!this.varyBlockColors){this.css.background=this.color}}}this.canvas=new a.jqplot.BlockCanvas();this.shadowCanvas=new a.jqplot.BlockCanvas();this.canvas._plotDimensions=this._plotDimensions;this.shadowCanvas._plotDimensions=this._plotDimensions;this._type="block";this.moveBlock=function(l,j,i,e){var c=this.canvas._elem.children(":eq("+l+")");this.data[l][0]=j;this.data[l][1]=i;this._plotData[l][0]=j;this._plotData[l][1]=i;this._stackData[l][0]=j;this._stackData[l][1]=i;this.gridData[l][0]=this._xaxis.series_u2p(j);this.gridData[l][1]=this._yaxis.series_u2p(i);var k=c.outerWidth();var f=c.outerHeight();var d=this.gridData[l][0]-k/2+"px";var g=this.gridData[l][1]-f/2+"px";if(e){if(parseInt(e,10)){e=parseInt(e,10)}c.animate({left:d,top:g},e)}else{c.css({left:d,top:g})}c=null}};a.jqplot.BlockRenderer.prototype.draw=function(q,o,r){if(this.plugins.pointLabels){this.plugins.pointLabels.show=false}var f,c,l,o,p,k,n,g,e,m;var b=(r!=undefined)?r:{};var j=new a.jqplot.ColorGenerator(this.seriesColors);this.canvas._elem.empty();for(f=0;f<this.gridData.length;f++){l=this.data[f];o=this.gridData[f];p="";k={};if(typeof l[2]=="string"){p=l[2]}else{if(typeof l[2]=="object"){k=l[2]}}if(typeof l[3]=="object"){k=l[3]}if(this.insertBreaks){p=p.replace(/ /g,"<br />")}k=a.extend(true,{},this.css,k);c=a('<div style="position:absolute;margin-left:auto;margin-right:auto;"></div>');this.canvas._elem.append(c);this.escapeHtml?c.text(p):c.html(p);delete k.position;delete k.marginRight;delete k.marginLeft;if(!k.background&&!k.backgroundColor&&!k.backgroundImage){k.background=j.next()}c.css(k);n=c.outerWidth();g=c.outerHeight();e=o[0]-n/2+"px";m=o[1]-g/2+"px";c.css({left:e,top:m});c=null}};a.jqplot.BlockCanvas=function(){a.jqplot.ElemContainer.call(this);this._ctx};a.jqplot.BlockCanvas.prototype=new a.jqplot.ElemContainer();a.jqplot.BlockCanvas.prototype.constructor=a.jqplot.BlockCanvas;a.jqplot.BlockCanvas.prototype.createElement=function(i,e,c){this._offsets=i;var b="jqplot-blockCanvas";if(e!=undefined){b=e}var g;if(this._elem){g=this._elem.get(0)}else{g=document.createElement("div")}if(c!=undefined){this._plotDimensions=c}var d=this._plotDimensions.width-this._offsets.left-this._offsets.right+"px";var f=this._plotDimensions.height-this._offsets.top-this._offsets.bottom+"px";this._elem=a(g);this._elem.css({position:"absolute",width:d,height:f,left:this._offsets.left,top:this._offsets.top});this._elem.addClass(b);return this._elem};a.jqplot.BlockCanvas.prototype.setContext=function(){this._ctx={canvas:{width:0,height:0},clearRect:function(){return null}};return this._ctx}})(jQuery);
|
||||
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.bubbleRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.bubbleRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||
jsDate | (c) 2010-2013 Chris Leonello
|
||||
*/(function(a){a.jqplot.CanvasAxisLabelRenderer=function(b){this.angle=0;this.axis;this.show=true;this.showLabel=true;this.label="";this.fontFamily='"Trebuchet MS", Arial, Helvetica, sans-serif';this.fontSize="11pt";this.fontWeight="normal";this.fontStretch=1;this.textColor="#666666";this.enableFontSupport=true;this.pt2px=null;this._elem;this._ctx;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null};a.extend(true,this,b);if(b.angle==null&&this.axis!="xaxis"&&this.axis!="x2axis"){this.angle=-90}var c={fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily};if(this.pt2px){c.pt2px=this.pt2px}if(this.enableFontSupport){if(a.jqplot.support_canvas_text()){this._textRenderer=new a.jqplot.CanvasFontRenderer(c)}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}};a.jqplot.CanvasAxisLabelRenderer.prototype.init=function(b){a.extend(true,this,b);this._textRenderer.init({fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily})};a.jqplot.CanvasAxisLabelRenderer.prototype.getWidth=function(d){if(this._elem){return this._elem.outerWidth(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.sin(f.angle)*e)+Math.abs(Math.cos(f.angle)*c);return b}};a.jqplot.CanvasAxisLabelRenderer.prototype.getHeight=function(d){if(this._elem){return this._elem.outerHeight(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.cos(f.angle)*e)+Math.abs(Math.sin(f.angle)*c);return b}};a.jqplot.CanvasAxisLabelRenderer.prototype.getAngleRad=function(){var b=this.angle*Math.PI/180;return b};a.jqplot.CanvasAxisLabelRenderer.prototype.draw=function(c,f){if(this._elem){if(a.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==undefined){window.G_vmlCanvasManager.uninitElement(this._elem.get(0))}this._elem.emptyForce();this._elem=null}var e=f.canvasManager.getCanvas();this._textRenderer.setText(this.label,c);var b=this.getWidth(c);var d=this.getHeight(c);e.width=b;e.height=d;e.style.width=b;e.style.height=d;e=f.canvasManager.initCanvas(e);this._elem=a(e);this._elem.css({position:"absolute"});this._elem.addClass("jqplot-"+this.axis+"-label");e=null;return this._elem};a.jqplot.CanvasAxisLabelRenderer.prototype.pack=function(){this._textRenderer.draw(this._elem.get(0).getContext("2d"),this.label)}})(jQuery);
|
||||
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||
jsDate | (c) 2010-2013 Chris Leonello
|
||||
*/(function(a){a.jqplot.CanvasAxisTickRenderer=function(b){this.mark="outside";this.showMark=true;this.showGridline=true;this.isMinorTick=false;this.angle=0;this.markSize=4;this.show=true;this.showLabel=true;this.labelPosition="auto";this.label="";this.value=null;this._styles={};this.formatter=a.jqplot.DefaultTickFormatter;this.formatString="";this.prefix="";this.fontFamily='"Trebuchet MS", Arial, Helvetica, sans-serif';this.fontSize="10pt";this.fontWeight="normal";this.fontStretch=1;this.textColor="#666666";this.enableFontSupport=true;this.pt2px=null;this._elem;this._ctx;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null};a.extend(true,this,b);var c={fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily};if(this.pt2px){c.pt2px=this.pt2px}if(this.enableFontSupport){if(a.jqplot.support_canvas_text()){this._textRenderer=new a.jqplot.CanvasFontRenderer(c)}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}};a.jqplot.CanvasAxisTickRenderer.prototype.init=function(b){a.extend(true,this,b);this._textRenderer.init({fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily})};a.jqplot.CanvasAxisTickRenderer.prototype.getWidth=function(d){if(this._elem){return this._elem.outerWidth(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.sin(f.angle)*e)+Math.abs(Math.cos(f.angle)*c);return b}};a.jqplot.CanvasAxisTickRenderer.prototype.getHeight=function(d){if(this._elem){return this._elem.outerHeight(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.cos(f.angle)*e)+Math.abs(Math.sin(f.angle)*c);return b}};a.jqplot.CanvasAxisTickRenderer.prototype.getTop=function(b){if(this._elem){return this._elem.position().top}else{return null}};a.jqplot.CanvasAxisTickRenderer.prototype.getAngleRad=function(){var b=this.angle*Math.PI/180;return b};a.jqplot.CanvasAxisTickRenderer.prototype.setTick=function(b,d,c){this.value=b;if(c){this.isMinorTick=true}return this};a.jqplot.CanvasAxisTickRenderer.prototype.draw=function(c,f){if(!this.label){this.label=this.prefix+this.formatter(this.formatString,this.value)}if(this._elem){if(a.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==undefined){window.G_vmlCanvasManager.uninitElement(this._elem.get(0))}this._elem.emptyForce();this._elem=null}var e=f.canvasManager.getCanvas();this._textRenderer.setText(this.label,c);var b=this.getWidth(c);var d=this.getHeight(c);e.width=b;e.height=d;e.style.width=b;e.style.height=d;e.style.textAlign="left";e.style.position="absolute";e=f.canvasManager.initCanvas(e);this._elem=a(e);this._elem.css(this._styles);this._elem.addClass("jqplot-"+this.axis+"-tick");e=null;return this._elem};a.jqplot.CanvasAxisTickRenderer.prototype.pack=function(){this._textRenderer.draw(this._elem.get(0).getContext("2d"),this.label)}})(jQuery);
|
||||
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.canvasOverlay.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.canvasOverlay.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.canvasTextRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.canvasTextRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.categoryAxisRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.categoryAxisRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.ciParser.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.ciParser.min.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||
jsDate | (c) 2010-2013 Chris Leonello
|
||||
*/(function(a){a.jqplot.ciParser=function(g,l){var m=[],o,n,h,f,e,c;if(typeof(g)=="string"){g=a.jqplot.JSON.parse(g,d)}else{if(typeof(g)=="object"){for(e in g){for(h=0;h<g[e].length;h++){for(c in g[e][h]){g[e][h][c]=d(c,g[e][h][c])}}}}else{return null}}function d(j,k){var i;if(k!=null){if(k.toString().indexOf("Date")>=0){i=/^\/Date\((-?[0-9]+)\)\/$/.exec(k);if(i){return parseInt(i[1],10)}}return k}}for(var b in g){o=[];n=g[b];switch(b){case"PriceTicks":for(h=0;h<n.length;h++){o.push([n[h]["TickDate"],n[h]["Price"]])}break;case"PriceBars":for(h=0;h<n.length;h++){o.push([n[h]["BarDate"],n[h]["Open"],n[h]["High"],n[h]["Low"],n[h]["Close"]])}break}m.push(o)}return m}})(jQuery);
|
||||
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.cursor.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.cursor.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.dateAxisRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.dateAxisRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.donutRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.donutRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.dragable.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.dragable.min.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||
jsDate | (c) 2010-2013 Chris Leonello
|
||||
*/(function(d){d.jqplot.Dragable=function(g){this.markerRenderer=new d.jqplot.MarkerRenderer({shadow:false});this.shapeRenderer=new d.jqplot.ShapeRenderer();this.isDragging=false;this.isOver=false;this._ctx;this._elem;this._point;this._gridData;this.color;this.constrainTo="none";d.extend(true,this,g)};function b(){d.jqplot.GenericCanvas.call(this);this.isDragging=false;this.isOver=false;this._neighbor;this._cursors=[]}b.prototype=new d.jqplot.GenericCanvas();b.prototype.constructor=b;d.jqplot.Dragable.parseOptions=function(i,h){var g=h||{};this.plugins.dragable=new d.jqplot.Dragable(g.dragable);this.isDragable=d.jqplot.config.enablePlugins};d.jqplot.Dragable.postPlotDraw=function(){if(this.plugins.dragable&&this.plugins.dragable.highlightCanvas){this.plugins.dragable.highlightCanvas.resetCanvas();this.plugins.dragable.highlightCanvas=null}this.plugins.dragable={previousCursor:"auto",isOver:false};this.plugins.dragable.dragCanvas=new b();this.eventCanvas._elem.before(this.plugins.dragable.dragCanvas.createElement(this._gridPadding,"jqplot-dragable-canvas",this._plotDimensions,this));var g=this.plugins.dragable.dragCanvas.setContext()};d.jqplot.preParseSeriesOptionsHooks.push(d.jqplot.Dragable.parseOptions);d.jqplot.postDrawHooks.push(d.jqplot.Dragable.postPlotDraw);d.jqplot.eventListenerHooks.push(["jqplotMouseMove",e]);d.jqplot.eventListenerHooks.push(["jqplotMouseDown",c]);d.jqplot.eventListenerHooks.push(["jqplotMouseUp",a]);function f(n,p){var q=n.series[p.seriesIndex];var m=q.plugins.dragable;var h=q.markerRenderer;var i=m.markerRenderer;i.style=h.style;i.lineWidth=h.lineWidth+2.5;i.size=h.size+5;if(!m.color){var l=d.jqplot.getColorComponents(h.color);var o=[l[0],l[1],l[2]];var k=(l[3]>=0.6)?l[3]*0.6:l[3]*(2-l[3]);m.color="rgba("+o[0]+","+o[1]+","+o[2]+","+k+")"}i.color=m.color;i.init();var g=(p.pointIndex>0)?p.pointIndex-1:0;var j=p.pointIndex+2;m._gridData=q.gridData.slice(g,j)}function e(o,l,h,t,m){if(m.plugins.dragable.dragCanvas.isDragging){var u=m.plugins.dragable.dragCanvas;var i=u._neighbor;var w=m.series[i.seriesIndex];var k=w.plugins.dragable;var r=w.gridData;var p=(k.constrainTo=="y")?i.gridData[0]:l.x;var n=(k.constrainTo=="x")?i.gridData[1]:l.y;var g=w._xaxis.series_p2u(p);var q=w._yaxis.series_p2u(n);var v=u._ctx;v.clearRect(0,0,v.canvas.width,v.canvas.height);if(i.pointIndex>0){k._gridData[1]=[p,n]}else{k._gridData[0]=[p,n]}m.series[i.seriesIndex].draw(u._ctx,{gridData:k._gridData,shadow:false,preventJqPlotSeriesDrawTrigger:true,color:k.color,markerOptions:{color:k.color,shadow:false},trendline:{show:false}});m.target.trigger("jqplotSeriesPointChange",[i.seriesIndex,i.pointIndex,[g,q],[p,n]])}else{if(t!=null){var j=m.series[t.seriesIndex];if(j.isDragable){var u=m.plugins.dragable.dragCanvas;if(!u.isOver){u._cursors.push(o.target.style.cursor);o.target.style.cursor="pointer"}u.isOver=true}}else{if(t==null){var u=m.plugins.dragable.dragCanvas;if(u.isOver){o.target.style.cursor=u._cursors.pop();u.isOver=false}}}}}function c(k,i,g,l,j){var m=j.plugins.dragable.dragCanvas;m._cursors.push(k.target.style.cursor);if(l!=null){var o=j.series[l.seriesIndex];var h=o.plugins.dragable;if(o.isDragable&&!m.isDragging){m._neighbor=l;m.isDragging=true;f(j,l);h.markerRenderer.draw(o.gridData[l.pointIndex][0],o.gridData[l.pointIndex][1],m._ctx);k.target.style.cursor="move";j.target.trigger("jqplotDragStart",[l.seriesIndex,l.pointIndex,i,g])}}else{var n=m._ctx;n.clearRect(0,0,n.canvas.width,n.canvas.height);m.isDragging=false}}function a(m,j,g,o,k){if(k.plugins.dragable.dragCanvas.isDragging){var p=k.plugins.dragable.dragCanvas;var q=p._ctx;q.clearRect(0,0,q.canvas.width,q.canvas.height);p.isDragging=false;var h=p._neighbor;var r=k.series[h.seriesIndex];var i=r.plugins.dragable;var n=(i.constrainTo=="y")?h.data[0]:g[r.xaxis];var l=(i.constrainTo=="x")?h.data[1]:g[r.yaxis];r.data[h.pointIndex][0]=n;r.data[h.pointIndex][1]=l;k.drawSeries({preventJqPlotSeriesDrawTrigger:true},h.seriesIndex);p._neighbor=null;m.target.style.cursor=p._cursors.pop();k.target.trigger("jqplotDragStop",[j,g])}}})(jQuery);
|
||||
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||
jsDate | (c) 2010-2013 Chris Leonello
|
||||
*/(function(c){c.jqplot.EnhancedLegendRenderer=function(){c.jqplot.TableLegendRenderer.call(this)};c.jqplot.EnhancedLegendRenderer.prototype=new c.jqplot.TableLegendRenderer();c.jqplot.EnhancedLegendRenderer.prototype.constructor=c.jqplot.EnhancedLegendRenderer;c.jqplot.EnhancedLegendRenderer.prototype.init=function(d){this.numberRows=null;this.numberColumns=null;this.seriesToggle="normal";this.seriesToggleReplot=false;this.disableIEFading=true;c.extend(true,this,d);if(this.seriesToggle){c.jqplot.postDrawHooks.push(b)}};c.jqplot.EnhancedLegendRenderer.prototype.draw=function(m,y){var f=this;if(this.show){var r=this._series;var u;var w="position:absolute;";w+=(this.background)?"background:"+this.background+";":"";w+=(this.border)?"border:"+this.border+";":"";w+=(this.fontSize)?"font-size:"+this.fontSize+";":"";w+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";w+=(this.textColor)?"color:"+this.textColor+";":"";w+=(this.marginTop!=null)?"margin-top:"+this.marginTop+";":"";w+=(this.marginBottom!=null)?"margin-bottom:"+this.marginBottom+";":"";w+=(this.marginLeft!=null)?"margin-left:"+this.marginLeft+";":"";w+=(this.marginRight!=null)?"margin-right:"+this.marginRight+";":"";this._elem=c('<table class="jqplot-table-legend" style="'+w+'"></table>');if(this.seriesToggle){this._elem.css("z-index","3")}var C=false,q=false,d,o;if(this.numberRows){d=this.numberRows;if(!this.numberColumns){o=Math.ceil(r.length/d)}else{o=this.numberColumns}}else{if(this.numberColumns){o=this.numberColumns;d=Math.ceil(r.length/this.numberColumns)}else{d=r.length;o=1}}var B,z,e,l,k,n,p,t,h,g;var v=0;for(B=r.length-1;B>=0;B--){if(o==1&&r[B]._stack||r[B].renderer.constructor==c.jqplot.BezierCurveRenderer){q=true}}for(B=0;B<d;B++){e=c(document.createElement("tr"));e.addClass("jqplot-table-legend");if(q){e.prependTo(this._elem)}else{e.appendTo(this._elem)}for(z=0;z<o;z++){if(v<r.length&&(r[v].show||r[v].showLabel)){u=r[v];n=this.labels[v]||u.label.toString();if(n){var x=u.color;if(!q){if(B>0){C=true}else{C=false}}else{if(B==d-1){C=false}else{C=true}}p=(C)?this.rowSpacing:"0";l=c(document.createElement("td"));l.addClass("jqplot-table-legend jqplot-table-legend-swatch");l.css({textAlign:"center",paddingTop:p});h=c(document.createElement("div"));h.addClass("jqplot-table-legend-swatch-outline");g=c(document.createElement("div"));g.addClass("jqplot-table-legend-swatch");g.css({backgroundColor:x,borderColor:x});l.append(h.append(g));k=c(document.createElement("td"));k.addClass("jqplot-table-legend jqplot-table-legend-label");k.css("paddingTop",p);if(this.escapeHtml){k.text(n)}else{k.html(n)}if(q){if(this.showLabels){k.prependTo(e)}if(this.showSwatches){l.prependTo(e)}}else{if(this.showSwatches){l.appendTo(e)}if(this.showLabels){k.appendTo(e)}}if(this.seriesToggle){var A;if(typeof(this.seriesToggle)==="string"||typeof(this.seriesToggle)==="number"){if(!c.jqplot.use_excanvas||!this.disableIEFading){A=this.seriesToggle}}if(this.showSwatches){l.bind("click",{series:u,speed:A,plot:y,replot:this.seriesToggleReplot},a);l.addClass("jqplot-seriesToggle")}if(this.showLabels){k.bind("click",{series:u,speed:A,plot:y,replot:this.seriesToggleReplot},a);k.addClass("jqplot-seriesToggle")}if(!u.show&&u.showLabel){l.addClass("jqplot-series-hidden");k.addClass("jqplot-series-hidden")}}C=true}}v++}l=k=h=g=null}}return this._elem};var a=function(j){var i=j.data,m=i.series,k=i.replot,h=i.plot,f=i.speed,l=m.index,g=false;if(m.canvas._elem.is(":hidden")||!m.show){g=true}var e=function(){if(k){var n={};if(c.isPlainObject(k)){c.extend(true,n,k)}h.replot(n);if(g&&f){var d=h.series[l];if(d.shadowCanvas._elem){d.shadowCanvas._elem.hide().fadeIn(f)}d.canvas._elem.hide().fadeIn(f);d.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+d.index).hide().fadeIn(f)}}else{var d=h.series[l];if(d.canvas._elem.is(":hidden")||!d.show){if(typeof h.options.legend.showSwatches==="undefined"||h.options.legend.showSwatches===true){h.legend._elem.find("td").eq(l*2).addClass("jqplot-series-hidden")}if(typeof h.options.legend.showLabels==="undefined"||h.options.legend.showLabels===true){h.legend._elem.find("td").eq((l*2)+1).addClass("jqplot-series-hidden")}}else{if(typeof h.options.legend.showSwatches==="undefined"||h.options.legend.showSwatches===true){h.legend._elem.find("td").eq(l*2).removeClass("jqplot-series-hidden")}if(typeof h.options.legend.showLabels==="undefined"||h.options.legend.showLabels===true){h.legend._elem.find("td").eq((l*2)+1).removeClass("jqplot-series-hidden")}}}};m.toggleDisplay(j,e)};var b=function(){if(this.legend.renderer.constructor==c.jqplot.EnhancedLegendRenderer&&this.legend.seriesToggle){var d=this.legend._elem.detach();this.eventCanvas._elem.after(d)}}})(jQuery);
|
||||
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.funnelRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.funnelRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.highlighter.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.highlighter.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.json2.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.json2.min.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||
jsDate | (c) 2010-2013 Chris Leonello
|
||||
*/(function($){$.jqplot.JSON=window.JSON;if(!window.JSON){$.jqplot.JSON={}}function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof $.jqplot.JSON.stringify!=="function"){$.jqplot.JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("$.jqplot.JSON.stringify")}return str("",{"":value})}}if(typeof $.jqplot.JSON.parse!=="function"){$.jqplot.JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("$.jqplot.JSON.parse")}}})(jQuery);
|
||||
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.logAxisRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.logAxisRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.mekkoRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.mekkoRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.meterGaugeRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.meterGaugeRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.mobile.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.mobile.min.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||
jsDate | (c) 2010-2013 Chris Leonello
|
||||
*/(function(b){function a(e,d,c){this.bindCustomEvents=function(){this.eventCanvas._elem.bind("vclick",{plot:this},this.onClick);this.eventCanvas._elem.bind("dblclick",{plot:this},this.onDblClick);this.eventCanvas._elem.bind("taphold",{plot:this},this.onDblClick);this.eventCanvas._elem.bind("vmousedown",{plot:this},this.onMouseDown);this.eventCanvas._elem.bind("vmousemove",{plot:this},this.onMouseMove);this.eventCanvas._elem.bind("mouseenter",{plot:this},this.onMouseEnter);this.eventCanvas._elem.bind("mouseleave",{plot:this},this.onMouseLeave);if(this.captureRightClick){this.eventCanvas._elem.bind("vmouseup",{plot:this},this.onRightClick);this.eventCanvas._elem.get(0).oncontextmenu=function(){return false}}else{this.eventCanvas._elem.bind("vmouseup",{plot:this},this.onMouseUp)}};this.plugins.mobile=true}b.jqplot.postInitHooks.push(a)})(jQuery);
|
||||
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.ohlcRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.ohlcRenderer.min.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||
jsDate | (c) 2010-2013 Chris Leonello
|
||||
*/(function(a){a.jqplot.OHLCRenderer=function(){a.jqplot.LineRenderer.call(this);this.candleStick=false;this.tickLength="auto";this.bodyWidth="auto";this.openColor=null;this.closeColor=null;this.wickColor=null;this.fillUpBody=false;this.fillDownBody=true;this.upBodyColor=null;this.downBodyColor=null;this.hlc=false;this.lineWidth=1.5;this._tickLength;this._bodyWidth};a.jqplot.OHLCRenderer.prototype=new a.jqplot.LineRenderer();a.jqplot.OHLCRenderer.prototype.constructor=a.jqplot.OHLCRenderer;a.jqplot.OHLCRenderer.prototype.init=function(e){e=e||{};this.lineWidth=e.lineWidth||1.5;a.jqplot.LineRenderer.prototype.init.call(this,e);this._type="ohlc";var b=this._yaxis._dataBounds;var f=this._plotData;if(f[0].length<5){this.renderer.hlc=true;for(var c=0;c<f.length;c++){if(f[c][2]<b.min||b.min==null){b.min=f[c][2]}if(f[c][1]>b.max||b.max==null){b.max=f[c][1]}}}else{for(var c=0;c<f.length;c++){if(f[c][3]<b.min||b.min==null){b.min=f[c][3]}if(f[c][2]>b.max||b.max==null){b.max=f[c][2]}}}};a.jqplot.OHLCRenderer.prototype.draw=function(A,N,j){var J=this.data;var v=this._xaxis.min;var z=this._xaxis.max;var l=0;var K=J.length;var p=this._xaxis.series_u2p;var G=this._yaxis.series_u2p;var D,E,f,M,F,n,O,C;var y;var u=this.renderer;var s=(j!=undefined)?j:{};var k=(s.shadow!=undefined)?s.shadow:this.shadow;var B=(s.fill!=undefined)?s.fill:this.fill;var c=(s.fillAndStroke!=undefined)?s.fillAndStroke:this.fillAndStroke;u.bodyWidth=(s.bodyWidth!=undefined)?s.bodyWidth:u.bodyWidth;u.tickLength=(s.tickLength!=undefined)?s.tickLength:u.tickLength;A.save();if(this.show){var m,q,g,Q,t;for(var D=0;D<J.length;D++){if(J[D][0]<v){l=D}else{if(J[D][0]<z){K=D+1}}}var I=this.gridData[K-1][0]-this.gridData[l][0];var L=K-l;try{var P=Math.abs(this._xaxis.series_u2p(parseInt(this._xaxis._intervalStats[0].sortedIntervals[0].interval,10))-this._xaxis.series_u2p(0))}catch(H){var P=I/L}if(u.candleStick){if(typeof(u.bodyWidth)=="number"){u._bodyWidth=u.bodyWidth}else{u._bodyWidth=Math.min(20,P/1.65)}}else{if(typeof(u.tickLength)=="number"){u._tickLength=u.tickLength}else{u._tickLength=Math.min(10,P/3.5)}}for(var D=l;D<K;D++){m=p(J[D][0]);if(u.hlc){q=null;g=G(J[D][1]);Q=G(J[D][2]);t=G(J[D][3])}else{q=G(J[D][1]);g=G(J[D][2]);Q=G(J[D][3]);t=G(J[D][4])}y={};if(u.candleStick&&!u.hlc){n=u._bodyWidth;O=m-n/2;if(t<q){if(u.wickColor){y.color=u.wickColor}else{if(u.downBodyColor){y.color=u.upBodyColor}}f=a.extend(true,{},s,y);u.shapeRenderer.draw(A,[[m,g],[m,t]],f);u.shapeRenderer.draw(A,[[m,q],[m,Q]],f);y={};M=t;F=q-t;if(u.fillUpBody){y.fillRect=true}else{y.strokeRect=true;n=n-this.lineWidth;O=m-n/2}if(u.upBodyColor){y.color=u.upBodyColor;y.fillStyle=u.upBodyColor}C=[O,M,n,F]}else{if(t>q){if(u.wickColor){y.color=u.wickColor}else{if(u.downBodyColor){y.color=u.downBodyColor}}f=a.extend(true,{},s,y);u.shapeRenderer.draw(A,[[m,g],[m,q]],f);u.shapeRenderer.draw(A,[[m,t],[m,Q]],f);y={};M=q;F=t-q;if(u.fillDownBody){y.fillRect=true}else{y.strokeRect=true;n=n-this.lineWidth;O=m-n/2}if(u.downBodyColor){y.color=u.downBodyColor;y.fillStyle=u.downBodyColor}C=[O,M,n,F]}else{if(u.wickColor){y.color=u.wickColor}f=a.extend(true,{},s,y);u.shapeRenderer.draw(A,[[m,g],[m,Q]],f);y={};y.fillRect=false;y.strokeRect=false;O=[m-n/2,q];M=[m+n/2,t];n=null;F=null;C=[O,M]}}f=a.extend(true,{},s,y);u.shapeRenderer.draw(A,C,f)}else{E=s.color;if(u.openColor){s.color=u.openColor}if(!u.hlc){u.shapeRenderer.draw(A,[[m-u._tickLength,q],[m,q]],s)}s.color=E;if(u.wickColor){s.color=u.wickColor}u.shapeRenderer.draw(A,[[m,g],[m,Q]],s);s.color=E;if(u.closeColor){s.color=u.closeColor}u.shapeRenderer.draw(A,[[m,t],[m+u._tickLength,t]],s);s.color=E}}}A.restore()};a.jqplot.OHLCRenderer.prototype.drawShadow=function(b,d,c){};a.jqplot.OHLCRenderer.checkOptions=function(d,c,b){if(!b.highlighter){b.highlighter={showMarker:false,tooltipAxes:"y",yvalues:4,formatString:'<table class="jqplot-highlighter"><tr><td>date:</td><td>%s</td></tr><tr><td>open:</td><td>%s</td></tr><tr><td>hi:</td><td>%s</td></tr><tr><td>low:</td><td>%s</td></tr><tr><td>close:</td><td>%s</td></tr></table>'}}}})(jQuery);
|
||||
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.pieRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.pieRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.pointLabels.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.pointLabels.min.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||
jsDate | (c) 2010-2013 Chris Leonello
|
||||
*/(function(c){c.jqplot.PointLabels=function(e){this.show=c.jqplot.config.enablePlugins;this.location="n";this.labelsFromSeries=false;this.seriesLabelIndex=null;this.labels=[];this._labels=[];this.stackedValue=false;this.ypadding=6;this.xpadding=6;this.escapeHTML=true;this.edgeTolerance=-5;this.formatter=c.jqplot.DefaultTickFormatter;this.formatString="";this.hideZeros=false;this._elems=[];c.extend(true,this,e)};var a=["nw","n","ne","e","se","s","sw","w"];var d={nw:0,n:1,ne:2,e:3,se:4,s:5,sw:6,w:7};var b=["se","s","sw","w","nw","n","ne","e"];c.jqplot.PointLabels.init=function(j,h,f,g,i){var e=c.extend(true,{},f,g);e.pointLabels=e.pointLabels||{};if(this.renderer.constructor===c.jqplot.BarRenderer&&this.barDirection==="horizontal"&&!e.pointLabels.location){e.pointLabels.location="e"}this.plugins.pointLabels=new c.jqplot.PointLabels(e.pointLabels);this.plugins.pointLabels.setLabels.call(this)};c.jqplot.PointLabels.prototype.setLabels=function(){var f=this.plugins.pointLabels;var h;if(f.seriesLabelIndex!=null){h=f.seriesLabelIndex}else{if(this.renderer.constructor===c.jqplot.BarRenderer&&this.barDirection==="horizontal"){h=(this._plotData[0].length<3)?0:this._plotData[0].length-1}else{h=(this._plotData.length===0)?0:this._plotData[0].length-1}}f._labels=[];if(f.labels.length===0||f.labelsFromSeries){if(f.stackedValue){if(this._plotData.length&&this._plotData[0].length){for(var e=0;e<this._plotData.length;e++){f._labels.push(this._plotData[e][h])}}}else{var g=this.data;if(this.renderer.constructor===c.jqplot.BarRenderer&&this.waterfall){g=this._data}if(g.length&&g[0].length){for(var e=0;e<g.length;e++){f._labels.push(g[e][h])}}g=null}}else{if(f.labels.length){f._labels=f.labels}}};c.jqplot.PointLabels.prototype.xOffset=function(f,e,g){e=e||this.location;g=g||this.xpadding;var h;switch(e){case"nw":h=-f.outerWidth(true)-this.xpadding;break;case"n":h=-f.outerWidth(true)/2;break;case"ne":h=this.xpadding;break;case"e":h=this.xpadding;break;case"se":h=this.xpadding;break;case"s":h=-f.outerWidth(true)/2;break;case"sw":h=-f.outerWidth(true)-this.xpadding;break;case"w":h=-f.outerWidth(true)-this.xpadding;break;default:h=-f.outerWidth(true)-this.xpadding;break}return h};c.jqplot.PointLabels.prototype.yOffset=function(f,e,g){e=e||this.location;g=g||this.xpadding;var h;switch(e){case"nw":h=-f.outerHeight(true)-this.ypadding;break;case"n":h=-f.outerHeight(true)-this.ypadding;break;case"ne":h=-f.outerHeight(true)-this.ypadding;break;case"e":h=-f.outerHeight(true)/2;break;case"se":h=this.ypadding;break;case"s":h=this.ypadding;break;case"sw":h=this.ypadding;break;case"w":h=-f.outerHeight(true)/2;break;default:h=-f.outerHeight(true)-this.ypadding;break}return h};c.jqplot.PointLabels.draw=function(x,j,v){var t=this.plugins.pointLabels;t.setLabels.call(this);for(var w=0;w<t._elems.length;w++){t._elems[w].emptyForce()}t._elems.splice(0,t._elems.length);if(t.show){var r="_"+this._stackAxis+"axis";if(!t.formatString){t.formatString=this[r]._ticks[0].formatString;t.formatter=this[r]._ticks[0].formatter}var E=this._plotData;var D=this._prevPlotData;var A=this._xaxis;var q=this._yaxis;var z,f;for(var w=0,u=t._labels.length;w<u;w++){var o=t._labels[w];if(o==null||(t.hideZeros&&parseInt(o,10)==0)){continue}o=t.formatter(t.formatString,o);f=document.createElement("div");t._elems[w]=c(f);z=t._elems[w];z.addClass("jqplot-point-label jqplot-series-"+this.index+" jqplot-point-"+w);z.css("position","absolute");z.insertAfter(x.canvas);if(t.escapeHTML){z.text(o)}else{z.html(o)}var g=t.location;if((this.fillToZero&&E[w][1]<0)||(this.fillToZero&&this._type==="bar"&&this.barDirection==="horizontal"&&E[w][0]<0)||(this.waterfall&&parseInt(o,10))<0){g=b[d[g]]}var n=A.u2p(E[w][0])+t.xOffset(z,g);var h=q.u2p(E[w][1])+t.yOffset(z,g);if(this._stack&&!t.stackedValue){if(this.barDirection==="vertical"){h=(this._barPoints[w][0][1]+this._barPoints[w][1][1])/2+v._gridPadding.top-0.5*z.outerHeight(true)}else{n=(this._barPoints[w][2][0]+this._barPoints[w][0][0])/2+v._gridPadding.left-0.5*z.outerWidth(true)}}if(this.renderer.constructor==c.jqplot.BarRenderer){if(this.barDirection=="vertical"){n+=this._barNudge}else{h-=this._barNudge}}z.css("left",n);z.css("top",h);var k=n+z.width();var s=h+z.height();var C=t.edgeTolerance;var e=c(x.canvas).position().left;var y=c(x.canvas).position().top;var B=x.canvas.width+e;var m=x.canvas.height+y;if(n-C<e||h-C<y||k+C>B||s+C>m){z.remove()}z=null;f=null}}};c.jqplot.postSeriesInitHooks.push(c.jqplot.PointLabels.init);c.jqplot.postDrawSeriesHooks.push(c.jqplot.PointLabels.draw)})(jQuery);
|
||||
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.pyramidAxisRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.pyramidAxisRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.pyramidGridRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.pyramidGridRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.pyramidRenderer.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.pyramidRenderer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.trendline.min.js
vendored
Normal file
3
templates/admin/default/assets/js/jqplot/plugins/jqplot.trendline.min.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||
jsDate | (c) 2010-2013 Chris Leonello
|
||||
*/(function(f){f.jqplot.Trendline=function(){this.show=f.jqplot.config.enablePlugins;this.color="#666666";this.renderer=new f.jqplot.LineRenderer();this.rendererOptions={marker:{show:false}};this.label="";this.type="linear";this.shadow=true;this.markerRenderer={show:false};this.lineWidth=1.5;this.shadowAngle=45;this.shadowOffset=1;this.shadowAlpha=0.07;this.shadowDepth=3;this.isTrendline=true};f.jqplot.postSeriesInitHooks.push(e);f.jqplot.postDrawSeriesHooks.push(g);f.jqplot.addLegendRowHooks.push(a);function a(k){var j=null;if(k.trendline&&k.trendline.show){var i=k.trendline.label.toString();if(i){j={label:i,color:k.trendline.color}}}return j}function e(m,k,j,i,l){if(this._type&&(this._type==="line"||this._type=="bar")){this.trendline=new f.jqplot.Trendline();i=i||{};f.extend(true,this.trendline,{color:this.color},j.trendline,i.trendline);this.trendline.renderer.init.call(this.trendline,null)}}function g(m,i){i=f.extend(true,{},this.trendline,i);if(this.trendline&&i.show){var k;var l=i.data||this.data;k=c(l,this.trendline.type);var j=i.gridData||this.renderer.makeGridData.call(this,k.data);this.trendline.renderer.draw.call(this.trendline,m,j,{showLine:true,shadow:this.trendline.shadow})}}function b(w,v,n){var u=(n==null)?"linear":n;var s=w.length;var t;var z;var o=0;var m=0;var r=0;var q=0;var l=0;var j=[];var k=[];if(u=="linear"){k=w;j=v}else{if(u=="exp"||u=="exponential"){for(var p=0;p<v.length;p++){if(v[p]<=0){s--}else{k.push(w[p]);j.push(Math.log(v[p]))}}}}for(var p=0;p<s;p++){o=o+k[p];m=m+j[p];q=q+k[p]*j[p];r=r+k[p]*k[p];l=l+j[p]*j[p]}t=(s*q-o*m)/(s*r-o*o);z=(m-t*o)/s;return[t,z]}function h(k,j){var i;i=b(k,j,"linear");return[i[0],i[1]]}function d(o,m){var k;var i=o;var n=m;k=b(i,n,"exp");var l=Math.exp(k[0]);var j=Math.exp(k[1]);return[l,j]}function c(l,j){var p=(j==null)?"linear":j;var n;var o;var r=[];var q=[];var m=[];for(k=0;k<l.length;k++){if(l[k]!=null&&l[k][0]!=null&&l[k][1]!=null){r.push(l[k][0]);q.push(l[k][1])}}if(p=="linear"){n=h(r,q);for(var k=0;k<r.length;k++){o=n[0]*r[k]+n[1];m.push([r[k],o])}}else{if(p=="exp"||p=="exponential"){n=d(r,q);for(var k=0;k<r.length;k++){o=n[1]*Math.pow(n[0],r[k]);m.push([r[k],o])}}}return{data:m,slope:n[0],intercept:n[1]}}})(jQuery);
|
||||
27
templates/admin/default/assets/less/thelia/jqplot.less
Normal file
27
templates/admin/default/assets/less/thelia/jqplot.less
Normal file
@@ -0,0 +1,27 @@
|
||||
.jqplot-axis{
|
||||
color: @gray-light;
|
||||
font-family: @font-family-sans-serif;
|
||||
font-size: @font-size-small;
|
||||
}
|
||||
|
||||
.jqplot-yaxis{
|
||||
margin-right: 10px;
|
||||
}
|
||||
.jqplot-xaxis{
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.jqplot-highlighter-tooltip{
|
||||
.tooltip-inner;
|
||||
}
|
||||
|
||||
.jqplot-title{
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
color: @gray;
|
||||
}
|
||||
|
||||
.jqplot-series-canvas{
|
||||
.opacity(0.7);
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
@import "wizard.less";
|
||||
@import "bootstrap-editable.less";
|
||||
@import "bootstrap-switch.less";
|
||||
@import "jqplot.less";
|
||||
|
||||
// -- Base styling ------------------------------------------------------------
|
||||
|
||||
@@ -254,6 +255,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
// -- Home --
|
||||
.dashboard hr{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
// -- Editable tweaks ---------------------------------------------------------
|
||||
|
||||
.editable-click, a.editable-click, a.editable-click:hover {
|
||||
|
||||
@@ -286,6 +286,27 @@
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
<script src="/web/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:"/web/tinymce/plugins/filemanager/",
|
||||
filemanager_title:"{intl l='Files manager'}" ,
|
||||
external_plugins: { "filemanager" : "/web/tinymce/plugins/filemanager/plugin.min.js"}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$(function() {
|
||||
|
||||
344
templates/admin/default/folder-edit.html
Normal file
344
templates/admin/default/folder-edit.html
Normal file
@@ -0,0 +1,344 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="check-permissions"}admin.folder.view{/block}
|
||||
|
||||
{block name="page-title"}{intl l='Edit folder'}{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="folder edit-folder">
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{* include file="includes/folder-breadcrumb.html" editing_category="true" *}
|
||||
|
||||
<div class="row">
|
||||
{loop name="folder_edit" type="folder" visible="*" id="{$folder_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 folder %title' title=$TITLE}
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 actions">
|
||||
|
||||
{if $HAS_PREVIOUS != 0}
|
||||
<a href="{url path='/admin/folders/update' folder_id=$PREVIOUS}" class="btn btn-default" title="{intl l='Edit previous folder'}"><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 folder page'}"><span class="glyphicon glyphicon-eye-open"></span></a>
|
||||
|
||||
{if $HAS_NEXT != 0}
|
||||
<a href="{url path='/admin/folders/update' folder_id=$NEXT}" class="btn btn-default" title="{intl l='Edit next folder'}"><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 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>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane fade active in" id="general">
|
||||
|
||||
<div class="form-container">
|
||||
|
||||
{form name="thelia.admin.folder.modification"}
|
||||
<form method="POST" action="{url path='/admin/folders/save'}" {form_enctype form=$form} class="clearfix">
|
||||
|
||||
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/folders' folder_id=$folder_id}"}
|
||||
|
||||
{* Be sure to get the folder ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="folder_id" value="{$folder_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/folder' folder_id={$folder_id}}" />
|
||||
{/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}
|
||||
|
||||
{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='parent'}
|
||||
<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>
|
||||
|
||||
{$myparent=$PARENT}
|
||||
{loop name="fold-parent" type="folder-tree" visible="*" folder="0"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $myparent == $ID}selected="selected"{/if} {if $folder_id == $ID}disabled="disabled"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
|
||||
</select>
|
||||
</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> </lablel>
|
||||
<div class="controls">
|
||||
<p>{intl l='Colder 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" id="details">
|
||||
<div class="form-container">
|
||||
<div class="form-group">
|
||||
<form action="{url path='/admin/folders/related-content/add'}" id="related_content_form">
|
||||
|
||||
{include
|
||||
file="includes/inner-form-toolbar.html"
|
||||
hide_submit_buttons=true
|
||||
close_url="{url path='/admin/folders' folder_id=$folder_id}"
|
||||
}
|
||||
|
||||
<input type="hidden" name="folder_id" value="{$folder_id}" />
|
||||
<input type="hidden" name="current_tab" value="details" />
|
||||
|
||||
{ifloop rel="folders"}
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<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}
|
||||
</select>
|
||||
</div>
|
||||
<span class="help-block">{intl l='Select a folder to get its content'}</span>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<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 category'}</span>
|
||||
</div>
|
||||
</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='Attribute title'}</th>
|
||||
|
||||
{module_include location='folder_contents_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="assigned_contents" type="associated_content" folder="$folder_id" backend_context="1" lang="$edit_language_id"}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{$TITLE}
|
||||
</td>
|
||||
|
||||
{module_include location='folder_contents_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.folder.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 folder contains no contents"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="images">
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="documents">
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="modules">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{* Delete related content confirmation dialog *}
|
||||
|
||||
{capture "delete_content_dialog"}
|
||||
<!-- <input type="hidden" name="category_id" value="{$category_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 ?"}
|
||||
|
||||
form_action = {url path='/admin/folders/related-content/delete'}
|
||||
form_content = {$smarty.capture.delete_content_dialog nofilter}
|
||||
}
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
<script>
|
||||
|
||||
$(function() {
|
||||
|
||||
$('.use_default_rewriten_url').click(function(ev) {
|
||||
alert("Not functionnal");
|
||||
|
||||
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'));
|
||||
$('#folder_delete_id').val($('#folder_id').val());
|
||||
});
|
||||
|
||||
// Load content on folder selection
|
||||
$('#folder_id').change(function(event) {
|
||||
$.ajax({
|
||||
url : '{url path="/admin/folder/$folder_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').removeClass('hide');
|
||||
else
|
||||
$('#content_selector').addClass('hide');
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Initialize folder (id={$folder_id}) select value
|
||||
{if $folder_id != 0}
|
||||
$('#folder_id').val("{$folder_id}").change();
|
||||
{/if}
|
||||
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
626
templates/admin/default/folders.html
Normal file
626
templates/admin/default/folders.html
Normal file
@@ -0,0 +1,626 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Folders'}{/block}
|
||||
|
||||
{block name="check-permissions"}admin.folders.view{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="folders">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{* include file="includes/folder-breadcrumb.html" *}
|
||||
|
||||
{module_include location='folders_top'}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
|
||||
<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'}
|
||||
|
||||
{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>
|
||||
|
||||
<th class="object-image"> </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>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* -- CONTENT MANAGEMENT ---------------------------------------------------- *}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption>
|
||||
{* display parent folder name *}
|
||||
{loop name="folder_title" type="folder" visible="*" id=$folder_id}
|
||||
{intl l="Contents in %fold" fold=$TITLE}
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="folder_title"}
|
||||
{intl l="Top level Contents"}
|
||||
{/elseloop}
|
||||
|
||||
{module_include location='content_list_caption'}
|
||||
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new content'}" href="#content_creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
</caption>
|
||||
|
||||
{ifloop rel="content_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$content_order
|
||||
order='id'
|
||||
reverse_order='id_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
|
||||
<th> </th>
|
||||
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$content_order
|
||||
order='alpha'
|
||||
reverse_order='alpha_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
label="{intl l='Content title'}"
|
||||
}
|
||||
|
||||
{module_include location='content_list_header'}
|
||||
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$content_order
|
||||
order='visible'
|
||||
reverse_order='visible_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
label="{intl l='Online'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$content_order
|
||||
order='manual'
|
||||
reverse_order='manual_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
label="{intl l='Position'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="content_list" type="content" visible="*" folder_default=$folder_id order=$content_order}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{loop type="image" name="folder_image" source="content" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
|
||||
<a href="{url path='admin/content/edit' id=$ID}" title="{intl l='Edit this content'}">
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
|
||||
</a>
|
||||
{/loop}
|
||||
|
||||
<td class="object-title"><a href="{url path="/admin/content/update/$ID"}" title="{intl l='Edit this content'}">{$TITLE}</a></td>
|
||||
|
||||
{module_include location='content_list_row'}
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.contents.edit"}
|
||||
<div class="make-switch switch-small contentVisibleToggle" 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="contentVisibleToggle" {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.content.edit"
|
||||
path={url path='/admin/contents/update-position' content_id=$ID}
|
||||
url_parameter="content_id"
|
||||
in_place_edit_class="contentPositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.content.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this content'}" href="{url path="admin/content/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.content.delete"}
|
||||
<a class="btn btn-default btn-xs content-delete" title="{intl l='Delete this content'}" href="#content_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="content_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="message"><div class="alert alert-info">{intl l="This folder doesn't contains any contents. To add a new content, <strong>click the + button</strong> above."}</div></td>
|
||||
</tr>
|
||||
</thead>
|
||||
{/elseloop}
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{module_include location='folders_bottom'}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{* -- Adding a new folder ------------------------------------------------- *}
|
||||
|
||||
{form name="thelia.admin.folder.creation"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "folder_creation_dialog"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/folders/update' folder_id='_ID_'}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='parent'}
|
||||
<input type="hidden" name="{$name}" value="{$folder_id}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
{loop type="lang" name="default-lang" default_only="1"}
|
||||
<div class="input-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{intl l='Folder title'}" placeholder="{intl l='Name'}">
|
||||
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="$TITLE" /></span>
|
||||
</div>
|
||||
|
||||
<div class="help-block">{intl l='Enter here the folder name in the default language (%title)' title="$TITLE"}</div>
|
||||
|
||||
{* Switch edition to the current locale *}
|
||||
<input type="hidden" name="edit_language_id" value="{$ID}" />
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$LOCALE}" />
|
||||
{/form_field}
|
||||
{/loop}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='visible'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" id="{$label_attr.for}" name="{$name}" value="1" checked="checked">
|
||||
{$label}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='folder_create_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "folder_creation_dialog"
|
||||
dialog_title = {intl l="Create a new folder"}
|
||||
dialog_body = {$smarty.capture.folder_creation_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Create this folder"}
|
||||
|
||||
form_action = {url path='/admin/folders/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
{/form}
|
||||
|
||||
{* -- Adding a new content -------------------------------------------------- *}
|
||||
|
||||
{form name="thelia.admin.content.creation"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "content_creation_dialog"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{* Be sure to get the folder_id, even if the form could not be validated *}
|
||||
<input type="hidden" name="folder_id" value="{$folder_id}" />
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/contents/update' content_id='_ID_'}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='default_folder'}
|
||||
<input type="hidden" name="{$name}" value="{$folder_id}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
{loop type="lang" name="default-lang" default_only="1"}
|
||||
<div class="input-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Title'}">
|
||||
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="$TITLE" /></span>
|
||||
</div>
|
||||
|
||||
<div class="help-block">{intl l='Enter here the content name in the default language (%title)' title="$TITLE"}</div>
|
||||
|
||||
{* Switch edition to the current locale *}
|
||||
<input type="hidden" name="edit_language_id" value="{$ID}" />
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$LOCALE}" />
|
||||
{/form_field}
|
||||
{/loop}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='visible'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" id="{$label_attr.for}" name="{$name}" value="1" checked="checked">
|
||||
{$label}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='content_create_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "content_creation_dialog"
|
||||
dialog_title = {intl l="Create a new content"}
|
||||
dialog_body = {$smarty.capture.content_creation_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Create this content"}
|
||||
|
||||
form_action = {url path='/admin/contents/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
{/form}
|
||||
|
||||
{* -- Delete folder confirmation dialog ----------------------------------- *}
|
||||
|
||||
{capture "folder_delete_dialog"}
|
||||
<input type="hidden" name="folder_id" id="folder_delete_id" value="" />
|
||||
|
||||
{module_include location='folder_delete_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "folder_delete_dialog"
|
||||
dialog_title = {intl l="Delete folder"}
|
||||
dialog_message = {intl l="Do you really want to delete this folder and all its content ?"}
|
||||
|
||||
form_action = {url path='/admin/folders/delete'}
|
||||
form_content = {$smarty.capture.folder_delete_dialog nofilter}
|
||||
}
|
||||
|
||||
{* -- Delete content confirmation dialog ------------------------------------ *}
|
||||
|
||||
{capture "content_delete_dialog"}
|
||||
<input type="hidden" name="content_id" id="content_delete_id" value="" />
|
||||
<input type="hidden" name="folder_id" value="{$folder_id}" />
|
||||
|
||||
{module_include location='content_delete_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "content_delete_dialog"
|
||||
dialog_title = {intl l="Delete content"}
|
||||
dialog_message = {intl l="Do you really want to delete this content ?"}
|
||||
|
||||
form_action = {url path='/admin/contents/delete'}
|
||||
form_content = {$smarty.capture.content_delete_dialog nofilter}
|
||||
}
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
// Set proper folder ID in delete from
|
||||
$('a.folder-delete').click(function(ev) {
|
||||
$('#folder_delete_id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
// Set proper content ID in delete from
|
||||
$('a.content-delete').click(function(ev) {
|
||||
$('#content_delete_id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
// JS stuff for creation form
|
||||
{include
|
||||
file = "includes/generic-js-dialog.html"
|
||||
dialog_id = "folder_creation_dialog"
|
||||
form_name = "thelia.admin.folder.creation"
|
||||
}
|
||||
|
||||
{include
|
||||
file = "includes/generic-js-dialog.html"
|
||||
dialog_id = "content_creation_dialog"
|
||||
form_name = "thelia.admin.content.creation"
|
||||
}
|
||||
|
||||
{* Toggle object visibility *}
|
||||
|
||||
$(".folderVisibleToggle").on('switch-change', function(event, data) {
|
||||
$.ajax({
|
||||
url : "{url path='admin/folders/toggle-online'}",
|
||||
data : {
|
||||
folder_id : $(this).data('id'),
|
||||
action : 'visibilityToggle'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(".contentVisibleToggle").on('switch-change', function(event, data) {
|
||||
$.ajax({
|
||||
url : "{url path='admin/contents/toggle-online'}",
|
||||
data : {
|
||||
content_id : $(this).data('id'),
|
||||
action : 'visibilityToggle'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
{* Inline editing of object position using bootstrap-editable *}
|
||||
|
||||
$('.folderPositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new folder position"}',
|
||||
mode : 'popup',
|
||||
inputclass : 'input-mini',
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/folders/update-position' folder_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
.replace('__POS__', newValue);
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
$('.contentPositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new content position"}',
|
||||
mode : 'popup',
|
||||
inputclass : 'input-mini',
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/contents/update-position' content_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
.replace('__POS__', newValue);
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
{* Change default status *}
|
||||
|
||||
$('.change-default').change(function(ev) {
|
||||
var url = "{url path='/admin/folders/set-default' folder_id='__ID__'}";
|
||||
|
||||
// Perform ID subtitutions
|
||||
url = url.replace('__ID__', $(this).val());
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@@ -8,11 +8,381 @@
|
||||
|
||||
{module_include location='home_top'}
|
||||
|
||||
<div class="col-md-12">
|
||||
This is the administration home page. Put some interesting statistics here, and display useful information :)
|
||||
<div class="col-md-12 general-block-decorator dashboard">
|
||||
|
||||
<div class="title title-without-tabs clearfix">
|
||||
{intl l='Dashboard'}
|
||||
<div class="btn-group pull-right">
|
||||
<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-chevron-left"></span></button>
|
||||
<button type="button" class="btn btn-default disabled"><span class="glyphicon glyphicon-calendar"></span></button>
|
||||
<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-chevron-right"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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-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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div class="jqplot-content">
|
||||
<div id="jqplot"></div>
|
||||
|
||||
<div id="turnover" 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>
|
||||
<div id="aborted-orders" data-toggle="jqplot-serie"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="general-block-decorator">
|
||||
<div class="title title-without-tabs">{intl l="Sales statistics"}</div>
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#statjour" data-toggle="tab">{intl l="Today"}</a></li>
|
||||
<li><a href="#statmois" data-toggle="tab">{intl l="This month"}</a></li>
|
||||
<li><a href="#statannee" data-toggle="tab">{intl l="This year"}</a></li>
|
||||
</ul>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{module_include location='home_bottom'}
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
{javascripts file='assets/js/jqplot/jquery.jqplot.min.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
|
||||
{javascripts file='assets/js/jqplot/plugins/jqplot.highlighter.min.js'}
|
||||
<script type="text/javascript" src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/jqplot/plugins/jqplot.barRenderer.min.js'}
|
||||
<script type="text/javascript" src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/jqplot/plugins/jqplot.pieRenderer.min.js'}
|
||||
<script type="text/javascript" src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
|
||||
(function($, window, document){
|
||||
|
||||
$(function(){
|
||||
|
||||
var $elem = $('#jqplot');
|
||||
|
||||
var url = "{url file='/test_to_remove/admin-stats.json'}",
|
||||
series = [],
|
||||
seriesColors = [],
|
||||
ticks = [],
|
||||
days = 0,
|
||||
jqplot;
|
||||
|
||||
var options = {
|
||||
animate: true,
|
||||
axesDefaults: {
|
||||
tickOptions: { showMark: true, showGridline: true }
|
||||
},
|
||||
axes: {
|
||||
xaxis: {
|
||||
borderColor: '#ccc',
|
||||
ticks : ticks,
|
||||
tickOptions: { showGridline: false }
|
||||
},
|
||||
yaxis: {
|
||||
tickOptions: { showGridline: true, showMark: false, showLabel: false, shadow: false }
|
||||
}
|
||||
},
|
||||
seriesDefaults: {
|
||||
lineWidth: 3,
|
||||
shadow : false,
|
||||
markerOptions: { shadow : false, style: 'filledCircle', size: 12 }
|
||||
},
|
||||
grid: {
|
||||
background: '#FFF',
|
||||
shadow : false,
|
||||
borderColor : '#FFF'
|
||||
},
|
||||
highlighter: {
|
||||
show: true,
|
||||
sizeAdjust: 7,
|
||||
tooltipLocation: 'n',
|
||||
tooltipContentEditor: function(str, seriesIndex, pointIndex, plot){
|
||||
|
||||
// Return axis value : data value
|
||||
return ticks[pointIndex][1] + ': ' + plot.data[seriesIndex][pointIndex][1];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Get datas Json
|
||||
$.getJSON(url)
|
||||
.done(function(data) {
|
||||
|
||||
// Init series datas and colors
|
||||
initJqplotDatas(series, seriesColors, options, data);
|
||||
|
||||
// Add days to xaxis
|
||||
for(var i = 1; i < (days+1); i++){
|
||||
ticks.push([i-1, i]);
|
||||
}
|
||||
|
||||
// Start jqplot
|
||||
var elementId = $elem.attr('id');
|
||||
jqplot = $.jqplot(elementId, series, options);
|
||||
|
||||
$('[data-toggle="jqplot"]').each(function(){
|
||||
|
||||
$(this).click(function(){
|
||||
|
||||
if($('[data-toggle="jqplot-serie"].active').length > 1 || !$(this).hasClass('active')){
|
||||
|
||||
// Active button and jqplot-serie management
|
||||
$(this).toggleClass('active');
|
||||
|
||||
var id = $(this).data('target');
|
||||
$('[data-toggle="jqplot-serie"]#' + id).toggleClass('active');
|
||||
|
||||
// Reinit variables
|
||||
series = [];
|
||||
seriesColors = [];
|
||||
|
||||
// Init series datas and colors
|
||||
initJqplotDatas(series, seriesColors, options, data);
|
||||
|
||||
// Restart jqplot
|
||||
jqplot.destroy();
|
||||
jqplot = $.jqplot(elementId, series, options);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(window).bind('resize', function(event, ui) {
|
||||
jqplot.replot( { resetAxes: true } );
|
||||
});
|
||||
|
||||
})
|
||||
.fail(function() {
|
||||
$elem.append('<div class="alert alert-danger">An error occurred while reading from JSON file</div>');
|
||||
});
|
||||
|
||||
|
||||
function initJqplotDatas(series, seriesColors, options, json){
|
||||
$('[data-toggle="jqplot-serie"].active').each(function(i){
|
||||
var position = $(this).index() - 1;
|
||||
series.push(json.series[position].datas);
|
||||
seriesColors.push(json.series[position].color);
|
||||
});
|
||||
|
||||
// Number of days to display ( = datas.length in one serie)
|
||||
days = json.series[0].datas.length;
|
||||
|
||||
// Graph title
|
||||
options.title = json.title;
|
||||
|
||||
// Graph series colors
|
||||
options.seriesColors = seriesColors;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}(window.jQuery, window, document));
|
||||
|
||||
</script>
|
||||
{/javascripts}
|
||||
{/block}
|
||||
26
templates/admin/default/includes/folder-breadcrumb.html
Normal file
26
templates/admin/default/includes/folder-breadcrumb.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{* Breadcrumb for folders browsing and editing *}
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='admin/home'}">Home</a></li>
|
||||
<li><a href="{url path='admin/folders'}">Folders</a>
|
||||
|
||||
{ifloop rel="folder_path"}</li>
|
||||
{loop name="folder_path" type="folder-path" visible="*" folder=$folder_id}
|
||||
{if $ID == $folder_id}
|
||||
<li class="active">
|
||||
{if $editing_folder == true}
|
||||
{intl l='Editing %fold' fold="{$TITLE}"}
|
||||
{else}
|
||||
{$TITLE} <a href="{url path='/admin/folders/update' folder_id=$ID}" title="{intl l='Edit this folder'}">{intl l="(edit)"}</a>
|
||||
{/if}
|
||||
</li>
|
||||
{else}
|
||||
<li><a href="{url path='/admin/folders' folder_id=" $ID" action='browse'}">{$TITLE}</a></li>
|
||||
{/if}
|
||||
{/loop}
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="folder_path"}
|
||||
</li>
|
||||
{/elseloop}
|
||||
</ul>
|
||||
@@ -25,7 +25,7 @@
|
||||
<span class="label-help-block">{intl l="The détailed description."}</span>
|
||||
</label>
|
||||
|
||||
<textarea name="{$name}" id="{$label_attr.for}" rows="10" class="form-control">{$value}</textarea>
|
||||
<textarea name="{$name}" id="{$label_attr.for}" rows="10" class="form-control wysiwyg">{$value}</textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
|
||||
111
templates/admin/default/shipping-zones-edit.html
Normal file
111
templates/admin/default/shipping-zones-edit.html
Normal file
@@ -0,0 +1,111 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Edit a shipping zone'}{/block}
|
||||
|
||||
{block name="check-permissions"}admin.configuration.shipping-zones.edit{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="shipping-zones edit-shipping-zones">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/shipping-zones'}">{intl l="Shipping zones"}</a></li>
|
||||
<li>{intl l='Editing shipping zone "%name"' name="{$TITLE}"}</li>
|
||||
</ul>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
|
||||
<div class="col-md-12 title title-without-tabs">
|
||||
{intl l='Edit shipping zone %title' title=$TITLE}
|
||||
</div>
|
||||
|
||||
<div class="form-container clearfix">
|
||||
<div class="col-md-4">
|
||||
|
||||
<form method="POST" action="">
|
||||
<label class="control-label" for="">{intl l="Zones"}</label>
|
||||
|
||||
<div class="input-group">
|
||||
<select name="" id="" class="form-control">
|
||||
<option value="">1</option>
|
||||
<option value="">2</option>
|
||||
<option value="">3</option>
|
||||
<option value="">4</option>
|
||||
<option value="">5</option>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-plus-sign"></span> {intl l="Add"}</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</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>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Delete related content confirmation dialog *}
|
||||
|
||||
{capture "delete_zone_dialog"}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_zone_dialog"
|
||||
dialog_title = {intl l="Remove zone"}
|
||||
dialog_message = {intl l="Do you really want to remove this zone ?"}
|
||||
|
||||
form_action = {url path=''}
|
||||
form_content = {$smarty.capture.delete_zone_dialog nofilter}
|
||||
}
|
||||
{/block}
|
||||
119
templates/admin/default/shipping-zones.html
Normal file
119
templates/admin/default/shipping-zones.html
Normal file
@@ -0,0 +1,119 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Thelia Shipping zones'}{/block}
|
||||
|
||||
{block name="check-permissions"}admin.configuration.shipping-zones.view{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="shipping-zones">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/shipping-zones'}">{intl l="Shipping zones"}</a></li>
|
||||
</ul>
|
||||
|
||||
{module_include location='shipping_zones_top'}
|
||||
|
||||
<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>
|
||||
|
||||
{module_include location='shipping_zones_table_header'}
|
||||
|
||||
<th>{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>So Colissimo</td>
|
||||
|
||||
{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>
|
||||
|
||||
{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>
|
||||
|
||||
{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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{module_include location='shipping_zones_bottom'}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Delete confirmation dialog *}
|
||||
|
||||
{capture "delete_dialog"}
|
||||
<input type="hidden" name="shipping_zones_id" id="shipping_zones_delete_id" value="" />
|
||||
|
||||
{module_include location='shipping_zones_delete_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_dialog"
|
||||
dialog_title = {intl l="Delete shipping zone"}
|
||||
dialog_message = {intl l="Do you really want to delete this shipping zone ?"}
|
||||
|
||||
form_action = {url path='/admin/configuration/shipping-zones/delete'}
|
||||
form_content = {$smarty.capture.delete_dialog nofilter}
|
||||
}
|
||||
{/block}
|
||||
0
web/.htaccess
Normal file → Executable file
0
web/.htaccess
Normal file → Executable file
0
web/install/bdd.php
Normal file → Executable file
0
web/install/bdd.php
Normal file → Executable file
0
web/install/bootstrap.php
Normal file → Executable file
0
web/install/bootstrap.php
Normal file → Executable file
0
web/install/config.php
Normal file → Executable file
0
web/install/config.php
Normal file → Executable file
0
web/install/connection.php
Normal file → Executable file
0
web/install/connection.php
Normal file → Executable file
0
web/install/end.php
Normal file → Executable file
0
web/install/end.php
Normal file → Executable file
0
web/install/fd33fd0-6fda040.ico
Normal file → Executable file
0
web/install/fd33fd0-6fda040.ico
Normal file → Executable file
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
0
web/install/footer.php
Normal file → Executable file
0
web/install/footer.php
Normal file → Executable file
0
web/install/header.php
Normal file → Executable file
0
web/install/header.php
Normal file → Executable file
0
web/install/index.php
Normal file → Executable file
0
web/install/index.php
Normal file → Executable file
0
web/install/permission.php
Normal file → Executable file
0
web/install/permission.php
Normal file → Executable file
0
web/install/script.js
Normal file → Executable file
0
web/install/script.js
Normal file → Executable file
0
web/install/styles.css
Normal file → Executable file
0
web/install/styles.css
Normal file → Executable file
25
web/test_to_remove/admin-stats.json
Normal file
25
web/test_to_remove/admin-stats.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"title" : "Stats on September 2013",
|
||||
"series" : [
|
||||
{
|
||||
"datas" : [[0,10.00],[1,200.00],[2,5.00],[3,2.75],[4,20.30],[5,14.09],[6,5],[7,23],[8,5],[9,42],[10,0],[11,4],[12,78],[13,75],[14,70],[15,65],[16,102],[17,50],[18,27],[19,35],[20,37],[21,29],[22,56],[23,52],[24,12],[25,6],[26,82],[27,32],[28,15],[29,50],[30,42]],
|
||||
"color" : "#adadad"
|
||||
},
|
||||
{
|
||||
"datas" : [[0,2],[1,5],[2,5],[3,7],[4,8],[5,9],[6,5],[7,2],[8,5],[9,4],[10,0],[11,4],[12,7],[13,7],[14,7],[15,6],[16,1],[17,5],[18,2],[19,3],[20,3],[21,2],[22,5],[23,5],[24,1],[25,6],[26,8],[27,3],[28,1],[29,5],[30,4]],
|
||||
"color" : "#f39922"
|
||||
},
|
||||
{
|
||||
"datas" : [[0,15],[1,20],[2,1],[3,1],[4,2],[5,3]],
|
||||
"color" : "#5cb85c"
|
||||
},
|
||||
{
|
||||
"datas" : [[0,45],[1,40],[2,41],[3,41],[4,42],[5,43]],
|
||||
"color" : "#5bc0de"
|
||||
},
|
||||
{
|
||||
"datas" : [[0,25],[1,20],[2,21],[3,21],[4,22],[5,23]],
|
||||
"color" : "#d9534f"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
{
|
||||
"breadcrumb" : [
|
||||
{
|
||||
"url" : "0",
|
||||
"display" : "Racine",
|
||||
"edit" : "",
|
||||
"browse" : ""
|
||||
}
|
||||
],
|
||||
"categories" : [
|
||||
{
|
||||
"id" : "1",
|
||||
"ligne" : "1",
|
||||
"classement" : "1",
|
||||
"titre" : "Boyaux",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "18",
|
||||
"ligne" : "1",
|
||||
"classement" : "2",
|
||||
"titre" : "Epices \/ condiments",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "100",
|
||||
"ligne" : "1",
|
||||
"classement" : "3",
|
||||
"titre" : "Emballage",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "194",
|
||||
"ligne" : "1",
|
||||
"classement" : "4",
|
||||
"titre" : "Petits mat\u00e9riels",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "355",
|
||||
"ligne" : "1",
|
||||
"classement" : "5",
|
||||
"titre" : "Materiel de cuisine",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "426",
|
||||
"ligne" : "0",
|
||||
"classement" : "6",
|
||||
"titre" : "Bacs",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "458",
|
||||
"ligne" : "1",
|
||||
"classement" : "7",
|
||||
"titre" : "Hygi\u00e8ne & entretien",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "592",
|
||||
"ligne" : "1",
|
||||
"classement" : "8",
|
||||
"titre" : "Art de la table",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "601",
|
||||
"ligne" : "1",
|
||||
"classement" : "9",
|
||||
"titre" : "Mat\u00e9riels",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
}
|
||||
],
|
||||
"products":[]
|
||||
}
|
||||
175
web/tinymce/langs/de.js
Executable file
175
web/tinymce/langs/de.js
Executable file
@@ -0,0 +1,175 @@
|
||||
tinymce.addI18n('de',{
|
||||
"Cut": "Ausschneiden",
|
||||
"Header 2": "\u00dcberschrift 2",
|
||||
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Ihr Browser unterst\u00fctzt leider keinen direkten Zugriff auf die Zwischenablage. Bitte benutzen Sie die Strg + X \/ C \/ V Tastenkombinationen.",
|
||||
"Div": "Textblock",
|
||||
"Paste": "Einf\u00fcgen",
|
||||
"Close": "Schlie\u00dfen",
|
||||
"Pre": "Vorformatierter Text",
|
||||
"Align right": "Rechtsb\u00fcndig ausrichten",
|
||||
"New document": "Neues Dokument",
|
||||
"Blockquote": "Zitat",
|
||||
"Numbered list": "Nummerierte Liste",
|
||||
"Increase indent": "Einzug vergr\u00f6\u00dfern",
|
||||
"Formats": "Formate",
|
||||
"Headers": "\u00dcberschriften",
|
||||
"Select all": "Alles ausw\u00e4hlen",
|
||||
"Header 3": "\u00dcberschrift 3",
|
||||
"Blocks": "Absatzformate",
|
||||
"Undo": "R\u00fcckg\u00e4ngig",
|
||||
"Strikethrough": "Durchgestrichen",
|
||||
"Bullet list": "Aufz\u00e4hlung",
|
||||
"Header 1": "\u00dcberschrift 1",
|
||||
"Superscript": "Hochgestellt",
|
||||
"Clear formatting": "Formatierung entfernen",
|
||||
"Subscript": "Tiefgestellt",
|
||||
"Header 6": "\u00dcberschrift 6",
|
||||
"Redo": "Wiederholen",
|
||||
"Paragraph": "Absatz",
|
||||
"Ok": "Ok",
|
||||
"Bold": "Fett",
|
||||
"Code": "Quelltext",
|
||||
"Italic": "Kursiv",
|
||||
"Align center": "Zentriert ausrichten",
|
||||
"Header 5": "\u00dcberschrift 5",
|
||||
"Decrease indent": "Einzug verkleinern",
|
||||
"Header 4": "\u00dcberschrift 4",
|
||||
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Einf\u00fcgungen erfolgen bis zum Abschalten dieses Modus als unformatierter Text.",
|
||||
"Underline": "Unterstrichen",
|
||||
"Cancel": "Abbrechen",
|
||||
"Justify": "Blocksatz",
|
||||
"Inline": "Zeichenformate",
|
||||
"Copy": "Kopieren",
|
||||
"Align left": "Linksb\u00fcndig ausrichten",
|
||||
"Visual aids": "Visuelle Hilfen",
|
||||
"Lower Greek": "Griechische Kleinbuchstaben",
|
||||
"Square": "Quadrat",
|
||||
"Default": "Standard",
|
||||
"Lower Alpha": "Kleinbuchstaben",
|
||||
"Circle": "Kreis",
|
||||
"Disc": "Punkt",
|
||||
"Upper Alpha": "Gro\u00dfbuchstaben",
|
||||
"Upper Roman": "R\u00f6mische Zahlen (Gro\u00dfbuchstaben)",
|
||||
"Lower Roman": "R\u00f6mische Zahlen (Kleinbuchstaben)",
|
||||
"Name": "Name",
|
||||
"Anchor": "Textmarke",
|
||||
"You have unsaved changes are you sure you want to navigate away?": "Die \u00c4nderungen wurden noch nicht gespeichert, sind Sie sicher, dass Sie diese Seite verlassen wollen?",
|
||||
"Restore last draft": "Zur\u00fcckholen den letzten Entwurf",
|
||||
"Special character": "Sonderzeichen",
|
||||
"Source code": "Quelltext",
|
||||
"Right to left": "Von rechts nach links",
|
||||
"Left to right": "Von links nach rechts",
|
||||
"Emoticons": "Emoticons",
|
||||
"Robots": "Robots",
|
||||
"Document properties": "Dokumenteigenschaften",
|
||||
"Title": "Titel",
|
||||
"Keywords": "Sch\u00fcsselw\u00f6rter",
|
||||
"Encoding": "Enkodieren",
|
||||
"Description": "Beschreibung",
|
||||
"Author": "Verfasser",
|
||||
"Fullscreen": "Vollbild",
|
||||
"Horizontal line": "Horizontale Linie",
|
||||
"Horizontal space": "Horizontaler Abstand",
|
||||
"Insert\/edit image": "Bild einf\u00fcgen\/bearbeiten",
|
||||
"General": "Allgemein",
|
||||
"Advanced": "Erweitert",
|
||||
"Source": "Quelle",
|
||||
"Border": "Rahmen",
|
||||
"Constrain proportions": "Seitenverh\u00e4ltnis beibehalten",
|
||||
"Vertical space": "Vertikaler Abstand",
|
||||
"Image description": "Bildbeschreibung",
|
||||
"Style": "Stil",
|
||||
"Dimensions": "Abmessungen",
|
||||
"Insert image": "Bild einf\u00fcgen",
|
||||
"Insert date\/time": "Datum\/Uhrzeit einf\u00fcgen ",
|
||||
"Remove link": "Link entfernen",
|
||||
"Url": "URL",
|
||||
"Text to display": "Anzuzeigender Text",
|
||||
"Anchors": "Textmarken",
|
||||
"Insert link": "Link einf\u00fcgen",
|
||||
"New window": "Neues Fenster",
|
||||
"None": "Keine",
|
||||
"Target": "Ziel",
|
||||
"Insert\/edit link": "Link einf\u00fcgen\/bearbeiten",
|
||||
"Insert\/edit video": "Video einf\u00fcgen\/bearbeiten",
|
||||
"Poster": "Poster",
|
||||
"Alternative source": "Alternative Quelle",
|
||||
"Paste your embed code below:": "F\u00fcgen Sie Ihren Einbettungscode hier ein:",
|
||||
"Insert video": "Video einf\u00fcgen",
|
||||
"Embed": "Einbetten",
|
||||
"Nonbreaking space": "Gesch\u00fctztes Leerzeichen",
|
||||
"Page break": "Seitenumbruch",
|
||||
"Paste as text": "Als Text einf\u00fcgen",
|
||||
"Preview": "Vorschau",
|
||||
"Print": "Drucken",
|
||||
"Save": "Speichern",
|
||||
"Could not find the specified string.": "Die Zeichenfolge wurde nicht gefunden.",
|
||||
"Replace": "Ersetzen",
|
||||
"Next": "Weiter",
|
||||
"Whole words": "Nur ganze W\u00f6rter",
|
||||
"Find and replace": "Suchen und ersetzen",
|
||||
"Replace with": "Ersetzen durch",
|
||||
"Find": "Suchen",
|
||||
"Replace all": "Alles ersetzen",
|
||||
"Match case": "Gro\u00df-\/Kleinschreibung beachten",
|
||||
"Prev": "Zur\u00fcck",
|
||||
"Spellcheck": "Rechtschreibpr\u00fcfung",
|
||||
"Finish": "Ende",
|
||||
"Ignore all": "Alles Ignorieren",
|
||||
"Ignore": "Ignorieren",
|
||||
"Insert row before": "Neue Zeile davor einf\u00fcgen ",
|
||||
"Rows": "Zeilen",
|
||||
"Height": "H\u00f6he",
|
||||
"Paste row after": "Zeile danach einf\u00fcgen",
|
||||
"Alignment": "Ausrichtung",
|
||||
"Column group": "Spaltengruppe",
|
||||
"Row": "Zeile",
|
||||
"Insert column before": "Neue Spalte davor einf\u00fcgen",
|
||||
"Split cell": "Zelle aufteilen",
|
||||
"Cell padding": "Zelleninnenabstand",
|
||||
"Cell spacing": "Zellenabstand",
|
||||
"Row type": "Zeilentyp",
|
||||
"Insert table": "Tabelle einf\u00fcgen",
|
||||
"Body": "Inhalt",
|
||||
"Caption": "Beschriftung",
|
||||
"Footer": "Fu\u00dfzeile",
|
||||
"Delete row": "Zeile l\u00f6schen",
|
||||
"Paste row before": "Zeile davor einf\u00fcgen",
|
||||
"Scope": "G\u00fcltigkeitsbereich",
|
||||
"Delete table": "Tabelle l\u00f6schen",
|
||||
"Header cell": "Kopfzelle",
|
||||
"Column": "Spalte",
|
||||
"Cell": "Zelle",
|
||||
"Header": "Kopfzeile",
|
||||
"Cell type": "Zellentyp",
|
||||
"Copy row": "Zeile kopieren",
|
||||
"Row properties": "Zeileneigenschaften",
|
||||
"Table properties": "Tabelleneigenschaften",
|
||||
"Row group": "Zeilengruppe",
|
||||
"Right": "Rechtsb\u00fcndig",
|
||||
"Insert column after": "Neue Spalte danach einf\u00fcgen",
|
||||
"Cols": "Spalten",
|
||||
"Insert row after": "Neue Zeile danach einf\u00fcgen",
|
||||
"Width": "Breite",
|
||||
"Cell properties": "Zelleneigenschaften",
|
||||
"Left": "Linksb\u00fcndig",
|
||||
"Cut row": "Zeile ausschneiden",
|
||||
"Delete column": "Spalte l\u00f6schen",
|
||||
"Center": "Zentriert",
|
||||
"Merge cells": "Zellen verbinden",
|
||||
"Insert template": "Vorlage einf\u00fcgen ",
|
||||
"Templates": "Vorlagen",
|
||||
"Background color": "Hintergrundfarbe",
|
||||
"Text color": "Textfarbe",
|
||||
"Show blocks": " Bl\u00f6cke anzeigen",
|
||||
"Show invisible characters": "Unsichtbare Zeichen anzeigen",
|
||||
"Words: {0}": "W\u00f6rter: {0}",
|
||||
"Insert": "Einf\u00fcgen",
|
||||
"File": "Datei",
|
||||
"Edit": "Bearbeiten",
|
||||
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich-Text- Area. Dr\u00fccken Sie ALT-F9 f\u00fcr das Men\u00fc. Dr\u00fccken Sie ALT-F10 f\u00fcr Symbolleiste. Dr\u00fccken Sie ALT-0 f\u00fcr Hilfe",
|
||||
"Tools": "Werkzeuge",
|
||||
"View": "Ansicht",
|
||||
"Table": "Tabelle",
|
||||
"Format": "Format"
|
||||
});
|
||||
175
web/tinymce/langs/es.js
Executable file
175
web/tinymce/langs/es.js
Executable file
@@ -0,0 +1,175 @@
|
||||
tinymce.addI18n('es',{
|
||||
"Cut": "Cortar",
|
||||
"Header 2": "Header 2 ",
|
||||
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Tu navegador no soporta acceso directo al portapapeles. Por favor usa las teclas Crtl+X\/C\/V de tu teclado",
|
||||
"Div": "Capa",
|
||||
"Paste": "Pegar",
|
||||
"Close": "Cerrar",
|
||||
"Pre": "Pre",
|
||||
"Align right": "Alinear a la derecha",
|
||||
"New document": "Nuevo documento",
|
||||
"Blockquote": "Bloque de cita",
|
||||
"Numbered list": "Lista numerada",
|
||||
"Increase indent": "Incrementar sangr\u00eda",
|
||||
"Formats": "Formatos",
|
||||
"Headers": "Headers",
|
||||
"Select all": "Seleccionar todo",
|
||||
"Header 3": "Header 3",
|
||||
"Blocks": "Bloques",
|
||||
"Undo": "Deshacer",
|
||||
"Strikethrough": "Tachado",
|
||||
"Bullet list": "Lista de vi\u00f1etas",
|
||||
"Header 1": "Header 1",
|
||||
"Superscript": "Super\u00edndice",
|
||||
"Clear formatting": "Limpiar formato",
|
||||
"Subscript": "Sub\u00edndice",
|
||||
"Header 6": "Header 6",
|
||||
"Redo": "Rehacer",
|
||||
"Paragraph": "P\u00e1rrafo",
|
||||
"Ok": "Ok",
|
||||
"Bold": "Negrita",
|
||||
"Code": "C\u00f3digo",
|
||||
"Italic": "It\u00e1lica",
|
||||
"Align center": "Alinear al centro",
|
||||
"Header 5": "Header 5 ",
|
||||
"Decrease indent": "Disminuir sangr\u00eda",
|
||||
"Header 4": "Header 4",
|
||||
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Pegar est\u00e1 ahora en modo de texto plano. El contenido se pegar\u00e1 como texto plano hasta que desactive esta opci\u00f3n.",
|
||||
"Underline": "Subrayado",
|
||||
"Cancel": "Cancelar",
|
||||
"Justify": "Justificar",
|
||||
"Inline": "en l\u00ednea",
|
||||
"Copy": "Copiar",
|
||||
"Align left": "Alinear a la izquierda",
|
||||
"Visual aids": "Ayudas visuales",
|
||||
"Lower Greek": "Inferior Griega",
|
||||
"Square": "Cuadrado",
|
||||
"Default": "Por defecto",
|
||||
"Lower Alpha": "Inferior Alfa",
|
||||
"Circle": "C\u00edrculo",
|
||||
"Disc": "Disco",
|
||||
"Upper Alpha": "Superior Alfa",
|
||||
"Upper Roman": "Superior Romana",
|
||||
"Lower Roman": "Inferior Romana",
|
||||
"Name": "Nombre",
|
||||
"Anchor": "Ancla",
|
||||
"You have unsaved changes are you sure you want to navigate away?": "Tiene cambios sin guardar. \u00bfEst\u00e1 seguro de que quiere salir fuera?",
|
||||
"Restore last draft": "Restaurar el \u00faltimo borrador",
|
||||
"Special character": "Car\u00e1cter especial",
|
||||
"Source code": "C\u00f3digo fuente",
|
||||
"Right to left": "De derecha a izquierda",
|
||||
"Left to right": "De izquierda a derecha",
|
||||
"Emoticons": "Emoticonos",
|
||||
"Robots": "Robots",
|
||||
"Document properties": "Propiedades del documento",
|
||||
"Title": "T\u00edtulo",
|
||||
"Keywords": "Palabras clave",
|
||||
"Encoding": "Codificaci\u00f3n",
|
||||
"Description": "Descripci\u00f3n",
|
||||
"Author": "Autor",
|
||||
"Fullscreen": "Pantalla completa",
|
||||
"Horizontal line": "L\u00ednea horizontal",
|
||||
"Horizontal space": "Espacio horizontal",
|
||||
"Insert\/edit image": "Insertar\/editar imagen",
|
||||
"General": "General",
|
||||
"Advanced": "Avanzado",
|
||||
"Source": "Origen",
|
||||
"Border": "Borde",
|
||||
"Constrain proportions": "Restringir proporciones",
|
||||
"Vertical space": "Espacio vertical",
|
||||
"Image description": "Descripci\u00f3n de la imagen",
|
||||
"Style": "Estilo",
|
||||
"Dimensions": "Dimensiones",
|
||||
"Insert image": "Insertar imagen",
|
||||
"Insert date\/time": "Insertar fecha\/hora",
|
||||
"Remove link": "Quitar enlace",
|
||||
"Url": "Url",
|
||||
"Text to display": "Texto para mostrar",
|
||||
"Anchors": "Anclas",
|
||||
"Insert link": "Insertar enlace",
|
||||
"New window": "Nueva ventana",
|
||||
"None": "Ninguno",
|
||||
"Target": "Destino",
|
||||
"Insert\/edit link": "Insertar\/editar enlace",
|
||||
"Insert\/edit video": "Insertar\/editar video",
|
||||
"Poster": "Miniatura",
|
||||
"Alternative source": "Fuente alternativa",
|
||||
"Paste your embed code below:": "Pega tu c\u00f3digo embebido debajo",
|
||||
"Insert video": "Insertar video",
|
||||
"Embed": "Incrustado",
|
||||
"Nonbreaking space": "Espacio fijo",
|
||||
"Page break": "Salto de p\u00e1gina",
|
||||
"Paste as text": "Pegar como texto",
|
||||
"Preview": "Previsualizar",
|
||||
"Print": "Imprimir",
|
||||
"Save": "Guardar",
|
||||
"Could not find the specified string.": "No se encuentra la cadena de texto especificada",
|
||||
"Replace": "Reemplazar",
|
||||
"Next": "Siguiente",
|
||||
"Whole words": "Palabras completas",
|
||||
"Find and replace": "Buscar y reemplazar",
|
||||
"Replace with": "Reemplazar con",
|
||||
"Find": "Buscar",
|
||||
"Replace all": "Reemplazar todo",
|
||||
"Match case": "Coincidencia exacta",
|
||||
"Prev": "Anterior",
|
||||
"Spellcheck": "Corrector ortogr\u00e1fico",
|
||||
"Finish": "Finalizar",
|
||||
"Ignore all": "Ignorar todos",
|
||||
"Ignore": "Ignorar",
|
||||
"Insert row before": "Insertar fila antes",
|
||||
"Rows": "Filas",
|
||||
"Height": "Alto",
|
||||
"Paste row after": "Pegar la fila despu\u00e9s",
|
||||
"Alignment": "Alineaci\u00f3n",
|
||||
"Column group": "Grupo de columnas",
|
||||
"Row": "Fila",
|
||||
"Insert column before": "Insertar columna antes",
|
||||
"Split cell": "Dividir celdas",
|
||||
"Cell padding": "Relleno de celda",
|
||||
"Cell spacing": "Espacio entre celdas",
|
||||
"Row type": "Tipo de fila",
|
||||
"Insert table": "Insertar tabla",
|
||||
"Body": "Cuerpo",
|
||||
"Caption": "Subt\u00edtulo",
|
||||
"Footer": "Pie de p\u00e1gina",
|
||||
"Delete row": "Eliminar fila",
|
||||
"Paste row before": "Pegar la fila antes",
|
||||
"Scope": "\u00c1mbito",
|
||||
"Delete table": "Eliminar tabla",
|
||||
"Header cell": "Celda de la cebecera",
|
||||
"Column": "Columna",
|
||||
"Cell": "Celda",
|
||||
"Header": "Cabecera",
|
||||
"Cell type": "Tipo de celda",
|
||||
"Copy row": "Copiar fila",
|
||||
"Row properties": "Propiedades de la fila",
|
||||
"Table properties": "Propiedades de la tabla",
|
||||
"Row group": "Grupo de filas",
|
||||
"Right": "Derecha",
|
||||
"Insert column after": "Insertar columna despu\u00e9s",
|
||||
"Cols": "Columnas",
|
||||
"Insert row after": "Insertar fila despu\u00e9s ",
|
||||
"Width": "Ancho",
|
||||
"Cell properties": "Propiedades de la celda",
|
||||
"Left": "Izquierda",
|
||||
"Cut row": "Cortar fila",
|
||||
"Delete column": "Eliminar columna",
|
||||
"Center": "Centrado",
|
||||
"Merge cells": "Combinar celdas",
|
||||
"Insert template": "Insertar plantilla",
|
||||
"Templates": "Plantillas",
|
||||
"Background color": "Color de fondo",
|
||||
"Text color": "Color del texto",
|
||||
"Show blocks": "Mostrar bloques",
|
||||
"Show invisible characters": "Mostrar caracteres invisibles",
|
||||
"Words: {0}": "Palabras: {0}",
|
||||
"Insert": "Insertar",
|
||||
"File": "Archivo",
|
||||
"Edit": "Editar",
|
||||
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "\u00c1rea de texto enriquecido. Pulse ALT-F9 para el menu. Pulse ALT-F10 para la barra de herramientas. Pulse ALT-0 para ayuda",
|
||||
"Tools": "Herramientas",
|
||||
"View": "Ver",
|
||||
"Table": "Tabla",
|
||||
"Format": "Formato"
|
||||
});
|
||||
175
web/tinymce/langs/fr_FR.js
Executable file
175
web/tinymce/langs/fr_FR.js
Executable file
@@ -0,0 +1,175 @@
|
||||
tinymce.addI18n('fr_FR',{
|
||||
"Cut": "Couper",
|
||||
"Header 2": "En-t\u00eate 2",
|
||||
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Votre navigateur ne supporte pas la copie directe. Merci d'utiliser les touches Ctrl+X\/C\/V.",
|
||||
"Div": "Div",
|
||||
"Paste": "Coller",
|
||||
"Close": "Fermer",
|
||||
"Pre": "Pre",
|
||||
"Align right": "Aligner \u00e0 droite",
|
||||
"New document": "Nouveau document",
|
||||
"Blockquote": "Citation",
|
||||
"Numbered list": "Num\u00e9rotation",
|
||||
"Increase indent": "Augmenter le retrait",
|
||||
"Formats": "Formats",
|
||||
"Headers": "En-t\u00eates",
|
||||
"Select all": "Tout s\u00e9lectionner",
|
||||
"Header 3": "En-t\u00eate 3",
|
||||
"Blocks": "Blocs",
|
||||
"Undo": "Annuler",
|
||||
"Strikethrough": "Barr\u00e9",
|
||||
"Bullet list": "Puces",
|
||||
"Header 1": "En-t\u00eate 1",
|
||||
"Superscript": "Exposant",
|
||||
"Clear formatting": "Effacer la mise en forme",
|
||||
"Subscript": "Indice",
|
||||
"Header 6": "En-t\u00eate 6",
|
||||
"Redo": "R\u00e9tablir",
|
||||
"Paragraph": "Paragraphe",
|
||||
"Ok": "Ok",
|
||||
"Bold": "Gras",
|
||||
"Code": "Code",
|
||||
"Italic": "Italique",
|
||||
"Align center": "Aligner au centre",
|
||||
"Header 5": "En-t\u00eate 5",
|
||||
"Decrease indent": "Diminuer le retrait",
|
||||
"Header 4": "En-t\u00eate 4",
|
||||
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Le presse-papiers est maintenant en mode \"texte plein\". Les contenus seront coll\u00e9s sans retenir les formatages jusqu'\u00e0 ce que vous d\u00e9sactiviez cette option.",
|
||||
"Underline": "Soulign\u00e9",
|
||||
"Cancel": "Annuler",
|
||||
"Justify": "Justifi\u00e9",
|
||||
"Inline": "en place",
|
||||
"Copy": "Copier",
|
||||
"Align left": "Aligner \u00e0 gauche",
|
||||
"Visual aids": "Aides visuelle",
|
||||
"Lower Greek": "Grec minuscule",
|
||||
"Square": "Carr\u00e9",
|
||||
"Default": "Par d\u00e9faut",
|
||||
"Lower Alpha": "Alpha inf\u00e9rieure",
|
||||
"Circle": "Cercle",
|
||||
"Disc": "Disque",
|
||||
"Upper Alpha": "Alpha majuscule",
|
||||
"Upper Roman": "Romain majuscule",
|
||||
"Lower Roman": "Romain minuscule",
|
||||
"Name": "Nom",
|
||||
"Anchor": "Ancre",
|
||||
"You have unsaved changes are you sure you want to navigate away?": "Vous avez des modifications non enregistr\u00e9es, \u00eates-vous s\u00fbr de quitter la page?",
|
||||
"Restore last draft": "Restaurer le dernier brouillon",
|
||||
"Special character": "Caract\u00e8res sp\u00e9ciaux",
|
||||
"Source code": "Code source",
|
||||
"Right to left": "Droite \u00e0 gauche",
|
||||
"Left to right": "Gauche \u00e0 droite",
|
||||
"Emoticons": "Emotic\u00f4nes",
|
||||
"Robots": "Robots",
|
||||
"Document properties": "Propri\u00e9t\u00e9 du document",
|
||||
"Title": "Titre",
|
||||
"Keywords": "Mots-cl\u00e9s",
|
||||
"Encoding": "Encodage",
|
||||
"Description": "Description",
|
||||
"Author": "Auteur",
|
||||
"Fullscreen": "Plein \u00e9cran",
|
||||
"Horizontal line": "Ligne horizontale",
|
||||
"Horizontal space": "Espacement horizontal",
|
||||
"Insert\/edit image": "Ins\u00e9rer\/\u00e9diter une image",
|
||||
"General": "G\u00e9n\u00e9ral",
|
||||
"Advanced": "Avanc\u00e9",
|
||||
"Source": "Source",
|
||||
"Border": "Bordure",
|
||||
"Constrain proportions": "Contraindre les proportions",
|
||||
"Vertical space": "Espacement vertical",
|
||||
"Image description": "Description de l'image",
|
||||
"Style": "Style",
|
||||
"Dimensions": "Dimensions",
|
||||
"Insert image": "Ins\u00e9rer une image",
|
||||
"Insert date\/time": "Ins\u00e9rer date\/heure",
|
||||
"Remove link": "Enlever le lien",
|
||||
"Url": "Url",
|
||||
"Text to display": "Texte \u00e0 afficher",
|
||||
"Anchors": "Ancre",
|
||||
"Insert link": "Ins\u00e9rer un lien",
|
||||
"New window": "Nouvelle fen\u00eatre",
|
||||
"None": "n\/a",
|
||||
"Target": "Cible",
|
||||
"Insert\/edit link": "Ins\u00e9rer\/\u00e9diter un lien",
|
||||
"Insert\/edit video": "Ins\u00e9rer\/\u00e9diter une vid\u00e9o",
|
||||
"Poster": "Afficher",
|
||||
"Alternative source": "Source alternative",
|
||||
"Paste your embed code below:": "Collez votre code d'int\u00e9gration ci-dessous :",
|
||||
"Insert video": "Ins\u00e9rer une vid\u00e9o",
|
||||
"Embed": "Int\u00e9grer",
|
||||
"Nonbreaking space": "Espace ins\u00e9cable",
|
||||
"Page break": "Saut de page",
|
||||
"Paste as text": "Coller comme texte",
|
||||
"Preview": "Pr\u00e9visualiser",
|
||||
"Print": "Imprimer",
|
||||
"Save": "Enregistrer",
|
||||
"Could not find the specified string.": "Impossible de trouver la cha\u00eene sp\u00e9cifi\u00e9e.",
|
||||
"Replace": "Remplacer",
|
||||
"Next": "Suiv",
|
||||
"Whole words": "Mots entiers",
|
||||
"Find and replace": "Trouver et remplacer",
|
||||
"Replace with": "Remplacer par",
|
||||
"Find": "Chercher",
|
||||
"Replace all": "Tout remplacer",
|
||||
"Match case": "Respecter la casse",
|
||||
"Prev": "Pr\u00e9c ",
|
||||
"Spellcheck": "V\u00e9rification orthographique",
|
||||
"Finish": "Finie",
|
||||
"Ignore all": "Tout ignorer",
|
||||
"Ignore": "Ignorer",
|
||||
"Insert row before": "Ins\u00e9rer une ligne avant",
|
||||
"Rows": "Lignes",
|
||||
"Height": "Hauteur",
|
||||
"Paste row after": "Coller la ligne apr\u00e8s",
|
||||
"Alignment": "Alignement",
|
||||
"Column group": "Groupe de colonnes",
|
||||
"Row": "Ligne",
|
||||
"Insert column before": "Ins\u00e9rer une colonne avant",
|
||||
"Split cell": "Diviser la cellule",
|
||||
"Cell padding": "Espacement interne cellule",
|
||||
"Cell spacing": "Espacement inter-cellulles",
|
||||
"Row type": "Type de ligne",
|
||||
"Insert table": "Ins\u00e9rer un tableau",
|
||||
"Body": "Corps",
|
||||
"Caption": "Titre",
|
||||
"Footer": "Pied",
|
||||
"Delete row": "Effacer la ligne",
|
||||
"Paste row before": "Coller la ligne avant",
|
||||
"Scope": "Etendue",
|
||||
"Delete table": "Supprimer le tableau",
|
||||
"Header cell": "Cellule d'en-t\u00eate",
|
||||
"Column": "Colonne",
|
||||
"Cell": "Cellule",
|
||||
"Header": "En-t\u00eate",
|
||||
"Cell type": "Type de cellule",
|
||||
"Copy row": "Copier la ligne",
|
||||
"Row properties": "Propri\u00e9t\u00e9s de la ligne",
|
||||
"Table properties": "Propri\u00e9t\u00e9s du tableau",
|
||||
"Row group": "Groupe de lignes",
|
||||
"Right": "Droite",
|
||||
"Insert column after": "Ins\u00e9rer une colonne apr\u00e8s",
|
||||
"Cols": "Colonnes",
|
||||
"Insert row after": "Ins\u00e9rer une ligne apr\u00e8s",
|
||||
"Width": "Largeur",
|
||||
"Cell properties": "Propri\u00e9t\u00e9s de la cellule",
|
||||
"Left": "Gauche",
|
||||
"Cut row": "Couper la ligne",
|
||||
"Delete column": "Effacer la colonne",
|
||||
"Center": "Centr\u00e9",
|
||||
"Merge cells": "Fusionner les cellules",
|
||||
"Insert template": "Ajouter un th\u00e8me",
|
||||
"Templates": "Th\u00e8mes",
|
||||
"Background color": "Couleur d'arri\u00e8re-plan",
|
||||
"Text color": "Couleur du texte",
|
||||
"Show blocks": "Afficher les blocs",
|
||||
"Show invisible characters": "Afficher les caract\u00e8res invisibles",
|
||||
"Words: {0}": "Mots : {0}",
|
||||
"Insert": "Ins\u00e9rer",
|
||||
"File": "Fichier",
|
||||
"Edit": "Editer",
|
||||
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Zone Texte Riche. Appuyer sur ALT-F9 pour le menu. Appuyer sur ALT-F10 pour la barre d'outils. Appuyer sur ALT-0 pour de l'aide.",
|
||||
"Tools": "Outils",
|
||||
"View": "Voir",
|
||||
"Table": "Tableau",
|
||||
"Format": "Format"
|
||||
});
|
||||
174
web/tinymce/langs/it.js
Executable file
174
web/tinymce/langs/it.js
Executable file
@@ -0,0 +1,174 @@
|
||||
tinymce.addI18n('it',{
|
||||
"Cut": "Taglia",
|
||||
"Header 2": "Header 2",
|
||||
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Il tuo browser non supporta l'accesso diretto negli Appunti. Per favore usa i tasti di scelta rapida Ctrl+X\/C\/V.",
|
||||
"Div": "Div",
|
||||
"Paste": "Incolla",
|
||||
"Close": "Chiudi",
|
||||
"Pre": "Pre",
|
||||
"Align right": "Allinea a Destra",
|
||||
"New document": "Nuovo Documento",
|
||||
"Blockquote": "Blockquote",
|
||||
"Numbered list": "Elenchi Numerati",
|
||||
"Increase indent": "Aumenta Rientro",
|
||||
"Formats": "Formattazioni",
|
||||
"Headers": "Intestazioni",
|
||||
"Select all": "Seleziona Tutto",
|
||||
"Header 3": "Intestazione 3",
|
||||
"Blocks": "Blocchi",
|
||||
"Undo": "Indietro",
|
||||
"Strikethrough": "Barrato",
|
||||
"Bullet list": "Elenchi Puntati",
|
||||
"Header 1": "Intestazione 1",
|
||||
"Superscript": "Apice",
|
||||
"Clear formatting": "Cancella Formattazione",
|
||||
"Subscript": "Pedice",
|
||||
"Header 6": "Intestazione 6",
|
||||
"Redo": "Ripeti",
|
||||
"Paragraph": "Paragrafo",
|
||||
"Ok": "Ok",
|
||||
"Bold": "Grassetto",
|
||||
"Code": "Codice",
|
||||
"Italic": "Corsivo",
|
||||
"Align center": "Allinea al Cento",
|
||||
"Header 5": "Intestazione 5",
|
||||
"Decrease indent": "Riduci Rientro",
|
||||
"Header 4": "Intestazione 4",
|
||||
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Incolla \u00e8 in modalit\u00e0 testo normale. I contenuti sono incollati come testo normale se non disattivi l'opzione.",
|
||||
"Underline": "Sottolineato",
|
||||
"Cancel": "Cancella",
|
||||
"Justify": "Giustifica",
|
||||
"Inline": "Inlinea",
|
||||
"Copy": "Copia",
|
||||
"Align left": "Allinea a Sinistra",
|
||||
"Visual aids": "Elementi Visivi",
|
||||
"Lower Greek": "Greek Minore",
|
||||
"Square": "Quadrato",
|
||||
"Default": "Default",
|
||||
"Lower Alpha": "Alpha Minore",
|
||||
"Circle": "Cerchio",
|
||||
"Disc": "Disco",
|
||||
"Upper Alpha": "Alpha Superiore",
|
||||
"Upper Roman": "Roman Superiore",
|
||||
"Lower Roman": "Roman Minore",
|
||||
"Name": "Nome",
|
||||
"Anchor": "Fissa",
|
||||
"You have unsaved changes are you sure you want to navigate away?": "Non hai salvato delle modifiche, sei sicuro di andartene?",
|
||||
"Restore last draft": "Ripristina l'ultima bozza.",
|
||||
"Special character": "Carattere Speciale",
|
||||
"Source code": "Codice Sorgente",
|
||||
"Right to left": "Da Destra a Sinistra",
|
||||
"Left to right": "Da Sinistra a Destra",
|
||||
"Emoticons": "Emoction",
|
||||
"Robots": "Robot",
|
||||
"Document properties": "Propriet\u00e0 Documento",
|
||||
"Title": "Titolo",
|
||||
"Keywords": "Parola Chiave",
|
||||
"Encoding": "Codifica",
|
||||
"Description": "Descrizione",
|
||||
"Author": "Autore",
|
||||
"Fullscreen": "Schermo Intero",
|
||||
"Horizontal line": "Linea Orizzontale",
|
||||
"Horizontal space": "Spazio Orizzontale",
|
||||
"Insert\/edit image": "Aggiungi\/Modifica Immagine",
|
||||
"General": "Generale",
|
||||
"Advanced": "Avanzato",
|
||||
"Source": "Fonte",
|
||||
"Border": "Bordo",
|
||||
"Constrain proportions": "Mantieni Proporzioni",
|
||||
"Vertical space": "Spazio Verticale",
|
||||
"Image description": "Descrizione Immagine",
|
||||
"Style": "Stile",
|
||||
"Dimensions": "Dimenzioni",
|
||||
"Insert image": "Inserisci immagine",
|
||||
"Insert date\/time": "Inserisci Data\/Ora",
|
||||
"Remove link": "Rimuovi link",
|
||||
"Url": "Url",
|
||||
"Text to display": "Testo da Visualizzare",
|
||||
"Anchors": "Anchors",
|
||||
"Insert link": "Inserisci il Link",
|
||||
"New window": "Nuova Finestra",
|
||||
"None": "No",
|
||||
"Target": "Target",
|
||||
"Insert\/edit link": "Inserisci\/Modifica Link",
|
||||
"Insert\/edit video": "Inserisci\/Modifica Video",
|
||||
"Poster": "Anteprima",
|
||||
"Alternative source": "Alternativo",
|
||||
"Paste your embed code below:": "Incolla il codice d'incorporamento qui:",
|
||||
"Insert video": "Inserisci Video",
|
||||
"Embed": "Incorporare",
|
||||
"Nonbreaking space": "Spazio unificatore",
|
||||
"Paste as text": "incolla come testo",
|
||||
"Preview": "Anteprima",
|
||||
"Print": "Stampa",
|
||||
"Save": "Salva",
|
||||
"Could not find the specified string.": "Impossibile trovare la parola specifica.",
|
||||
"Replace": "Sostituisci",
|
||||
"Next": "Successivo",
|
||||
"Whole words": "Parole Sbagliate",
|
||||
"Find and replace": "Trova e Sostituisci",
|
||||
"Replace with": "Sostituisci Con",
|
||||
"Find": "Trova",
|
||||
"Replace all": "Sostituisci Tutto",
|
||||
"Match case": "Maiuscole\/Minuscole ",
|
||||
"Prev": "Precedente",
|
||||
"Spellcheck": "Controllo ortografico",
|
||||
"Finish": "Termina",
|
||||
"Ignore all": "Ignora Tutto",
|
||||
"Ignore": "Ignora",
|
||||
"Insert row before": "Inserisci una Riga Prima",
|
||||
"Rows": "Righe",
|
||||
"Height": "Altezza",
|
||||
"Paste row after": "Incolla una Riga Dopo",
|
||||
"Alignment": "Allineamento",
|
||||
"Column group": "Gruppo di Colonne",
|
||||
"Row": "Riga",
|
||||
"Insert column before": "Inserisci una Colonna Prima",
|
||||
"Split cell": "Dividi Cella",
|
||||
"Cell padding": "Padding della Cella",
|
||||
"Cell spacing": "Spaziatura della Cella",
|
||||
"Row type": "Tipo di Riga",
|
||||
"Insert table": "Inserisci Tabella",
|
||||
"Body": "Body",
|
||||
"Caption": "Didascalia",
|
||||
"Footer": "Footer",
|
||||
"Delete row": "Cancella Riga",
|
||||
"Paste row before": "Incolla una Riga Prima",
|
||||
"Scope": "Campo",
|
||||
"Delete table": "Cancella Tabella",
|
||||
"Header cell": "cella d'intestazione",
|
||||
"Column": "Colonna",
|
||||
"Cell": "Cella",
|
||||
"Header": "Header",
|
||||
"Cell type": "Tipo di Cella",
|
||||
"Copy row": "Copia Riga",
|
||||
"Row properties": "Propriet\u00e0 della Riga",
|
||||
"Table properties": "Propiet\u00e0 della Tabella",
|
||||
"Row group": "Gruppo di Righe",
|
||||
"Right": "Destra",
|
||||
"Insert column after": "Inserisci una Colonna Dopo",
|
||||
"Cols": "Colonne",
|
||||
"Insert row after": "Inserisci una Riga Dopo",
|
||||
"Width": "Larghezza",
|
||||
"Cell properties": "Propiet\u00e0 della Cella",
|
||||
"Left": "Sinistra",
|
||||
"Cut row": "Taglia Riga",
|
||||
"Delete column": "Cancella Colonna",
|
||||
"Center": "Centro",
|
||||
"Merge cells": "Unisci Cella",
|
||||
"Insert template": "Inserisci Template",
|
||||
"Templates": "Template",
|
||||
"Background color": "Colore Background",
|
||||
"Text color": "Colore Testo",
|
||||
"Show blocks": "Mostra Blocchi",
|
||||
"Show invisible characters": "Mostra Caratteri Invisibili",
|
||||
"Words: {0}": "Parole: {0}",
|
||||
"Insert": "Inserisci",
|
||||
"File": "File",
|
||||
"Edit": "Modifica",
|
||||
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich Text Area. Premi ALT-F9 per il men\u00f9. Premi ALT-F10 per la barra degli strumenti. Premi ALT-0 per l'aiuto.",
|
||||
"Tools": "Strumenti",
|
||||
"View": "Visualiza",
|
||||
"Table": "Tabella",
|
||||
"Format": "Formato"
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user