Calendar is now displayed on home page and recipes can be scheduled without being logged
This commit is contained in:
parent
ccb1248da3
commit
37721ac3ea
22 changed files with 538 additions and 166 deletions
|
|
@ -9,9 +9,10 @@
|
|||
{% if crate::data::model::can_user_edit_recipe(user, recipe) %}
|
||||
<a class="edit-recipe" href="/recipe/edit/{{ recipe.id }}" >Edit</a>
|
||||
{% endif %}
|
||||
<span class="add-to-planner">{{ tr.t(Sentence::CalendarAddToPlanner) }}</span>
|
||||
{% endif %}
|
||||
|
||||
<span class="add-to-planner">{{ tr.t(Sentence::CalendarAddToPlanner) }}</span>
|
||||
|
||||
<div class="tags">
|
||||
{% for tag in recipe.tags %}
|
||||
<span class="tag">{{ tag }}</span>
|
||||
|
|
@ -81,17 +82,21 @@
|
|||
|
||||
<div id="hidden-templates">
|
||||
{# To create a modal dialog to choose a date and and servings #}
|
||||
{% if let Some(user) = user %}
|
||||
<div class="date-and-servings" >
|
||||
{% include "calendar.html" %}
|
||||
<label for="input-servings">{{ tr.t(Sentence::RecipeServings) }}</label>
|
||||
<input
|
||||
id="input-servings"
|
||||
type="number"
|
||||
step="1" min="1" max="100"
|
||||
value="{{ user.default_servings }}"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="date-and-servings" >
|
||||
{% include "calendar.html" %}
|
||||
<label for="input-servings">{{ tr.t(Sentence::RecipeServings) }}</label>
|
||||
<input
|
||||
id="input-servings"
|
||||
type="number"
|
||||
step="1" min="1" max="100"
|
||||
value="
|
||||
{% if let Some(user) = user %}
|
||||
{{ user.default_servings }}
|
||||
{% else %}
|
||||
4
|
||||
{% endif %}
|
||||
"/>
|
||||
</div>
|
||||
|
||||
<span class="calendar-add-to-planner-success">{{ tr.t(Sentence::CalendarAddToPlannerSuccess) }}</span>
|
||||
<span class="calendar-add-to-planner-already-exists">{{ tr.t(Sentence::CalendarAddToPlannerAlreadyExists) }}</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue