diff --git a/public/views/d.blog.view.html b/public/views/d.blog.view.html index b112ac3..1854f7a 100755 --- a/public/views/d.blog.view.html +++ b/public/views/d.blog.view.html @@ -7,23 +7,42 @@ -
is_archive=="t"||$blogArticle->is_public=="f"?'class="archive"':''?>> + is_archive == "t" || $blogArticle->is_public == "f"; + $canViewHistory = $user->rankIsHigher('premium'); + $canModerate = $user->rankIsHigher('moderator'); + $canWriteComment = $user->rankIsHigher("registered"); + $canOpenCommentForm = $canWriteComment && !$isArchiveOrPrivate; + $hasHistory = isset($blogHistory); + $isVisitor = $user->rank == "visitor"; + $isCommentable = $blogArticle->is_commentable == "t"; + ?> + +
>

name?>

- rankIsHigher('premium')) { ?> + - + - rankIsHigher('moderator') && isset($blogHistory)) { ?> + rankIsHigher("moderator")) { ?> + if ($canModerate) { ?> Éditer l'articleis_public == 't') { ?> Effacer l'article @@ -41,21 +60,20 @@

Article écrit par rankIsHigher("blocked")) { ?> author_name?> - + author_name?> le datetime_format,date_create($blogArticle->creation_date, new DateTimeZone("UTC"))) ?>

- is_commentable == "t") { ?> +
-
rank=="visitor"?"class='sent' ":""?>> - is_archive == "t" || $blogArticle->is_public == "f") { ?> +
> +

Impossible de commenter un article non publié

- rankIsHigher("registered")) { ?> +

Ajouter un nouveau commentaire

@@ -68,36 +86,35 @@
- is_commentable == 't') { - foreach ($blogArticles_comments->objs as $comment) { ?> + objs as $comment) { ?> + id == $comment->author; ?> -
is_archive == 't' || $comment->is_public == 'f') echo 'class="comment_archive" '; ?>> -
- author_obj->is_avatar_present=='t') { ?> - Avatar - - - - rankIsHigher("blocked")) { ?> - author_obj->name?> - - author_obj->name?> - - le datetime_format,date_create($comment->update_date, new DateTimeZone("UTC"))) ?> - rankIsHigher("moderator") || $user->id == $comment->author) && $comment->is_public == 't') { ?> - Effacer le commentaire - - rankIsHigher("moderator") || $user->id == $comment->author) && $comment->is_public == 'f') { ?> - Restaurer le commentaire - -
-
- comment_html?> -
-
+
is_archive == 't' || $comment->is_public == 'f') echo 'class="comment_archive" '; ?>> +
+ author_obj->is_avatar_present=='t') { ?> + Avatar + + + + rankIsHigher("blocked")) { ?> + author_obj->name?> + + author_obj->name?> + + le datetime_format,date_create($comment->update_date, new DateTimeZone("UTC"))) ?> + is_public == 't') { ?> + Effacer le commentaire + + is_public == 'f') { ?> + Restaurer le commentaire + +
+
+ comment_html?> +
+
-
@@ -105,24 +122,24 @@
-rankIsHigher("premium")) { ?> + -rankIsHigher("registered") && $blogArticle->is_archive == "f" && $blogArticle->is_public == "t") { ?> + - \ No newline at end of file + diff --git a/public/views/d.poi.view.html b/public/views/d.poi.view.html index c661887..62ab479 100644 --- a/public/views/d.poi.view.html +++ b/public/views/d.poi.view.html @@ -7,10 +7,21 @@ + is_archive == "t" || $poi->is_public == "f"; + $canViewHistory = $user->rankIsHigher('premium'); + $canModerate = $user->rankIsHigher('moderator'); + $canWriteComment = $user->rankIsHigher("registered"); + $canOpenCommentForm = $canWriteComment && !$isArchiveOrPrivate; + $hasHistory = isset($PoiHistory); + $isVisitor = $user->rank == "visitor"; + $isCommentable = $poi->is_commentable == 't'; + ?> +
-
is_archive=="t"||$poi->is_public=="f"?'class="archive"':''?>> +
>

@@ -50,21 +61,29 @@

- rankIsHigher('premium')) { ?> + - + - rankIsHigher('moderator') && isset($PoiHistory)) { ?> - — rankIsHigher("moderator")) { ?> + if ($canModerate && $hasHistory) { ?> + — + Éditer le pointis_public == 't') { ?> Effacer le point @@ -79,18 +98,18 @@
poi_type][5]; - $values = $poi->parameters ?? []; + $poiFields = $poi_types[$poi->poi_type][5]; + $poiValues = $poi->parameters ?? []; // Séparer les booléens des autres champs - $bool_fields = []; - $other_fields = []; + $boolFields = []; + $otherFields = []; - foreach ($fields as $key => $label) { + foreach ($poiFields as $key => $label) { if ($key[0] === 'b') { - $bool_fields[$key] = $label; + $boolFields[$key] = $label; } else { - $other_fields[$key] = $label; + $otherFields[$key] = $label; } } ?> @@ -98,9 +117,9 @@
- $label): ?> + $label): ?> @@ -131,27 +150,30 @@ - + + "", + 1 => "", + 2 => "✔️", + -1 => "" + ]; + ?>
- $label): ?> + $label): ?>
- $label): ?> + $label): ?> "", - 1 => "", - 2 => "✔️", - -1 => "" - ][$value]; + $value = $poiValues[$key] ?? 2; + $icon = $boolIcons[$value]; ?>
@@ -165,13 +187,13 @@
- is_commentable == 't') { ?> +
-
rank=="visitor"?"class='sent' ":""?>> - is_archive == "t" || $poi->is_public == "f") { ?> +
> +

Impossible de commenter un point non publié

- rankIsHigher("registered")) { ?> +

Ajouter un nouveau commentaire

@@ -187,6 +209,7 @@ number > 0) { ?>
objs as $comment) { ?> + id == $comment->author; ?>
is_archive == 't' || $comment->is_public == 'f') echo 'class="comment_archive" '; ?>>
@@ -206,7 +229,7 @@ le datetime_format, date_create($comment->update_date, new DateTimeZone("UTC"))) ?> - rankIsHigher("moderator") || $user->id == $comment->author) && $comment->is_public == 't') { ?> + is_public == 't') { ?> Effacer le commentaire @@ -214,7 +237,7 @@ - rankIsHigher("moderator") || $user->id == $comment->author) && $comment->is_public == 'f') { ?> + is_public == 'f') { ?> Restaurer le commentaire @@ -249,23 +272,23 @@ var root = ""; -rankIsHigher("premium")) { ?> + - + -rankIsHigher("registered") && $poi->is_archive == "f" && $poi->is_public == "t") { ?> + - + - \ No newline at end of file +