Update project_display.tpl
This commit is contained in:
parent
4d9703fdec
commit
7a34954e74
1 changed files with 83 additions and 90 deletions
|
|
@ -1,7 +1,8 @@
|
||||||
{extends file="views/layout.tpl"}
|
{extends file="views/layout.tpl"}
|
||||||
|
{block name="title" append} - Portfolio{/block}
|
||||||
|
|
||||||
{block name="content"}
|
{block name="content"}
|
||||||
<main class="container mt-5 py-5">
|
<div class="mt-5">
|
||||||
|
|
||||||
<!-- Message après l'envoi d'email -->
|
<!-- Message après l'envoi d'email -->
|
||||||
{if isset($smarty.get.mail) && $smarty.get.mail === 'ok'}
|
{if isset($smarty.get.mail) && $smarty.get.mail === 'ok'}
|
||||||
|
|
@ -22,8 +23,11 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="mb-4 shadow-sm">
|
<div class="mb-4 shadow-sm">
|
||||||
<img src="{$objProject->getThumbnail()}"
|
<img
|
||||||
class="img-fluid rounded w-100">
|
src="{$smarty.env.IMG_PROJECT_PATH}{$objProject->getThumbnail()}"
|
||||||
|
class="img-fluid rounded w-100"
|
||||||
|
alt="Aperçu du projet"
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bg-light p-4 rounded mb-4">
|
<div class="bg-light p-4 rounded mb-4">
|
||||||
|
|
@ -39,12 +43,19 @@
|
||||||
<div class="card shadow-sm p-4 mb-5">
|
<div class="card shadow-sm p-4 mb-5">
|
||||||
<form method="post" action="index.php?ctrl=project&action=shareProject">
|
<form method="post" action="index.php?ctrl=project&action=shareProject">
|
||||||
|
|
||||||
<input type="hidden" name="project_id"
|
<input
|
||||||
value="{$objProject->getId()}">
|
type="hidden"
|
||||||
|
name="project_id"
|
||||||
|
value="{$objProject->getId()}"
|
||||||
|
>
|
||||||
|
|
||||||
<input type="email" name="to_email"
|
<input
|
||||||
|
type="email"
|
||||||
|
name="to_email"
|
||||||
class="form-control mb-3"
|
class="form-control mb-3"
|
||||||
placeholder="Adresse email" required>
|
placeholder="Adresse email"
|
||||||
|
required
|
||||||
|
>
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary w-100">
|
<button type="submit" class="btn btn-primary w-100">
|
||||||
Envoyer par email
|
Envoyer par email
|
||||||
|
|
@ -57,47 +68,29 @@
|
||||||
|
|
||||||
<!-- Sidebar : informations du créateur -->
|
<!-- Sidebar : informations du créateur -->
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
|
|
||||||
<div class="card text-center shadow-sm p-4">
|
<div class="card text-center shadow-sm p-4">
|
||||||
<a href="index.php?ctrl=user&action=user&id={$objProject->getUser_id()}" class="text-decoration-none text-dark">
|
<a
|
||||||
<img src="{$objProject->getUser_image()}"
|
href="index.php?ctrl=user&action=user&id={$objProject->getUser_id()}"
|
||||||
|
class="text-decoration-none text-dark"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src="{$smarty.env.IMG_USER_PATH}{$objProject->getUser_image()|default:'images.jpg'}"
|
||||||
class="rounded-circle mb-3 mx-auto"
|
class="rounded-circle mb-3 mx-auto"
|
||||||
style="width:100px;height:100px;object-fit:cover;">
|
style="width:100px;height:100px;object-fit:cover;"
|
||||||
|
alt="Photo du créateur"
|
||||||
|
>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<h5>{$objProject->getCreatorName()}</h5>
|
<h5>{$objProject->getCreatorName()}</h5>
|
||||||
|
|
||||||
<p class="text-muted small">
|
<p class="text-muted small">
|
||||||
Publié le {$objProject->getCreation_date()}
|
Publié le {$objProject->getCreation_date()}
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<button class="btn btn-primary">Contacter le talent</button>
|
<button class="btn btn-primary">Contacter le talent</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{*Controle de l'utilisateur ainsi que du status du projet + Suppression disponible pour l'utilisateur possédant le projet*}
|
|
||||||
{if isset($smarty.session.user)}
|
|
||||||
{if ($smarty.session.user.user_status == 2 || $smarty.session.user.user_id == $objProject->getUser_id())}
|
|
||||||
<div class="border rounded text-center">
|
|
||||||
<a class="btn btn-sm m-1 btn-danger" href="?ctrl=project&action=delete&id={$objProject->getId()}" name="toDelete">Supprimer le projet</a>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
|
|
||||||
{if $smarty.session.user.user_id == $objProject->getUser_id()}
|
|
||||||
<a class="btn btn-sm m-1 btn-warning" href="?ctrl=project&action=addedit_project&id={$objProject->getId()}" name="addedit">Modifier le projet</a>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{*Conditions permettant au Modérateur de modifier le status d'un projet*}
|
|
||||||
{if $smarty.session.user.user_status == 2 && $objProject->getStatus() == "en_attente"}
|
|
||||||
<a class="btn btn-sm m-1 btn-success" href="?ctrl=project&action=accept&id={$objProject->getId()}" name="toPublished">Accepter</a>
|
|
||||||
<a class="btn btn-sm m-1 btn-warning" href="?ctrl=project&action=refuse&id={$objProject->getId()}" name="toRefused">Refuser</a>
|
|
||||||
</div>
|
|
||||||
{elseif $projectStatus == "refusé"}
|
|
||||||
<p class="text-danger fw-bold">Portfolio refusé</p>
|
|
||||||
{/if}
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue