2018-04-22 17:45:31 +02:00
|
|
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
2017-04-17 12:49:03 +02:00
|
|
|
|
2018-06-24 13:37:45 +02:00
|
|
|
echo Bootstrap::pageTitle(array('title'=>$L->g('Categories'), 'icon'=>'tags'));
|
2017-04-17 12:49:03 +02:00
|
|
|
|
2018-04-15 22:23:11 +02:00
|
|
|
echo Bootstrap::link(array(
|
|
|
|
'title'=>'Add a new category',
|
|
|
|
'href'=>HTML_PATH_ADMIN_ROOT.'new-category',
|
|
|
|
'icon'=>'plus'
|
|
|
|
));
|
2017-04-17 12:49:03 +02:00
|
|
|
|
|
|
|
echo '
|
2018-04-15 22:23:11 +02:00
|
|
|
<table class="table table-striped mt-3">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="border-bottom-0" scope="col">Name</th>
|
|
|
|
<th class="border-bottom-0" scope="col">URL</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2017-04-17 12:49:03 +02:00
|
|
|
';
|
|
|
|
|
2017-05-16 00:46:20 +02:00
|
|
|
$categories = $dbCategories->getKeyNameArray();
|
2018-04-15 22:23:11 +02:00
|
|
|
foreach ($categories as $categoryKey=>$category) {
|
2017-04-17 12:49:03 +02:00
|
|
|
echo '<tr>';
|
|
|
|
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-category/'.$categoryKey.'">'.$category.'</a></td>';
|
2017-06-09 20:30:13 +02:00
|
|
|
echo '<td><a href="'.DOMAIN_CATEGORIES.$categoryKey.'">'.$Url->filters('category', false).$categoryKey.'</a></td>';
|
2017-04-17 12:49:03 +02:00
|
|
|
echo '</tr>';
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '
|
2018-04-15 22:23:11 +02:00
|
|
|
</tbody>
|
2017-04-17 12:49:03 +02:00
|
|
|
</table>
|
|
|
|
';
|