blob: d1e02d6a5a3452e06014adbad9321fd2b0b41306 (
plain)
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
|
<%pre>
#include <vdr/plugin.h>
#include <vdr/config.h>
</%pre>
<%args>
active;
component;
</%args>
<%request scope="page">
std::string set_active;
std::string set_component;
</%request>
<{
set_active = active;
if (!component.empty())
set_component = component;
}>
<div class="menu">
<a href="whats_on.html?type=now" <& menu.setactive current=("now") &>><$ tr("What's on now?") $></a> <& menu.component current=("now") &> |
<a href="whats_on.html?type=next" <& menu.setactive current=("next") &>><$ tr("What's on next?") $></a> <& menu.component current=("next") &> |
<a href="schedule.html" <& menu.setactive current=("schedule") &>><$ tr("Schedule") $></a> <& menu.component current=("schedule") &> |
<a href="timers.html" <& menu.setactive current=("timers") &>><$ tr("Timers") $></a> <& menu.component current=("timers") &> |
<a href="searchtimers.html" <& menu.setactive current=("searchtimers") &>><$ tr("Searchtimers") $></a> <& menu.component current=("searchtimers") &> |
<a href="recordings.html" <& menu.setactive current=("recordings") &>><$ tr("Recordings") $></a> <& menu.component current=("recordings") &> |
<a href="remote.html" <& menu.setactive current=("remote") &>><$ tr("Remote Control") $></a> <& menu.component current=("remote") &>
</div>
<%def setactive>
<%args>
current;
</%args>
<%cpp> if (current== set_active) { </%cpp>class="active"<%cpp> } </%cpp>
</%def>
<%def component>
<%args>
current;
</%args>
<%cpp> if ((current== set_active) && (!set_component.empty())) { </%cpp><& (set_component) &><%cpp> } </%cpp>
</%def>
|