Recettes : on finalise la fonction d'impression de la recette

This commit is contained in:
2021-05-05 22:37:10 +02:00
parent 347fbf2d77
commit db09da198a
3 changed files with 37 additions and 23 deletions

View File

@@ -18,4 +18,5 @@ return array(
'Quantity proposed' => 'Quantité proposée', 'Quantity proposed' => 'Quantité proposée',
'Select' => 'Sélectionner', 'Select' => 'Sélectionner',
'Add to cart' => 'Ajouter ces produits au panier', 'Add to cart' => 'Ajouter ces produits au panier',
'Print recipe' => 'Imprimer la recette',
); );

View File

@@ -80,5 +80,16 @@ div.entete span b {
font-weight: bold; font-weight: bold;
} }
.bouton-imprimer { .bouton-imprimer {
margin: 20px 0;
text-align: center; text-align: center;
} }
@media print {
.footer-block,
header,
.nav-breadcrumb,
.table-ingredients tr:last-of-type,
#tarteaucitronAlertBig {
display: none !important;
}
}

View File

@@ -71,14 +71,14 @@
<td class="cellule-etroite"><input type="checkbox" name="pseid-{$PSE_ID}-qty-{$QUANTITY_PROPOSED}" class="cellule-checkbox"></td> <td class="cellule-etroite"><input type="checkbox" name="pseid-{$PSE_ID}-qty-{$QUANTITY_PROPOSED}" class="cellule-checkbox"></td>
</tr> </tr>
{/loop} {/loop}
<tr> <tr>
<td colspan="3"></td> <td colspan="3"></td>
<td> <td>
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-primary">{intl l='Add to cart' d='recettes'}</button> <button type="submit" class="btn btn-primary">{intl l='Add to cart' d='recettes'}</button>
</div> </div>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<br> <br>
@@ -89,21 +89,19 @@
</form> </form>
<br> <br>
<br> <br>
<table class="table table-striped table-steps"> <table class="table table-striped table-steps">
{loop type="recipe_steps" name="steps-loop" recipe_id=$ID} {loop type="recipe_steps" name="steps-loop" recipe_id=$ID}
<tr> <tr>
<td class="number">{$STEP}</td> <td class="number">{$STEP}</td>
<td class="description">{$DESCRIPTION}</td> <td class="description">{$DESCRIPTION}</td>
</tr> </tr>
{/loop} {/loop}
</table> </table>
</div>
{/loop} {/loop}
</article> </article>
<br> <div class="bouton-imprimer">
<button type="button" class="btn btn-primary bouton-imprimer">{intl l="Print recipe" d="recettes"}</button> <button type="button" class="btn btn-primary">{intl l="Print recipe" d="recettes"}</button>
<br> </div>
<br>
</div> </div>
{/if} {/if}
{/block} {/block}
@@ -123,5 +121,9 @@
} }
}); });
$(".bouton-imprimer button").click(function () {
window.print();
});
</script> </script>
{/block} {/block}