Skip to content

Commit

Permalink
Template cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
melinath committed Aug 18, 2014
1 parent 917aa1f commit 6fba140
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 40 deletions.
4 changes: 2 additions & 2 deletions argus/templates/argus/__group.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h3 class="panel-title">
{% for member in members %}
<li><a href="{{ member.get_absolute_url }}">{{ member.name }}: {{ member.balance }}</a></li>
{% endfor %}
<li><a href="{% url 'argus_party_create' group_slug=group.slug %}"><span class="glyphicon glyphicon-plus"></span> Add Member</a></li>
<li><a href="{% url 'argus_party_create' group_slug=group.slug %}"><span class="fa fa-plus"></span> Add Member</a></li>
</ul>

{% with categories=group.categories.all %}
Expand All @@ -37,7 +37,7 @@ <h3 class="panel-title">
{% for category in categories %}
<li><a href="{{ category.get_absolute_url }}">{{ category.name }}</a></li>
{% endfor %}
<li><a href="{% url 'argus_category_create' group_slug=group.slug %}"><span class="glyphicon glyphicon-plus"></span> New Category</a></li>
<li><a href="{% url 'argus_category_create' group_slug=group.slug %}"><span class="fa fa-plus"></span> New Category</a></li>
</ul>
{% endwith %}
</div>{# /.panel-body #}
Expand Down
72 changes: 35 additions & 37 deletions argus/templates/argus/__transaction_list.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "argus/__group.html" %}

{% load floppyforms %}
{% load floppyforms zenaida %}

{% block main_panel %}
<div class="panel panel-default">
Expand All @@ -19,43 +19,41 @@ <h2 class="panel-title">Record a New Expense</h2>
<div class="panel-heading">
<h2 class="panel-title">Expense Log</h2>
</div>
<div class="panel-body">
<table class="table">
<thead>
<table class="table">
<thead>
<tr>
<th>Paid at</th>
<th>Paid by</th>
<th>Paid to</th>
<th>Memo</th>
<th>Amount ({{ group.currency }})</th>
{% if not category %}<th>Category</th>{% endif %}
<th>Sharers</th>
<th></th>
</tr>
</thead>
<tbody>
{% for transaction in recent_transactions|slice:":10" %}
<tr>
<th>Paid at</th>
<th>Paid by</th>
<th>Paid to</th>
<th>Memo</th>
<th>Amount ({{ group.currency }})</th>
{% if not category %}<th>Category</th>{% endif %}
<th>Sharers</th>
<th></th>
</tr>
</thead>
<tbody>
{% for transaction in recent_transactions|slice:":10" %}
<tr>
<td>{{ transaction.paid_at|date:"Y-m-d H:i:s" }}</td>
<td><a href="{{ transaction.paid_by.get_absolute_url }}">{{ transaction.paid_by.name }}</a></td>
<td><a href="{{ transaction.paid_to.get_absolute_url }}">{{ transaction.paid_to.name }}</a></td>
<td>{{ transaction.memo }}</td>
<td>{{ transaction.amount }}</td>
{% if not category %}<td><a href="{{ transaction.category.get_absolute_url }}">{{ transaction.category.name }}</a></td>{% endif %}
<td>
{% for party in group.parties.all %}
{% for share in transaction.shares.all %}
{% if share.party_id == party.pk %}
<a href="{{ party.get_absolute_url }}" title="{{ share.amount }} ({{ share.percentage }}%)">{{ party.name }}</a>
{% endif %}
{% endfor %}
<td>{{ transaction.paid_at|date:"Y-m-d H:i:s" }}</td>
<td><a href="{{ transaction.paid_by.get_absolute_url }}">{{ transaction.paid_by.name }}</a></td>
<td><a href="{{ transaction.paid_to.get_absolute_url }}">{{ transaction.paid_to.name }}</a></td>
<td>{{ transaction.memo }}</td>
<td>{{ transaction.amount|format_money:group.currency }}</td>
{% if not category %}<td><a href="{{ transaction.category.get_absolute_url }}">{{ transaction.category.name }}</a></td>{% endif %}
<td>
{% for party in group.parties.all %}
{% for share in transaction.shares.all %}
{% if share.party_id == party.pk %}
<a href="{{ party.get_absolute_url }}" title="{{ share.amount }} ({{ share.percentage }}%)">{{ party.name }}</a>
{% endif %}
{% endfor %}
</td>
<td><a href="{% url 'argus_transaction_update' group_slug=group.slug pk=transaction.pk %}"><i class='glyphicon glyphicon-pencil'></i></a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endfor %}
</td>
<td><a href="{% url 'argus_transaction_update' group_slug=group.slug pk=transaction.pk %}"><i class='fa fa-fw fa-pencil'></i></a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock main_panel %}
2 changes: 1 addition & 1 deletion argus/templates/argus/group_create.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$('.formset-container').formset({
formTemplate: "#form-empty",
addTrigger: '',
deleteTrigger: "<a href='#'><i class='glyphicon glyphicon-remove'></i> Remove</a>",
deleteTrigger: "<a href='#'><i class='fa fa-remove'></i> Remove</a>",
deleteWrapper: 'label',
rowSelector: '.form-group',
prefix: '{{ form.prefix }}'
Expand Down

0 comments on commit 6fba140

Please sign in to comment.