mirror of
https://github.com/nanoy42/coope
synced 2024-11-29 08:02:25 +00:00
Change string of draft product
This commit is contained in:
parent
f715726a1e
commit
ed5b4a6fa7
2 changed files with 8 additions and 4 deletions
|
@ -98,7 +98,11 @@ class Product(models.Model):
|
||||||
history = HistoricalRecords()
|
history = HistoricalRecords()
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
if self.draft_category == self.DRAFT_NONE:
|
||||||
|
return self.name + "(" + str(self.amount) + " €)"
|
||||||
|
else:
|
||||||
|
return self.name + " (" + str(self.amount) + " €, " + str(self.deg) + "°)"
|
||||||
|
|
||||||
|
|
||||||
def user_ranking(self, pk):
|
def user_ranking(self, pk):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
{% if forloop.counter0|divisibleby:4 %}
|
{% if forloop.counter0|divisibleby:4 %}
|
||||||
<tr style="text-align:center">
|
<tr style="text-align:center">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td><button class="product {% if product.adherentRequired %}special{% endif%}" target="{{product.pk}}">{{product.name}}</button></td>
|
<td><button class="product {% if product.adherentRequired %}special{% endif%}" target="{{product.pk}}">{{product}}</button></td>
|
||||||
{% if forloop.counter|divisibleby:4 %}
|
{% if forloop.counter|divisibleby:4 %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -148,7 +148,7 @@
|
||||||
{% if forloop.counter0|divisibleby:4 %}
|
{% if forloop.counter0|divisibleby:4 %}
|
||||||
<tr style="text-align:center">
|
<tr style="text-align:center">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td><button class="product {% if product.adherentRequired %}special{% endif%}" target="{{product.pk}}">{{product.name}}</button></td>
|
<td><button class="product {% if product.adherentRequired %}special{% endif%}" target="{{product.pk}}">{{product}}</button></td>
|
||||||
{% if forloop.counter|divisibleby:4 %}
|
{% if forloop.counter|divisibleby:4 %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
{% if forloop.counter0|divisibleby:4 %}
|
{% if forloop.counter0|divisibleby:4 %}
|
||||||
<tr style="text-align:center">
|
<tr style="text-align:center">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td><button class="menu {% if product.adherent_required %}special{% endif%}" target="{{product.pk}}">{{product.name}}</button></td>
|
<td><button class="menu {% if product.adherent_required %}special{% endif%}" target="{{product.pk}}">{{product}}</button></td>
|
||||||
{% if forloop.counter|divisibleby:4 %}
|
{% if forloop.counter|divisibleby:4 %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue