-
Notifications
You must be signed in to change notification settings - Fork 279
/
domain-pricing.tpl
175 lines (168 loc) · 7.51 KB
/
domain-pricing.tpl
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<div class="domain-pricing">
{if $featuredTlds}
<div class="featured-tlds-container">
<div class="row">
{foreach $featuredTlds as $num => $tldinfo}
<div class="col-md-3 col-sm-4 col-xs-6">
<div class="featured-tld">
<div class="img-container">
<img src="{$BASE_PATH_IMG}/tld_logos/{$tldinfo.tldNoDots}.png">
</div>
<div class="price {$tldinfo.tldNoDots}">
{if is_object($tldinfo.register)}
{$tldinfo.register->toPrefixed()}{if $tldinfo.period > 1}{lang key="orderForm.shortPerYears" years={$tldinfo.period}}{else}{lang key="orderForm.shortPerYear" years=''}{/if}
{else}
{lang key="domainregnotavailable"}
{/if}
</div>
</div>
</div>
{/foreach}
</div>
</div>
{/if}
{if !$loggedin && $currencies}
<form method="post" action="" class="pull-right">
<select name="currency" class="form-control currency-selector" onchange="submit()">
<option>
{lang key="changeCurrency"} ({$activeCurrency.prefix} {$activeCurrency.code})
</option>
{foreach $currencies as $currency}
<option value="{$currency['id']}">
{$currency['prefix']} {$currency['code']}
</option>
{/foreach}
</select>
</form>
{/if}
<h4>{lang key='pricing.browseExtByCategory'}</h4>
<div class="tld-filters">
{foreach $tldCategories as $category => $count}
<a href="#" data-category="{$category}" class="label label-default">{lang key="domainTldCategory.$category" defaultValue=$category} ({$count})</a>
{/foreach}
</div>
{include file="$template/includes/tablelist.tpl" tableName="DomainPricing" noOrdering=true}
<script type="text/javascript">
jQuery(document).ready(function(){
var table = jQuery('#tableDomainPricing').removeClass('hidden').DataTable();
{if $orderby == 'date'}
table.order(0, '{$sort}');
{elseif $orderby == 'subject'}
table.order(1, '{$sort}');
{/if}
table.draw();
jQuery('#tableLoading').addClass('hidden');
jQuery('.tld-filters a').unbind();
jQuery('.tld-filters a').click(function(e) {
e.preventDefault();
if (jQuery(this).hasClass('label-success')) {
jQuery('#tableDomainPricing_wrapper input[type="search"]').val('').trigger('keyup');
jQuery('.tld-filters a').removeClass('label-success');
} else {
jQuery('#tableDomainPricing_wrapper input[type="search"]').val(jQuery(this).data('category')).trigger('keyup');
jQuery('.tld-filters a').removeClass('label-success');
jQuery(this).addClass('label-success');
}
});
});
</script>
<div class="table-container clearfix">
<table class="table table-list hidden" id="tableDomainPricing">
<thead>
<tr>
<th>{lang key='domaintld'}</th>
<th>{lang key='category'}</th>
<th>{lang key='pricing.register'}</th>
<th>{lang key='pricing.transfer'}</th>
<th>{lang key='pricing.renewal'}</th>
<th>{lang key='gracePeriod'}</th>
<th>{lang key='redemptionPeriod'}</th>
</tr>
</thead>
<tbody>
{foreach $pricing as $extension => $data}
<tr>
<td>
{$extension}
{if $data.group}
<span class="tld-sale-group tld-sale-group-{$data.group}">
{$data.group}!
</span>
{/if}
</td>
<td>
{$data.categories[0]}
<span class="hidden">
{foreach $data.categories as $category}
{$category}
{/foreach}
</span>
</td>
{foreach $data.register as $years => $price}
<td>
{if $price >= 0}
{$price}<br>
<small>{$years} {if $years > 1}{lang key="orderForm.years"}{else}{lang key="orderForm.year"}{/if}</small>
{else}
<small>{lang key="domainregnotavailable"}</small>
{/if}
</td>
{break}
{foreachelse}
<td>-</td>
{/foreach}
{foreach $data.transfer as $years => $price}
<td>
{if $price >= 0}
{$price}<br>
<small>{$years} {if $years > 1}{lang key="orderForm.years"}{else}{lang key="orderForm.year"}{/if}</small>
{else}
<small>{lang key="domainregnotavailable"}</small>
{/if}
</td>
{break}
{foreachelse}
<td>-</td>
{/foreach}
{foreach $data.renew as $years => $price}
<td>
{if $price >= 0}
{$price}<br>
<small>{$years} {if $years > 1}{lang key="orderForm.years"}{else}{lang key="orderForm.year"}{/if}</small>
{else}
<small>{lang key="domainregnotavailable"}</small>
{/if}
</td>
{break}
{foreachelse}
<td>-</td>
{/foreach}
<td>
{if is_null($data.grace_period)}
-
{else}
{$data.grace_period.days} {lang key='domainrenewalsdays'}<br>
<small>({$data.grace_period.price})</small>
{/if}
</td>
<td>
{if is_null($data.redemption_period)}
-
{else}
{$data.redemption_period.days} {lang key='domainrenewalsdays'}<br>
<small>({$data.redemption_period.price})</small>
{/if}
</td>
</tr>
{foreachelse}
<tr>
<td colspan="7">{lang key="pricing.noExtensionsDefined"}</td>
</tr>
{/foreach}
</tbody>
</table>
<div class="text-center" id="tableLoading">
<p><i class="fas fa-spinner fa-spin"></i> {$LANG.loading}</p>
</div>
</div>
</div>