only show edit/delete buttons if the user can use them
This commit is contained in:
parent
3a23ef1d27
commit
11791c19df
@ -37,10 +37,12 @@ $O_recipe = $A_view["RECIPE"];
|
|||||||
|
|
||||||
<p>By <?= $O_recipe->getAuthorOrAnon()->S_USERNAME ?> </p>
|
<p>By <?= $O_recipe->getAuthorOrAnon()->S_USERNAME ?> </p>
|
||||||
|
|
||||||
|
<?php if ($A_view["ADMIN"] || $A_view["USER_ID"] === $O_recipe->I_AUTHOR_ID) { ?>
|
||||||
<section class="buttonsEditRecipe">
|
<section class="buttonsEditRecipe">
|
||||||
<a href="/recipe/edit/<?= $O_recipe->I_ID ?>">Modifier la recette</a>
|
<a href="/recipe/edit/<?= $O_recipe->I_ID ?>">Modifier la recette</a>
|
||||||
<a href="/recipe/delete/<?= $O_recipe->I_ID ?>">Supprimer la recette</a>
|
<a href="/recipe/delete/<?= $O_recipe->I_ID ?>">Supprimer la recette</a>
|
||||||
</section>
|
</section>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
View::show("appreciations/view_all", $A_view)
|
View::show("appreciations/view_all", $A_view)
|
||||||
|
Loading…
Reference in New Issue
Block a user