Merge pull request #56 from ThomasRubini/delete_appr

This commit is contained in:
Thomas Rubini 2023-01-23 15:17:47 +01:00 committed by GitHub
commit 36b141b55e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 9 deletions

View File

@ -12,11 +12,11 @@ final class ApprModel {
");
$stmt->bindParam("recipe_id", $I_recipe_id);
$stmt->execute();
$rows = $stmt->fetchAll();
foreach($rows as &$row) {
$row["AUTHOR_IMG_LINK"] = "/static/img/user.jpg";
$row["AUTHOR_IMG_LINK"] = "/static/img/users/1.jpg";
}
return $rows;

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>
<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["NOTE"] ?> </p>
<p> <?= $A_view["DATE"] ?> </p>
<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"] = $A_view["ADMIN"];
View::show("appreciations/appreciation", $A_appr);
}
?>

View File

@ -2,7 +2,7 @@
<main>
<img src="<?= $A_view["IMAGE_LINK"] ?>" alt="Image d'illustration de la recette">
<img src="<?= $A_view["IMG_LINK"] ?>" alt="Image d'illustration de la recette">
<section class="infosRecette">
<header>
@ -39,7 +39,7 @@
"appreciations/view",
array(
"APPRS" => $A_view["APPRS"],
"ADMIN" => $A_view["ADMIN"]
"ADMIN" => $A_view["ADMIN"]
)
);
?>