mirror of
https://github.com/nanoy42/coope
synced 2024-11-22 11:23:11 +00:00
Ajour d'icones
This commit is contained in:
parent
7907a91d7e
commit
be65967e3c
22 changed files with 96 additions and 96 deletions
|
@ -13,13 +13,13 @@
|
|||
<h2>Liste des fûts actifs</h2>
|
||||
</header>
|
||||
{% if perms.gestion.add_keg %}
|
||||
<a class="button" href="{% url 'gestion:addKeg' %}">Créer un fût</a>
|
||||
<a class="button" href="{% url 'gestion:addKeg' %}"><i class="fa fa-plus-square"></i> Créer un fût</a>
|
||||
{% endif %}
|
||||
{% if perms.gestion.open_keg %}
|
||||
<a class="button" href="{% url 'gestion:openKeg' %}">Percuter un fût</a>
|
||||
<a class="button" href="{% url 'gestion:openKeg' %}"><i class="fa fa-fill-drip"></i> Percuter un fût</a>
|
||||
{% endif %}
|
||||
{% if perms.gestion.close_keg %}
|
||||
<a class="button" href="{% url 'gestion:closeKeg' %}">Fermer un fût</a>
|
||||
<a class="button" href="{% url 'gestion:closeKeg' %}"><i class="fa fa-fill"></i> Fermer un fût</a>
|
||||
{% endif %}
|
||||
<br><br>
|
||||
<div class="table-wrapper">
|
||||
|
@ -48,7 +48,7 @@
|
|||
<td>{{ kegH.amountSold }} €</td>
|
||||
<td>{{ kegH.keg.amount }} €</td>
|
||||
<td><a href="{% url 'gestion:kegH' kegH.keg.pk %}">Voir</a></td>
|
||||
<td>{% if perms.gestion.close_keg %}<a href="{% url 'gestion:closeDirectKeg' kegH.keg.pk %}" class="button small">Fermer</a> {% endif %}{% if perms.gestion.change_keg %}<a href="{% url 'gestion:editKeg' kegH.keg.pk %}" class="button small">Modifier</a>{% endif %}</td>
|
||||
<td>{% if perms.gestion.close_keg %}<a href="{% url 'gestion:closeDirectKeg' kegH.keg.pk %}" class="button small"><i class="fa fa-fill"></i> Fermer</a> {% endif %}{% if perms.gestion.change_keg %}<a href="{% url 'gestion:editKeg' kegH.keg.pk %}" class="button small"><i class="fa fa-pencil-alt"></i> Modifier</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
@ -60,13 +60,13 @@
|
|||
<h2>Liste des fûts inactifs</h2>
|
||||
</header>
|
||||
{% if perms.gestion.add_keg %}
|
||||
<a class="button" href="{% url 'gestion:addKeg' %}">Créer un fût</a>
|
||||
<a class="button" href="{% url 'gestion:addKeg' %}"><i class="fa fa-plus-square"></i> Créer un fût</a>
|
||||
{% endif %}
|
||||
{% if perms.gestion.open_keg %}
|
||||
<a class="button" href="{% url 'gestion:openKeg' %}">Percuter un fût</a>
|
||||
<a class="button" href="{% url 'gestion:openKeg' %}"><i class="fa fa-fill-drip"></i> Percuter un fût</a>
|
||||
{% endif %}
|
||||
{% if perms.gestion.close_keg %}
|
||||
<a class="button" href="{% url 'gestion:closeKeg' %}">Fermer un fût</a>
|
||||
<a class="button" href="{% url 'gestion:closeKeg' %}"><i class="fa fa-fill"></i> Fermer un fût</a>
|
||||
{% endif %}
|
||||
<br><br>
|
||||
<div class="table-wrapper">
|
||||
|
@ -91,7 +91,7 @@
|
|||
<td>{{ keg.capacity }} L</td>
|
||||
<td>{{ keg.amount }} €</td>
|
||||
<td><a href="{% url 'gestion:kegH' keg.pk %}">Voir</a></td>
|
||||
<td>{% if perms.gestion.open_keg %}{% if keg.stockHold > 0 %}<a href="{% url 'gestion:openDirectKeg' keg.pk %}" class="button small">Percuter</a> {% endif %}{% endif %}{% if perms.gestion.change_keg %}<a href="{% url 'gestion:editKeg' keg.pk %}" class="button small">Modifier</a>{% endif %}</td>
|
||||
<td>{% if perms.gestion.open_keg %}{% if keg.stockHold > 0 %}<a href="{% url 'gestion:openDirectKeg' keg.pk %}" class="button small"><i class="fa fa-fill-drip"></i> Percuter</a> {% endif %}{% endif %}{% if perms.gestion.change_keg %}<a href="{% url 'gestion:editKeg' keg.pk %}" class="button small"><i class="fa fa-pencil-alt"></i> Modifier</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
</header>
|
||||
<div class="row uniform">
|
||||
<div class="12u$">
|
||||
<a class="button small" href="">Annuler</a><br><br>
|
||||
<a class="button small" href=""><i class="fa fa-times"></i> Annuler</a><br><br>
|
||||
{{gestion_form}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -214,7 +214,7 @@
|
|||
{% csrf_token %}
|
||||
{{reload_form}}
|
||||
<br>
|
||||
<button type="submit">Recharger</button>
|
||||
<button type="submit"><i class="fa fa-hand-holding-usd"></i> Recharger</button>
|
||||
</form>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
@ -227,7 +227,7 @@
|
|||
{% csrf_token %}
|
||||
{{refund_form}}
|
||||
<br>
|
||||
<button type="submit">Rembourser</button>
|
||||
<button type="submit"><i class="fa fa-file-invoice-dollar"></i> Rembourser</button>
|
||||
</form>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<header class="major">
|
||||
<h2>Liste des menus</h2>
|
||||
</header>
|
||||
<a class="button" href="{% url 'gestion:addMenu' %}">Créer un menu</a><br><br>
|
||||
<a class="button" href="{% url 'gestion:addMenu' %}"><i class="fa fa-plus-square"></i> Créer un menu</a><br><br>
|
||||
<div class="table-wrapper">
|
||||
<table>
|
||||
<thead>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<td>{{ menu.barcode }}</td>
|
||||
<td>{% for art in menu.articles.all %}<a href="{% url 'gestion:productProfile' art.pk %}">{{art}}</a>,{% endfor %}</td>
|
||||
<td>{{ menu.is_active | yesno:"Oui, Non"}}</td>
|
||||
<td>{% if perms.gestion.change_menu %}<a href="{% url 'gestion:switchActivateMenu' menu.pk %}" class="button small">{% if menu.is_active %}Désa{% else %}A{% endif %}ctiver</a> <a href="{% url 'gestion:editMenu' menu.pk %}" class="button small">Modifier</a>{% endif %}</td>
|
||||
<td>{% if perms.gestion.change_menu %}<a href="{% url 'gestion:switchActivateMenu' menu.pk %}" class="button small">{% if menu.is_active %}<i class="fa fa-times-cirlce"></i> Désa{% else %}<i class="fa fa-check-circle"></i> A{% endif %}ctiver</a> <a href="{% url 'gestion:editMenu' menu.pk %}" class="button small"><i class="fa fa-pencil-alt"></i> Modifier</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<h2>Général</h2>
|
||||
</header>
|
||||
{% if perms.gestion.add_pinte %}
|
||||
<a class="button" href="{% url 'gestion:addPintes' %}">Créer une ou plusieurs pintes</a><br><br>
|
||||
<a class="button" href="{% url 'gestion:addPintes' %}"><i class="fa fa-glass-whiskey"></i> Créer une ou plusieurs pintes</a><br><br>
|
||||
{% endif %}
|
||||
Il a y actuellement {{ taken_pintes.count|add:free_pintes.count }} pintes, parmis lesquelles <strong>{{ free_pintes.count }} sont rendues</strong> et <strong>{{ taken_pintes.count }} ne sont pas rendues</strong>.
|
||||
</section>
|
||||
|
@ -37,10 +37,10 @@
|
|||
{% for pinte in taken_pintes %}
|
||||
<tr>
|
||||
<td>{{ pinte.pk }}</td>
|
||||
<td>{{ pinte.current_owner }}</td>
|
||||
<td>{{ pinte.previous_owner }}</td>
|
||||
<td>{% if pinte.current_owner %}<a href="{% url 'users:profile' pinte.current_owner.pk %}">{{ pinte.current_owner }}</a>{% endif %}</td>
|
||||
<td>{% if pinte.previous_owner %}<a href="{% url 'users:profile' pinte.previous_owner.pk %}">{{ pinte.previous_owner }}</a>{% endif %}</td>
|
||||
<td>{{ pinte.last_update_date }}</td>
|
||||
<td>{% if perms.gestion.change_pinte %} <a href="{% url 'gestion:release' pinte.pk %}" class="button small">Libérer</a>{% endif %}</td>
|
||||
<td>{% if perms.gestion.change_pinte %} <a href="{% url 'gestion:release' pinte.pk %}" class="button small"><i class="fa fa-glass-whiskey"></i> Libérer</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
@ -64,7 +64,7 @@
|
|||
{% for pinte in free_pintes %}
|
||||
<tr>
|
||||
<td>{{ pinte.pk }}</td>
|
||||
<td>{{ pinte.previous_owner }}</td>
|
||||
<td>{% if pinte.previous_owner %}<a href="{% url 'users:profile' pinte.previous_owner.pk %}">{{ pinte.previous_owner }}</a>{% endif %}</td>
|
||||
<td>{{ pinte.last_update_date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
{% for user in users %}
|
||||
<tr>
|
||||
<td><a href="{% url 'users:profile' user.pk">{{user}}</a></td>
|
||||
<td><a href="{% url 'users:profile' user.pk %}" class="button small">Profil</a></td>
|
||||
<td><a href="{% url 'users:profile' user.pk %}" class="button small"><i class="fa fa-user"></i> Profil</a></td>
|
||||
<td>{{ user.pintes_owned_currently.count }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<h2>Liste des produits</h2>
|
||||
</header>
|
||||
{% if perms.gestion.add_product %}
|
||||
<a class="button" href="{% url 'gestion:addProduct' %}">Créer un produit</a><br><br>
|
||||
<a class="button" href="{% url 'gestion:addProduct' %}"><i class="fa fa-boxes"></i> Créer un produit</a><br><br>
|
||||
{% endif %}
|
||||
<div class="table-wrapper">
|
||||
<table>
|
||||
|
@ -41,7 +41,7 @@
|
|||
<td>{{ product.is_active | yesno:"Oui, Non"}}</td>
|
||||
<td>{{ product.deg }}</td>
|
||||
<td>{{ product.volume }} cl</td>
|
||||
<td><a href="{% url 'gestion:productProfile' product.pk %}" class="button small">Profil</a> {% if perms.gestion.change_product %}<a href="{% url 'gestion:switchActivate' product.pk %}" class="button small">{% if product.is_active %}Désa{% else %}A{% endif %}ctiver</a> <a href="{% url 'gestion:editProduct' product.pk %}" class="button small">Modifier</a>{% endif %}</td>
|
||||
<td><a href="{% url 'gestion:productProfile' product.pk %}" class="button small"><i class="fa fa-eye"></i> Profil</a> {% if perms.gestion.change_product %}<a href="{% url 'gestion:switchActivate' product.pk %}" class="button small">{% if product.is_active %}<i class="fa fa-times-circle"></i> Désa{% else %}<i class="fa fa-check-circle"></i> A{% endif %}ctiver</a> <a href="{% url 'gestion:editProduct' product.pk %}" class="button small"><i class="fa fa-pencil-alt"></i> Modifier</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -341,7 +341,7 @@ def addProduct(request):
|
|||
product = form.save()
|
||||
messages.success(request, "Le produit a bien été ajouté")
|
||||
return redirect(reverse('gestion:productProfile', kwargs={'pk':product.pk}))
|
||||
return render(request, "form.html", {"form": form, "form_title": "Ajout d'un produit", "form_button": "Ajouter"})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Ajout d'un produit", "form_button": "Ajouter", "form_button_icon": "plus-square"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -374,7 +374,7 @@ def editProduct(request, pk):
|
|||
form.save()
|
||||
messages.success(request, "Le produit a bien été modifié")
|
||||
return redirect(reverse('gestion:productProfile', kwargs={'pk':product.pk}))
|
||||
return render(request, "form.html", {"form": form, "form_title": "Modification d'un produit", "form_button": "Modifier"})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Modification d'un produit", "form_button": "Modifier", "form_button_icon": "pencil-alt"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -420,7 +420,7 @@ def searchProduct(request):
|
|||
form = SearchProductForm(request.POST or None)
|
||||
if(form.is_valid()):
|
||||
return redirect(reverse('gestion:productProfile', kwargs={'pk': form.cleaned_data['product'].pk }))
|
||||
return render(request, "form.html", {"form": form, "form_title":"Rechercher un produit", "form_button": "Rechercher"})
|
||||
return render(request, "form.html", {"form": form, "form_title":"Rechercher un produit", "form_button": "Rechercher", "form_button_icon": "search"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -526,7 +526,7 @@ def addKeg(request):
|
|||
keg = form.save()
|
||||
messages.success(request, "Le fût " + keg.name + " a bien été ajouté")
|
||||
return redirect(reverse('gestion:kegsList'))
|
||||
return render(request, "form.html", {"form":form, "form_title": "Ajout d'un fût", "form_button": "Ajouter"})
|
||||
return render(request, "form.html", {"form":form, "form_title": "Ajout d'un fût", "form_button": "Ajouter", "form_button_icon": "plus-square"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -559,7 +559,7 @@ def editKeg(request, pk):
|
|||
form.save()
|
||||
messages.success(request, "Le fût a bien été modifié")
|
||||
return redirect(reverse('gestion:kegsList'))
|
||||
return render(request, "form.html", {"form": form, "form_title": "Modification d'un fût", "form_button": "Modifier"})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Modification d'un fût", "form_button": "Modifier", "form_button_icon": "pencil-alt"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -598,7 +598,7 @@ def openKeg(request):
|
|||
keg.save()
|
||||
messages.success(request, "Le fut a bien été percuté")
|
||||
return redirect(reverse('gestion:kegsList'))
|
||||
return render(request, "form.html", {"form": form, "form_title":"Percutage d'un fût", "form_button":"Percuter"})
|
||||
return render(request, "form.html", {"form": form, "form_title":"Percutage d'un fût", "form_button":"Percuter", "form_button_icon": "fill-drip"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -660,7 +660,7 @@ def closeKeg(request):
|
|||
keg.save()
|
||||
messages.success(request, "Le fût a bien été fermé")
|
||||
return redirect(reverse('gestion:kegsList'))
|
||||
return render(request, "form.html", {"form": form, "form_title":"Fermeture d'un fût", "form_button":"Fermer le fût"})
|
||||
return render(request, "form.html", {"form": form, "form_title":"Fermeture d'un fût", "form_button":"Fermer le fût", "form_button_icon": "fill"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -785,7 +785,7 @@ def addMenu(request):
|
|||
menu = form.save()
|
||||
messages.success(request, "Le menu " + menu.name + " a bien été ajouté")
|
||||
return redirect(reverse('gestion:menusList'))
|
||||
return render(request, "form.html", {"form":form, "form_title": "Ajout d'un menu", "form_button": "Ajouter", "extra_css": extra_css})
|
||||
return render(request, "form.html", {"form":form, "form_title": "Ajout d'un menu", "form_button": "Ajouter", "form_button_icon": "plus-square", "extra_css": extra_css})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -819,7 +819,7 @@ def edit_menu(request, pk):
|
|||
form.save()
|
||||
messages.success(request, "Le menu a bien été modifié")
|
||||
return redirect(reverse('gestion:menusList'))
|
||||
return render(request, "form.html", {"form": form, "form_title": "Modification d'un menu", "form_button": "Modifier", "extra_css": extra_css})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Modification d'un menu", "form_button": "Modifier", "form_button_icon": "pencil-alt", "extra_css": extra_css})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -847,7 +847,7 @@ def searchMenu(request):
|
|||
if(form.is_valid()):
|
||||
menu = form.cleaned_data['menu']
|
||||
return redirect(reverse('gestion:editMenu', kwargs={'pk':menu.pk}))
|
||||
return render(request, "form.html", {"form": form, "form_title": "Recherche d'un menu", "form_button": "Modifier"})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Recherche d'un menu", "form_button": "Modifier", "form_button_icon": "search"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -989,7 +989,7 @@ def add_pintes(request):
|
|||
i += 1
|
||||
messages.success(request, str(i) + " pinte(s) a(ont) été ajoutée(s)")
|
||||
return redirect(reverse('gestion:productsIndex'))
|
||||
return render(request, "form.html", {"form": form, "form_title": "Ajouter des pintes", "form_button": "Ajouter"})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Ajouter des pintes", "form_button": "Ajouter", "form_button_icon": "plus-square"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -1008,7 +1008,7 @@ def release_pintes(request):
|
|||
i += 1
|
||||
messages.success(request, str(i) + " pinte(s) a(ont) été libérée(s)")
|
||||
return redirect(reverse('gestion:productsIndex'))
|
||||
return render(request, "form.html", {"form": form, "form_title": "Libérer des pintes", "form_button": "Libérer"})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Libérer des pintes", "form_button": "Libérer", "form_button_icon": "glass-whiskey"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -1072,4 +1072,4 @@ def gen_releve(request):
|
|||
now = datetime.datetime.now()
|
||||
return render_to_pdf(request, 'gestion/releve.tex', {"consumptions": consumptions, "reloads": reloads, "refunds": refunds, "cotisations": cotisations, "begin": begin, "end": end, "now": now, "value_especes": value_especes, "value_lydia": value_lydia, "value_cheque": value_cheque}, filename="releve.pdf")
|
||||
else:
|
||||
return render(request, "form.html", {"form": form, "form_title": "Génération d'un relevé", "form_button": "Générer"})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Génération d'un relevé", "form_button": "Générer", "form_button_icon": "file-pdf"})
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<h2>Liste des cotisations</h2>
|
||||
</header>
|
||||
{% if perms.preferences.add_cotisation %}
|
||||
<a class="button" href="{% url 'preferences:addCotisation' %}">Créer une cotisation</a><br><br>
|
||||
<a class="button" href="{% url 'preferences:addCotisation' %}"><i class="fa fa-plus-square"></i> Créer une cotisation</a><br><br>
|
||||
{% endif %}
|
||||
<div class="table-wrapper">
|
||||
<table>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<tr>
|
||||
<td>{{ cotisation.duration }} jours</td>
|
||||
<td>{{ cotisation.amount }} €</td>
|
||||
<td>{% if perms.preferences.change_cotisation %}<a class="button small" href="{% url 'preferences:editCotisation' cotisation.pk %}">Modifier</a> {% endif %}{% if perms.preferences.delete_cotisation %}<a class="button small" href="{% url 'preferences:deleteCotisation' cotisation.pk %}">Supprimer</a>{% endif %}</td>
|
||||
<td>{% if perms.preferences.change_cotisation %}<a class="button small" href="{% url 'preferences:editCotisation' cotisation.pk %}"><i class="fa fa-pencil-alt"></i> Modifier</a> {% endif %}{% if perms.preferences.delete_cotisation %}<a class="button small" href="{% url 'preferences:deleteCotisation' cotisation.pk %}"><i class="fa fa-trash"></i> Supprimer</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</div>
|
||||
<div class="row uniform">
|
||||
<div class="12u">
|
||||
<button type="submit">Enregistrer</button>
|
||||
<button type="submit"><i class="fa fa-save"></i> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -51,7 +51,7 @@
|
|||
</div>
|
||||
<div class="row uniform">
|
||||
<div class="12u">
|
||||
<button type="submit">Enregistrer</button>
|
||||
<button type="submit"><i class="fa fa-save"></i> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -89,7 +89,7 @@
|
|||
</div>
|
||||
<div class="row uniform">
|
||||
<div class="12u">
|
||||
<button type="submit">Enregistrer</button>
|
||||
<button type="submit"><i class="fa fa-save"></i> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -115,7 +115,7 @@
|
|||
</div>
|
||||
<div class="row uniform">
|
||||
<div class="12u">
|
||||
<button type="submit">Enregistrer</button>
|
||||
<button type="submit"><i class="fa fa-save"></i> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -135,7 +135,7 @@
|
|||
</div>
|
||||
<div class="row uniform">
|
||||
<div class="12u">
|
||||
<button type="submit">Enregistrer</button>
|
||||
<button type="submit"><i class="fa fa-save"></i> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<h2>Liste des moyens de paiement</h2>
|
||||
</header>
|
||||
{% if perms.preferences.add_paymentmethod %}
|
||||
<a class="button" href="{% url 'preferences:addPaymentMethod' %}">Créer un moyen de paiement</a><br><br>
|
||||
<a class="button" href="{% url 'preferences:addPaymentMethod' %}"><i class="fa fa-plus-square"></i> Créer un moyen de paiement</a><br><br>
|
||||
{% endif %}
|
||||
<div class="table-wrapper">
|
||||
<table>
|
||||
|
@ -35,7 +35,7 @@
|
|||
<td>{{ pm.is_usable_in_reload | yesno:"Oui, Non" }}</td>
|
||||
<td>{{ pm.affect_balance | yesno:"Oui, Non" }}</td>
|
||||
<td><i class="fa fa-{{ pm.icon }}"></i></td>
|
||||
<td>{% if perms.preferences.change_paymentmethod %}<a class="button small" href="{% url 'preferences:editPaymentMethod' pm.pk %}">Modifier</a> {% endif %}{% if perms.preferences.delete_paymentmethod %}<a class="button small" href="{% url 'preferences:deletePaymentMethod' pm.pk %}">Supprimer</a>{% endif %}</td>
|
||||
<td>{% if perms.preferences.change_paymentmethod %}<a class="button small" href="{% url 'preferences:editPaymentMethod' pm.pk %}"><i class="fa fa-pencil-alt"></i> Modifier</a> {% endif %}{% if perms.preferences.delete_paymentmethod %}<a class="button small" href="{% url 'preferences:deletePaymentMethod' pm.pk %}"><i class="fa fa-trash"></i> Supprimer</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -84,7 +84,7 @@ def addCotisation(request):
|
|||
cotisation = form.save()
|
||||
messages.success(request, "La cotisation (" + str(cotisation.duration) + " jours, " + str(cotisation.amount) + "€) a bien été créée")
|
||||
return redirect(reverse('preferences:cotisationsIndex'))
|
||||
return render(request, "form.html", {"form": form, "form_title": "Création d'une cotisation", "form_button": "Créer"})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Création d'une cotisation", "form_button": "Créer", "form_button_icon": "plus-square"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -117,7 +117,7 @@ def editCotisation(request, pk):
|
|||
cotisation = form.save()
|
||||
messages.success(request, "La cotisation (" + str(cotisation.duration) + " jours, " + str(cotisation.amount) + "€) a bien été modifiée")
|
||||
return redirect(reverse('preferences:cotisationsIndex'))
|
||||
return render(request, "form.html", {"form": form, "form_title": "Modification d'une cotisation", "form_button": "Modifier"})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Modification d'une cotisation", "form_button": "Modifier", "form_button_icon": "pencil-alt"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -184,7 +184,7 @@ def addPaymentMethod(request):
|
|||
paymentMethod = form.save()
|
||||
messages.success(request, "Le moyen de paiement " + paymentMethod.name + " a bien été crée")
|
||||
return redirect(reverse('preferences:paymentMethodsIndex'))
|
||||
return render(request, "form.html", {"form": form, "form_title": "Création d'un moyen de paiement", "form_button": "Créer"})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Création d'un moyen de paiement", "form_button": "Créer", "form_button_icon": "plus-square"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -217,7 +217,7 @@ def editPaymentMethod(request, pk):
|
|||
paymentMethod = form.save()
|
||||
messages.success(request, "Le moyen de paiment " + paymentMethod.name + " a bien été modifié")
|
||||
return redirect(reverse('preferences:paymentMethodsIndex'))
|
||||
return render(request, "form.html", {"form": form, "form_title": "Modification d'un moyen de paiement", "form_button": "Modifier"})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Modification d'un moyen de paiement", "form_button": "Modifier", "form_button_icon": "pencil-alt"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<br>
|
||||
<button type="submit">{{form_button}}</button>
|
||||
<button type="submit"><i class="fa fa-{{form_button_icon}}"></i> {{form_button}}</button>
|
||||
</form>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
@ -45,5 +45,5 @@
|
|||
<i class="fa fa-bed"></i> <a href="{% url 'users:logout' %}">Deconnexion</a>
|
||||
</span>
|
||||
{% else %}
|
||||
<i class="fa fa-sign-in"></i> <a href="{% url 'users:login' %}">Connexion</a>
|
||||
<i class="fa fa-sign-in-alt"></i> <a href="{% url 'users:login' %}">Connexion</a>
|
||||
{% endif %}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<header class="major">
|
||||
<h2>Liste des admins</h2>
|
||||
</header>
|
||||
<a class="button" href="{% url 'users:addAdmin' %}">Ajouter un admin</a><br><br>
|
||||
<a class="button" href="{% url 'users:addAdmin' %}"><i class="fa fa-user-plus"></i> Ajouter un admin</a><br><br>
|
||||
<div class="table-wrapper">
|
||||
<table>
|
||||
<thead>
|
||||
|
@ -24,8 +24,8 @@
|
|||
{% for user in admins %}
|
||||
<tr>
|
||||
<td><a href="{% url 'users:profile' user.pk %}">{{ user }}</a>{ {% if user.is_superuser %}(superuser){% endif %}</td>
|
||||
<td><a class="button small" href="{% url 'users:profile' user.pk %}">Profil</a></td>
|
||||
<td>{% if not user.is_superuser %}<a class="button small" href="{% url 'users:removeAdmin' user.pk %}">Retirer des admins</a>{% endif %}</td>
|
||||
<td><a class="button small" href="{% url 'users:profile' user.pk %}"><i class="fa fa-user"></i> Profil</a></td>
|
||||
<td>{% if not user.is_superuser %}<a class="button small" href="{% url 'users:removeAdmin' user.pk %}"><i class="fa fa-minus-square"></i> Retirer des admins</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -21,12 +21,12 @@
|
|||
<div class="row">
|
||||
{% if perms.auth.change_group %}
|
||||
<div class="6u">
|
||||
<a class="button" href="{% url 'users:editGroup' group.pk %}">Éditer</a>
|
||||
<a class="button" href="{% url 'users:editGroup' group.pk %}"><i class="fa fa-pencil-alt"></i> Éditer</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if perms.auth.delete_group %}
|
||||
<div class="6u">
|
||||
<a class="button" href="{% url 'users:deleteGroup' group.pk %}">Supprimer</a>
|
||||
<a class="button" href="{% url 'users:deleteGroup' group.pk %}"><i class="fa fa-trash"></i> Supprimer</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -49,7 +49,7 @@
|
|||
<tr>
|
||||
<td>{{perm.codename}}</td>
|
||||
<td>{{perm.name}}</td>
|
||||
<td><a class="button small" href="{% url 'users:removeRight' group.pk perm.pk %}">Enlever le droit</a></td>
|
||||
<td><a class="button small" href="{% url 'users:removeRight' group.pk perm.pk %}"><i class="fa fa-minus-square"></i> Enlever le droit</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
@ -72,9 +72,9 @@
|
|||
<tbody>
|
||||
{% for user in group.user_set.all %}
|
||||
<tr>
|
||||
<td><a href="{% url 'profile:users' user.pk %}">{{user}}</a></td>
|
||||
<td><a class="button small" href="{% url 'users:profile' user.pk %}">Profil</a></td>
|
||||
<td><a class="button small" href="{% url 'users:removeUser' group.pk user.pk %}">Retirer</a></td>
|
||||
<td><a href="{% url 'users:profile' user.pk %}">{{user}}</a></td>
|
||||
<td><a class="button small" href="{% url 'users:profile' user.pk %}"><i class="fa fa-user"></i> Profil</a></td>
|
||||
<td><a class="button small" href="{% url 'users:removeUser' group.pk user.pk %}"><i class="fa fa-minus-square"></i> Retirer</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<h2>Liste des groupes de droit</h2>
|
||||
</header>
|
||||
{% if perms.auth.add_group %}
|
||||
<a href="{% url 'users:createGroup' %}" class="button">Ajouter un groupe de droit</a><br><br>
|
||||
<a href="{% url 'users:createGroup' %}" class="button"><i class="fa fa-plus-square"></i> Ajouter un groupe de droit</a><br><br>
|
||||
{% endif %}
|
||||
<div class="table-wrapper">
|
||||
<table>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<td>{{ group.name }}</td>
|
||||
<td>{{ group.permissions.count }}</td>
|
||||
<td>{{ group.user_set.count }}</td>
|
||||
<td><a href="{% url 'users:groupProfile' group.pk %}" class="button small">Voir</a> {% if perms.auth.change_group %}<a href="{% url 'users:editGroup' group.pk %}" class="button small">Éditer</a> {% endif %}{% if perms.auth.delete_group %}<a href="{% url 'users:deleteGroup' group.pk %}" class="button small">Supprimer</a>{% endif %}</td>
|
||||
<td><a href="{% url 'users:groupProfile' group.pk %}" class="button small"><i class="fa fa-eye"></i> Voir</a> {% if perms.auth.change_group %}<a href="{% url 'users:editGroup' group.pk %}" class="button small"><i class="fa fa-pencil-alt"></i> Éditer</a> {% endif %}{% if perms.auth.delete_group %}<a href="{% url 'users:deleteGroup' group.pk %}" class="button small"><i class="fa fa-trash"></i> Supprimer</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
{% csrf_token %}
|
||||
{{export_form}}
|
||||
<br>
|
||||
<button class="button" target="_blank">Exporter au format csv</button>
|
||||
<button class="button" target="_blank"><i class="fa fa-file-csv"></i> Exporter au format csv</button>
|
||||
</form>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
|
|
@ -52,19 +52,19 @@
|
|||
<ul class="alt">
|
||||
<li>
|
||||
{% if self or perms.users.can_change_user %}
|
||||
<span><a href="{% url 'users:editUser' user.pk %}">Modifier {{self | yesno:"mes,les"}} informations</a></span>
|
||||
<span><a href="{% url 'users:editUser' user.pk %}"><i class="fa fa-pencil-alt"></i> Modifier {{self | yesno:"mes,les"}} informations</a></span>
|
||||
{% endif %}
|
||||
{% if self %}
|
||||
<span class="tabulation"><a href="{% url 'users:editPassword' user.pk %}">Changer mon mot de passe</a></span>
|
||||
<span class="tabulation"><a href="{% url 'users:editPassword' user.pk %}"><i class="fa fa-user-lock"></i> Changer mon mot de passe</a></span>
|
||||
{% endif %}
|
||||
{% if perms.users.can_reset_password %}
|
||||
<span class="tabulation"><a href="{% url 'users:resetPassword' user.pk %}">Réinitialiser le mot de passe</a></span>
|
||||
<span class="tabulation"><a href="{% url 'users:resetPassword' user.pk %}"><i class="fa fa-lock-open"></i> Réinitialiser le mot de passe</a></span>
|
||||
{% endif %}
|
||||
{% if perms.users.can_change_user_perm %}
|
||||
<span class="tabulation"><a href="{% url 'users:editGroups' user.pk %}">Changer les groupes</a></span>
|
||||
<span class="tabulation"><a href="{% url 'users:editGroups' user.pk %}"><i class="fa fa-layer-group"></i> Changer les groupes</a></span>
|
||||
{% endif %}
|
||||
{% if perms.auth.change_user %}
|
||||
<span class="tabulation"><a href="{% url 'users:switchActivateUser' user.pk %}">{{ user.is_active | yesno:"Désa,A"}}ctiver</a></span>
|
||||
<span class="tabulation"><a href="{% url 'users:switchActivateUser' user.pk %}"><i class="fa fa-check-circle"></i> {{ user.is_active | yesno:"Désa,A"}}ctiver</a></span>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -129,7 +129,7 @@
|
|||
<td>{{c.amount}} €</td>
|
||||
<td>{{c.paymentMethod}}</td>
|
||||
<td>{{c.date}}</td>
|
||||
<td>{% if perms.gestion.delete_consumptionhistory %}<a href="{% url 'gestion:cancelConsumption' c.pk %}" class="button small">Annuler</a>{% endif %}</td>
|
||||
<td>{% if perms.gestion.delete_consumptionhistory %}<a href="{% url 'gestion:cancelConsumption' c.pk %}" class="button small"><i class="fa fa-times"></i> Annuler</a>{% endif %}</td>
|
||||
</tr>
|
||||
{%endfor%}
|
||||
</tbody>
|
||||
|
@ -163,7 +163,7 @@
|
|||
<td>{{m.amount}} €</td>
|
||||
<td>{{m.paymentMethod}}</td>
|
||||
<td>{{m.date}}</td>
|
||||
<td>{% if perms.gestion.delete_menuhistory %}<a href="{% url 'gestion:cancelMenu' m.pk %}" class="button small">Annuler</a>{% endif %}</td>
|
||||
<td>{% if perms.gestion.delete_menuhistory %}<a href="{% url 'gestion:cancelMenu' m.pk %}" class="button small"><i class="fa fa-times"></i> Annuler</a>{% endif %}</td>
|
||||
</tr>
|
||||
{%endfor%}
|
||||
</tbody>
|
||||
|
@ -196,7 +196,7 @@
|
|||
<td>{{reload.PaymentMethod}}</td>
|
||||
<td>{{reload.date}}</td>
|
||||
{% if perms.gestion.delete_reload %}
|
||||
<th><a href="{% url 'gestion:cancelReload' reload.pk %}" class="button small">Annuler</a></th>
|
||||
<th><a href="{% url 'gestion:cancelReload' reload.pk %}" class="button small"><i class="fa fa-times"></i> Annuler</a></th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -211,7 +211,7 @@
|
|||
<h2>{{ self | yesno:"Mes cotisations,Cotisations"}}</h2>
|
||||
</header>
|
||||
<section>
|
||||
<a class="button" href="{% url 'users:addCotisationHistory' user.pk %}">Ajouter une cotisation</a><br><br>
|
||||
<a class="button" href="{% url 'users:addCotisationHistory' user.pk %}"><i class="fa fa-comments-dollar"></i> Ajouter une cotisation</a><br><br>
|
||||
<div class="table-wrapper">
|
||||
<table>
|
||||
<thead>
|
||||
|
@ -234,7 +234,7 @@
|
|||
<td>{{cotisation.paymentMethod}}</td>
|
||||
<td>{{cotisation.endDate}}</td>
|
||||
<td>{{cotisation.valid}}</td>
|
||||
<td>{% if perms.users.validate_cotisationHistory %}<a class="button small" href="{% url 'users:validateCotisationHistory' cotisation.pk %}">Valider</a> <a class="button small" href="{% url 'users:invalidateCotisationHistory' cotisation.pk %}">Invalider</a>{% endif %}</td>
|
||||
<td>{% if perms.users.validate_cotisationHistory %}<a class="button small" href="{% url 'users:validateCotisationHistory' cotisation.pk %}"><i class="fa fa-check-circle"></i> Valider</a> <a class="button small" href="{% url 'users:invalidateCotisationHistory' cotisation.pk %}"><i class="fa fa-times-circle"></i> Invalider</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
@ -248,7 +248,7 @@
|
|||
<h2>{{ self | yesno:"Mes accès gracieux,Accès gracieux"}}</h2>
|
||||
</header>
|
||||
<section>
|
||||
<a class="button" href="{% url 'users:addWhiteListHistory' user.pk %}">Ajouter un accès à titre gracieux</a><br><br>
|
||||
<a class="button" href="{% url 'users:addWhiteListHistory' user.pk %}"><i class="fa fa-handshake"></i> Ajouter un accès à titre gracieux</a><br><br>
|
||||
<div class="table-wrapper">
|
||||
<table>
|
||||
<thead>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<header class="major">
|
||||
<h2>Liste des écoles</h2>
|
||||
</header>
|
||||
<a class="button" href="{% url 'users:createSchool' %}">Créer une école</a><br><br>
|
||||
<a class="button" href="{% url 'users:createSchool' %}"><i class="fa fa-school"></i> Créer une école</a><br><br>
|
||||
<div class="table-wrapper">
|
||||
<table>
|
||||
<thead>
|
||||
|
@ -23,7 +23,7 @@
|
|||
{% for school in schools %}
|
||||
<tr>
|
||||
<td>{{ school }}</td>
|
||||
<td>{% if perms.gestion.change_school %}<a class="button small" href="{% url 'users:editSchool' school.pk %}">Modifier</a> {% endif %}{% if perms.gestion.delete_school %}<a class="button small" href="{% url 'users:deleteSchool' school.pk %}">Supprimer</a>{% endif %}</td>
|
||||
<td>{% if perms.gestion.change_school %}<a class="button small" href="{% url 'users:editSchool' school.pk %}"><i class="fa fa-pencil-alt"></i> Modifier</a> {% endif %}{% if perms.gestion.delete_school %}<a class="button small" href="{% url 'users:deleteSchool' school.pk %}"><i class="fa fa-trash"></i> Supprimer</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<header class="major">
|
||||
<h2>Liste des superusers</h2>
|
||||
</header>
|
||||
<a class="button" href="{% url 'users:addSuperuser' %}">Ajouter un superuser</a><br><br>
|
||||
<a class="button" href="{% url 'users:addSuperuser' %}"><i class="fa fa-user-plus"></i> Ajouter un superuser</a><br><br>
|
||||
<div class="table-wrapper">
|
||||
<table>
|
||||
<thead>
|
||||
|
@ -23,9 +23,9 @@
|
|||
<tbody>
|
||||
{% for user in superusers %}
|
||||
<tr>
|
||||
<td><a href="{% url 'profile:users' user.pk %}">{{user}}</a></td>
|
||||
<td><a class="button small" href="{% url 'users:profile' user.pk %}">Profil</a></td>
|
||||
<td><a class="button small" href="{% url 'users:removeSuperuser' user.pk %}">Retirer des superusers</a></td>
|
||||
<td><a href="{% url 'users:profile' user.pk %}">{{user}}</a></td>
|
||||
<td><a class="button small" href="{% url 'users:profile' user.pk %}"><i class="fa fa-user"></i> Profil</a></td>
|
||||
<td><a class="button small" href="{% url 'users:removeSuperuser' user.pk %}"><i class="fa fa-minus-square"></i> Retirer des superusers</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<header class="major">
|
||||
<h2>Liste des utilisateurs</h2>
|
||||
</header>
|
||||
<a class="button" href="{% url 'users:createUser' %}">Créer un utilisateur</a><br><br>
|
||||
<a class="button" href="{% url 'users:createUser' %}"><i class="fa fa-user-plus"></i> Créer un utilisateur</a><br><br>
|
||||
<div class="table-wrapper">
|
||||
<table>
|
||||
<thead>
|
||||
|
@ -25,10 +25,10 @@
|
|||
<tbody>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td><a href="{% url 'profile:users' user.pk %}">{{user}}</a></td>
|
||||
<td><a class="button small" href="{% url 'users:profile' user.pk %}">Profil</a></td>
|
||||
<td><a href="{% url 'users:profile' user.pk %}">{{user}}</a></td>
|
||||
<td><a class="button small" href="{% url 'users:profile' user.pk %}"><i class="fa fa-user"></i> Profil</a></td>
|
||||
{% if perms.auth.change_user %}
|
||||
<td><a class="button small" href="{% url 'users:switchActivateUser' user.pk %}">{{ user.is_active | yesno:"Désa,A"}}ctiver</a></td>
|
||||
<td><a class="button small" href="{% url 'users:switchActivateUser' user.pk %}">{% if user.is_active %}<i class="fa fa-times-circle"></i> Désactiver{% else %}<i class="fa fa-check-circle"></i> Activer{% endif %}</a></td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
@ -52,7 +52,7 @@ def loginView(request):
|
|||
return redirect(reverse('users:profile', kwargs={'pk':request.user.pk}))
|
||||
else:
|
||||
messages.error(request, "Nom d'utilisateur et/ou mot de passe invalide")
|
||||
return render(request, "form.html", {"form_entete": "Connexion", "form": form, "form_title": "Connexion", "form_button": "Se connecter"})
|
||||
return render(request, "form.html", {"form_entete": "Connexion", "form": form, "form_title": "Connexion", "form_button": "Se connecter", "form_button_icon": "sign-in-alt"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -225,7 +225,7 @@ def createUser(request):
|
|||
user.save()
|
||||
messages.success(request, "L'utilisateur a bien été créé")
|
||||
return redirect(reverse('users:profile', kwargs={'pk':user.pk}))
|
||||
return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form":form, "form_title":"Création d'un nouvel utilisateur", "form_button":"Créer l'utilisateur"})
|
||||
return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form":form, "form_title":"Création d'un nouvel utilisateur", "form_button":"Créer l'utilisateur", "form_button_icon": "user-plus"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -252,7 +252,7 @@ def searchUser(request):
|
|||
form = SelectUserForm(request.POST or None)
|
||||
if(form.is_valid()):
|
||||
return redirect(reverse('users:profile', kwargs={"pk":form.cleaned_data['user'].pk}))
|
||||
return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form": form, "form_title": "Rechercher un utilisateur", "form_button": "Afficher le profil"})
|
||||
return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form": form, "form_title": "Rechercher un utilisateur", "form_button": "Afficher le profil", "form_button_icon": "search"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -305,7 +305,7 @@ def editGroups(request, pk):
|
|||
messages.success(request, "Les groupes de l'utilisateur " + user.username + " ont bien été enregistrés.")
|
||||
return redirect(reverse('users:profile', kwargs={'pk':pk}))
|
||||
extra_css = "#id_groups{height:200px;}"
|
||||
return render(request, "form.html", {"form_entete": "Gestion de l'utilisateur " + user.username, "form": form, "form_title": "Modification des groupes", "form_button": "Enregistrer", "extra_css": extra_css})
|
||||
return render(request, "form.html", {"form_entete": "Gestion de l'utilisateur " + user.username, "form": form, "form_title": "Modification des groupes", "form_button": "Enregistrer", "form_button_icon": "pencil-alt", "extra_css": extra_css})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -345,7 +345,7 @@ def editPassword(request, pk):
|
|||
return redirect(reverse('users:profile', kwargs={'pk':pk}))
|
||||
else:
|
||||
messages.error(request, "Le mot de passe actuel est incorrect")
|
||||
return render(request, "form.html", {"form_entete": "Modification de mon compte", "form": form, "form_title": "Modification de mon mot de passe", "form_button": "Modifier mon mot de passe"})
|
||||
return render(request, "form.html", {"form_entete": "Modification de mon compte", "form": form, "form_title": "Modification de mon mot de passe", "form_button": "Modifier mon mot de passe", "form_button_icon": "pencil-alt"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -379,7 +379,7 @@ def editUser(request, pk):
|
|||
user.save()
|
||||
messages.success(request, "Les modifications ont bien été enregistrées")
|
||||
return redirect(reverse('users:profile', kwargs={'pk': pk}))
|
||||
return render(request, "form.html", {"form_entete":"Modification du compte " + user.username, "form": form, "form_title": "Modification des informations", "form_button": "Modifier"})
|
||||
return render(request, "form.html", {"form_entete":"Modification du compte " + user.username, "form": form, "form_title": "Modification des informations", "form_button": "Modifier", "form_button_icon": "pencil-alt"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -583,7 +583,7 @@ def createGroup(request):
|
|||
group = form.save()
|
||||
messages.success(request, "Le groupe " + form.cleaned_data['name'] + " a bien été crée.")
|
||||
return redirect(reverse('users:groupProfile', kwargs={'pk': group.pk}))
|
||||
return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form":form, "form_title": "Création d'un groupe de droit", "form_button": "Créer le groupe de droit"})
|
||||
return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form":form, "form_title": "Création d'un groupe de droit", "form_button": "Créer le groupe de droit", "form_button_icon": "plus-square"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -617,7 +617,7 @@ def editGroup(request, pk):
|
|||
form.save()
|
||||
messages.success(request, "Le groupe " + group.name + " a bien été modifié.")
|
||||
return redirect(reverse('users:groupProfile', kwargs={'pk': group.pk}))
|
||||
return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form": form, "form_title": "Modification du groupe de droit " + group.name, "form_button": "Modifier le groupe de droit", "extra_css":extra_css})
|
||||
return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form": form, "form_title": "Modification du groupe de droit " + group.name, "form_button": "Modifier le groupe de droit", "form_button_icon": "pencil-alt", "extra_css":extra_css})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -736,7 +736,7 @@ def addAdmin(request):
|
|||
user.save()
|
||||
messages.success(request, "L'utilisateur " + user.username + " a bien été rajouté aux admins")
|
||||
return redirect(reverse('users:adminsIndex'))
|
||||
return render(request, "form.html", {"form": form, "form_title": "Ajout d'un admin", "form_button":"Ajouter l'utilisateur aux admins"})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Ajout d'un admin", "form_button": "Ajouter l'utilisateur aux admins", "form_button_icon": "user-plus"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -814,7 +814,7 @@ def addSuperuser(request):
|
|||
user.save()
|
||||
messages.success(request, "L'utilisateur " + user.username + " a bien été rajouté aux superusers")
|
||||
return redirect(reverse('users:superusersIndex'))
|
||||
return render(request, "form.html", {"form_entete": "Gestion des superusers", "form": form, "form_title": "Ajout d'un superuser", "form_button":"Ajouter l'utilisateur aux superusers"})
|
||||
return render(request, "form.html", {"form_entete": "Gestion des superusers", "form": form, "form_title": "Ajout d'un superuser", "form_button":"Ajouter l'utilisateur aux superusers", "form_button_icon": "user-plus"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -888,7 +888,7 @@ def addCotisationHistory(request, pk):
|
|||
cotisation.save()
|
||||
messages.success(request, "La cotisation a bien été ajoutée")
|
||||
return redirect(reverse('users:profile',kwargs={'pk':user.pk}))
|
||||
return render(request, "form.html",{"form": form, "form_title": "Ajout d'une cotisation pour l'utilisateur " + str(user), "form_button": "Ajouter"})
|
||||
return render(request, "form.html",{"form": form, "form_title": "Ajout d'une cotisation pour l'utilisateur " + str(user), "form_button": "Ajouter", "form_button_icon": "plus-square"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -969,7 +969,7 @@ def addWhiteListHistory(request, pk):
|
|||
whiteList.save()
|
||||
messages.success(request, "L'accès gracieux a bien été ajouté")
|
||||
return redirect(reverse('users:profile', kwargs={'pk':user.pk}))
|
||||
return render(request, "form.html", {"form": form, "form_title": "Ajout d'un accès gracieux pour " + user.username, "form_button": "Ajouter"})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Ajout d'un accès gracieux pour " + user.username, "form_button": "Ajouter", "form_button_icon": "plus-square"})
|
||||
|
||||
########## Schools ##########
|
||||
|
||||
|
@ -1019,7 +1019,7 @@ def createSchool(request):
|
|||
form.save()
|
||||
messages.success(request, "L'école a bien été créée")
|
||||
return redirect(reverse('users:schoolsIndex'))
|
||||
return render(request, "form.html", {"form": form, "form_title": "Création d'une école", "form_button": "Créer"})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Création d'une école", "form_button": "Créer", "form_button_icon": "plus-square"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
@ -1052,7 +1052,7 @@ def editSchool(request, pk):
|
|||
form.save()
|
||||
messages.success(request, "L'école a bien été modifiée")
|
||||
return redirect(reverse('users:schoolsIndex'))
|
||||
return render(request, "form.html", {"form": form, "form_title": "Modification de l'école " + str(school), "form_button": "Modifier"})
|
||||
return render(request, "form.html", {"form": form, "form_title": "Modification de l'école " + str(school), "form_button": "Modifier", "form_button": "pencil-alt"})
|
||||
|
||||
@active_required
|
||||
@login_required
|
||||
|
|
Loading…
Reference in a new issue