koblog/bl-kernel/admin/views/medias.php
2025-07-15 12:40:38 +02:00

41 lines
No EOL
1 KiB
PHP

<?php defined('KOBLOG') or die('Koblog CMS.');
echo "<div class='d-flex justify-content-between align-content-center'>";
echo Bootstrap::pageTitle(array('title'=>$L->g('Medias'), 'icon'=>'images'));
echo "<div>";
echo Bootstrap::link(array(
'title'=>$L->g('New media'),
'href'=>HTML_PATH_ADMIN_ROOT.'new-media',
'icon'=>'plus',
'class'=>'btn btn-outline-success'
));
echo "</div></div>";
echo '
<div class="card mt-3">
<table class="table m-0">
<thead>
<tr class="card-header">
<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>
';
foreach ($medias->content() as $key=>$media) {
echo '<tr class="card-tablebody">';
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-media/'.$key.'">'.'<img class="me-2" src="'.$media->permalink().'" alt="'.$media->alt().'" width="32" height="32" />'.$media->name().'</a></td>';
echo '<td><a href="'.$media->permalink().'">'.$media->permalink().'</a></td>';
echo '</tr>';
}
echo '
</tbody>
</table>
</div>
';
?>