summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--css/styles.css34
-rw-r--r--doc/ChangeLog7
-rw-r--r--epg_events.cpp72
-rw-r--r--epg_events.h76
-rw-r--r--live/css/siteprefs.css5
-rw-r--r--live/js/live/infowin.js2
-rw-r--r--pages/epginfo.ecpp55
-rw-r--r--pages/pageelems.ecpp50
-rw-r--r--pages/searchresults.ecpp2
-rw-r--r--pages/whats_on.ecpp29
10 files changed, 215 insertions, 117 deletions
diff --git a/css/styles.css b/css/styles.css
index d197816..516ef4f 100644
--- a/css/styles.css
+++ b/css/styles.css
@@ -569,6 +569,7 @@ div.content {
height: 220px;
padding: 0;
margin: 0;
+ overflow: hidden;
background: white url(bg_tools.png) top left repeat-y;
border-left: 1px solid #000000;
@@ -582,18 +583,23 @@ div.content div.tools {
height: 220px;
margin: 0;
padding: 0;
+ padding-top: 3px;
text-align: center;
vertical-align: top;
}
div.content div.tools img {
- margin: 5px 2px;
- border: 0px;
+ margin: 2px 5px;
}
div.content div {
- padding-left: 15px;
+ padding-left: 0px;
+ margin-left: 35px;
+}
+
+div.content div div {
+ margin-left: 0px;
}
div.description {
@@ -921,9 +927,14 @@ table.login tr td {
.info-win div.epg_content {
padding: 0px 0px 7px 0px;
- margin: 0;
+ margin: 0px 0px 0px 0px;
background: transparent url(bg_tools.png) top left repeat-y;
border: 0px;
+ overflow: hidden;
+}
+
+.info-win div.epg_content div {
+ margin-left: 35px;
}
.info-win div.epg_content div.epg_tools {
@@ -931,21 +942,24 @@ table.login tr td {
width: 26px;
margin: 0;
padding: 0;
+ padding-top: 3px;
text-align: center;
vertical-align: top;
}
-.info-win div.epg_content div div.progress div {
+.info-win div.epg_content div div {
margin-left: 0px;
}
-.info-win div.epg_content div div {
- margin-left: 35px;
+/*
+.info-win div.epg_content div div.progress div {
+ margin-left: 0px;
}
+*/
.info-win div.epg_content div.epg_tools img {
- margin-top: 5px;
+ margin: 2px 5px;
}
.info-win span.epg_images img.epg_image {
@@ -1002,12 +1016,12 @@ div.about_box a:hover {
}
.info-win div.epg_content div.about_line {
- padding-left: 10px;
+ padding-left: 0px;
}
.info-win div.epg_content div.about_head {
font-weight: bold;
- margin-left: 26px;
+ margin-left: -9px;
padding-top: 6px;
}
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 289e7a1..452126c 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,10 @@
+2007-07-22 Dieter Hametner <dh+vdr at gekrumbel dot de>
+
+ Added toolbox buttons to epg info popup windows.
+ Some style fixes for this.
+ * pages/whats_on.ecpp: Use new pageelems.epg_tool_box component.
+ * pages/pageelems.ecpp: new epg_tool_box component.
+
2007-07-21 Dieter Hametner <dh+vdr at gekrumbel dot de>
* live/js/live/pageenhance.js: Enhance a normal web page with
diff --git a/epg_events.cpp b/epg_events.cpp
index 89c1347..83d067d 100644
--- a/epg_events.cpp
+++ b/epg_events.cpp
@@ -28,7 +28,7 @@ namespace vdrlive
{
}
- const std::string EpgInfo::CurrentTime(const char* format) const
+ const string EpgInfo::CurrentTime(const char* format) const
{
return FormatDateTime(format, time(0));
}
@@ -47,16 +47,7 @@ namespace vdrlive
int EpgInfo::Elapsed() const
{
- time_t end_time = GetEndTime();
- time_t start_time = GetStartTime();
-
- if (end_time > start_time) {
- time_t now = time(0);
- if ((start_time <= now) && (now <= end_time)) {
- return 100 * (now - start_time) / (end_time - start_time);
- }
- }
- return -1;
+ return EpgEvents::ElapsedTime(GetStartTime(), GetEndTime());
}
/*
@@ -217,7 +208,7 @@ namespace vdrlive
{
}
- string EpgEvents::GetDomId(const tChannelID& chanId, const tEventID& eId)
+ string EpgEvents::EncodeDomId(tChannelID const &chanId, tEventID const &eId)
{
string channelId(chanId.ToString());
string eventId("event_");
@@ -231,9 +222,9 @@ namespace vdrlive
return eventId;
}
- EpgInfoPtr EpgEvents::CreateEpgInfo(const std::string& epgid, const cSchedules* schedules)
+ void EpgEvents::DecodeDomId(string const &epgid, tChannelID& channelId, tEventID& eventId)
{
- const string eventStr("event_");
+ string const eventStr("event_");
size_t delimPos = epgid.find_last_of('_');
string cIdStr = epgid.substr(eventStr.length(), delimPos - eventStr.length());
@@ -241,51 +232,60 @@ namespace vdrlive
replace(cIdStr.begin(), cIdStr.end(), 'm', '-');
replace(cIdStr.begin(), cIdStr.end(), 'p', '.');
- const string eIdStr = epgid.substr(delimPos+1);
- const string errorInfo(tr("Epg error"));
+ string const eIdStr = epgid.substr(delimPos+1);
+
+ channelId = tChannelID::FromString(cIdStr.c_str());
+ eventId = lexical_cast<tEventID>(eIdStr);
+ }
+
+ EpgInfoPtr EpgEvents::CreateEpgInfo(string const &epgid, cSchedules const *schedules)
+ {
+ string const errorInfo(tr("Epg error"));
+ cSchedulesLock schedulesLock;
+ tEventID eventId = tEventID();
+ tChannelID channelId = tChannelID();
- tEventID eventId = lexical_cast<tEventID>(eIdStr);
- tChannelID channelId = tChannelID::FromString(cIdStr.c_str());
- const cChannel* channel = Channels.GetByChannelID(channelId);
+ DecodeDomId(epgid, channelId, eventId);
+ cChannel const *channel = Channels.GetByChannelID(channelId);
if (!channel) {
return CreateEpgInfo(epgid, errorInfo, tr("Wrong channel id"));
}
- const cSchedule* schedule = schedules->GetSchedule(channel);
+ cSchedule const *schedule = schedules->GetSchedule(channel);
if (!schedule) {
return CreateEpgInfo(epgid, errorInfo, tr("Channel has no schedule"));
}
- const cEvent* event = schedule->GetEvent(eventId);
+ cEvent const *event = schedule->GetEvent(eventId);
if (!event) {
- return CreateEpgInfo(epgid, errorInfo, tr("wrong event id"));
+ return CreateEpgInfo(epgid, errorInfo, tr("Wrong event id"));
}
return CreateEpgInfo(channel, event, epgid.c_str());
}
- EpgInfoPtr EpgEvents::CreateEpgInfo(const cChannel* chan, const cEvent* event, const char* idOverride)
+ EpgInfoPtr EpgEvents::CreateEpgInfo(cChannel const *chan, cEvent const *event, char const *idOverride)
{
- string domId(idOverride ? idOverride : GetDomId(chan->GetChannelID(), event->EventID()));
+ string domId(idOverride ? idOverride : EncodeDomId(chan->GetChannelID(), event->EventID()));
return EpgInfoPtr(new EpgEvent(domId, event, chan->Name()));
}
- EpgInfoPtr EpgEvents::CreateEpgInfo(const string& recid, const cRecording* recording, const char* caption)
+ EpgInfoPtr EpgEvents::CreateEpgInfo(string const &recid, cRecording const *recording, char const *caption)
{
return EpgInfoPtr(new EpgRecording(recid, recording, caption));
}
- EpgInfoPtr EpgEvents::CreateEpgInfo(const std::string& id, const std::string& caption, const std::string& info)
+ EpgInfoPtr EpgEvents::CreateEpgInfo(string const &id, string const &caption, string const &info)
{
return EpgInfoPtr(new EpgString(id, caption, info));
}
- list<string> EpgEvents::EpgImages(const std::string& epgid)
+ list<string> EpgEvents::EpgImages(string const &epgid)
{
list<string> images;
-
+
size_t delimPos = epgid.find_last_of('_');
string imageId = epgid.substr(delimPos+1);
imageId = imageId.substr(0, imageId.size()-1); // tvm2vdr seems always to use one digit less
-
+
const string filemask(LiveSetup().GetEpgImageDir() + "/" + imageId + "*.*");
glob_t globbuf;
globbuf.gl_offs = 0;
@@ -295,11 +295,21 @@ namespace vdrlive
{
const string imagefile(globbuf.gl_pathv[i]);
size_t delimPos = imagefile.find_last_of('/');
- images.push_back(imagefile.substr(delimPos+1));
+ images.push_back(imagefile.substr(delimPos+1));
}
globfree(&globbuf);
}
return images;
}
-
+
+ int EpgEvents::ElapsedTime(time_t const startTime, time_t const endTime)
+ {
+ if (endTime > startTime) {
+ time_t now = time(0);
+ if ((startTime <= now) && (now <= endTime)) {
+ return 100 * (now - startTime) / (endTime - startTime);
+ }
+ }
+ return -1;
+ }
}; // namespace vdrlive
diff --git a/epg_events.h b/epg_events.h
index f055045..15e4b36 100644
--- a/epg_events.h
+++ b/epg_events.h
@@ -19,29 +19,29 @@ namespace vdrlive
class EpgInfo
{
protected:
- EpgInfo(const std::string& id,
- const std::string& caption);
+ EpgInfo(std::string const &id,
+ std::string const &caption);
public:
virtual ~EpgInfo();
- virtual const std::string Id() const { return m_eventId; }
+ virtual std::string const Id() const { return m_eventId; }
- virtual const std::string Caption() const { return m_caption; }
+ virtual std::string const Caption() const { return m_caption; }
- virtual const std::string Title() const = 0;
+ virtual std::string const Title() const = 0;
- virtual const std::string ShortDescr() const = 0;
+ virtual std::string const ShortDescr() const = 0;
- virtual const std::string LongDescr() const = 0;
+ virtual std::string const LongDescr() const = 0;
- virtual const std::string Archived() const { return ""; }
+ virtual std::string const Archived() const { return ""; }
- virtual const std::string StartTime(const char* format) const;
+ virtual std::string const StartTime(const char* format) const;
- virtual const std::string EndTime(const char* format) const;
+ virtual std::string const EndTime(const char* format) const;
- virtual const std::string CurrentTime(const char* format) const;
+ virtual std::string const CurrentTime(const char* format) const;
virtual int Elapsed() const;
@@ -65,18 +65,18 @@ namespace vdrlive
friend class EpgEvents;
protected:
- EpgString(const std::string& id,
- const std::string& caption,
- const std::string& info);
+ EpgString(std::string const &id,
+ std::string const &caption,
+ std::string const &info);
public:
virtual ~EpgString();
- virtual const std::string Title() const;
+ virtual std::string const Title() const;
- virtual const std::string ShortDescr() const;
+ virtual std::string const ShortDescr() const;
- virtual const std::string LongDescr() const;
+ virtual std::string const LongDescr() const;
virtual time_t GetStartTime() const;
@@ -93,18 +93,18 @@ namespace vdrlive
friend class EpgEvents;
protected:
- EpgEvent(const std::string& id,
- const cEvent* event,
- const char* channelName = "");
+ EpgEvent(std::string const &id,
+ cEvent const *event,
+ char const *channelName = "");
public:
virtual ~EpgEvent();
- virtual const std::string Title() const { return std::string(m_event->Title() ? m_event->Title() : ""); }
+ virtual std::string const Title() const { return std::string(m_event->Title() ? m_event->Title() : ""); }
- virtual const std::string ShortDescr() const { return std::string(m_event->ShortText() ? m_event->ShortText() : ""); }
+ virtual std::string const ShortDescr() const { return std::string(m_event->ShortText() ? m_event->ShortText() : ""); }
- virtual const std::string LongDescr() const { return std::string(m_event->Description() ? m_event->Description() : ""); }
+ virtual std::string const LongDescr() const { return std::string(m_event->Description() ? m_event->Description() : ""); }
virtual time_t GetStartTime() const { return m_event->StartTime(); }
@@ -121,22 +121,24 @@ namespace vdrlive
friend class EpgEvents;
protected:
- EpgRecording(const std::string& recid, const cRecording* recording, const char* caption);
+ EpgRecording(std::string const &recid,
+ cRecording const *recording,
+ char const *caption);
const std::string Name() const;
public:
virtual ~EpgRecording();
- virtual const std::string Caption() const;
+ virtual std::string const Caption() const;
- virtual const std::string Title() const;
+ virtual std::string const Title() const;
- virtual const std::string ShortDescr() const;
+ virtual std::string const ShortDescr() const;
- virtual const std::string LongDescr() const;
+ virtual std::string const LongDescr() const;
- virtual const std::string Archived() const;
+ virtual std::string const Archived() const;
virtual time_t GetStartTime() const;
@@ -156,32 +158,36 @@ namespace vdrlive
EpgEvents();
virtual ~EpgEvents();
- static std::string GetDomId(const tChannelID& chanId, const tEventID& eventId);
+ static std::string EncodeDomId(tChannelID const &chanId, tEventID const &eventId);
+ static void DecodeDomId(std::string const &epgid, tChannelID &chanId, tEventID &eventId);
/**
* Allocate and initalize an epgEvent instance with the
* passed channel and event information.
*/
- static EpgInfoPtr CreateEpgInfo(const cChannel* chan, const cEvent* event, const char* idOverride = 0);
+ static EpgInfoPtr CreateEpgInfo(cChannel const *chan, cEvent const *event, char const *idOverride = 0);
/**
* This is the inverse creator for epgInfos to the creator above.
*/
- static EpgInfoPtr CreateEpgInfo(const std::string& epgid, const cSchedules* schedules);
+ static EpgInfoPtr CreateEpgInfo(std::string const &epgid, cSchedules const *schedules);
/**
* Allocate and initalize an epgEvent instance with the
* passed recording information.
*/
- static EpgInfoPtr CreateEpgInfo(const std::string& recid, const cRecording* recording, const char* caption = 0);
+ static EpgInfoPtr CreateEpgInfo(std::string const &recid, cRecording const *recording, char const *caption = 0);
/**
* Allocate and initalize an epgEvent instance with the
* passed string informations
*/
- static EpgInfoPtr CreateEpgInfo(const std::string& id, const std::string& caption, const std::string& info);
+ static EpgInfoPtr CreateEpgInfo(std::string const &id, std::string const &caption, std::string const &info);
+
+ static std::list<std::string> EpgImages(std::string const &epgid);
+
+ static int ElapsedTime(time_t const startTime, time_t const endTime);
- static std::list<std::string> EpgImages(const std::string& epgid);
private:
};
}; // namespace vdrlive
diff --git a/live/css/siteprefs.css b/live/css/siteprefs.css
index 9fa03cc..2f440b4 100644
--- a/live/css/siteprefs.css
+++ b/live/css/siteprefs.css
@@ -16,7 +16,10 @@ table {
}
*/
-/* comment this out, if you want epg images at their native size */
+/* comment this out, if you want epg images at their native size
+ * the popup windows. This here restricts their width to 120 px.
+ * You might also only change size.
+ */
.info-win span.epg_images {
width: 120px;
}
diff --git a/live/js/live/infowin.js b/live/js/live/infowin.js
index 393cd87..1e35438 100644
--- a/live/js/live/infowin.js
+++ b/live/js/live/infowin.js
@@ -254,7 +254,7 @@ InfoWin.Ajax = InfoWin.extend({
options: {
loadingMsg: 'loading',
errorMsg: 'an error occured!',
- onError: Class.empty,
+ onError: Class.empty
},
initialize: function(id, url, options){
diff --git a/pages/epginfo.ecpp b/pages/epginfo.ecpp
index 9487040..c14d89d 100644
--- a/pages/epginfo.ecpp
+++ b/pages/epginfo.ecpp
@@ -1,12 +1,31 @@
<%pre>
#include <sys/stat.h>
#include <vdr/tools.h>
+
+#include "stdext.h"
#include "exception.h"
#include "setup.h"
#include "tools.h"
#include "epg_events.h"
#include "recordings.h"
+namespace vdrlive {
+ class SchedulesLock
+ {
+ public:
+ SchedulesLock() : m_schedulesLock() {}
+
+ operator cSchedulesLock& () { return m_schedulesLock; }
+
+ private:
+ SchedulesLock(SchedulesLock const &schedulesLock) {}
+
+ cSchedulesLock m_schedulesLock;
+ };
+
+ typedef std::tr1::shared_ptr<SchedulesLock> SchedulesLockPtr;
+}
+
using namespace vdrlive;
using namespace std;
@@ -16,24 +35,25 @@ using namespace std;
string async;
</%args>
<%session scope="global">
-bool logged_in(false);
+ bool logged_in(false);
</%session>
+<%request scope="page">
+ EpgInfoPtr epgEvent;
+</%request>
<%include>page_init.eh</%include>
<%cpp>
-if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
-</%cpp>
-<%cpp>
+ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
+
pageTitle = tr("Electronic program guide information");
bool ajaxReq = !async.empty() && (lexical_cast<int>(async) != 0);
- EpgInfoPtr epgEvent;
- bool aboutBox(false);
+ bool aboutBox = false;
- // These get initialized when needed. When freed by getting out
+ // One of these get initialized when needed. When freed by getting
// out of scope they will release (if initialized) important
// Semaphores/Locks.
- cSchedulesLock schedulesLock;
+ SchedulesLockPtr schedulesLockPtr;
RecordingsManagerPtr recordings;
if (!epgid.empty()) {
@@ -53,7 +73,11 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
}
// check for event:
else if (epgid.compare(0, event.length(), event) == 0) {
- const cSchedules* schedules = cSchedules::Schedules(schedulesLock);
+ schedulesLockPtr = SchedulesLockPtr(new SchedulesLock);
+ if (!schedulesLockPtr) {
+ throw HtmlError(tr("Error aquiring schedules lock"));
+ }
+ const cSchedules* schedules = cSchedules::Schedules(*schedulesLockPtr);
if (!schedules) {
throw HtmlError(tr("Error aquiring schedules"));
}
@@ -97,6 +121,9 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
if (recordings) {
tools_component = epgEvent->Archived().empty() ? "recordings.rec_tools" : "recordings.archived_disc" ;
}
+ if (schedulesLockPtr) {
+ tools_component = "epginfo.epgTools";
+ }
</%cpp>
<& pageelems.epg_tt_box boxId=(epgEvent->Id()) caption=(epgEvent->Caption()) tools_comp=(tools_component) time=(start) title=(epgEvent->Title()) short_descr=(epgEvent->ShortDescr()) long_descr=(epgEvent->LongDescr()) archived=(epgEvent->Archived()) elapsed=(epgEvent->Elapsed()) &>
<%cpp>
@@ -112,3 +139,13 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
</html>
<%include>page_exit.eh</%include>
+
+<# ---------------------------------------------------------------------- #>
+
+<%def epgTools>
+<%args>
+string id;
+int detail;
+</%args>
+<& pageelems.epg_tool_box detail=(detail) epgid=(id) title=(epgEvent->Title()) startTime=(epgEvent->GetStartTime()) endTime=(epgEvent->GetEndTime()) &>
+</%def>
diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp
index 799412b..2cff427 100644
--- a/pages/pageelems.ecpp
+++ b/pages/pageelems.ecpp
@@ -190,6 +190,52 @@ int update_status(1);
<# ---------------------------------------------------------------------- #>
+<%def epg_tool_box>
+<%args>
+ int detail;
+ string epgid;
+ string title;
+ time_t startTime;
+ time_t endTime;
+ int lastCurrentChanel = int();
+</%args>
+<%cpp>
+ int elapsed = EpgEvents::ElapsedTime(startTime, endTime);
+ tEventID eventId = tEventID();
+ tChannelID channelId = tChannelID();
+
+ EpgEvents::DecodeDomId(epgid, channelId, eventId);
+ if (detail) { // output for vertical toolbox
+</%cpp>
+ <& pageelems.event_timer channelid=(channelId) eventid=(eventId) &>
+<%cpp>
+ if (elapsed > 0) {
+</%cpp>
+ <& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channelId) image="zap.png" alt="" &>
+<%cpp>
+ }
+ if (LiveFeatures<features::epgsearch>().Recent()) {
+</%cpp>
+ <a href="searchresults.html?searchplain=<$ StringEscapeAndBreak(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a>
+<%cpp>
+ }
+</%cpp>
+ <a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a>
+<%cpp>
+ }
+ else { // table output
+</%cpp>
+ <td class="action leftcol <? lastCurrentChanel ? "bottomrow"?>"><& pageelems.event_timer channelid=(channelId) eventid=(eventId) &></td>
+ <td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (elapsed > 0) { </%cpp><& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channelId) image="zap.png" alt="" &><%cpp> } </%cpp></td>
+ <td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (LiveFeatures<features::epgsearch>().Recent()) { </%cpp><a href="searchresults.html?searchplain=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a><%cpp> } else { </%cpp><img src="transparent.png" width="16" height="16"><%cpp> } </%cpp></td>
+ <td class="action <? lastCurrentChanel ? "bottomrow"?>"><a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" border="0" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a></td>
+<%cpp>
+ }
+</%cpp>
+</%def>
+
+<# ---------------------------------------------------------------------- #>
+
<%def epg_tt_box>
<%args>
string boxId;
@@ -208,9 +254,9 @@ int update_status(1);
</div>
<div class="epg_content">
<div class="epg_tools">
- <& (tools_comp) id=(boxId) archived=(archived) &>
+ <& (tools_comp) id=(boxId) archived=(archived) detail=(1) &>
</div>
- <div>
+ <div class="epg_info">
<div class="info"><%cpp> if (!archived.empty()) { </%cpp><span class="bold"><$ (archived + " ") $></span><%cpp> } </%cpp><$ (time) $></div>
<%cpp>
if (elapsed >= 0) {
diff --git a/pages/searchresults.ecpp b/pages/searchresults.ecpp
index 63226d5..dda0d12 100644
--- a/pages/searchresults.ecpp
+++ b/pages/searchresults.ecpp
@@ -69,7 +69,7 @@ bool logged_in(false);
tEventID event = result->EventId();
tChannelID channel_id(result->Channel());
string description = result->Description();
- string epgDomId(EpgEvents::GetDomId(result->Channel(), event));
+ string epgDomId(EpgEvents::EncodeDomId(result->Channel(), event));
bool truncated = false;
diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp
index d149e55..dfba641 100644
--- a/pages/whats_on.ecpp
+++ b/pages/whats_on.ecpp
@@ -128,21 +128,6 @@ if (type == "now") {
continue;
}
- tChannelID channel_id(Channel->GetChannelID());
- tEventID event = Event->EventID();
-
-
- // string evntId("event_");
- //
- // string schanid(channel_id.ToString());
- // replace(schanid.begin(), schanid.end(), '.', 'p');
- // replace(schanid.begin(), schanid.end(), '-', 'm');
- // evntId += schanid;
- // evntId += '_';
- // evntId += lexical_cast<std::string>(event);
- // // evntId += lexical_cast<std::string, int>(++evntNr);
- // EpgEventPtr epgEvent(new EpgEvent(evntId, Event, Channel->Name()));
- // // epgEvents.push_back(epgEvent);
EpgInfoPtr epgEvent = EpgEvents::CreateEpgInfo(Channel, Event);
bool truncated = false;
@@ -159,14 +144,7 @@ if (type == "now") {
</div>
<div class="content">
<div class="tools">
- <& pageelems.event_timer channelid=(channel_id) eventid=(event) &>
-% if (type == "now") {
- <& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channel_id) image="zap.png" alt="" &>
-% }
-% if ( LiveFeatures< features::epgsearch >().Recent() ) {
- <a href="searchresults.html?searchplain=<$ StringEscapeAndBreak(epgEvent->Title()) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a>
-% }
- <a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(epgEvent->Title()) $>"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a>
+ <& pageelems.epg_tool_box detail=(1) epgid=(epgEvent->Id()) title=(epgEvent->Title()) startTime=(epgEvent->GetStartTime()) endTime=(epgEvent->GetEndTime()) &>
</div>
<div>
<div class="info"><$ (epgEvent->StartTime(tr("%I:%M %p"))) $> - <$ (epgEvent->EndTime(tr("%I:%M %p"))) $></div>
@@ -189,10 +167,7 @@ if (type == "now") {
|| (!Channels.Next(Channel)));
</%cpp>
<tr>
- <td class="action leftcol <? lastCurrentChanel ? "bottomrow"?>"><& pageelems.event_timer channelid=(channel_id) eventid=(event) &></td>
- <td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (type == "now") { </%cpp><& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channel_id) image="zap.png" alt="" &><%cpp> } </%cpp>
- <td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (LiveFeatures<features::epgsearch>().Recent() ) { </%cpp><a href="searchresults.html?searchplain=<$ StringUrlEncode(epgEvent->Title()) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" border="0" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a><%cpp> } else { </%cpp><img src="transparent.png" width="16" height="16"><%cpp> } </%cpp></td>
- <td class="action <? lastCurrentChanel ? "bottomrow"?>"><a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(epgEvent->Title()) $>"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" border="0" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a></td>
+ <& pageelems.epg_tool_box detail=(0) epgid=(epgEvent->Id()) title=(epgEvent->Title()) startTime=(epgEvent->GetStartTime()) endTime=(epgEvent->GetEndTime()) lastCurrentChanel=(lastCurrentChanel ? 1 : 0) &>
<td class="topaligned <? lastCurrentChanel ? "bottomrow"?>">
<div class="withmargin">
<div class="nomargin"><$ (epgEvent->StartTime(tr("%I:%M %p"))) $> - <$ (epgEvent->EndTime(tr("%I:%M %p"))) $></div>