diff options
Diffstat (limited to 'pages')
-rw-r--r-- | pages/pageelems.ecpp | 27 | ||||
-rw-r--r-- | pages/timerconflicts.ecpp | 2 | ||||
-rw-r--r-- | pages/timers.ecpp | 2 |
3 files changed, 22 insertions, 9 deletions
diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp index ab2b53b..e70d7fd 100644 --- a/pages/pageelems.ecpp +++ b/pages/pageelems.ecpp @@ -124,17 +124,30 @@ int update_status(1); const cTimer* timer = LiveTimerManager().GetTimer(eventid, channelid); if (timer) { </%cpp> - <a href="edit_timer.html?timerid=<$ LiveTimerManager().GetTimers().GetTimerId(*timer) $>"> - <img src="<$ LiveSetup().GetThemedLink("img", "record_timer.png") $>" alt="" <& tooltip.hint text=(tr("Edit this")) &> /> -<%cpp> } else { </%cpp> - <a href="edit_timer.html?epgid=<$ epgid $>"> - <img src="<$ LiveSetup().GetThemedLink("img", "record.png") $>" alt="" <& tooltip.hint text=(tr("Record this")) &> /> -<%cpp> } </%cpp> - </a> + <& pageelems.edit_timer timerId=(LiveTimerManager().GetTimers().GetTimerId(*timer)) imgName=("record_timer.png") &> +<%cpp> + } + else { +</%cpp> + <a href="edit_timer.html?epgid=<$ epgid $>"><img src="<$ LiveSetup().GetThemedLink("img", "record.png") $>" alt="" <& tooltip.hint text=(tr("Record this")) &> /></a> +<%cpp> + } +</%cpp> </%def> <# ---------------------------------------------------------------------- #> +<%def edit_timer> +<%args> + string timerId; + string imgName = "edit.png"; +</%args> + <a href="edit_timer.html?timerid=<$ SortedTimers::EncodeDomId(timerId) $>"><img src="<$ LiveSetup().GetThemedLink("img", imgName) $>" alt="" <& tooltip.hint text=(tr("Edit timer")) &> /></a> +</%def> + + +<# ---------------------------------------------------------------------- #> + <%def ajax_js> <%cpp> if (LiveSetup().GetUseAjax()) { diff --git a/pages/timerconflicts.ecpp b/pages/timerconflicts.ecpp index ed7e0b6..4e2c15c 100644 --- a/pages/timerconflicts.ecpp +++ b/pages/timerconflicts.ecpp @@ -112,7 +112,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); ><$ timer->File() $></a></div></td> <td class="action <? bottom ? "bottomrow" ?>"><a href="searchresults.html?searchplain=<$ StringEscapeAndBreak(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a></td> <td class="action <? bottom ? "bottomrow" ?>"><a href="timers.html?timerid=<$ SortedTimers::EncodeDomId(timers.GetTimerId(*timer)) $>&action=toggle"><img src="<$ LiveSetup().GetThemedLink("img", (timer->Flags() & tfActive) ? "active.png" : "inactive.png") $>" alt="" <& tooltip.hint text=(tr("Toggle timer active/inactive")) &>></img></a></td> - <td class="action <? bottom ? "bottomrow" ?>"><a href="edit_timer.html?timerid=<$ SortedTimers::EncodeDomId(timers.GetTimerId(*timer)) $>"><img src="<$ LiveSetup().GetThemedLink("img", "edit.png") $>" alt="" <& tooltip.hint text=(tr("Edit timer")) &>></img></a></td> + <td class="action <? bottom ? "bottomrow" ?>"><& pageelems.edit_timer timerId=(timers.GetTimerId(*timer)) &></td> <td class="action rightcol <? bottom ? "bottomrow" ?>"><a href="timers.html?timerid=<$ SortedTimers::EncodeDomId(timers.GetTimerId(*timer)) $>&action=delete"><img src="<$ LiveSetup().GetThemedLink("img", "del.png") $>" alt="" <& tooltip.hint text=(tr("Delete timer")) &>></img></a></td> </tr> % } diff --git a/pages/timers.ecpp b/pages/timers.ecpp index 3e6f56d..edea2a9 100644 --- a/pages/timers.ecpp +++ b/pages/timers.ecpp @@ -146,7 +146,7 @@ static const size_t maximumDescriptionLength = 300; ><$ timer->File() $></a></div> </td> <td class="action <? bottom ? "bottomrow" ?>"><a href="timers.html?timerid=<$ SortedTimers::EncodeDomId(timers.GetTimerId(*timer)) $>&action=toggle"><img src="<$ LiveSetup().GetThemedLink("img", (timer->Flags() & tfActive) ? "active.png" : "inactive.png") $>" alt="" <& tooltip.hint text=(tr("Toggle timer active/inactive")) &>></img></a></td> - <td class="action <? bottom ? "bottomrow" ?>"><a href="edit_timer.html?timerid=<$ SortedTimers::EncodeDomId(timers.GetTimerId(*timer)) $>"><img src="<$ LiveSetup().GetThemedLink("img", "edit.png") $>" alt="" <& tooltip.hint text=(tr("Edit timer")) &>></img></a></td> + <td class="action <? bottom ? "bottomrow" ?>"><& pageelems.edit_timer timerId=(timers.GetTimerId(*timer)) &></td> <td class="action rightcol <? bottom ? "bottomrow" ?>"><a href="timers.html?timerid=<$ SortedTimers::EncodeDomId(timers.GetTimerId(*timer)) $>&action=delete"><img src="<$ LiveSetup().GetThemedLink("img", "del.png") $>" alt="" <& tooltip.hint text=(tr("Delete timer")) &>></img></a></td> </tr> <%cpp> |