several recipe view improvements

This commit is contained in:
vabene1111
2020-07-15 18:05:12 +02:00
parent 1cea0350c9
commit c9f1576b24

View File

@ -218,9 +218,11 @@
{% endif %} {% endif %}
</div> </div>
<div v-if="recipe !== undefined && recipe.steps.length > 0">
<hr> <hr>
<h3>{% trans 'Instructions' %}</h3> <h3>{% trans 'Instructions' %}</h3>
<hr> <hr>
</div>
<div style="font-size: large;" v-if="recipe"> <div style="font-size: large;" v-if="recipe">
{% for s in recipe.steps.all %} {% for s in recipe.steps.all %}
@ -229,9 +231,8 @@
{% if recipe.steps.all|length > 1 %} {% if recipe.steps.all|length > 1 %}
<div class="card-title"> <div class="card-title">
<div class="row"> <div class="row d-flex">
<div class="col-md-12 text-muted d-flex"> <div class="col-md-8 text-muted ">
<div class="flex-fill">
{% if s.type == 'TEXT' %} {% if s.type == 'TEXT' %}
<i class="fas fa-paragraph fa-fw"></i> <i class="fas fa-paragraph fa-fw"></i>
{% elif s.type == 'TIME' %} {% elif s.type == 'TIME' %}
@ -243,14 +244,13 @@
- {{ s.time }} {% trans 'Minutes' %} - {{ s.time }} {% trans 'Minutes' %}
{% endif %} {% endif %}
</div> </div>
<div class="flex-grow-0 justify-content-end"> <div class="col-md-4 col-12 justify-content-end" v-if="has_times">
<input type="datetime-local" class="form-control" <input type="datetime-local" class="form-control"
@change="updateTimes(recipe.steps[{{ forloop.counter0 }}])" @change="updateTimes(recipe.steps[{{ forloop.counter0 }}])"
v-model="recipe.steps[{{ forloop.counter0 }}].time_finished"> v-model="recipe.steps[{{ forloop.counter0 }}].time_finished">
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="row" v-if="recipe.steps[{{ forloop.counter0 }}].ingredients.length > 0" <div class="row" v-if="recipe.steps[{{ forloop.counter0 }}].ingredients.length > 0"
style="margin-top: 1vh"> style="margin-top: 1vh">