Shopping list (WIP)
This commit is contained in:
parent
ce3821b94e
commit
084be9fb00
16 changed files with 296 additions and 90 deletions
|
|
@ -4,6 +4,20 @@
|
|||
|
||||
<div class="content" id="home">
|
||||
{% include "calendar.html" %}
|
||||
|
||||
<div id="shopping-list">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="hidden-templates">
|
||||
<div class="shopping-item">
|
||||
<input class="item-is-checked" type="checkbox"/>
|
||||
<div class="item-quantity"></div>
|
||||
<div class="item-name"></div>
|
||||
<div class="item-scheduled-recipe"><a></a></div>
|
||||
<div class="item-delete"></div>
|
||||
</div>
|
||||
<span class="calendar-date-format">{{ tr.t(Sentence::CalendarDateFormat) }}</span>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
{%+ if recipe.is_published %}
|
||||
checked
|
||||
{% endif %}
|
||||
>
|
||||
/>
|
||||
<label for="input-is-published">{{ tr.t(Sentence::RecipeIsPublished) }}</label>
|
||||
|
||||
<input id="input-delete" type="button" value="{{ tr.t(Sentence::RecipeDelete) }}" />
|
||||
|
|
@ -83,63 +83,63 @@
|
|||
</div>
|
||||
|
||||
<input id="input-add-group" type="button" value="{{ tr.t(Sentence::RecipeAddAGroup) }}" />
|
||||
</div>
|
||||
|
||||
<div id="hidden-templates">
|
||||
<div class="group">
|
||||
<span class="drag-handle"></span>
|
||||
<div id="hidden-templates">
|
||||
<div class="group">
|
||||
<span class="drag-handle"></span>
|
||||
|
||||
<label for="input-group-name">{{ tr.t(Sentence::RecipeGroupName) }}</label>
|
||||
<input class="input-group-name" type="text" />
|
||||
<label for="input-group-name">{{ tr.t(Sentence::RecipeGroupName) }}</label>
|
||||
<input class="input-group-name" type="text" />
|
||||
|
||||
<label for="input-group-comment">{{ tr.t(Sentence::RecipeGroupComment) }}</label>
|
||||
<input class="input-group-comment" type="text" />
|
||||
<label for="input-group-comment">{{ tr.t(Sentence::RecipeGroupComment) }}</label>
|
||||
<input class="input-group-comment" type="text" />
|
||||
|
||||
<input class="input-group-delete" type="button" value="{{ tr.t(Sentence::RecipeRemoveGroup) }}" />
|
||||
<input class="input-group-delete" type="button" value="{{ tr.t(Sentence::RecipeRemoveGroup) }}" />
|
||||
|
||||
<div class="steps">
|
||||
</div>
|
||||
|
||||
<input class="input-add-step" type="button" value="{{ tr.t(Sentence::RecipeAddAStep) }}" />
|
||||
<div class="steps">
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<span class="drag-handle"></span>
|
||||
|
||||
<label for="text-area-step-action">{{ tr.t(Sentence::RecipeStepAction) }}</label>
|
||||
<textarea class="text-area-step-action"></textarea>
|
||||
|
||||
<input class="input-step-delete" type="button" value="{{ tr.t(Sentence::RecipeRemoveStep) }}" />
|
||||
|
||||
<div class="ingredients"></div>
|
||||
|
||||
<input class="input-add-ingredient" type="button" value="{{ tr.t(Sentence::RecipeAddAnIngredient) }}"/>
|
||||
</div>
|
||||
|
||||
<div class="ingredient">
|
||||
<span class="drag-handle"></span>
|
||||
|
||||
<label for="input-ingredient-name">{{ tr.t(Sentence::RecipeIngredientName) }}</label>
|
||||
<input class="input-ingredient-name" type="text" />
|
||||
|
||||
<label for="input-ingredient-quantity">{{ tr.t(Sentence::RecipeIngredientQuantity) }}</label>
|
||||
<input class="input-ingredient-quantity" type="number" step="0.1" min="0" max="10000" />
|
||||
|
||||
<label for="input-ingredient-unit">{{ tr.t(Sentence::RecipeIngredientUnit) }}</label>
|
||||
<input class="input-ingredient-unit" type="text" />
|
||||
|
||||
<label for="input-ingredient-comment">{{ tr.t(Sentence::RecipeIngredientComment) }}</label>
|
||||
<input class="input-ingredient-comment" type="text" />
|
||||
|
||||
<input class="input-ingredient-delete" type="button" value="{{ tr.t(Sentence::RecipeRemoveIngredient) }}" />
|
||||
</div>
|
||||
|
||||
<div class="dropzone"></div>
|
||||
|
||||
<span class="recipe-delete-confirmation">{{ tr.t(Sentence::RecipeDeleteConfirmation) }}</span>
|
||||
<span class="recipe-group-delete-confirmation">{{ tr.t(Sentence::RecipeGroupDeleteConfirmation) }}</span>
|
||||
<span class="recipe-step-delete-confirmation">{{ tr.t(Sentence::RecipeStepDeleteConfirmation) }}</span>
|
||||
<span class="recipe-ingredient-delete-confirmation">{{ tr.t(Sentence::RecipeIngredientDeleteConfirmation) }}</span>
|
||||
<input class="input-add-step" type="button" value="{{ tr.t(Sentence::RecipeAddAStep) }}" />
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<span class="drag-handle"></span>
|
||||
|
||||
<label for="text-area-step-action">{{ tr.t(Sentence::RecipeStepAction) }}</label>
|
||||
<textarea class="text-area-step-action"></textarea>
|
||||
|
||||
<input class="input-step-delete" type="button" value="{{ tr.t(Sentence::RecipeRemoveStep) }}" />
|
||||
|
||||
<div class="ingredients"></div>
|
||||
|
||||
<input class="input-add-ingredient" type="button" value="{{ tr.t(Sentence::RecipeAddAnIngredient) }}"/>
|
||||
</div>
|
||||
|
||||
<div class="ingredient">
|
||||
<span class="drag-handle"></span>
|
||||
|
||||
<label for="input-ingredient-name">{{ tr.t(Sentence::RecipeIngredientName) }}</label>
|
||||
<input class="input-ingredient-name" type="text" />
|
||||
|
||||
<label for="input-ingredient-quantity">{{ tr.t(Sentence::RecipeIngredientQuantity) }}</label>
|
||||
<input class="input-ingredient-quantity" type="number" step="0.1" min="0" max="10000" />
|
||||
|
||||
<label for="input-ingredient-unit">{{ tr.t(Sentence::RecipeIngredientUnit) }}</label>
|
||||
<input class="input-ingredient-unit" type="text" />
|
||||
|
||||
<label for="input-ingredient-comment">{{ tr.t(Sentence::RecipeIngredientComment) }}</label>
|
||||
<input class="input-ingredient-comment" type="text" />
|
||||
|
||||
<input class="input-ingredient-delete" type="button" value="{{ tr.t(Sentence::RecipeRemoveIngredient) }}" />
|
||||
</div>
|
||||
|
||||
<div class="dropzone"></div>
|
||||
|
||||
<span class="recipe-delete-confirmation">{{ tr.t(Sentence::RecipeDeleteConfirmation) }}</span>
|
||||
<span class="recipe-group-delete-confirmation">{{ tr.t(Sentence::RecipeGroupDeleteConfirmation) }}</span>
|
||||
<span class="recipe-step-delete-confirmation">{{ tr.t(Sentence::RecipeStepDeleteConfirmation) }}</span>
|
||||
<span class="recipe-ingredient-delete-confirmation">{{ tr.t(Sentence::RecipeIngredientDeleteConfirmation) }}</span>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
|
@ -79,39 +79,39 @@
|
|||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div id="hidden-templates">
|
||||
{# To create a modal dialog to choose a date and and servings #}
|
||||
<div class="date-and-servings" >
|
||||
{% include "calendar.html" %}
|
||||
<div id="hidden-templates">
|
||||
{# To create a modal dialog to choose a date and and servings #}
|
||||
<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 %}
|
||||
"/>
|
||||
<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 %}
|
||||
"/>
|
||||
|
||||
<input
|
||||
id="input-add-ingredients-to-shopping-list"
|
||||
type="checkbox"
|
||||
checked
|
||||
>
|
||||
<label for="input-add-ingredients-to-shopping-list">
|
||||
{{ tr.t(Sentence::CalendarAddIngredientsToShoppingList) }}
|
||||
</label>
|
||||
</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>
|
||||
<span class="calendar-date-format">{{ tr.t(Sentence::CalendarDateFormat) }}</span>
|
||||
<input
|
||||
id="input-add-ingredients-to-shopping-list"
|
||||
type="checkbox"
|
||||
checked
|
||||
>
|
||||
<label for="input-add-ingredients-to-shopping-list">
|
||||
{{ tr.t(Sentence::CalendarAddIngredientsToShoppingList) }}
|
||||
</label>
|
||||
</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>
|
||||
<span class="calendar-date-format">{{ tr.t(Sentence::CalendarDateFormat) }}</span>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue