testing around

This commit is contained in:
vabene1111
2020-07-01 23:22:29 +02:00
parent adbc7e4a39
commit 0005ca243c
2 changed files with 284 additions and 266 deletions

View File

@@ -28,10 +28,14 @@
{% endblock %}
{% block content %}
<h3>{% trans 'Edit Recipe' %}</h3>
<div id="app">
<div v-if="recipe">
<div v-if="!recipe" class="text-center">
<br/>
<i class="fas fa-spinner fa-spin fa-8x"></i>
</div>
<div v-if="recipe">
<div class="row">
@@ -330,7 +334,8 @@
</div>
</div>
</div>
{% endblock %}
{% block content_xl_right %}
@@ -355,7 +360,8 @@
<div class="col-md-11">
<h5><i class="fas fa-sort-amount-down-alt"></i> {% trans 'Steps' %}</h5>
<draggable :list="recipe.steps" group="steps_sorter"
:empty-insert-threshold="10" handle=".handle" @sort="sortSteps()" class="list-group" style="margin-top: 1vh">
:empty-insert-threshold="10" handle=".handle" @sort="sortSteps()" class="list-group"
style="margin-top: 1vh">
<div v-for="step, step_index in recipe.steps" class="list-group-item">
<div class="d-flex justify-content-center align-items-center">
<div class="flex-grow-0 text-muted">
@@ -397,6 +403,7 @@
foods_loading: false,
units: [],
units_loading: false,
message: '',
},
directives: {
tabindex: {

View File

@@ -215,7 +215,19 @@
{% if recipe.steps.all|length > 1 %}
<div class="row">
<div class="col-md-12 text-muted">
<small>{% trans 'Step' %} {{ forloop.counter }}{% if s.name %} - {{ s.name }}{% endif %}</small>
<small>
{% if s.type == 'TEXT' %}
<i class="fas fa-paragraph fa-fw"></i>
{% elif s.type == 'TIME' %}
<i class="fas fa-clock fa-fw"></i>
{% endif %}
{% if s.name %}{{ s.name }}{% else %}{% trans 'Step' %}
{{ forloop.counter }}{% endif %}
{% if s.type == 'TIME' %}
- {{ s.time }} {% trans 'Minutes' %}
{% endif %}
</small>
</div>
</div>
{% endif %}
@@ -246,7 +258,6 @@
width="100%"
height="700px"
style="border: none;"></iframe>
</div>
{% endif %}
{% if '.jpg' in recipe.file_path or '.png' in recipe.file_path or '.jpeg' in recipe.file_path %}