-
Notifications
You must be signed in to change notification settings - Fork 8
/
paginate;firehose;default
61 lines (59 loc) · 1.92 KB
/
paginate;firehose;default
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
__section__
default
__description__
You should describe stuff here.
__title__
Useless title to template
__page__
firehose
__lang__
en_US
__name__
paginate
__seclev__
10000
__template__
[% IF options.orderby == "createtime";
day = day || options.startdate;
day = day.replace('-','');
day = day || Slash.db.getDay(0);
days = Slash.getOlderDaysFromDay(day, -1, 3);
END %]
[%
param_str = ""
state_params = ["mode", "type", "primaryskid", "order", "filter", "category"];
FOREACH param = state_params;
IF form.${param}.defined;
param_str = param_str _ "&" _ param _ "=";
fp_val = form.${param} | fixparam;
param_str = param_str _ fp_val;
END;
END;
%]
[% IF !contentsonly %]
<div class="paginate" [% IF divid %]id="[% divid %]"[% END %]>
<ul class="menu" [% IF ulid %]id="[% ulid %]"[% END %]>
[% END %]
[% IF days.size > 0 %]
[% FOREACH cur_day = days; %]
[% is_base_day = cur_day.0 == day %]
<li>[% IF is_base_day && !nopages; "["; END %]<a href="?issue=[% cur_day.0 %]">[% IF is_base_day %]<b>[% END %][% cur_day.1 %][% IF is_base_day %]</b>[% END %]</a></li>
[% IF cur_day.0 == day && !nopages %]
[% IF page %] <li><a href="?page=[% page - 1 %]&issuee=[% cur_day.0 %]"><- [% page %]</a></li>[% END %]
<li><a href="?page=[% page %][% param_str %]&issuee=[% cur_day.0 %]">[% page + 1 %]</a></li>
<li><a href="?page=[% page + 1%][% param_str %]&issuedate=[% cur_day.0 %]">[% page + 2 %] -></a>[% IF is_base_day; "]"; END %]</li>
[% END %]
[% END %]
[% ELSE %]
[% UNLESS nopages %]
[% IF page %] <li><a href="[% gSkin.rootdir %]/firehose.pl?page=[% page - 1 %][% param_str %]"><- [% page %]</a></li>[% END %]
<li><a href="[% gSkin.rootdir %]/firehose.pl?page=[% page %][% param_str %]">[% page + 1 %]</a></li>
<li><a href="[% gSkin.rootdir %]/firehose.pl?page=[% page + 1%][% param_str %]">[% page + 2 %] -></a></li>
[% END %]
[% END %]
[% IF !contentsonly %]
</ul>
</div>
[% END %]
__version__
$Id$