summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2007-05-03 18:17:16 +0000
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2007-05-03 18:17:16 +0000
commit3a0ab012c018c1d5093c8cdc89537a9d4467afb0 (patch)
treed8b999b85e95f725f2dfba00fdf2eae91e9b50d8 /pages
parent69d1982a650657a4cd2d17b818c3d7bdc3e969e4 (diff)
downloadvdr-plugin-live-3a0ab012c018c1d5093c8cdc89537a9d4467afb0.tar.gz
vdr-plugin-live-3a0ab012c018c1d5093c8cdc89537a9d4467afb0.tar.bz2
- EPG pages now display record.png or record_timer.png depending on an existing timer
- If record_timer.png is displayed one can now edit the timer for an event
Diffstat (limited to 'pages')
-rw-r--r--pages/pageelems.ecpp12
-rw-r--r--pages/searchresults.ecpp5
2 files changed, 14 insertions, 3 deletions
diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp
index 74af3dd..7acf72a 100644
--- a/pages/pageelems.ecpp
+++ b/pages/pageelems.ecpp
@@ -4,6 +4,7 @@
#include <vdr/epg.h>
#include "tools.h"
#include "i18n.h"
+#include "timers.h"
using namespace std;
using namespace vdrlive;
@@ -88,7 +89,16 @@ using namespace vdrlive;
tChannelID channelid;
tEventID eventid;
</%args>
- <a href="edit_timer.html?channelid=<$ channelid $>&eventid=<$ eventid $>"><img src="record.png" alt="" <& tooltip.hint text=(tr("Record this")) &> /></a>
+<%cpp> const cTimer* timer = LiveTimerManager().GetTimer(eventid, channelid);
+ if (timer) {
+</%cpp>
+ <a href="edit_timer.html?timerid=<$ LiveTimerManager().GetTimers().GetTimerId(*timer) $>">
+ <img src="record_timer.png" alt="" <& tooltip.hint text=(tr("Edit this")) &> />
+<%cpp> } else { </%cpp>
+ <a href="edit_timer.html?channelid=<$ channelid $>&eventid=<$ eventid $>">
+ <img src="record.png" alt="" <& tooltip.hint text=(tr("Record this")) &> />
+<%cpp> } </%cpp>
+ </a>
</%def>
<# ---------------------------------------------------------------------- #>
diff --git a/pages/searchresults.ecpp b/pages/searchresults.ecpp
index 542e0ac..22fbbc2 100644
--- a/pages/searchresults.ecpp
+++ b/pages/searchresults.ecpp
@@ -35,6 +35,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.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 &>">
@@ -55,7 +56,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
string end(result->StopTime() ? FormatDateTime(tr("%I:%M %p"), result->StopTime()) : "");
string day(result->StartTime() ? FormatDateTime(tr("%A, %b %d %Y"), result->StartTime()) : "");
tEventID event = result->EventId();
- tChannelID channel_id(result->Channel());
+ tChannelID channel_id(result->Channel());
if (current_day != day) {
if (current_day != "") {
}>
@@ -71,7 +72,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
% current_day = day;
% }
<tr class="<? active_line ? "active" ?>">
- <td style="border-left: 1px solid black"><& pageelems.event_timer channelid=(channel_id) eventid=(event) &></td>
+ <td style="border-left: 1px solid black"><& pageelems.event_timer channelid=(channel_id) eventid=(event)&></td>
<td><$ channelname $></td>
<td><$ start $> - <$ end $></td>
<td><strong><$ result->Title() $></strong><br /><$ result->ShortText() $><br /></td>