user navigation overview: Display the type of a navigation item

refs #5600
This commit is contained in:
Johannes Meyer 2015-09-16 15:09:56 +02:00
parent 4c1dd2ed36
commit 47257d74ff
2 changed files with 5 additions and 0 deletions

View File

@ -66,6 +66,7 @@ class NavigationController extends Controller
$userConfig = $user->loadNavigationConfig();
$sharedConfig = Config::app('navigation');
$this->view->types = $this->listItemTypes();
$this->view->items = array_merge(
$sharedConfig->select()->where('owner', $user->getUsername())->fetchAll(),
iterator_to_array($userConfig)

View File

@ -10,6 +10,7 @@
<table class="action alternating">
<thead>
<th><?= $this->translate('Navigation'); ?></th>
<th style="width: 10em"><?= $this->translate('Type'); ?></th>
<th style="width: 5em"><?= $this->translate('Remove'); ?></th>
</thead>
<tbody>
@ -23,6 +24,9 @@
'title' => sprintf($this->translate('Edit navigation item %s'), $name)
)
); ?></td>
<td><?= $item->type && isset($types[$item->type])
? $this->escape($types[$item->type])
: $this->escape($this->translate('Unknown')); ?></td>
<td><?= $this->qlink(
'',
'navigation/remove',