From f05b2dab839898859a0b0e7d4429d8cf9aa4965e Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Sun, 6 May 2007 16:09:18 +0000 Subject: - Added recording timer indication. Fixes #302 - Added appropriate image, adaped Makefile - Changed timers.ecpp, recordings.ecpp to use only <%cpp> (Doesn't confuse syntax aware text editors like <{ }> did.) --- images/Makefile | 5 ++++- images/arrow_rec.gif | Bin 0 -> 4121 bytes pages/recordings.ecpp | 13 ++++++------ pages/timers.ecpp | 56 +++++++++++++++++++++++++------------------------- 4 files changed, 38 insertions(+), 36 deletions(-) create mode 100644 images/arrow_rec.gif diff --git a/images/Makefile b/images/Makefile index 098a701..f62a90a 100644 --- a/images/Makefile +++ b/images/Makefile @@ -23,7 +23,7 @@ OBJS = logo.o record.o active.o inactive.o button_blue.o \ reload.o stop.o one_uparrow.o one_downarrow.o tv.o \ remotecontrol.o search.o record_timer.o button_red.o \ button_green.o button_new.o help.o logo_login.o \ - button_yellow.o arrow.o on_dvd.o + button_yellow.o arrow.o arrow_rec.o on_dvd.o ### Default rules: @@ -39,6 +39,9 @@ all: libimages.a %.cpp: %.png $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CSS) -b -m "image/png" $< +%.cpp: %.gif + $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CSS) -b -m "image/gif" $< + %.cpp: %.jpg $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CSS) -b -m "image/jpg" $< diff --git a/images/arrow_rec.gif b/images/arrow_rec.gif new file mode 100644 index 0000000..16e4f46 Binary files /dev/null and b/images/arrow_rec.gif differ diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp index c9f9432..4993284 100644 --- a/pages/recordings.ecpp +++ b/pages/recordings.ecpp @@ -23,10 +23,9 @@ RecordingsTree recordingsTree(LiveRecordingsManager()); EpgEvents epgEvents; <%include>page_init.eh -<{ -if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); -}> <%cpp> + if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); + pageTitle = tr("Recordings"); <& pageelems.doc_type &> @@ -117,7 +116,7 @@ for (iter = recordingsTree.begin(path); iter != end; ++iter) { <# ---------------------------------------------------------------------- #> <%def recordings_data> -<{ +<%cpp> // create hidden div for the tooltip hints. for (vector::iterator i = epgEvents.begin(); i != epgEvents.end(); ++i) { EpgEventPtr epg = *i; @@ -125,11 +124,11 @@ for (iter = recordingsTree.begin(path); iter != end; ++iter) { + epg->StartTime(tr("%b %d %y")) + string(" ") + epg->StartTime(tr("%I:%M %p"))); string tools_component = epg->Archived().empty() ? "recordings.rec_tools" : "recordings.archived_disc" ; -}> + <& pageelems.epg_tt_box boxId=(epg->Id()) caption=(epg->Caption()) tools_comp=(tools_component) time=(start) title=(epg->Title()) short_descr=(epg->ShortDescr()) long_descr=(epg->LongDescr()) archived=(epg->Archived()) elapsed=(epg->Elapsed()) &> -<{ +<%cpp> } -}> + <# ---------------------------------------------------------------------- #> diff --git a/pages/timers.ecpp b/pages/timers.ecpp index 0f20662..7e38444 100644 --- a/pages/timers.ecpp +++ b/pages/timers.ecpp @@ -14,16 +14,15 @@ using namespace vdrlive; string action; <%session scope="global"> -bool logged_in(false); + bool logged_in(false); <%request scope="page"> -cTimer* timer; + cTimer* timer; <%include>page_init.eh -<{ -if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); -}> <%cpp> + if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); + pageTitle = tr("Timers"); cMutexLock timersLock( &LiveTimerManager() ); @@ -38,17 +37,15 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); LiveTimerManager().DelTimer(timer); if (action == "toggle") LiveTimerManager().ToggleTimerActive(timer); - } int previousDay = 0; - <& pageelems.doc_type &> VDR-Live - <$ pageTitle $> - + <& tooltip.javascript var=("domTT_styleClass") value=("domTTepg") &> <& pageelems.ajax_js &> @@ -57,60 +54,63 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); <& menu active=("timers") component=("timers.timer_actions")>
% if (timers.size() == 0) { - Keiner Timer definiert + <$ tr("No timer defined") $> % } else { -<{ +<%cpp> for (SortedTimers::iterator timer = timers.begin(); timer != timers.end(); ++timer) { if (previousDay != timer->Day()) { if (previousDay > 0) { -}> + - + -<{ +<%cpp> } previousDay = timer->Day(); -}> + - + - + - - - - + + + - <{ +<%cpp> } -}> + std::string timerStateImg = "transparent.png"; + if (timer->Recording()) + timerStateImg = "arrow_rec.gif"; + else if (timer->Flags() & tfActive) + timerStateImg = "arrow.png"; + - + - - + -<{ +<%cpp> } } -}> - + +
  
<$ timer->WeekDays() > 0 ? *cTimer::PrintDay(0, timer->WeekDays()) : FormatDateTime(tr("%A, %x"), timer->Day()) $><$ timer->WeekDays() > 0 ? *cTimer::PrintDay(0, timer->WeekDays()) : FormatDateTime(tr("%A, %x"), timer->Day()) $>
  <$ tr("Channel") $> <$ tr("Start") $> <$ tr("Stop") $>  <$ tr("File") $>   
<{ if (timer->Flags() & tfActive) { }> <{ } }> <$ timer->Channel()->Name() $> <$ FormatDateTime(tr("%I:%M %p"), timer->StartTime()) $> <$ FormatDateTime(tr("%I:%M %p"), timer->StopTime()) $><{ if (timer->Recording()) { }>Record<{ } }> <$ timer->File() $>.png" alt="" <& tooltip.hint text=(tr("Toggle timer active/inactive")) &>>.png" alt="" <& tooltip.hint text=(tr("Toggle timer active/inactive")) &>> > >
 
 
-- cgit v1.2.3