-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcategory.html
119 lines (95 loc) · 6.9 KB
/
category.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{% extends "layout.html" %}
{% block content %}
<div id="content-outer" class="container index">
<section class="p-0 row no-gutters layout-standard">
<div class="col-12 col-lg-4 sidebar">
{% include "header_2.html" %}
</div>
<div class="col-12 col-lg-8 mainbar">
<div class="page-title dh-bg-light dh-border p-4 d-flex align-items-center">
<h1 class="text-white text-shadow">{{ category.name }}</h1>
</div>
<div class="dh-bg-light dh-border p-4 desc">
{% if category.description != "" %}
<h3>{{ category.description|raw }}</h3>
{% endif %}
{% if category.packages|length > 0 %}
{% if category.displayType == "list" %}
<div class="row packages list">
<table class="table table-hover table-striped">
<tbody>
{% for package in category.packages %}
<tr>
<td class="name"><h4 class="mb-0"><strong class="h4">{{ package.name }} {% if package.countdownEnds %}<span class="text-danger"> <i
class="fa fa-clock-o"></i> <br /><span class="countdown-to badge px-0" data-countdown="{{ package.countdownEnds }}">{{
__("Ending Soon!") }}</span></span>{% endif %}</strong></h4></td>
<td class="price">
{% if package.customPrice == false and package.price > 0 %}
<strong class="h4">
{% if package.discount.applied %}
<del class="text-danger small font-weight-bold">{{ package.discount.original|money }}</del>
{% endif %}
{{ package.price|money }} <small>{{ basket.currency }}</small>
</strong>
{% endif %}
</td>
<td class="button text-right">
{% if package.basket %}
<a href="/checkout/packages/remove/{{ package.id }}" class="btn btn-primary">{{ __("Remove") }}</a>
{% else %}
<a href="/package/{{ package.id }}" class="btn btn-primary">{{ __("View") }} </a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<div class="row packages grid">
{% for package in category.packages %}
<div class="col-12">
<div class="package card mb-4">
{% if onSaleTag and package.discount.applied %}
<span class="tag tag--danger tag--right">On Sale</span>
{% endif %}
<div class="package__image">
<a href="/package/{{ package.id }}">
<img src="{{ package.image.url }}" class="card-img-top toggle-tooltip {% if package.image.borderless %}img-rounded{% else %}img-thumbnail{% endif %}"
title="{{ __("Click for more details") }}" />
</a>
</div>
<div class="package__info">
<h2>{{ package.name[:20] }}</h2>
{% if package.customPrice == false and package.price > 0.00 %}
<h3>
{% if package.discount.applied %}
<span class="price--discounted text--title">{{ package.discount.original|money }} {{ basket.currency }}</span><br>
{% endif %}
{{ package.price|money }} {{ basket.currency }}
</h3>
{% endif %}
</div>
<div class="package__buttons">
{% if package.basket %}
<a href="#" onclick="subtractPackage({{package.id}})" class="iconBoxed iconBoxed--rounded package__remove cursorAura" ><i class="fas fa-minus"></i></a>
<input type="text" class="package__quantity" name="quantity[{{ package.id }}]" value="{{ package.quantity }}" {% if package.price == 0.00 or package.disableQuantity %}disabled="disabled"{% endif %} maxlength="3"/>
<a href="/checkout/packages/add/{{ package.id }}" class="iconBoxed iconBoxed--rounded package__add cursorAura"><i class="fas fa-plus"></i></a>
{% else %}
<a href="/checkout/packages/add/{{ package.id }}" class="btn btn--primary cursorAura">Add to Cart</a>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% else %}
{{ __("No packages to display in this category.") }}
{% endif %}
</div>
</div>
</section>
</div>
{% include "content_footer.html" %}
{% endblock %}