Fix "already acquired" pictogram. Close #8

This commit is contained in:
Gabriel Augendre 2018-06-02 16:29:06 +02:00
parent 71e0537400
commit 50c4cebc96
2 changed files with 7 additions and 4 deletions

View file

@ -145,11 +145,11 @@ class Book(BaseModel):
)
@property
def previously_acquired_emoji(self):
def previously_acquired_text(self):
if self.previously_acquired:
return ''
return 'Oui'
else:
return '🚫'
return 'Non'
def __str__(self):
return f'{self.title} ({self.authors}) - {self.isbn}'

View file

@ -59,7 +59,10 @@
<td>{{ book.publication_year }}</td>
<td>{{ book.isbn }}</td>
<td>{{ book.price }}</td>
<td>{{ book.previously_acquired_emoji }}</td>
<td>
<i class="fas fa-{% if book.previously_acquired %}check-circle{% else %}ban{% endif %}"></i>
{{ book.previously_acquired_text }}
</td>
</tr>
{% endfor %}
</tbody>