blob: 0f20662526cec5b63615a3f9441db9bafe5a0b26 (
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
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
|
<%pre>
#include <vdr/i18n.h>
#include "timers.h"
#include "tools.h"
#include "setup.h"
using namespace std;
using namespace vdrlive;
</%pre>
<%args>
// input parameters
string timerid;
string action;
</%args>
<%session scope="global">
bool logged_in(false);
</%session>
<%request scope="page">
cTimer* timer;
</%request>
<%include>page_init.eh</%include>
<{
if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
}>
<%cpp>
pageTitle = tr("Timers");
cMutexLock timersLock( &LiveTimerManager() );
SortedTimers& timers = LiveTimerManager().GetTimers();
timer = 0;
if ( !timerid.empty() ) {
timer = timers.GetByTimerId( timerid );
if ( timer == 0 )
throw HtmlError( tr("Couldn't find timer. Maybe you mistyped your request?") );
if (action == "delete")
LiveTimerManager().DelTimer(timer);
if (action == "toggle")
LiveTimerManager().ToggleTimerActive(timer);
}
int previousDay = 0;
</%cpp>
<& pageelems.doc_type &>
<html>
<head>
<title>VDR-Live - <$ pageTitle $></title>
<link rel="stylesheet" type="text/css" href="/styles.css" />
<& tooltip.javascript var=("domTT_styleClass") value=("domTTepg") &>
<& pageelems.ajax_js &>
</head>
<body onload="<& pageelems.infobox_start_update &>">
<& pageelems.logo &>
<& menu active=("timers") component=("timers.timer_actions")>
<div class="inhalt">
% if (timers.size() == 0) {
Keiner Timer definiert
% } else {
<table class="timers" cellspacing="0" cellpadding="0">
<{
for (SortedTimers::iterator timer = timers.begin(); timer != timers.end(); ++timer) {
if (previousDay != timer->Day()) {
if (previousDay > 0) {
}>
<tr>
<td colspan="11" style="border-top: 1px solid black; border-bottom: none; background-image: none"> </td>
</tr>
<{
}
previousDay = timer->Day();
}>
<tr class="head">
<td style="background: url(bg_box_l.png); width: 3px;"></td>
<td colspan="9"><$ timer->WeekDays() > 0 ? *cTimer::PrintDay(0, timer->WeekDays()) : FormatDateTime(tr("%A, %x"), timer->Day()) $></td>
<td style="background: url(bg_box_r.png); width: 3px;"></td>
</tr>
<tr class="description">
<td class="border" style="border-left: 1px solid black"></td>
<td> </td>
<td><$ tr("Channel") $></td>
<td><$ tr("Start") $></td>
<td><$ tr("Stop") $></td>
<td> </td>
<td><$ tr("File") $></td>
<td> </td>
<td> </td>
<td> </td>
<td class="border" style="border-right: 1px solid black"></td>
</tr>
<{
}
}>
<tr>
<td class="border" style="border-left: 1px solid black"></td>
<td><{ if (timer->Flags() & tfActive) { }><img src="/arrow.png" alt=""></img> <{ } }></td>
<td><$ timer->Channel()->Name() $></td>
<td><$ FormatDateTime(tr("%I:%M %p"), timer->StartTime()) $></td>
<td><$ FormatDateTime(tr("%I:%M %p"), timer->StopTime()) $></td>
<td><{ if (timer->Recording()) { }><img src="/record.png" alt="Record" /><{ } }></td>
<td><$ timer->File() $></td>
<td><a href="timers.html?timerid=<$ timers.GetTimerId(*timer) $>&action=toggle"><img src="/<$ (timer->Flags() & tfActive) ? "active" : "inactive" $>.png" alt="" <& tooltip.hint text=(tr("Toggle timer active/inactive")) &>></img></a></td>
<td><a href="edit_timer.html?timerid=<$ timers.GetTimerId(*timer) $>"><img src="edit.png" alt="" <& tooltip.hint text=(tr("Edit timer")) &>></img></a></td>
<td><a href="timers.html?timerid=<$ timers.GetTimerId(*timer) $>&action=delete"><img src="del.png" alt="" <& tooltip.hint text=(tr("Delete timer")) &>></img></a></td>
<td class="border" style="border-right: 1px solid black"></td>
</tr>
<{
}
}
}>
<tr><td colspan="11" style="border-top: 1px solid black; background-image: none; border-bottom: none"> </td></tr>
</table>
</div>
</body>
</html>
<%include>page_exit.eh</%include>
<%def timer_actions>
<a href="edit_timer.html"><$ tr("New timer") $></a>
</%def>
|