Finalisation de la partie addedit, modif et affichage, plus que les tests
|
|
@ -18,6 +18,7 @@ class Project extends Entity{
|
|||
private int $_category = 0;
|
||||
private string $_creatorname;
|
||||
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){
|
||||
$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;
|
||||
}
|
||||
}
|
||||
BIN
uploads/projects/69a07901009c5.webp
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
uploads/projects/69a07901159e9_gallery.webp
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
uploads/projects/69a07901209a9_gallery.webp
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
uploads/projects/69a079012b538_gallery.webp
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
uploads/projects/69a079013593e_gallery.webp
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
uploads/projects/69a07936f13ca_gallery.webp
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
uploads/projects/69a07937088e1_gallery.webp
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
uploads/projects/69a079371c10b_gallery.webp
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
uploads/projects/69a07937268f6_gallery.webp
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
|
|
@ -27,9 +27,19 @@
|
|||
<div class="row mb-2">
|
||||
|
||||
{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"}
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
{/foreach}
|
||||
</section>
|
||||
{/block}
|
||||
|
|
|
|||