diff options
Diffstat (limited to 'pages/searchtimers.ecpp')
-rw-r--r-- | pages/searchtimers.ecpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/pages/searchtimers.ecpp b/pages/searchtimers.ecpp index 8f4c437..5594293 100644 --- a/pages/searchtimers.ecpp +++ b/pages/searchtimers.ecpp @@ -18,9 +18,9 @@ using namespace std; bool logged_in(false); </%session> <%include>page_init.eh</%include> -<{ +<%cpp> if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); -}> +</%cpp> <%cpp> pageTitle = tr("Searchtimers"); SearchTimers timers; @@ -58,22 +58,24 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); <td><div class="withmargin"><$ tr("Starts between") $></div></td> <td class="rightcol" colspan="4"/> </tr> -<{ +<%cpp> for (SearchTimers::iterator timer = timers.begin(); timer != timers.end(); ++timer) { -}> + SearchTimers::iterator nextTimer = timer; ++nextTimer; + bool bottom = (nextTimer == timers.end()); +</%cpp> <tr> - <td class="action leftcol"><{ if(timer->UseAsSearchTimer()) { }><img src="<$ LiveSetup().GetThemedLink("img", "arrow.png") $>" alt=""></img><{ } }></td> - <td><div class="withmargin"><$ timer->Search() $></div></td> - <td><div class="withmargin"><$ timer->ChannelText() $></div></td> - <td><div class="withmargin"><? timer->UseTime() ? timer->StartTimeFormatted()+" - "+timer->StopTimeFormatted() ?></div></td> - <td class="action"><a href="searchtimers.html?searchtimerid=<$ timer->Id() $>&action=toggle"><img src="<$ LiveSetup().GetThemedLink("img", timer->UseAsSearchTimer() ? "active.png" : "inactive.png") $>" alt="<$ tr("Toggle search timer actions (in)active") $>" <& tooltip.hint text=(tr("Toggle search timer actions (in)active")) &>></img></a></td> - <td class="action"><a href="searchresults.html?searchtimerid=<$ timer->Id() $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="<$ tr("Browse search timer results") $>" <& tooltip.hint text=(tr("Browse search timer results")) &>></img></a></td> - <td class="action"><a href="edit_searchtimer.html?searchtimerid=<$ timer->Id() $>"><img src="<$ LiveSetup().GetThemedLink("img", "edit.png") $>" alt="<$ tr("Edit search timer") $>" <& tooltip.hint text=(tr("Edit search timer")) &>></img></a></td> - <td class="action rightcol"><a href="searchtimers.html?searchtimerid=<$ timer->Id() $>&action=delete" onclick="return confirm('<$ tr("Delete this search timer?") $>')"><img src="<$ LiveSetup().GetThemedLink("img", "del.png") $>" alt="<$ tr("Delete search timer") $>" <& tooltip.hint text=(tr("Delete search timer")) &>></img></a></td> + <td class="action leftcol <? bottom ? "bottomrow" ?>"><%cpp> if(timer->UseAsSearchTimer()) { </%cpp><img src="<$ LiveSetup().GetThemedLink("img", "arrow.png") $>" alt=""></img><%cpp> } </%cpp></td> + <td class="<? bottom ? "bottomrow" ?>"><div class="withmargin"><$ timer->Search() $></div></td> + <td class="<? bottom ? "bottomrow" ?>"><div class="withmargin"><$ timer->ChannelText() $></div></td> + <td class="<? bottom ? "bottomrow" ?>"><div class="withmargin"><? timer->UseTime() ? timer->StartTimeFormatted()+" - "+timer->StopTimeFormatted() ?></div></td> + <td class="action <? bottom ? "bottomrow" ?>"><a href="searchtimers.html?searchtimerid=<$ timer->Id() $>&action=toggle"><img src="<$ LiveSetup().GetThemedLink("img", timer->UseAsSearchTimer() ? "active.png" : "inactive.png") $>" alt="<$ tr("Toggle search timer actions (in)active") $>" <& tooltip.hint text=(tr("Toggle search timer actions (in)active")) &>></img></a></td> + <td class="action <? bottom ? "bottomrow" ?>"><a href="searchresults.html?searchtimerid=<$ timer->Id() $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="<$ tr("Browse search timer results") $>" <& tooltip.hint text=(tr("Browse search timer results")) &>></img></a></td> + <td class="action <? bottom ? "bottomrow" ?>"><a href="edit_searchtimer.html?searchtimerid=<$ timer->Id() $>"><img src="<$ LiveSetup().GetThemedLink("img", "edit.png") $>" alt="<$ tr("Edit search timer") $>" <& tooltip.hint text=(tr("Edit search timer")) &>></img></a></td> + <td class="action rightcol <? bottom ? "bottomrow" ?>"><a href="searchtimers.html?searchtimerid=<$ timer->Id() $>&action=delete" onclick="return confirm('<$ tr("Delete this search timer?") $>')"><img src="<$ LiveSetup().GetThemedLink("img", "del.png") $>" alt="<$ tr("Delete search timer") $>" <& tooltip.hint text=(tr("Delete search timer")) &>></img></a></td> </tr> -<{ +<%cpp> } -}> +</%cpp> <tr class="spacer"> <td colspan="8"/> </tr> |