From 40bfdf4152c5bd6ef6d3b3b0e726ca5371f5a582 Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Wed, 23 May 2007 09:34:30 +0000 Subject: - summary for search results --- pages/searchresults.ecpp | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) (limited to 'pages') diff --git a/pages/searchresults.ecpp b/pages/searchresults.ecpp index 22fbbc2..a900061 100644 --- a/pages/searchresults.ecpp +++ b/pages/searchresults.ecpp @@ -5,6 +5,7 @@ #include "epgsearch.h" #include "tools.h" #include "setup.h" +#include "epg_events.h" using namespace vdrlive; using namespace std; @@ -49,14 +50,26 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); <{ string current_day = ""; bool active_line = false; - for (SearchResults::iterator result = results.begin(); result != results.end(); ++result) { -// active_line = !active_line; - string channelname = Channels.GetByChannelID(result->Channel())->Name(); + EpgEvents epgEvents; + int evntNr = 0; + + for (SearchResults::iterator result = results.begin(); result != results.end(); ++result) { +// active_line = !active_line; + string channelname = Channels.GetByChannelID(result->Channel())->Name(); string start(result->StartTime() ? FormatDateTime(tr("%I:%M %p"), result->StartTime()) : ""); 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()); + string description = result->Description(); + + + string evntId("eventId_"); + evntId += lexical_cast(++evntNr); + EpgEventPtr epgEvent(new EpgEvent(evntId, channelname, result->Title(), result->ShortText(), description, result->StartTime(), result->StopTime())); + epgEvents.push_back(epgEvent); + bool truncated = false; + if (current_day != day) { if (current_day != "") { }> @@ -75,7 +88,11 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); <& pageelems.event_timer channelid=(channel_id) eventid=(event)&> <$ channelname $> <$ start $> - <$ end $> - <$ result->Title() $>
<$ result->ShortText() $>
+ + +
") + string(tr("Click to view details."))) &><& tooltip.display domId=(epgEvent->Id()) &>><$ result->Title() $>
<$ result->ShortText() $>
+ +   % } @@ -86,6 +103,17 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); % } + -- cgit v1.2.3