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

34 lines
825 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(
2018-08-08 00:16:35 +02:00
'title'=>$L->g('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>
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>
</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>
';