| 4 |
lars |
1 |
<script>
|
|
|
2 |
$(document).ready(function(){
|
|
|
3 |
$('.sort').change(function(){
|
|
|
4 |
var sort = $(this).val();
|
|
|
5 |
var href = window.location.href.split('?');
|
|
|
6 |
if(href.length>1) {
|
|
|
7 |
if( href[1].match("search") ) {
|
|
|
8 |
var search = $(".searchValue").val();
|
|
|
9 |
window.location.href = href[0] + "?search="+ search +"&sort="+sort;
|
|
|
10 |
}else{
|
|
|
11 |
window.location.href = href[0] + "?sort="+sort;
|
|
|
12 |
}
|
|
|
13 |
|
|
|
14 |
}else{
|
|
|
15 |
window.location.href = href[0] + "?sort="+sort;
|
|
|
16 |
}
|
|
|
17 |
});
|
|
|
18 |
});
|
|
|
19 |
</script>
|
|
|
20 |
<div class="pagination_container">
|
|
|
21 |
|
|
|
22 |
<label>Sortieren: </label>
|
|
|
23 |
{if $smarty.session.sort}
|
|
|
24 |
{assign var="sort" value=$smarty.session.sort}
|
|
|
25 |
{/if}
|
|
|
26 |
<select name="sort" class="sort">
|
|
|
27 |
<option {if $sort=="beliebt" || !$smarty.get.sort}selected='selected'{/if} value="beliebt">nach Beliebtheit</option>
|
|
|
28 |
<option {if $sort=="rel"}selected='selected'{/if} value="rel">nach Relevanz</option>
|
|
|
29 |
<option {if $sort=="desc"}selected='selected'{/if} value="desc">Preis absteigend</option>
|
|
|
30 |
<option {if $sort=="asc"}selected='selected'{/if} value="asc">Preis aufsteigend</option>
|
|
|
31 |
</select>
|
|
|
32 |
<input type="hidden" class="searchValue" value="{$smarty.get.search}" />
|
|
|
33 |
|
|
|
34 |
<div>
|
|
|
35 |
<div class="p_artikel"> Artikel {$paginate.first|default:0} - {$paginate.last} ({$paginate.total} Gesamt)
|
|
|
36 |
<div class="pagination_artikelproseite">
|
|
|
37 |
{$langstrings.pagination.items_per_page}
|
|
|
38 |
{foreach $limits as $limit}
|
|
|
39 |
{if $smarty.session.Paginate.limit!=$limit}
|
|
|
40 |
{if $sp_url|strpos:"?"}
|
|
|
41 |
<a href="{$sp_url}&limit={$limit}">{$limit}</a>
|
|
|
42 |
{else}
|
|
|
43 |
<a href="{$sp_url}?limit={$limit}">{$limit}</a>
|
|
|
44 |
{/if}
|
|
|
45 |
{else}
|
|
|
46 |
{$limit}
|
|
|
47 |
{/if}
|
|
|
48 |
{if !$limit@last} | {/if}
|
|
|
49 |
{/foreach}
|
|
|
50 |
</div>
|
|
|
51 |
|
|
|
52 |
</div>
|
|
|
53 |
</div>
|
|
|
54 |
<div>
|
|
|
55 |
<div class="p_page">
|
|
|
56 |
Seite:
|
|
|
57 |
{if $paginate.page_current > 1}
|
|
|
58 |
<span>{paginate_first class="pagination"}</span>
|
|
|
59 |
{/if}
|
|
|
60 |
<span class="active">{paginate_middle format="page" class="pagination" page_limit="5"}</span>
|
|
|
61 |
{if $paginate.page_current < $paginate.page_total}
|
|
|
62 |
<span>{paginate_last class="pagination"}</span>
|
|
|
63 |
{/if}
|
|
|
64 |
</div>
|
|
|
65 |
</div>
|
|
|
66 |
</div>
|