bludit/bl-kernel/admin/views/categories.php

34 lines
792 B
PHP
Raw Normal View History

<?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
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 '
<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
';
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 '
</tbody>
2017-04-17 12:49:03 +02:00
</table>
';