Routine UI improvement
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Gregory Trullemans 2022-01-08 12:03:07 +01:00
parent edfb858aa9
commit a157e8d147
2 changed files with 13 additions and 20 deletions

View File

@ -12,7 +12,7 @@
</div>
<div class="card-body">
{% if skill_link_list %}
<table class="table table-striped table-condensed col-6 offset-3">
<table class="table table-striped table-condensed col-6 offset-3" id="list_skill_table">
{% for link in skill_link_list %}
<tr>
<td></td>
@ -27,10 +27,10 @@
</tr>
</table>
<div class="row">
<div class="col-3 text-center">Niveau : {{ routine.level }}</div>
<div class="col-3 text-center">Rank : {{ routine.rank }}</div>
<div class="col-3 text-center">Age Boy : {{ routine.age_boy }}</div>
<div class="col-3 text-center">Age Girl : {{ routine.age_girl }}</div>
<div class="col-3 text-center">Niveau : <a href="#">{{ routine.level }}</a></div>
<div class="col-3 text-center">Rank : <a href="#">{{ routine.rank }}</a></div>
<div class="col-3 text-center">Age Boy : <a href="#">{{ routine.age_boy_masterised }}</a></div>
<div class="col-3 text-center">Age Girl : <a href="#">{{ routine.age_girl_masterised }}</a></div>
</div>
{% else %}
<p>No skill defined for this routine.</p>
@ -77,19 +77,12 @@
<script type="text/javascript" >
$(function(){
$('.plusButton').click(function(){
alert('Ajout !');
$(this).closest('li').append('<li><button type="button" class="btn btn-success plusButton">+</button>&nbsp;<button type="button" class="btn btn-warning minusButton">-</button>&nbsp;<input type="text" class="form-control col-sm-5" placeholder="Skill search…" /></li>');
//
});
$('.minusButton').click(function(){
alert('Suppression !');
$(this).closest('li').remove();
// appel à django pour supprimer l'élément et renuméroter les éléments restants.
// rename();
});
// $('#list_skill_table').DataTable({
// paging: false,
// searching: false,
// ordering: false,
// "bInfo" : false,
// });
});
</script>
{% endblock %}

View File

@ -49,8 +49,8 @@
<td class="text-center">{{ routine.difficulty }}</td>
<td class="text-center">{{ routine.level }}</td>
<td class="text-center">{{ routine.rank }}</td>
<td class="text-center">{{ routine.age_girl }}</td>
<td class="text-center">{{ routine.age_boy }}</td>
<td class="text-center">{{ routine.age_girl_masterised }}</td>
<td class="text-center">{{ routine.age_boy_masterised }}</td>
</tr>
{% endfor %}
</tbody>