From 9bebbad537dfedc7d143b35d1d01dc9cc7b68b5f Mon Sep 17 00:00:00 2001 From: Jasmin Jessich Date: Sat, 17 Jun 2017 03:07:52 +0200 Subject: Added column 'Searchtimer' to the timer views - This implements the change request from ludi: http://www.vdr-portal.de/board16-video-disk-recorder/board55-vdr-plugins/p1293486-vdr-plugin-live-f%C3%BCr-vdr-2-3-x/#post1293486 He requested to see the name of the serach timer, which has created a timer. --- pages/timerconflicts.ecpp | 6 +++++- pages/timers.ecpp | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'pages') diff --git a/pages/timerconflicts.ecpp b/pages/timerconflicts.ecpp index bbc35b6..514a9c7 100644 --- a/pages/timerconflicts.ecpp +++ b/pages/timerconflicts.ecpp @@ -49,7 +49,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); for (std::list< TimerInConflict >::const_iterator confltimer = conflTimers.begin(); confltimer != conflTimers.end(); ++confltimer) { - +
<$ FormatDateTime(tr("%A, %x"), conflict->ConflictTime()) + " " + FormatDateTime(tr("%I:%M %p"), conflict->ConflictTime()) + " - " + lexical_cast(confltimer->percentage) + "%" $>
@@ -60,6 +60,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<$ trVDR("Stop") $>
<$ trVDR("Priority") $>
<$ trVDR("File") $>
+
<$ tr("Searchtimer") $>
@@ -92,6 +93,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); EpgInfoPtr epgEvent; string longDescription; + string searchTimName; string title; #if VDRVERSNUM >= 20301 if (!timer->Event()) { @@ -106,6 +108,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); longDescription = StringEscapeAndBreak(SortedTimers::GetTimerInfo(*timer)) + "
" + StringEscapeAndBreak(StringWordTruncate(epgEvent->LongDescr(), maximumDescriptionLength)) + "

" + tr("Click to view details."); + searchTimName = SortedTimers::SearchTimerName(*timer); title = epgEvent->Title(); } @@ -120,6 +123,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); <& tooltip.hint text=(longDescription) &><& tooltip.display domId=(epgEvent->Id()) &> % } ><$ timer->File() $> + ">
<$ searchTimName $>
">" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>> ">Flags() & tfActive) ? "active.png" : "inactive.png") $>" alt="" <& tooltip.hint text=(tr("Toggle timer active/inactive")) &>> "><& pageelems.edit_timer timerId=(timers.GetTimerId(*timer)) &> diff --git a/pages/timers.ecpp b/pages/timers.ecpp index ff3fd40..91986dd 100644 --- a/pages/timers.ecpp +++ b/pages/timers.ecpp @@ -78,6 +78,7 @@ static const size_t maximumDescriptionLength = 300; for (SortedTimers::iterator timer = timers.begin(); timer != timers.end(); ++timer) { EpgInfoPtr epgEvent; string longDescription; + string searchTimName; #if VDRVERSNUM >= 20301 if (!timer->Event()) { LOCK_SCHEDULES_READ; @@ -92,6 +93,7 @@ static const size_t maximumDescriptionLength = 300; longDescription = StringEscapeAndBreak(SortedTimers::GetTimerInfo(*timer)) + "
" + StringEscapeAndBreak(StringWordTruncate(epgEvent->LongDescr(), maximumDescriptionLength)) + "

" + tr("Click to view details."); + searchTimName = SortedTimers::SearchTimerName(*timer); } string currentDay = SortedTimers::GetTimerDays(*timer); SortedTimers::iterator nextTimer = timer; ++nextTimer; @@ -113,7 +115,7 @@ static const size_t maximumDescriptionLength = 300; previousDay = currentDay; - +
<$ currentDay $>
@@ -125,6 +127,7 @@ static const size_t maximumDescriptionLength = 300;
<$ trVDR("Start") $>
<$ trVDR("Stop") $>
<$ trVDR("File") $>
+
<$ tr("Searchtimer") $>
@@ -149,11 +152,12 @@ static const size_t maximumDescriptionLength = 300; ">
<$ FormatDateTime(tr("%I:%M %p"), timer->StartTime()) $>
">
<$ FormatDateTime(tr("%I:%M %p"), timer->StopTime()) $>
">
<& tooltip.display domId=(epgEvent->Id()) &> % } ><$ timer->File() $>
+ ">
<$ searchTimName $>
">Flags() & tfActive) ? "active.png" : "inactive.png") $>" alt="" <& tooltip.hint text=(tr("Toggle timer active/inactive")) &>> "><& pageelems.edit_timer timerId=(timers.GetTimerId(*timer)) &> ">" alt="" <& tooltip.hint text=(tr("Delete timer")) &>> -- cgit v1.2.3