diff options
author | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2007-05-23 09:34:30 +0000 |
---|---|---|
committer | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2007-05-23 09:34:30 +0000 |
commit | 40bfdf4152c5bd6ef6d3b3b0e726ca5371f5a582 (patch) | |
tree | 070fe23a5c4ac6b0ab13d94802cd97b39ca6e37c /pages | |
parent | ae96a23d9cc3d1e2f13b567be5126b7c9a44d032 (diff) | |
download | vdr-plugin-live-40bfdf4152c5bd6ef6d3b3b0e726ca5371f5a582.tar.gz vdr-plugin-live-40bfdf4152c5bd6ef6d3b3b0e726ca5371f5a582.tar.bz2 |
- summary for search results
Diffstat (limited to 'pages')
-rw-r--r-- | pages/searchresults.ecpp | 36 |
1 files changed, 32 insertions, 4 deletions
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<std::string, int>(++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"); <td style="border-left: 1px solid black"><& pageelems.event_timer channelid=(channel_id) eventid=(event)&></td> <td><$ channelname $></td> <td><$ start $> - <$ end $></td> - <td><strong><$ result->Title() $></strong><br /><$ result->ShortText() $><br /></td> + + <td> + <div class="more"<& tooltip.hint text=(StringEscapeAndBreak(StringWordTruncate(description, 300, truncated)) + string("<br />") + string(tr("Click to view details."))) &><& tooltip.display domId=(epgEvent->Id()) &>><strong><$ result->Title() $></strong></div><$ result->ShortText() $><br /> + </td> + <td style="border-right: 1px solid black"> </td> </tr> % } @@ -86,6 +103,17 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); % } </table> </div> + <div class="epg_data" style="display: none;"> +<{ + // create hidden div for the tooltip hints. + for (vector<EpgEventPtr>::iterator i = epgEvents.begin(); i != epgEvents.end(); ++i) { + EpgEventPtr epg = *i; +}> + <& pageelems.epg_tt_box boxId=(epg->Id()) caption=(epg->Caption()) time=(epg->StartTime(tr("%I:%M %p")) + string(" - ") + epg->EndTime(tr("%I:%M %p"))) title=(epg->Title()) short_descr=(epg->ShortDescr()) long_descr=(epg->LongDescr()) elapsed=(epg->Elapsed()) &> +<{ + } +}> + </div> </body> </html> |