forked from django-oscar/django-oscar
-
Notifications
You must be signed in to change notification settings - Fork 19
/
offer_list.html
77 lines (71 loc) · 2.17 KB
/
offer_list.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{% extends 'dashboard/layout.html' %}
{% load currency_filters %}
{% block title %}
Offer management | {{ block.super }}
{% endblock %}
{% block breadcrumbs %}
<ul class="breadcrumb">
<li>
<a href="{% url promotions:home %}">Dashboard</a>
<span class="divider">/</span>
</li>
<li class="active"><a href=".">Offer management</a></li>
</ul>
{% endblock %}
{% block header %}
<div class="page-header">
<h1>Offer management</h1>
</div>
{% endblock header %}
{% block dashboard_content %}
<div class="well well-info">
<div class="sub-header">
<h3>Search</h3>
</div>
<form action="." method="get" class="form-inline">
{% include 'partials/form_fields_inline.html' with form=form %}
<button type="submit" class="btn btn-primary">Search</button>
<a href="{% url dashboard:offer-list %}" class="btn">Reset</a>
</form>
</div>
<p><a href="{% url dashboard:offer-metadata %}" class="btn-large btn-primary">Create new offer</a></p>
<div class="sub-header">
<h2>{{ queryset_description }}</h2>
</div>
{% if offers.count %}
<form action="." method="post" class="order_table">
{% csrf_token %}
<table class="table table-striped table-bordered">
<tr>
<th>Offer name</th>
<th>Start date</th>
<th>End date</th>
<th>Condition</th>
<th>Benefit</th>
<th>Date created</th>
<th></th>
</tr>
{% for offer in offers %}
<tr>
<td><a href="{{ offer.get_absolute_url }}">{{ offer.name }}</a></td>
<td>{{ offer.start_date }}</td>
<td>{{ offer.end_date }}</td>
<td>{{ offer.condition.description }}</td>
<td>{{ offer.benefit.description }}</td>
<td>{{ offer.date_created }}</td>
<td>
<a class="btn btn-info" href="{% url dashboard:offer-detail offer.pk %}">Stats</a>
<a class="btn btn-primary" href="{% url dashboard:offer-metadata offer.pk %}">Edit</a>
<a class="btn btn-danger" href="{% url dashboard:offer-delete offer.pk %}">Delete</a>
</td>
</tr>
{% endfor %}
</table>
{% if page_obj %}
{% include "catalogue/partials/pagination.html" %}
{% endif %}
</form>
{% else %}
<p>No offers found.</p>
{% endif %}
{% endblock dashboard_content %}