summaryrefslogtreecommitdiff
path: root/pages/searchtimers.ecpp
blob: 1c23347801f8db434d27408f8dc28af70a42b5c3 (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
<%pre>
#include <vdr/channels.h>
#include <vdr/i18n.h>
#include "epgsearch.h"
#include "tools.h"
#include "setup.h"

using namespace vdrlive;
using namespace std;

</%pre>
<%args>
	// input parameters
	string searchtimerid;
	string action;
</%args>
<%session scope="global">
bool logged_in(false);
</%session>
<%include>page_init.eh</%include>
<{
if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
}>
<%cpp>
	pageTitle = tr("Searchtimers");
	SearchTimers timers;
	if ( !searchtimerid.empty() ) {
		if (action == "toggle")
			timers.ToggleActive(searchtimerid);
		if (action == "delete")
			timers.Delete(searchtimerid);
	}
</%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=("searchtimers") component=("searchtimers.searchtimer_actions")>
		<div class="inhalt">
			<table class="timers" cellspacing="0" cellpadding="0">
				<tr class="head">
					<td colspan="10">
						<div class="boxheader"><div><div><$ pageTitle $></div></div></div>
					</td>
				</tr>
				<tr class="description">
					<td class="border" style="border-left: 1px solid black"></td>
					<td>&nbsp;</td>
					<td><$ tr("Expression") $></td>
					<td><$ tr("Channel") $></td>
					<td><$ tr("Starts between") $>&nbsp;</td>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
					<td class="border" style="border-right: 1px solid black"></td>
				</tr>
<{
				for (SearchTimers::iterator timer = timers.begin(); timer != timers.end(); ++timer) {
}>
				<tr>
					<td class="border" style="border-left: 1px solid black"></td>
					<td><{ if(timer->UseAsSearchTimer()) { }><img src="/arrow.png" alt=""></img><{ } }></td>
					<td><$ timer->Search() $></td>
					<td><$ timer->ChannelText() $></td>
					<td><? timer->UseTime() ? timer->StartTimeFormatted()+" - "+timer->StopTimeFormatted() ?></td>
					<td><a href="searchtimers.html?searchtimerid=<$ timer->Id() $>&action=toggle"><img src="/<$ timer->UseAsSearchTimer() ? "active" : "inactive" $>.png" alt="<$ tr("Toggle search timer actions (in)active") $>" <& tooltip.hint text=(tr("Toggle search timer actions (in)active")) &>></img></a></td>
					<td><a href="searchresults.html?searchtimerid=<$ timer->Id() $>"><img src="/search.png" border="0" alt="<$ tr("Browse search timer results") $>" <& tooltip.hint text=(tr("Browse search timer results")) &>></img></a></td>
					<td><a href="edit_searchtimer.html?searchtimerid=<$ timer->Id() $>"><img src="/edit.png" alt="<$ tr("Edit search timer") $>" <& tooltip.hint text=(tr("Edit search timer")) &>></img></a></td>
					<td><a href="searchtimers.html?searchtimerid=<$ timer->Id() $>&action=delete" onclick="return confirm('<$ tr("Delete this search timer?") $>')"><img src="/del.png" alt="<$ tr("Delete search timer") $>" <& tooltip.hint text=(tr("Delete search 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">&nbsp;</td></tr>
			</table>
		</div>
	</body>
</html>
<%include>page_exit.eh</%include>

<%def searchtimer_actions>
<a href="edit_searchtimer.html"><$ tr("New search timer") $></a>
</%def>