Merge pull request #268 from eReuse/feature/#3368-tag-list

add column created and put order descendent from created field
This commit is contained in:
cayop 2022-05-12 11:34:25 +02:00 committed by GitHub
commit e8edd8e2d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -23,7 +23,9 @@ class TagListView(View):
def dispatch_request(self): def dispatch_request(self):
lots = Lot.query.filter(Lot.owner_id == current_user.id) lots = Lot.query.filter(Lot.owner_id == current_user.id)
tags = Tag.query.filter(Tag.owner_id == current_user.id).order_by(Tag.id) tags = Tag.query.filter(Tag.owner_id == current_user.id).order_by(
Tag.created.desc()
)
context = { context = {
'lots': lots, 'lots': lots,
'tags': tags, 'tags': tags,

View File

@ -47,6 +47,7 @@
<th scope="col">Type</th> <th scope="col">Type</th>
<th scope="col">Provider</th> <th scope="col">Provider</th>
<th scope="col">Device</th> <th scope="col">Device</th>
<th scope="col">Created</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -62,6 +63,7 @@
</a> </a>
{% endif %} {% endif %}
</td> </td>
<td>{{ tag.created.strftime('%H:%M %d-%m-%Y') }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>