Skip to content

Commit

Permalink
add more information in WebIf for timers
Browse files Browse the repository at this point in the history
  • Loading branch information
nobody9 committed Jan 5, 2012
1 parent 9507858 commit a0b9a39
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
6 changes: 4 additions & 2 deletions plugin/controllers/models/timers.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def getTimers(session):

timers.append({
"serviceref": timer.service_ref,
"servicename": timer.service_ref.getServiceName(),
"servicename": timer.service_ref.getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', ''),
"eit": timer.eit,
"name": timer.name,
"description": timer.description,
Expand All @@ -88,7 +88,9 @@ def getTimers(session):
"toggledisabled": toggledisabled,
"toggledisabledimg" : toggledisabledimg,
"filename": filename,
"nextactivation": nextactivation
"nextactivation": nextactivation,
"realbegin":strftime("%d.%m.%Y %H:%M", (localtime(float(timer.begin)))),
"realend":strftime("%d.%m.%Y %H:%M", (localtime(float(timer.end))))
})

return {
Expand Down
18 changes: 17 additions & 1 deletion plugin/controllers/views/ajax/timers.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#filter WebSafe
#from urllib import quote
<div id="content_main" style="min-height: 500px;">
<div id="info">
Expand All @@ -8,7 +9,21 @@
<div class="moviecontainer_main" id="$timer.begin-$timer.end">
<div class="moviecontainer_left">
<div style="padding: 3px;">
<span style="color: #176093; font-weight: bold;">$timer.name</span><br />$timer.description
<span style="color: #176093; font-weight: bold;">$timer.name </span><br />$timer.realbegin - $timer.realend<br /> <span style="font-weight: bold;">$timer.servicename</span>
</div>
<div style="padding: 3px;">
$timer.description
</div>
<div style="padding: 3px;">
<span style="color: #7F8181; font-weight: bold;">
#if $timer.state == 0
waiting
#elif $timer.state == 2
running
#elif $timer.state == 3
finished
#end if
</span>
</div>
</div>
<div class="moviecontainer_right">
Expand Down Expand Up @@ -141,3 +156,4 @@ function editTimer(sRef, begin, end, name, description) {
}

</script>
#end filter

0 comments on commit a0b9a39

Please sign in to comment.