From 25df031093ca740ba3d081b5951b2d34e6614f0f Mon Sep 17 00:00:00 2001 From: Thomas Keil Date: Sun, 7 Jan 2007 17:26:39 +0000 Subject: New --- pages/tooltip_widget.ecpp | 4 +++ pages/whats_on.ecpp | 86 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 pages/tooltip_widget.ecpp create mode 100644 pages/whats_on.ecpp diff --git a/pages/tooltip_widget.ecpp b/pages/tooltip_widget.ecpp new file mode 100644 index 0000000..1b65950 --- /dev/null +++ b/pages/tooltip_widget.ecpp @@ -0,0 +1,4 @@ +<%args> +tooltip = ""; + + onmouseover="domTT_activate(this, event, 'content', '<$ tooltip $>', 'trail', true, 'delay', 0);" \ No newline at end of file diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp new file mode 100644 index 0000000..3f12d84 --- /dev/null +++ b/pages/whats_on.ecpp @@ -0,0 +1,86 @@ +<%pre> +#include +#include +#include +#include +#include +#include "setup.h" +#include "tools.h" + +using namespace vdrlive; + + +<%args> +type = "now"; + +<{ + +cSchedulesLock schedulesLock; +const cSchedules* Schedules = cSchedules::Schedules(schedulesLock); + +if (type == "now") + std::string head(tr("What's running now")); +else + std::string head(tr("What's running at")+FormatDateTime(tr("%I:%M %p"), time(0))); + +}> + + + VDR-Live - <$ head $> + + + +
+ VDR Live! +<& menu > +
+
+<& pageelems.header_box content=(head) &> + +<{ + ReadLock channelsLock( Channels ); + if (channelsLock) { + for (cChannel *Channel = Channels.First(); Channel && Channel->Number() <= LiveSetup().GetLastChannel(); Channel = Channels.Next(Channel)) { + if (!Channel->GroupSep()) { + const cSchedule *Schedule = Schedules->GetSchedule(Channel); + if (Schedule) { + const cEvent *Event = (type == "now" ? Schedule->GetPresentEvent() : Schedule->GetFollowingEvent()); + if (Event) { + std::string title(Event->Title() ? Event->Title() : ""); + std::string channel_name(Channel->Name()); + std::string short_description(Event->ShortText() ? Event->ShortText() : ""); + std::string description(Event->Description() ? Event->Description() : ""); + std::string start(Event->StartTime() ? FormatDateTime(tr("%I:%M %p"), Event->StartTime()) : ""); + std::string end(Event->EndTime() ? FormatDateTime(tr("%I:%M %p"), Event->EndTime()) : ""); + std::string start_h(FormatDateTime( "%H", Event->StartTime())); + std::string end_h(FormatDateTime( "%H", Event->EndTime())); + std::string start_m(FormatDateTime( "%M", Event->StartTime())); + std::string end_m(FormatDateTime( "%M", Event->EndTime())); + + +}> + + + + + + +
<$ channel_name $>
+ border="0"/> + +
<$ start $> - <$ end $>
+
<$ title $>
+
<$ short_description $>
+
<$ description $>
+
+ +<{ + } + } + } + } + } +}> +
+ + -- cgit v1.2.3