From 47365a8e84d30c44e12b5e5f6220c691a0bf074d Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Fri, 22 Feb 2008 00:36:05 +0100 Subject: First implementation of a notification about timer conflicts in LIVE. Based on the work of winni in epgsearch and its service interface. --- pages/menu.ecpp | 73 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 29 deletions(-) (limited to 'pages/menu.ecpp') diff --git a/pages/menu.ecpp b/pages/menu.ecpp index e9b5faf..c7a9ba2 100644 --- a/pages/menu.ecpp +++ b/pages/menu.ecpp @@ -2,9 +2,11 @@ #include #include #include + #include "livefeatures.h" #include "setup.h" #include "i18n.h" +#include "timerconflict.h" using namespace std; using namespace vdrlive; @@ -16,69 +18,82 @@ component; <%session scope="global"> bool logged_in(false); +TimerConflictNotifier timerNotifier(); <%request scope="page"> std::string set_active; std::string set_component; -<{ +<%cpp> if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); -}> -<{ - using namespace vdrlive; +bool hasComp(!component.empty()); +bool hasMesg(timerNotifier.ShouldNotify()); + +set_active = active; +if (hasComp) { + set_component = component; +} - set_active = active; - if (!component.empty()) - set_component = component; -}> + -% if (!component.empty()) { -