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(
|
2018-08-08 00:16:35 +02:00
|
|
|
'title'=>$L->g('Add a new category'),
|
2018-04-15 22:23:11 +02:00
|
|
|
'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>
|
2018-08-08 00:16:35 +02:00
|
|
|
<th class="border-bottom-0" scope="col">'.$L->g('Name').'</th>
|
|
|
|
<th class="border-bottom-0" scope="col">'.$L->g('URL').'</th>
|
2018-04-15 22:23:11 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2017-04-17 12:49:03 +02:00
|
|
|
';
|
|
|
|
|
2018-08-02 22:33:53 +02:00
|
|
|
foreach ($categories->keys() as $key) {
|
|
|
|
$category = new Category($key);
|
2017-04-17 12:49:03 +02:00
|
|
|
echo '<tr>';
|
2018-08-02 22:33:53 +02:00
|
|
|
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-category/'.$key.'">'.$category->name().'</a></td>';
|
|
|
|
echo '<td><a href="'.$category->permalink().'">'.$url->filters('category', false).$key.'</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>
|
|
|
|
';
|