From 8cf9e58d0aa6f6395e3353126ce684f3923b4d23 Mon Sep 17 00:00:00 2001 From: Andreas Mair Date: Thu, 31 May 2007 10:56:35 +0000 Subject: Implemented list view (see Feature Request #0000338). --- pages/whats_on.ecpp | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp index baa99f5..216eb2a 100644 --- a/pages/whats_on.ecpp +++ b/pages/whats_on.ecpp @@ -14,6 +14,7 @@ using namespace vdrlive; <%args> type = "now"; +mode = "detail"; string attime; string fixtime; @@ -23,6 +24,7 @@ bool logged_in(false); <%request scope="page"> string current_type; +string current_mode; string current_attime; string current_fixtime; string current_displaytime; @@ -41,6 +43,7 @@ time_t seektime = 0; string displaytime; current_type = type; +current_mode = mode; current_attime = attime; current_fixtime = fixtime; @@ -73,12 +76,12 @@ if (type == "now") { function showtime(selection) { if (selection.options[selection.selectedIndex].value != "") - window.location.href = "whats_on.html?type=at&fixtime=" + selection.options[selection.selectedIndex].value; + window.location.href = "whats_on.html?type=at&mode=<$ current_mode $>&fixtime=" + selection.options[selection.selectedIndex].value; } function showspectime(selection) { if (selection.value != "") - window.location.href = "whats_on.html?type=at&attime=" + selection.value; + window.location.href = "whats_on.html?type=at&mode=<$ current_mode $>&attime=" + selection.value; } //--> @@ -86,11 +89,18 @@ if (type == "now") { <& pageelems.logo &> <& menu active=("whats_on") component=("whats_on.whats_on_actions")>
+% if (mode == "list") { + + + + +% } <{ EpgEvents epgEvents; ReadLock channelsLock( Channels ); if (channelsLock) { + bool active_line = false; int evntNr = 0; for (cChannel *Channel = Channels.First(); Channel && Channel->Number() <= LiveSetup().GetLastChannel(); Channel = Channels.Next(Channel)) { if (!Channel->GroupSep()) { @@ -115,6 +125,7 @@ if (type == "now") { bool truncated = false; string description(); }> +% if (mode == "detail") {
@@ -142,6 +153,20 @@ if (type == "now") {
+% } else { // mode == "list" + "> + + + + + +% } <{ } } @@ -160,6 +185,12 @@ if (type == "now") { <{ } }> +% if (mode == "list") { + + + +
<$ head $>
<& pageelems.event_timer channelid=(channel_id) eventid=(event) &> +% if (LiveSetup().HaveEPGSearch()) { + > +% } + <$ (epgEvent->StartTime(tr("%I:%M %p"))) $> - <$ (epgEvent->EndTime(tr("%I:%M %p"))) $> +
LongDescr(), 300, truncated)) + string("
") + string(tr("Click to view details."))) &><& tooltip.display domId=(epgEvent->Id()) &>><$ (epgEvent->Title()) $>
<$ (epgEvent->ShortDescr()) $>
+
 
 
+% }
@@ -167,9 +198,9 @@ if (type == "now") { <%include>page_exit.eh <%def whats_on_actions> -" href="whats_on.html?type=now" id="nowhref"><$ tr("Now") $> +" href="whats_on.html?type=now&mode=<$ current_mode $>" id="nowhref"><$ tr("Now") $> | -" href="whats_on.html?type=next" id="nexthref"><$ tr("Next") $> +" href="whats_on.html?type=next&mode=<$ current_mode $>" id="nexthref"><$ tr("Next") $> | <$ tr("What's on") $> | <$ tr("at") $> -" onchange="showspectime(this)"/> +" onchange="showspectime(this)"/> +| +<$ tr("Detailview") $> +| +<$ tr("Listview") $> -- cgit v1.2.3