ensure tier and price information is updated in the cart after a logon
[bse.git] / site / templates / preload.tmpl
CommitLineData
b62cae00
TC
1<:# utility definitions :>
2<:-.define make_select-:>
19851056
TC
3 <:-.if !default.defined -:>
4 <:-.set default = "" -:>
5 <:.end if:>
b62cae00
TC
6 <select name="<:= name :>">
7 <:-.for i in list -:>
8 <option value="<:= i[id] |html :>"
9 <:- .if i[id] eq default :> selected="selected"<:.end if -:>
10 >
11 <:= i[desc] | html :>
12 <:-.end for-:>
13 </select>
14<:-.end define -:>
8f685a21
TC
15<:#
16page_list expects:
17base - base url for links
18pages - the result of the bse.pages call
19 :>
20<:-.define page_list-:>
21<:.set sep = base =~ /\?/ ? "&" : "?" -:>
22<:.set base = base _ sep :>
23<div class="pagelist">
24Page <:= pages.page :> of <:= pages.pagecount :>
25<:.if pages.previous_page -:>
26<a href="<:= base |html:><:= pages.pname | uri :>=1&amp;<:= pages.ppname | uri :>=<:= pages.pp | uri :>">&lt;&lt</a>
27<a href="<:= base |html:><:= pages.pname | uri :>=<:= pages.previous_page |uri:>&amp;<:= pages.ppname | uri :>=<:= pages.pp | uri :>">&lt;</a>
28<:.else -:>
29<span>&lt&lt</span>
30<span>&lt</span>
31<:.end if -:>
32<:.for p in pcats.pages :>
33<:.if p.link -:>
34<a href="<:= base |html :><:= pages.pname | uri:>=<:= p.page | uri :>&amp;<:=pages.ppname | uri :>=<:= pages.pp | uri :>"><:= p.page |html :></a>
35<:.else -:>
36<span><:= p.page |html:></span>
37<:.end if -:>
38<:.end for:>
39<:.if pages.next_page -:>
40<a href="<:= base |html:><:= pages.pname | uri :>=<:= pages.next_page |uri:>&amp;<:= pages.ppname | uri :>=<:= pages.pp | uri :>">&gt;</a>
41<a href="<:= base |html:><:= pages.pname | uri :>=<:= pages.pagecount |uri:>&amp;<:= pages.ppname | uri :>=<:= pages.pp | uri :>">&gt;&gt</a>
42<:.else -:>
43<span>&gt&gt</span>
44<span>&gt</span>
45<:.end if -:>
46</div>
47<:-.end define -:>