3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-11-22 03:13:12 +00:00

Ajout de liens pour les profils users et produits

This commit is contained in:
Yoann Pétri 2019-01-14 02:43:47 +01:00
parent e37c3d1c68
commit 26f638251d
12 changed files with 14 additions and 14 deletions

View file

@ -29,7 +29,7 @@
<td>{{ menu.name }}</td> <td>{{ menu.name }}</td>
<td>{{ menu.amount}} €</td> <td>{{ menu.amount}} €</td>
<td>{{ menu.barcode }}</td> <td>{{ menu.barcode }}</td>
<td>{% for art in menu.articles.all %}{{art}},{% endfor %}</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>{{ 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 %}Désa{% else %}A{% endif %}ctiver</a> <a href="{% url 'gestion:editMenu' menu.pk %}" class="button small">Modifier</a>{% endif %}</td>
</tr> </tr>

View file

@ -22,7 +22,7 @@
<tbody> <tbody>
{% for user in users %} {% for user in users %}
<tr> <tr>
<td>{{ user }}</td> <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">Profil</a></td>
<td>{{ user.pintes_owned_currently.count }}</td> <td>{{ user.pintes_owned_currently.count }}</td>
</tr> </tr>

View file

@ -32,7 +32,7 @@
<tbody> <tbody>
{% for product in products %} {% for product in products %}
<tr> <tr>
<td>{{ product.name }}</td> <td><a href="{% url 'gestion:productProfile' product.pk %}">{{ product.name }}</a></td>
<td>{{ product.amount}}</td> <td>{{ product.amount}}</td>
<td>{{ product.stockHold }}</td> <td>{{ product.stockHold }}</td>
<td>{{ product.stockBar }}</td> <td>{{ product.stockBar }}</td>

View file

@ -28,7 +28,7 @@
{%for customer in bestBuyers%} {%for customer in bestBuyers%}
<tr> <tr>
<th>{{ forloop.counter }}</th> <th>{{ forloop.counter }}</th>
<th>{{ customer.username }}</th> <th><a href="{% url 'users:profile' customer.pk %}">{{ customer.username }}</a></th>
<th>{{ customer.profile.debit }}€</th> <th>{{ customer.profile.debit }}€</th>
</tr> </tr>
{%endfor%} {%endfor%}
@ -59,7 +59,7 @@
{% for customer in bestDrinkers %} {% for customer in bestDrinkers %}
<tr> <tr>
<th>{{ forloop.counter }}</th> <th>{{ forloop.counter }}</th>
<th>{{ customer.0.username }}</th> <th><a href="{% url 'users:profile' customer.0.pk %}">{{ customer.0.username }}</a></th>
<th>{{ customer.1 }}</th> <th>{{ customer.1 }}</th>
</tr> </tr>
{%endfor%} {%endfor%}

View file

@ -23,7 +23,7 @@
<tbody> <tbody>
{% for user in admins %} {% for user in admins %}
<tr> <tr>
<td>{{ user }} {% if user.is_superuser %}(superuser){% endif %}</td> <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><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>{% if not user.is_superuser %}<a class="button small" href="{% url 'users:removeAdmin' user.pk %}">Retirer des admins</a>{% endif %}</td>
</tr> </tr>

View file

@ -4,7 +4,7 @@
{% block navbar %} {% block navbar %}
<ul> <ul>
<li><a href="#first">Rechargements ({{user}})</a></li> <li><a href="#first">Rechargements (<a href="{% url 'profile:users' user.pk %}">{{user}}</a>)</a></li>
</ul> </ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View file

@ -10,7 +10,7 @@
{% block content %} {% block content %}
<section id="first" class="main special"> <section id="first" class="main special">
<header class="major"> <header class="major">
<h2>Consommations ({{user}})</h2> <h2>Consommations (<a href="{% url 'users:profile' user.pk %}">{{user}}</a>)</h2>
</header> </header>
<section id="rechargements"> <section id="rechargements">
<div class="table-wrapper"> <div class="table-wrapper">
@ -28,7 +28,7 @@
<tbody id="bodyTransaction"> <tbody id="bodyTransaction">
{% for c in consumptions %} {% for c in consumptions %}
<tr> <tr>
<td>{{c.product}}</td> <td>{% if perms.gestion.view_product %}<a href="{% url 'gestion:productProfile' c.product.pk %}">{{ c.product.name }}{% else %}{{c.product.name}}{% endif %}</a></td>
<td>{{c.quantity}}</td> <td>{{c.quantity}}</td>
<td>{{c.amount}}</td> <td>{{c.amount}}</td>
<td>{{c.paymentMethod}}</td> <td>{{c.paymentMethod}}</td>

View file

@ -10,7 +10,7 @@
{% block content %} {% block content %}
<section id="first" class="main special"> <section id="first" class="main special">
<header class="major"> <header class="major">
<h2>Consommations de menus ({{user}})</h2> <h2>Consommations de menus (<a href="{% url 'profile:users' user.pk %}">{{user}}</a>)</h2>
</header> </header>
<section id="rechargements"> <section id="rechargements">
<div class="table-wrapper"> <div class="table-wrapper">

View file

@ -72,7 +72,7 @@
<tbody> <tbody>
{% for user in group.user_set.all %} {% for user in group.user_set.all %}
<tr> <tr>
<td>{{ user }}</td> <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:profile' user.pk %}">Profil</a></td>
<td><a class="button small" href="{% url 'users:removeUser' group.pk user.pk %}">Retirer</a></td> <td><a class="button small" href="{% url 'users:removeUser' group.pk user.pk %}">Retirer</a></td>
</tr> </tr>

View file

@ -124,7 +124,7 @@
<tbody id="bodyTransaction"> <tbody id="bodyTransaction">
{% for c in lastConsumptions %} {% for c in lastConsumptions %}
<tr> <tr>
<td>{{c.product}}</td> <td>{% if perms.gestion.view_product %}<a href="{% url 'gestion:productProfile' c.product.pk %}">{{ c.product.name }}</a>{% else %}{{c.product}}{% endif %}</td>
<td>{{c.quantity}}</td> <td>{{c.quantity}}</td>
<td>{{c.amount}} €</td> <td>{{c.amount}} €</td>
<td>{{c.paymentMethod}}</td> <td>{{c.paymentMethod}}</td>

View file

@ -23,7 +23,7 @@
<tbody> <tbody>
{% for user in superusers %} {% for user in superusers %}
<tr> <tr>
<td>{{ user }}</td> <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:profile' user.pk %}">Profil</a></td>
<td><a class="button small" href="{% url 'users:removeSuperuser' user.pk %}">Retirer des superusers</a></td> <td><a class="button small" href="{% url 'users:removeSuperuser' user.pk %}">Retirer des superusers</a></td>
</tr> </tr>

View file

@ -25,7 +25,7 @@
<tbody> <tbody>
{% for user in users %} {% for user in users %}
<tr> <tr>
<td>{{ user }}</td> <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:profile' user.pk %}">Profil</a></td>
{% if perms.auth.change_user %} {% 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 %}">{{ user.is_active | yesno:"Désa,A"}}ctiver</a></td>