-
Notifications
You must be signed in to change notification settings - Fork 0
/
recette_visualisation.twig
103 lines (81 loc) · 2.78 KB
/
recette_visualisation.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<form id="formulaire_visualiserRecette" name="formulaire_visualiserRecette" action="recette_visualisation.php" METHOD="post">
{{ script_saisie_recette|raw }}
<h1>Consulter une recette</h1>
<br>
<table class="contenuForm" style="white-space:nowrap;">
<tr>
<td>Nom de la recette : </td>
<td class="ui-widget">
{% if post|length == 0 %}
{% if not get.idRecette is null %}
<input id="liste_recettes" style="width: 300px;" name="libelle_recette" value="{{ recette.libelle }}" />
{% else %}
<input id="liste_recettes" style="width: 300px;" name="libelle_recette"/>
{% endif %}
{% else %}
<input id="liste_recettes" style="width: 300px;" name="libelle_recette" value="{{ post.libelle_recette }}" />
{% endif %}
</td>
<td>
<input type="submit" value="Afficher" name="button_AfficherRecette"></input>
{% if (not post|length == 0) or (not get.idRecette is null) %}
<input type="button" value="Imprimer" name="button_Imprimer" onclick="window.location.href='recette_visualisation.php?impression=1&idRecette={{ recette.id }}'"></input>
<input type="button" value="Editer" name="button_EditerRecette2" onclick="window.location.href='recette_edition_vue.php?idRecette={{ recette.id }}'"></input>
{% endif %}
</td>
</tr>
</table>
{% if (not post.button_AfficherRecette is null) or (not get.idRecette is null) %}
<div class="recetteVisuTitre">{{ recette.libelle }}</div>
<label>Classement : {{ lireClassement }}</label>
<br /><br />
<table style="text-align: left; width: 100%; height: 40px;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td>Difficulté :
{% for i in 1..5 %}
{% if i <= recette.difficulte %}
<img alt="Difficulte" title="Difficulte" src="images/cheff_16_allume.png">
{% else %}
<img alt="Difficulte" title="Difficulte" src="images/cheff_16.png">
{% endif %}
{% endfor %}
</td>
<td>Appréciation :
{% for i in 1..5 %}
{% if i <= recette.appreciation %}
<img alt="Appreciation" title="Appreciation" src="images/favorits_16_allume.png">
{% else %}
<img alt="Appreciation" title="Appreciation" src="images/cheff_16.png">
{% endif %}
{% endfor %}
</td>
</tr>
<tr>
<td>
Temps de préparation : {{ recette.tempsPreparation }}
</td>
<td>
Temps de cuisson : {{ recette.tempsCuisson }}
</td>
</tr>
</tbody>
</table>
<div class="recetteVisuSousTitre">Commentaire</div>
{{ recette_commentaire|raw }}
<div class="recetteVisuSousTitre">Ingrédients</div>
<ul>
{% for ingredient in recette.ingredients %}
<li>
{{ ingredient.quantite }}
{% if ingredient.nomunite != 'inconnu' %}
{{ ingredient.nomunite }}
{% endif %}
{{ ingredient.nomingredient }}
</li>
{% endfor %}
</ul>
<div class="recetteVisuSousTitre">Préparation</div>
{{ recette_preparation|raw }}
{% endif %}
</form>