152 lines
5.3 KiB
HTML
152 lines
5.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
|
|
<? include('blocks/d.head.html'); ?>
|
|
|
|
<body>
|
|
|
|
<? include('blocks/d.nav.html'); ?>
|
|
|
|
<div id="mapid"></div>
|
|
|
|
<div id="sticky">
|
|
<section>
|
|
<i id="slide-icon" class="fas fa-chevron-up"></i>
|
|
|
|
<h1 class="flex_line">
|
|
<span class="poi-icon-wrapper" data-tooltip="<?=htmlspecialchars($poi_types[$poi->poi_type][4] ?? '')?>">
|
|
<img class="poi-icon"
|
|
src="<?=$config['rel_root_folder']?>views/img/<?=$poi->poi_type?>.svg"
|
|
alt="">
|
|
</span>
|
|
<span><?=$poi->name?></span>
|
|
</h1>
|
|
<? if($user->rankIsHigher('premium')) { ?>
|
|
<span class="subtitle">
|
|
<? if(isset($PoiHistory)) { ?>
|
|
<select id="PoiHistory">
|
|
<? $i = 0;
|
|
foreach ($PoiHistory->objs as $row) { ?>
|
|
<option <?=$row->version_id==$poi->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'• ':''?><? echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option>
|
|
<? $i++;
|
|
} ?>
|
|
</select>
|
|
<? }
|
|
if ($user->rankIsHigher('moderator') && isset($PoiHistory)) { ?>
|
|
—
|
|
<? }
|
|
if ($user->rankIsHigher("moderator")) { ?>
|
|
<a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/edit"><i class="fas fa-pencil-alt"></i> Éditer le point</a> —
|
|
<? if ($poi->is_public == 't') { ?>
|
|
<a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/delete"><i class="fas fa-trash"></i> Effacer le point</a>
|
|
<? } else { ?>
|
|
<a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/restore"><i class="fas fa-eye"></i> Restaurer le point</a>
|
|
<? } ?>
|
|
<? } ?>
|
|
</span>
|
|
<? } ?>
|
|
|
|
<div class="flex_line">
|
|
<div>
|
|
<strong>Latitude :</strong> <?=$poi->lat?><br>
|
|
<strong>Longitude :</strong> <?=$poi->lon?><br>
|
|
<? if ($poi->ele !== null && $poi->ele !== '') { ?>
|
|
<strong>Altitude :</strong> <?=$poi->ele?> m<br>
|
|
<? } ?>
|
|
</div>
|
|
<div>
|
|
<strong>Langue :</strong> <?=$poi->locale?><br>
|
|
<strong>Auteur :</strong> <?=$poi->author_name?><br>
|
|
<strong>Dernière mise à jour :</strong> <?=$poi->update_date?><br>
|
|
</div>
|
|
</div>
|
|
|
|
<h2>Description</h2>
|
|
<div class="poi-description">
|
|
<?=$poi->content_html?>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<h2 id="abstract_title">Informations générales</h2>
|
|
<p id="abstract">
|
|
<?=$poi_types[$poi->poi_type][4] ?? ""?>
|
|
</p>
|
|
|
|
<h2>Caractéristiques</h2>
|
|
<div id="specific_form">
|
|
<? if (!empty($poi->parameters)) { ?>
|
|
<? foreach ($poi->parameters as $key => $value) { ?>
|
|
<div class="flex_line poi_param">
|
|
<label><strong><?=$key?></strong></label>
|
|
<span><?=$value?></span>
|
|
</div>
|
|
<? } ?>
|
|
<? } else { ?>
|
|
<p>Aucune information spécifique.</p>
|
|
<? } ?>
|
|
</div>
|
|
|
|
<? if ($poi->is_commentable == 't') { ?>
|
|
<h2>Commentaires</h2>
|
|
|
|
<? if (isset($poi_comments) && $poi_comments->number > 0) { ?>
|
|
<div id="comments">
|
|
<? foreach ($poi_comments->objs as $comment) { ?>
|
|
<article class="comment">
|
|
<header>
|
|
<strong><?=$comment->author_obj->name?></strong>
|
|
<span><?=$comment->creation_date?></span>
|
|
|
|
<? if ($user->rankIsHigher("moderator") || $user->id == $comment->author) { ?>
|
|
<? if ($comment->is_public == 't') { ?>
|
|
<a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/delete_comment/<?=$comment->id?>">Supprimer</a>
|
|
<? } else { ?>
|
|
<a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/restore_comment/<?=$comment->id?>">Restaurer</a>
|
|
<? } ?>
|
|
<? } ?>
|
|
</header>
|
|
|
|
<div class="comment-body">
|
|
<?=$comment->comment_html?>
|
|
</div>
|
|
</article>
|
|
<? } ?>
|
|
</div>
|
|
<? } else { ?>
|
|
<p>Aucun commentaire pour le moment.</p>
|
|
<? } ?>
|
|
|
|
<? if ($user->rankIsHigher("registered")) { ?>
|
|
<form class="form" action="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/new_comment" method="post">
|
|
<h3>Ajouter un commentaire</h3>
|
|
<textarea name="comment" id="comment" required></textarea>
|
|
<input type="submit" name="submit" value="Envoyer">
|
|
</form>
|
|
<? } else { ?>
|
|
<p>Connectez-vous pour ajouter un commentaire.</p>
|
|
<? } ?>
|
|
<? } ?>
|
|
|
|
</section>
|
|
|
|
<? include('blocks/d.footer.html'); ?>
|
|
</div>
|
|
|
|
<script>
|
|
var poi_lat = <?=$poi->lat?>;
|
|
var poi_lon = <?=$poi->lon?>;
|
|
var poi_type = "<?=$poi->poi_type?>";
|
|
var poi_mode = "view";
|
|
var root = "<?=$config['rel_root_folder']?>";
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
$( "#slide-icon" ).click(function() {
|
|
$( "html, body" ).animate({scrollTop: "300px"});
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|