From 04c590602f1bbba03e5d945e7e36239be5e06d37 Mon Sep 17 00:00:00 2001 From: Marc Neuhaus Date: Mon, 4 Jan 2016 10:34:20 +0100 Subject: [PATCH] indent items in select --- Classes/Controller/CategoryController.php | 12 ++++++++++- .../Private/Templates/Category/Index.html | 20 ++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/Classes/Controller/CategoryController.php b/Classes/Controller/CategoryController.php index 11e19fa..aba97e6 100644 --- a/Classes/Controller/CategoryController.php +++ b/Classes/Controller/CategoryController.php @@ -93,8 +93,18 @@ public function batchCreateAction() { 'sys_category', '1=1' . BackendUtility::BEenableFields('sys_category'), '', - 'sorting' + 'sorting', + '', + 'uid' ); + foreach ($categories as $key => $category) { + $level = 0; + while ($category['parent'] > 0) { + $category = $categories[$category['parent']]; + $level++; + } + $categories[$key]['title'] = str_repeat('- ', $level) . $categories[$key]['title']; + } $this->view->assign('categories', $categories); if ($this->request->hasArgument('categories')) { diff --git a/Resources/Private/Templates/Category/Index.html b/Resources/Private/Templates/Category/Index.html index 6ec4e29..2d1e45c 100644 --- a/Resources/Private/Templates/Category/Index.html +++ b/Resources/Private/Templates/Category/Index.html @@ -10,7 +10,25 @@ - {category.title} + {category.title} + +
description: {category.description} +
+ +
icon: {category.icon} +
+ +
type: {category.type} +
+ +
compare: {category.comparison_type} +
+ +
detail: {category.detail_view} +
+ +
format: {category.value_format} +