Merge branch 'main' of https://github.com/Yasder5/projet_php
This commit is contained in:
commit
03f2e90bdf
3 changed files with 41 additions and 37 deletions
|
|
@ -159,9 +159,21 @@
|
|||
<p>Pas de résultats</p>
|
||||
</div>
|
||||
{/if}
|
||||
{foreach $arrProjectToDisplay as $objProject}
|
||||
{include file="views/_partial/preview.tpl"}
|
||||
{/foreach}
|
||||
{foreach from=$arrProjectToDisplay item=objProject}
|
||||
|
||||
{assign var="isAuthor" value=(isset($smarty.session.user) && $smarty.session.user.user_id == $objProject->getUser_id())}
|
||||
{assign var="isModerator" value=(isset($smarty.session.user) && $smarty.session.user.user_status == 2)}
|
||||
{assign var="isDeleted" value=($objProject->getProject_deleted_at() !== null)}
|
||||
{assign var="isRefused" value=($objProject->getStatus() == "refusé")}
|
||||
|
||||
{if $isModerator
|
||||
|| ($isAuthor && !$isDeleted)
|
||||
|| (!$isRefused && !$isDeleted)}
|
||||
|
||||
{include file="views/_partial/preview.tpl"}
|
||||
{/if}
|
||||
|
||||
{/foreach}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue