From bab577b2b3a1330dc0903c1f4a35bb229ccb21a7 Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Sun, 22 Apr 2007 18:36:40 +0000 Subject: - added search result page --- pages/searchresults.ecpp | 82 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 pages/searchresults.ecpp diff --git a/pages/searchresults.ecpp b/pages/searchresults.ecpp new file mode 100644 index 0000000..15ce030 --- /dev/null +++ b/pages/searchresults.ecpp @@ -0,0 +1,82 @@ +<%pre> +#include +#include +#include +#include "epgsearch.h" +#include "tools.h" + +using namespace vdrlive; +using namespace std; + + +<%args> + // input parameters + int searchtimerid; + +<%include>page_init.eh +<%cpp> + pageTitle = tr("Search results"); + + SearchResults results(searchtimerid); + +<& pageelems.doc_type &> + + + VDR-Live - <$ pageTitle $> + + <& pageelems.ajax_js &> + + + <& pageelems.logo &> + <& menu active=("searchresults") &> +
+% if (results.size() == 0) { + <$ tr("No search results") $> +% } + +<{ + 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(); + 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()); + if (current_day != day) { + if (current_day != "") { +}> + + + +<{ + } +}> + + + +% current_day = day; +% } + "> + + + + + + +% } +% if (results.size() > 0) { + + + +% } +
 
<$ day $>
<& pageelems.event_timer channelid=(channel_id) eventid=(event) &><$ channelname $><$ start $> - <$ end $><$ result->Title() $>
<$ result->ShortText() $>
 
 
+
+ + + +<%include>page_exit.eh + + -- cgit v1.2.3