added ADMIN entry for each appr to display or no the button to

remove a comment
This commit is contained in:
Capelier-Marla 2023-01-20 21:51:46 +01:00 committed by Thomas Rubini
parent 21d077099b
commit 78d1704d6e
No known key found for this signature in database
GPG Key ID: C7D287C8C1CAC373
2 changed files with 5 additions and 4 deletions

View File

@ -2,8 +2,9 @@
<header>
<img src="<?= $A_view["AUTHOR_IMG_LINK"] ?>" alt="profile picture">
<h3> <?= $A_view["AUTHOR_NAME"] ?> </h3>
<p> <?= $A_view["COMMENT"] ?> </p>
</header>
<p> <?= $A_view["NOTE"] ?> </p>
<p> <?= $A_view["DATE"] ?> </p>
<?= $A_view["SHOW_REMOVE_BUTTON"]===true? "<a href=/appr/delete/".$A_view["ID"].">Supprimer l'appréciation</a>" : "" ?>
</header>
<p> <?= $A_view["COMMENT"] ?> </p>
</section>

View File

@ -17,7 +17,7 @@
<?php
foreach ($A_view["APPRS"] as $A_appr){
$A_appr["ADMIN"] = $A_view["ADMIN"];
$A_appr["SHOW_REMOVE_BUTTON"] = $B_view["ADMIN"];
View::show("appreciations/appreciation", $A_appr);
}
?>