mirror of https://gitlab.federez.net/re2o/re2o
committed by
root
11 changed files with 288 additions and 8 deletions
@ -0,0 +1,28 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.10.7 on 2017-12-16 04:33 |
|||
from __future__ import unicode_literals |
|||
|
|||
import django.core.validators |
|||
from django.db import migrations, models |
|||
import django.db.models.deletion |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('contenttypes', '0002_remove_content_type_name'), |
|||
('preferences', '0026_auto_20171216_0401'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.CreateModel( |
|||
name='Jauge', |
|||
fields=[ |
|||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|||
('level_value', models.IntegerField(blank=True, null=True)), |
|||
('level_percentage', models.IntegerField(blank=True, null=True, validators=[django.core.validators.MaxValueValidator(100)])), |
|||
('comment', models.CharField(max_length=255)), |
|||
('objet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')), |
|||
], |
|||
), |
|||
] |
|||
@ -0,0 +1,20 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.10.7 on 2017-12-16 05:06 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations, models |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('preferences', '0027_jauge'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='jauge', |
|||
name='direction', |
|||
field=models.CharField(choices=[('croissant', 'croissant'), ('decroissant', 'decroissant')], default='croissant', max_length=32), |
|||
), |
|||
] |
|||
@ -0,0 +1,54 @@ |
|||
{% comment %} |
|||
Re2o est un logiciel d'administration développé initiallement au rezometz. Il |
|||
se veut agnostique au réseau considéré, de manière à être installable en |
|||
quelques clics. |
|||
|
|||
Copyright © 2017 Gabriel Détraz |
|||
Copyright © 2017 Goulven Kermarec |
|||
Copyright © 2017 Augustin Lemesle |
|||
|
|||
This program is free software; you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License as published by |
|||
the Free Software Foundation; either version 2 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License along |
|||
with this program; if not, write to the Free Software Foundation, Inc., |
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
|||
{% endcomment %} |
|||
|
|||
<table class="table table-striped"> |
|||
<thead> |
|||
<tr> |
|||
<th>Objet</th> |
|||
<th>Jauge en pourcentage</th> |
|||
<th>Jauge en valeur</th> |
|||
<th>Sens</th> |
|||
<th>Valeur recherchée</th> |
|||
<th>Etat</th> |
|||
<th></th> |
|||
</tr> |
|||
</thead> |
|||
{% for jauge in jauge_list %} |
|||
<tr> |
|||
<td>{{ jauge.objet }}</td> |
|||
<td>{{ jauge.level_percentage }}%</td> |
|||
<td>{{ jauge.level_value }}</td> |
|||
<td>{{ jauge.direction }}<td> |
|||
<td>{{ jauge.comment }}</td> |
|||
<td>{{ jauge.jauge_state }}<td> |
|||
<td class="text-right"> |
|||
{% if is_admin %} |
|||
{% include 'buttons/edit.html' with href='preferences:edit-jauge' id=jauge.id %} |
|||
{% endif %} |
|||
{% include 'buttons/history.html' with href='preferences:history' name='jauge' id=jauge.id %} |
|||
</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</table> |
|||
|
|||
Loading…
Reference in new issue