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

34 lines
792 B
PHP

<?php defined('BLUDIT') or die('Bludit CMS.');
echo Bootstrap::pageTitle(array('title'=>$L->g('Categories'), 'icon'=>'tags'));
echo Bootstrap::link(array(
'title'=>'Add a new category',
'href'=>HTML_PATH_ADMIN_ROOT.'new-category',
'icon'=>'plus'
));
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>
';
foreach ($categories->keys() as $key) {
$category = new Category($key);
echo '<tr>';
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>';
echo '</tr>';
}
echo '
</tbody>
</table>
';