forked from thirtybees/niara
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stores.tpl
146 lines (132 loc) · 5.03 KB
/
stores.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
{capture name=path}{l s='Our stores'}{/capture}
<h1 class="page-heading">{l s='Our stores'}</h1>
{if $simplifiedStoresDiplay}
{if !empty($stores)}
<p class="store-title">
<strong>
{l s='Here you can find our store locations. Please feel free to contact us:'}
</strong>
</p>
<table class="table table-bordered">
<thead>
<tr>
<th class="logo">{l s='Logo'}</th>
<th class="name">{l s='Store name'}</th>
<th class="address">{l s='Store address'}</th>
<th class="store-hours">{l s='Working hours'}</th>
</tr>
</thead>
{foreach $stores as $store}
<tr class="store-small">
<td class="logo">
{if $store.has_picture}
<div class="store-image">
<img src="{Link::getGenericImageLink(
'stores',
$store.id_store,
'medium',
(ImageManager::retinaSupport()) ? '2x' : ''
)|escape:'htmlall':'UTF-8'}"
alt="{$store.name|escape:'html':'UTF-8'}"
style="width: {$mediumSize.width}px; height: {$mediumSize.height}px"
>
</div>
{/if}
</td>
<td class="name">
{$store.name|escape:'html':'UTF-8'}
</td>
<td class="address">
{assign value=$store.id_store var="id_store"}
{foreach from=$addresses_formated.$id_store.ordered name=adr_loop item=pattern}
{assign var=addressKey value=" "|explode:$pattern}
{foreach from=$addressKey item=key name="word_loop"}
<span {if isset($addresses_style[$key])} class="{$addresses_style[$key]}"{/if}>
{$addresses_formated.$id_store.formated[$key|replace:',':'']|escape:'html':'UTF-8'}
</span>
{/foreach}
{/foreach}
<br>
{if $store.phone}<br>{l s='Phone:'} {$store.phone|escape:'html':'UTF-8'}{/if}
{if $store.fax}<br>{l s='Fax:'} {$store.fax|escape:'html':'UTF-8'}{/if}
{if $store.email}<br>{l s='Email:'} {$store.email|escape:'html':'UTF-8'}{/if}
{if $store.note}<br><br>{$store.note|escape:'html':'UTF-8'|nl2br}{/if}
</td>
<td class="store-hours">
{if isset($store.working_hours)}{$store.working_hours}{/if}
</td>
</tr>
{/foreach}
</table>
{/if}
{else}
<div id="map"></div>
<p>
<b>{l s='Enter a location (e.g. zip/postal code, address, city or country) in order to find the nearest stores.'}</b>
</p>
<div class="store-content form-inline">
<div class="form-group">
<label for="addressInput">{l s='Your location:'}</label>
<input class="form-control" type="text" name="location" id="addressInput" value="{l s='Address, zip / postal code, city, state or country'}">
</div>
<div class="form-group">
<label for="radiusSelect">{l s='Radius:'}</label>
<select name="radius" id="radiusSelect" class="form-control">
<option value="15">15</option>
<option value="25">25</option>
<option value="50">50</option>
<option value="100">100</option>
</select>
</div>
<div class="form-group">
<button name="search_locations" class="btn btn-primary">
{l s='Search'} <i class="icon icon-search"></i>
</button>
</div>
<div class="form-group">
<div class="form-control-static">
<img src="{$img_ps_dir}loader.gif" id="stores_loader">
</div>
</div>
</div>
<div class="store-content-select form-inline">
<div class="form-group">
<select id="locationSelect" class="form-control">
<option>-</option>
</select>
</div>
</div>
<div class="table-responsive">
<table id="stores-table" class="table table-bordered">
<thead>
<tr>
<th class="num">#</th>
<th>{l s='Store'}</th>
<th>{l s='Address'}</th>
<th>{l s='Distance'}</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
{strip}
{addJsDef map=''}
{addJsDef markers=array()}
{addJsDef infoWindow=''}
{addJsDef locationSelect=''}
{addJsDef defaultLat=$defaultLat}
{addJsDef defaultLong=$defaultLong}
{addJsDef hasStoreIcon=$hasStoreIcon}
{addJsDef distance_unit=$distance_unit}
{addJsDef img_store_dir=$img_store_dir}
{addJsDef img_ps_dir=$img_ps_dir}
{addJsDef searchUrl=$searchUrl}
{addJsDef logo_store=$logo_store}
{addJsDefL name=translation_1}{l s='No stores were found. Please try selecting a wider radius.' js=1}{/addJsDefL}
{addJsDefL name=translation_2}{l s='store found -- see details:' js=1}{/addJsDefL}
{addJsDefL name=translation_3}{l s='stores found -- view all results:' js=1}{/addJsDefL}
{addJsDefL name=translation_4}{l s='Phone:' js=1}{/addJsDefL}
{addJsDefL name=translation_5}{l s='Get directions' js=1}{/addJsDefL}
{addJsDefL name=translation_6}{l s='Not found' js=1}{/addJsDefL}
{/strip}
{/if}