Finalisation de la partie addedit, modif et affichage, plus que les tests

This commit is contained in:
GuillaumeH-Cci 2026-02-26 17:58:13 +01:00
parent a846fa104f
commit a154735a0c
11 changed files with 29 additions and 2 deletions

View file

@ -18,6 +18,7 @@ class Project extends Entity{
private int $_category = 0; private int $_category = 0;
private string $_creatorname; private string $_creatorname;
private ?string $_user_image = null; private ?string $_user_image = null;
private ?string $_project_deleted_at = null;
/** /**
@ -216,4 +217,20 @@ class Project extends Entity{
public function setUser_image($user_image){ public function setUser_image($user_image){
$this->_user_image = $user_image; $this->_user_image = $user_image;
} }
/**
* Récupération de la date du projet supprimer
* @return string date du projet
*/
public function getProject_deleted_at(){
return $this->_project_deleted_at;
}
/**
* Mise à jour de la date de suppression de projet
* @param string date du projet
*/
public function setProject_deleted_at($project_deleted_at){
$this->_project_deleted_at = $project_deleted_at;
}
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -27,9 +27,19 @@
<div class="row mb-2"> <div class="row mb-2">
{foreach from=$arrProjectToDisplay item=objProject} {foreach from=$arrProjectToDisplay item=objProject}
{if $objProject->getStatus() !== "refusé"}
{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"} {include file="views/_partial/preview.tpl"}
{/if} {/if}
{/foreach} {/foreach}
</section> </section>
{/block} {/block}