Ajout d'un système de listing des fichiers de dossier /medias/wiki
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Mise à jour</h1>
|
||||
<h1><?=$head['title']?></h1>
|
||||
<br>
|
||||
<pre><?
|
||||
foreach($output as $line) {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<? } ?>
|
||||
<? if($user->rankIsHigher("moderator")) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/logs" class="button"><i class="fas fa-history"></i> Voir les logs</a> <small>Permet d'accéder aux 200 dernières lignes des logs bruts des actions sur la base de données.</small><br><br>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files" class="button"><i class="fas fa-paperclip"></i> Fichiers attachés</a><small>Gérer les fichiers attachés pour le wiki : liste, ajout suppression...</small><br><br>
|
||||
<? } ?>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Logs</h1>
|
||||
<h1><?=$head['title']?></h1>
|
||||
<span class="subtitle">
|
||||
<select id="logfile">
|
||||
<? $i = 0;
|
||||
|
||||
62
views/d.admin.wiki-files.html
Executable file
62
views/d.admin.wiki-files.html
Executable file
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1><?=$head['title']?></h1>
|
||||
|
||||
<p class="subtitle">Fichiers attachés <?=$first?> à <?=$last?> sur les <?=$filenb?> présents</p>
|
||||
|
||||
<br><br>
|
||||
|
||||
<table>
|
||||
<tr class="first">
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+1?>?orderby=name&order=<?=$order=='ASC'?'DESC':'ASC'?>">Nom</a>
|
||||
<?=$orderby=='name'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+1?>?orderby=type&order=<?=$order=='ASC'?'DESC':'ASC'?>">Type</a>
|
||||
<?=$orderby=='type'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+1?>?orderby=size&order=<?=$order=='ASC'?'DESC':'ASC'?>">Taille</a>
|
||||
<?=$orderby=='size'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+1?>?orderby=creation_date&order=<?=$order=='ASC'?'DESC':'ASC'?>">Date de création</a>
|
||||
<?=$orderby=='creation_date'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
<th>Suppression</th>
|
||||
</tr>
|
||||
<? foreach ($files as $file) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?=$config['rel_root_folder']?>medias/wiki/<?=$file['name']?>"><?=$file['name']?></a>
|
||||
</td>
|
||||
<td><i class='fas <?=getFontAwesomeIcon($file['type'])?>'></i> <?=$file['type']?></td>
|
||||
<td><?=$file['size']?></td>
|
||||
<td><? echo datefmt_format($user->date_format,date_create($file['creation_date'], new DateTimeZone("UTC"))) ?></td>
|
||||
<td>
|
||||
<a href="<?=$file['name']?>"><span class="external-link"><i class="fas fa-trash"></i></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</table>
|
||||
|
||||
<div class="pagebuttons">
|
||||
<? if ($page != 0) { ?><a class="previous" href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fas fa-chevron-left fa-fw"></i></a><? }
|
||||
if (($page+1)*$rows_per_pages < $filenb) { ?><a class="next" href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+2?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fas fa-chevron-right fa-fw"></i></a><? } ?>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user