Update chrono add and list management
This commit is contained in:
parent
514807204a
commit
c3d34fe174
|
@ -24,7 +24,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body vh-100">
|
<div class="card-body vh-100">
|
||||||
<div class="table-responsive">
|
|
||||||
{% if gymnast %}
|
{% if gymnast %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
@ -75,12 +74,13 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6 pl-0 pr-0">
|
||||||
<canvas id="chart_chrono" class="chartjs" width="400" height="200"></canvas>
|
<canvas id="chart_chrono" class="chartjs" width="100%"></canvas>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if chrono_list %}
|
{% if chrono_list %}
|
||||||
|
<div class="table-responsive">
|
||||||
<table class="table table-striped tablesorter" id="chrono_table">
|
<table class="table table-striped tablesorter" id="chrono_table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -128,8 +128,8 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="text-muted">There are no chronos corresponding to your criterias.</p>
|
<p class="text-muted">There are no chronos corresponding to your criterias.</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -476,7 +476,7 @@ def chrono_create_or_update(request, chrono_id=None, gymnast_id=None):
|
||||||
)
|
)
|
||||||
|
|
||||||
return HttpResponseRedirect(
|
return HttpResponseRedirect(
|
||||||
reverse("gymnast_details_tab", args=(new_chrono.gymnast.id, "scores"))
|
reverse("chrono_list_for_gymnast", args=(new_chrono.gymnast.id,))
|
||||||
)
|
)
|
||||||
|
|
||||||
return render(request, "chronos/create.html", {"form": form})
|
return render(request, "chronos/create.html", {"form": form})
|
||||||
|
|
Loading…
Reference in New Issue