summaryrefslogtreecommitdiff
path: root/pages/timers.ecpp
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2007-10-24 16:43:31 +0000
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2007-10-24 16:43:31 +0000
commit3e27a5e446e94a306569a9116e0d5eaa0f3f6b04 (patch)
tree182e8de7ebaf7df8f0efca076c2adf10594d3e12 /pages/timers.ecpp
parent5a5a15c9bfe832b942d0984ce117a18e005d285e (diff)
downloadvdr-plugin-live-3e27a5e446e94a306569a9116e0d5eaa0f3f6b04.tar.gz
vdr-plugin-live-3e27a5e446e94a306569a9116e0d5eaa0f3f6b04.tar.bz2
- EPG popup in timers menu (#385)
Diffstat (limited to 'pages/timers.ecpp')
-rw-r--r--pages/timers.ecpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/pages/timers.ecpp b/pages/timers.ecpp
index 71077b1..45bcc01 100644
--- a/pages/timers.ecpp
+++ b/pages/timers.ecpp
@@ -5,10 +5,13 @@
#include "tools.h"
#include "setup.h"
#include "i18n.h"
+#include "epg_events.h"
using namespace std;
using namespace vdrlive;
+static const size_t maximumDescriptionLength = 300;
+
</%pre>
<%args>
// input parameters
@@ -59,8 +62,18 @@ using namespace vdrlive;
% } else {
<table class="listing" cellspacing="0" cellpadding="0">
<%cpp>
+ EpgEvents epgEvents;
// output of the timer list:
for (SortedTimers::iterator timer = timers.begin(); timer != timers.end(); ++timer) {
+ EpgInfoPtr epgEvent;
+ string longDescription;
+ if (!timer->Event()) timer->SetEventFromSchedule();
+ if (timer->Event())
+ {
+ epgEvent = EpgEvents::CreateEpgInfo(timer->Channel(), timer->Event());
+ longDescription = StringEscapeAndBreak(StringWordTruncate(epgEvent->LongDescr(), maximumDescriptionLength))
+ + "<br/><br/>" + tr("Click to view details.");
+ }
string currentDay = SortedTimers::GetTimerDays(*timer);
SortedTimers::iterator nextTimer = timer; ++nextTimer;
bool bottom = false;
@@ -106,11 +119,17 @@ using namespace vdrlive;
timerStateImg = "arrow.png";
</%cpp>
<tr>
+
<td class="leftcol <? bottom ? "bottomrow" ?>"><img src="<$ LiveSetup().GetThemedLink("img", timerStateImg) $>" alt=""></img></td>
<td class="<? bottom ? "bottomrow" ?>"><div class="withmargin"><a href="schedule.html?channel=<$ timer->Channel()->Number()$>"><$ timer->Channel()->Name() $></a></div></td>
<td class="<? bottom ? "bottomrow" ?>"><div class="withmargin"><$ FormatDateTime(tr("%I:%M %p"), timer->StartTime()) $></div></td>
<td class="<? bottom ? "bottomrow" ?>"><div class="withmargin"><$ FormatDateTime(tr("%I:%M %p"), timer->StopTime()) $></div></td>
- <td class="<? bottom ? "bottomrow" ?>"><div class="withmargin"><$ timer->File() $></div></td>
+ <td class="<? bottom ? "bottomrow" ?>"><div class="withmargin"><a
+% if (!longDescription.empty()) {
+ <& tooltip.hint text=(longDescription) &><& tooltip.display domId=(epgEvent->Id()) &>
+% }
+ ><$ timer->File() $></a></div>
+ </td>
<td class="action <? bottom ? "bottomrow" ?>"><a href="timers.html?timerid=<$ timers.GetTimerId(*timer) $>&action=toggle"><img src="<$ LiveSetup().GetThemedLink("img", (timer->Flags() & tfActive) ? "active.png" : "inactive.png") $>" alt="" <& tooltip.hint text=(tr("Toggle timer active/inactive")) &>></img></a></td>
<td class="action <? bottom ? "bottomrow" ?>"><a href="edit_timer.html?timerid=<$ timers.GetTimerId(*timer) $>"><img src="<$ LiveSetup().GetThemedLink("img", "edit.png") $>" alt="" <& tooltip.hint text=(tr("Edit timer")) &>></img></a></td>
<td class="action rightcol <? bottom ? "bottomrow" ?>"><a href="timers.html?timerid=<$ timers.GetTimerId(*timer) $>&action=delete"><img src="<$ LiveSetup().GetThemedLink("img", "del.png") $>" alt="" <& tooltip.hint text=(tr("Delete timer")) &>></img></a></td>