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

41 lines
1 KiB
PHP
Raw Normal View History

<?php defined('KOBLOG') or die('Koblog CMS.');
2017-04-17 12:49:03 +02:00
echo "<div class='d-flex justify-content-between align-content-center'>";
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 "<div>";
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',
'class'=>'btn btn-outline-success'
));
echo "</div></div>";
2017-04-17 12:49:03 +02:00
echo '
<div class="card mt-3">
<table class="table m-0">
<thead>
<tr class="card-header">
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);
echo '<tr class="card-tablebody">';
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>
</div>
2017-04-17 12:49:03 +02:00
';