Skip to content

Commit

Permalink
indent items in select
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Neuhaus committed Jan 4, 2016
1 parent fa2140e commit 04c5906
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
12 changes: 11 additions & 1 deletion Classes/Controller/CategoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down
20 changes: 19 additions & 1 deletion Resources/Private/Templates/Category/Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,25 @@
<img src="/typo3/sysext/core/Resources/Public/Icons/T3Icons/mimetypes/mimetypes-x-sys_category.svg" width="16" height="16">
</span>
</a>
{category.title}
<strong>{category.title}</strong>
<f:if condition="{category.description}">
<br />description: {category.description}
</f:if>
<f:if condition="{category.icon}">
<br />icon: {category.icon}
</f:if>
<f:if condition="{category.type}">
<br />type: {category.type}
</f:if>
<f:if condition="{category.comparison_type}">
<br />compare: {category.comparison_type}
</f:if>
<f:if condition="{category.detail_view}">
<br />detail: {category.detail_view}
</f:if>
<f:if condition="{category.value_format}">
<br />format: {category.value_format}
</f:if>

<div class="btn-group" role="group">
<c:be.editLink uid="{category.uid}" class="btn btn-default">
Expand Down

0 comments on commit 04c5906

Please sign in to comment.