Added a print button

All print-optimized pages have that
This commit is contained in:
Bernd Bestel 2021-08-06 20:16:02 +02:00
parent a3b03871a2
commit 7d4135ebf4
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 9 additions and 0 deletions

View File

@ -1055,3 +1055,8 @@ Grocy.Components.RecipePicker.GetPicker().on('change', function(e)
);
}
});
$("#print-meal-plan-button").on("click", function(e)
{
window.print();
});

View File

@ -92,6 +92,10 @@
</div>
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100 d-print-none"
id="related-links">
<a id="print-meal-plan-button"
class="btn btn-outline-dark m-1 mt-md-0 mb-md-0 float-right">
{{ $__t('Print') }}
</a>
<a class="btn btn-outline-secondary m-1 mt-md-0 mb-md-0 float-right"
href="{{ $U('/mealplansections') }}">
{{ $__t('Configure sections') }}