V1 avec bugs
This commit is contained in:
18
views/ingredients/index.php
Normal file
18
views/ingredients/index.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php use App\Domain\Tags\Tag;
|
||||
use App\Infrastructure\View as V; ?>
|
||||
|
||||
<div class="content">
|
||||
<?php foreach (V::arg( 'ingredients') as $ing): ?>
|
||||
<div class="liste-ingr-elem">
|
||||
<img class="ingr-image" src="<?php echo $ing->photo_ingredient; ?>">
|
||||
<div class="liste-ingr-elem-text">
|
||||
<?php echo $ing->nom_ingredient; ?>
|
||||
</div>
|
||||
<div class="liste-ingr-elem-modif">
|
||||
<a class="recette-button ingr-modifier" data-id="<?php echo $ing->getId(); ?>">Modifier</a>
|
||||
<a class="recette-button ingr-suppr" data-id="<?php echo $ing->getId(); ?>">Supprimer</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<script src="<?php V::assetUrl( 'js/manage-ingredients.js' ); ?>" ></script>
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
<footer id="footer">
|
||||
<div class="src">
|
||||
<a href="google.com">Une source</a>
|
||||
<a href="https://code.romhackplaza.org/Benjamin/LesRecettesDePapis" target="_blank">Notre Gitea</a>
|
||||
</div>
|
||||
<div class="Contact">
|
||||
Front end : Bousquet Sébastien
|
||||
--- Back end : Thorel Benjamin
|
||||
--- Base de donné : Glaudis Jordan
|
||||
--- Base de données : Glaudis Jordan
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
<?php if( \App\Helpers\Authentification::isLoggedIn() ): ?>
|
||||
<li><a id="login" class= "nav-element" href="<?php V::routeUrl( 'logout'); ?>">Logout</a></li>
|
||||
<li><a id="addBouton" class="nav-element" href="<?php V::routeUrl( 'recettes->create'); ?>">Ajouter une Recette</a></li>
|
||||
<li><a id="ingrManage" class="nav-element" href="<?php V::routeUrl( 'manage->ingredients'); ?>">Gérer les ingrédients</a></li>
|
||||
<li><a id="tagManage" class="nav-element" href="<?php V::routeUrl( 'manage->tags'); ?>">Gérer les tags</a></li>
|
||||
|
||||
<?php else: ?>
|
||||
<li><a id="login" class= "nav-element" href="<?php V::routeUrl( 'login'); ?>">Login</a></li>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -30,13 +30,15 @@ use App\Infrastructure\View as V; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class = "recette-desc">
|
||||
<h3>Ingrédients :</h3>
|
||||
<ul>
|
||||
<div class="recette-liste-ingr-div">
|
||||
<h3>Liste des ingrédients</h3>
|
||||
<ul class="recette-liste-ingr">
|
||||
<?php foreach( $R->getAllLinkedIngredients() as $ingr ): ?>
|
||||
<li><?php echo $ingr->nom_ingredient; ?></li>
|
||||
<li class="recette-liste-ingr-elem"><img class="ingr-image-prev" src="<?php echo $ingr->photo_ingredient; ?>"> <div class="recette-liste-ingr-elem-nom"><?php echo $ingr->nom_ingredient; ?></div></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class = "recette-desc">
|
||||
<div id="description">
|
||||
<?php echo $R->getHTMLDescription(); ?>
|
||||
</div>
|
||||
|
||||
17
views/tags/index.php
Normal file
17
views/tags/index.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php use App\Domain\Tags\Tag;
|
||||
use App\Infrastructure\View as V; ?>
|
||||
|
||||
<div class="content">
|
||||
<?php foreach( V::arg( 'tags' ) as $tag ): ?>
|
||||
<div class="liste-tag-elem">
|
||||
<div class="liste-tag-elem-text">
|
||||
<?php echo $tag->nom_tag; ?>
|
||||
</div>
|
||||
<div class="liste-tag-elem-modif">
|
||||
<a class="recette-button tag-modifier" data-id="<?php echo $tag->num_tag; ?>">Modifier</a>
|
||||
<a class="recette-button tag-suppr" data-id="<?php echo $tag->num_tag; ?>">Supprimer</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<script src="<?php V::assetUrl( 'js/manage-tags.js' ); ?>" ></script>
|
||||
Reference in New Issue
Block a user