Commit a0802456 by Renzo Lucioni

Clean up refund list view

parent ddf7e7f9
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
{% block title %} {% block title %}
{% trans "Refunds" %} | {{ block.super }} {% trans "Refunds" %} | {{ block.super }}
{% endblock %} {% endblock title %}
{% block extrascripts %} {% block extrascripts %}
{{ block.super }} {{ block.super }}
...@@ -26,66 +26,65 @@ ...@@ -26,66 +26,65 @@
{% endblock extrascripts %} {% endblock extrascripts %}
{% block breadcrumbs %} {% block breadcrumbs %}
<ul class="breadcrumb"> <ul class="breadcrumb">
<li> <li>
<a href="{% url 'dashboard:index' %}">{% trans "Dashboard" %}</a> <a href="{% url 'dashboard:index' %}">{% trans "Dashboard" %}</a>
<span class="divider">/</span> <span class="divider">/</span>
</li> </li>
<li class="active">{% trans "Refunds" %}</li> <li class="active">{% trans "Refunds" %}</li>
</ul> </ul>
{% endblock %} {% endblock breadcrumbs %}
{% block header %} {% block header %}
<div class="page-header"> <div class="page-header">
<h1>{% trans "Refunds" %}</h1> <h1>{% trans "Refunds" %}</h1>
</div> </div>
{% endblock header %} {% endblock header %}
{% block dashboard_content %} {% block dashboard_content %}
<div class="table-header"> <div class="table-header">
<h3><i class="icon-search icon-large"></i>{% trans "Search" %}</h3> <h3><i class="icon-search icon-large"></i>{% trans "Search" %}</h3>
</div> </div>
<div class="well">
<form action="" method="get" class="form-inline" id="search_form"> <div class="well">
{% for field in form %} <form action="" method="get" class="form-inline" id="search_form">
{% for field in form %}
{% if field.id_for_label == 'id_id' %} {% if field.id_for_label == 'id_id' %}
{% if field.is_hidden %} {% if field.is_hidden %}
{{ field }} {{ field }}
{% else %} {% else %}
<span class="control-group {% if field.errors %}error{% endif %}"> <span class="control-group {% if field.errors %}error{% endif %}">
{{ field.label_tag }} {{ field.label_tag }}
{{ field }} {{ field }}
{% for error in field.errors %} {% for error in field.errors %}
<ul class="error-block"> <ul class="error-block">
<li>{{ error }}</li> <li>{{ error }}</li>
</ul> </ul>
{% endfor %} {% endfor %}
</span> </span>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<input type="submit" value="{% trans "Search" %}" class="btn btn-primary"/> <input type="submit" value="{% trans "Search" %}" class="btn btn-primary"/>
<a data-toggle="modal" href="#SearchModal">{% trans "Advanced Search" %}</a> <a data-toggle="modal" href="#SearchModal">{% trans "Advanced Search" %}</a>
</form> </form>
<div class="modal hide fade" id="SearchModal"> <div class="modal hide fade" id="SearchModal">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
<h3>{% trans "Advanced Search" %}</h3> <h3>{% trans "Advanced Search" %}</h3>
</div>
<form action="" method="get" class="form-horizontal">
<div class="modal-body">
{% include "partials/form_fields.html" with form=form %}
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">{% trans "Close" %}</a>
<button type="submit" class="btn btn-primary">{% trans "Search" %}</button>
</div>
</form>
</div> </div>
<form action="" method="get" class="form-horizontal">
<div class="modal-body">{% include "partials/form_fields.html" with form=form %}</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">{% trans "Close" %}</a>
<button type="submit" class="btn btn-primary">{% trans "Search" %}</button>
</div>
</form>
</div> </div>
</div>
{% if refunds %} {% if refunds %}
{% block refund_list %} {% block refund_list %}
<table class="table table-striped table-bordered table-hover"> <table class="table table-striped table-bordered table-hover">
<caption> <caption>
...@@ -93,28 +92,27 @@ ...@@ -93,28 +92,27 @@
</caption> </caption>
<thead> <thead>
<tr> <tr>
<th>{% anchor 'id' _("Refund ID") %}</th> <th>{% anchor 'id' _("Refund ID") %}</th>
<th>{% trans "Total Credit" %}</th> <th>{% trans "Total Credit" %}</th>
<th>{% trans "Number of Items" %}</th> <th>{% trans "Number of Items" %}</th>
<th>{% trans "Status" %}</th> <th>{% trans "Status" %}</th>
<th>{% trans "Customer" %}</th> <th>{% trans "Customer" %}</th>
<th>{% trans "Created" %}</th> <th>{% trans "Created" %}</th>
<th>{% trans "Actions" %}</th> <th>{% trans "Actions" %}</th>
<th></th> </tr>
</tr>
</thead> </thead>
<tbody> <tbody>
{% for refund in refunds %} {% for refund in refunds %}
<tr data-refund-id="{{ refund.id }}"> <tr data-refund-id="{{ refund.id }}">
<td><a href="{% url 'dashboard:refunds:detail' pk=refund.id %}">{{ refund.id }}</a> <td>
<a href="{% url 'dashboard:refunds:detail' pk=refund.id %}">{{ refund.id }}</a>
</td> </td>
<td>{{ refund.total_credit_excl_tax|currency:refund.currency }}</td> <td>{{ refund.total_credit_excl_tax|currency:refund.currency }}</td>
<td>{{ refund.num_items }}</td> <td>{{ refund.num_items }}</td>
<td class="refund-status">{{ refund.status|default:"-" }}</td> <td class="refund-status">{{ refund.status }}</td>
<td> <td>
<a href="{% url 'dashboard:user-detail' pk=refund.user.id %}"> <a href="{% url 'dashboard:user-detail' pk=refund.user.id %}">{{ refund.user.get_full_name|default:"-" }}</a>
{{ refund.user.get_full_name|default:"-" }}</a>
</td> </td>
<td>{{ refund.created }}</td> <td>{{ refund.created }}</td>
<td> <td>
...@@ -128,13 +126,12 @@ ...@@ -128,13 +126,12 @@
{% endblock refund_list %} {% endblock refund_list %}
{% include "partials/pagination.html" %} {% include "partials/pagination.html" %}
{% else %} {% else %}
<table class="table table-striped table-bordered"> <table class="table table-striped table-bordered">
<caption><i class="icon-repeat icon-large icon-flip-horizontal"></i>{{ queryset_description }}</caption> <caption><i class="icon-repeat icon-large icon-flip-horizontal"></i>{{ queryset_description }}</caption>
<tr> <tr>
<td>{% trans "No refunds found." %}</td> <td>{% trans "No refunds found." %}</td>
</tr> </tr>
</table> </table>
{% endif %} {% endif %}
{% endblock dashboard_content %} {% endblock dashboard_content %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment