Export positions

modifié:         core/lib/Thelia/Config/Resources/routing/admin.xml
	modifié:         core/lib/Thelia/Controller/Admin/ExportController.php
	modifié:         core/lib/Thelia/Controller/Admin/ImportExportController.php
	modifié:         core/lib/Thelia/Core/Template/Loop/ImportExportType.php
	modifié:         core/lib/Thelia/Model/Export.php
	nouveau fichier: templates/backOffice/default/export-page.html
	modifié:         templates/backOffice/default/export.html
	nouveau fichier: templates/backOffice/default/import-page.html
This commit is contained in:
Benjamin Perche
2014-07-10 13:32:48 +02:00
parent 7727c14440
commit fa7b02c9c9
8 changed files with 212 additions and 17 deletions

View File

@@ -29,6 +29,8 @@ use Thelia\Type\TypeCollection;
*/
abstract class ImportExportType extends BaseLoop implements PropelSearchLoopInterface
{
const DEFAULT_ORDER = "manual";
protected $timestampable = true;
/**
@@ -49,9 +51,9 @@ abstract class ImportExportType extends BaseLoop implements PropelSearchLoopInte
->set("ID", $type->getId())
->set("TITLE", $type->getTitle())
->set("DESCRIPTION", $type->getDescription())
->set("URL", $type->isImport() ? $url : null)
->set("URL", $url)
->set("POSITION", $type->getPosition())
->set("CATEGORY_ID", $type->getImportExportCategoryId())
->set("CATEGORY_ID", $type->getByName($this->getCategoryName()))
;
$loopResult->addRow($loopResultRow);
@@ -137,13 +139,18 @@ abstract class ImportExportType extends BaseLoop implements PropelSearchLoopInte
new Argument(
"order",
new TypeCollection(
new EnumListType(["id", "id_reverse", "alpha", "alpha_reverse", "manual", "manual_reverse"])
new EnumListType(static::getAllowedOrders())
),
"manual"
static::DEFAULT_ORDER
)
);
}
public static function getAllowedOrders()
{
return ["id", "id_reverse", "alpha", "alpha_reverse", "manual", "manual_reverse"];
}
abstract protected function getBaseUrl();
abstract protected function getQueryModel();