Skip to content

Commit

Permalink
admin fixes
Browse files Browse the repository at this point in the history
show items on index
  • Loading branch information
bradjc committed Jul 24, 2014
1 parent 8a112cf commit e3abb3b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions chezbetty/models/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def all(cls):
def some(cls, count):
return DBSession.query(cls)\
.filter(cls.deleted == False)\
.order_by(desc(cls.id))\
.limit(count).all()

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion chezbetty/templates/admin/index.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
</tr>
</thead>
<tbody>
{% for e in events|reverse %}
{% for e in events %}
{% for t in e.transactions|reverse %}
<tr>
{% if loop.index == 1 %}
Expand Down
2 changes: 2 additions & 0 deletions chezbetty/templates/admin/item_edit.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
<tr>
<th></th>
<th>Date</th>
<th>User</th>
<th>Type</th>
<th>Quantity</th>
</tr>
Expand All @@ -104,6 +105,7 @@
<tr>
<td>{{ button.event(subtrans.transaction.event.id) }}</td>
<td>{{ subtrans.transaction.event.timestamp|pretty_date|safe }}</td>
<td>{{ subtrans.transaction.event.admin.name }}</td>
<td>{{ subtrans.transaction.type }}</td>
{% if subtrans.transaction.type == "inventory" %}
<td>{{ subtrans.quantity_counted }}</td>
Expand Down

0 comments on commit e3abb3b

Please sign in to comment.