Ajout lecture/édition des paramètres généraux
This commit is contained in:
parent
b628808493
commit
ee998f8a24
6 changed files with 114 additions and 3 deletions
|
@ -37,6 +37,9 @@
|
|||
{% if user.username != 'kfet_genericteam' %}
|
||||
<li><a href="{% url 'kfet.login.genericteam' %}" target="_blank" id="genericteam">Connexion standard</a></li>
|
||||
{% endif %}
|
||||
{% if perms.kfet.change_settings %}
|
||||
<li><a href="{% url 'kfet.settings' %}">Paramètres</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
|
24
kfet/templates/kfet/settings.html
Normal file
24
kfet/templates/kfet/settings.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
{% extends 'kfet/base.html' %}
|
||||
|
||||
{% block title %}Paramètres{% endblock %}
|
||||
{% block content-header-title %}Paramètres{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include 'kfet/base_messages.html' %}
|
||||
<table>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Nom</td>
|
||||
<td>Valeur</td>
|
||||
</tr>
|
||||
{% for setting in settings %}
|
||||
<tr>
|
||||
<td><a href="{% url 'kfet.settings.update' setting.pk %}">Modifier</a></td>
|
||||
<td>{{ setting.name }}</td>
|
||||
<td>{% firstof setting.value_decimal setting.value_duration setting.value_account %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
14
kfet/templates/kfet/settings_update.html
Normal file
14
kfet/templates/kfet/settings_update.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{% extends 'kfet/base.html' %}
|
||||
|
||||
{% block title %}Modification de {{ settings.name }}{% endblock %}
|
||||
{% block content-header-title %}Modification de {{ settings.name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" value="Mettre à jour">
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue