#!/usr/bin/env python




##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
    import builtins as builtin
except ImportError:
    import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
from Cheetah.Template import Template
from Cheetah.DummyTransaction import *
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
from Cheetah.CacheRegion import CacheRegion
import Cheetah.Filters as Filters
import Cheetah.ErrorCatchers as ErrorCatchers
from json import dumps
from six.moves.urllib.parse import quote
from time import localtime, strftime
from Plugins.Extensions.OpenWebif.controllers.i18n import tstrings
from Plugins.Extensions.OpenWebif.vtiaddon import MinTimerList

##################################################
## MODULE CONSTANTS
VFFSL=valueFromFrameOrSearchList
VFSL=valueFromSearchList
VFN=valueForName
currentTime=time.time
__CHEETAH_version__ = '2.4.4'
__CHEETAH_versionTuple__ = (2, 4, 4, 'development', 0)
__CHEETAH_genTime__ = 1644610944.076627
__CHEETAH_genTimestamp__ = 'Fri Feb 11 20:22:24 2022'
__CHEETAH_src__ = '/home/nonsolosat/openpli-dreambox-oe-core/build/tmp/work/dm7080-oe-linux/enigma2-plugin-extensions-openwebif/gitAUTOINC+81b15e17ab-r0/git/plugin/controllers/views/responsive/ajax/timers.tmpl'
__CHEETAH_srcLastModified__ = 'Fri Feb 11 20:05:52 2022'
__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'

if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
    raise AssertionError(
      'This template was compiled with Cheetah version'
      ' %s. Templates compiled before version %s must be recompiled.'%(
         __CHEETAH_version__, RequiredCheetahVersion))

##################################################
## CLASSES

class timers(Template):

    ##################################################
    ## CHEETAH GENERATED METHODS


    def __init__(self, *args, **KWs):

        super(timers, self).__init__(*args, **KWs)
        if not self._CHEETAH__instanceInitialized:
            cheetahKWArgs = {}
            allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
            for k,v in KWs.items():
                if k in allowedKWs: cheetahKWArgs[k] = v
            self._initCheetahInstance(**cheetahKWArgs)
        

    def respond(self, trans=None):



        ## CHEETAH: main method generated for this template
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        _orig_filter_95783845 = _filter
        filterName = u'WebSafe'
        if self._CHEETAH__filters.has_key("WebSafe"):
            _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName]
        else:
            _filter = self._CHEETAH__currentFilter = \
			self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter
        write(u'''
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
\t<div class="card">
\t\t<div class="header">
\t\t\t<div class="row clearfix">
\t\t\t\t<div class="col-xs-12 col-sm-6">
\t\t\t\t\t<h2><i class="material-icons material-icons-centered">alarm</i>''')
        _v = VFFSL(SL,"tstrings",True)['timers'] # u"$tstrings['timers']" on line 13, col 69
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['timers']")) # from line 13, col 69.
        write(u'''</h2>
\t\t\t\t</div>
\t\t\t</div>
\t\t\t<ul class="header-dropdown m-r-5">
\t\t\t\t<li class="dropdown">
\t\t\t\t\t<a href="javascript:void(0);" class="dropdown-toggle m-l-5 m-r-5" title="''')
        _v = VFFSL(SL,"tstrings",True)['sort'] # u"$tstrings['sort']" on line 18, col 79
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['sort']")) # from line 18, col 79.
        write(u'''" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="material-icons">sort</i></a>
\t\t\t\t\t<ul class="dropdown-menu pull-right">
\t\t\t\t\t\t<li><a href="javascript:void(0);" onclick="lastcontenturl=\'\';load_maincontent(\'ajax/timers\'); return false;"><i class="material-icons material-icons-centered">vertical_align_center</i>''')
        _v = VFFSL(SL,"tstrings",True)['default'] # u"$tstrings['default']" on line 20, col 191
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['default']")) # from line 20, col 191.
        write(u'''</a></li>
\t\t\t\t\t\t<li><a href="javascript:void(0);" onclick="lastcontenturl=\'\';load_maincontent(\'ajax/timers?sort=name\'); return false;"><i class="material-icons material-icons-centered">vertical_align_bottom</i>''')
        _v = VFFSL(SL,"tstrings",True)['name'] # u"$tstrings['name']" on line 21, col 201
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['name']")) # from line 21, col 201.
        write(u'''</a></li>
\t\t\t\t\t\t<li><a href="javascript:void(0);" onclick="lastcontenturl=\'\';load_maincontent(\'ajax/timers?sort=named\'); return false;"><i class="material-icons material-icons-centered">vertical_align_top</i>''')
        _v = VFFSL(SL,"tstrings",True)['name'] # u"$tstrings['name']" on line 22, col 199
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['name']")) # from line 22, col 199.
        write(u'''</a></li>
\t\t\t\t\t\t<li><a href="javascript:void(0);" onclick="lastcontenturl=\'\';load_maincontent(\'ajax/timers?sort=date\'); return false;"><i class="material-icons material-icons-centered">vertical_align_bottom</i>''')
        _v = VFFSL(SL,"tstrings",True)['date'] # u"$tstrings['date']" on line 23, col 201
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['date']")) # from line 23, col 201.
        write(u'''</a></li>
\t\t\t\t\t\t<li><a href="javascript:void(0);" onclick="lastcontenturl=\'\';load_maincontent(\'ajax/timers?sort=dated\'); return false;"><i class="material-icons material-icons-centered">vertical_align_top</i>''')
        _v = VFFSL(SL,"tstrings",True)['date'] # u"$tstrings['date']" on line 24, col 199
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['date']")) # from line 24, col 199.
        write(u'''</a></li>
\t\t\t\t\t</ul>
\t\t\t\t</li>
\t\t\t\t<li>
\t\t\t\t\t<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="material-icons">more_vert</i></a>
\t\t\t\t\t<ul class="dropdown-menu pull-right" id="timerbuttons">
\t\t\t\t\t\t<li class="dropdown"><a href="javascript:void(0);" onclick="lastcontenturl=\'\';load_maincontent(\'ajax/timers\'); return false;"><i class="material-icons">autorenew</i>''')
        _v = VFFSL(SL,"tstrings",True)['reload'] # u"$tstrings['reload']" on line 30, col 172
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['reload']")) # from line 30, col 172.
        write(u'''</a>
\t\t\t\t\t\t<li><a href="#addtimer" data-toggle="modal" data-target="#TimerModal" id="timerbutton0"><i class="material-icons material-icons-centered">alarm_add</i>''')
        _v = VFFSL(SL,"tstrings",True)['add_timer'] # u"$tstrings['add_timer']" on line 31, col 158
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['add_timer']")) # from line 31, col 158.
        write(u'''</a></li>
\t\t\t\t\t\t<li><a href="javascript:void(0);" onclick="lastcontenturl=\'\';cleanupTimer(); return false"><i class="material-icons material-icons-centered">delete_forever</i>''')
        _v = VFFSL(SL,"tstrings",True)['cleanup_timer'] # u"$tstrings['cleanup_timer']" on line 32, col 166
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['cleanup_timer']")) # from line 32, col 166.
        write(u'''</a></li>
\t\t\t\t\t\t<li><a href="javascript:void(0);" onclick="lastcontenturl=\'\';load_maincontent(\'ajax/timers\'); return false;"><i class="material-icons material-icons-centered">autorenew</i>''')
        _v = VFFSL(SL,"tstrings",True)['refresh_timer'] # u"$tstrings['refresh_timer']" on line 33, col 179
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['refresh_timer']")) # from line 33, col 179.
        write(u'''</a></li>
\t\t\t\t\t</ul>
\t\t\t\t</li>
\t\t\t</ul>
\t\t</div>
\t\t<div class="body">
\t\t\t<div id="content_main" >
\t\t\t\t<div id="tvcontentmain">

''')
        if VFFSL(SL,"MinTimerList",True) == 'checked': # generated from line 42, col 1
            write(u'''<div class="row clearfix" id="timers">
\t<div class="col-xs-12">
''')
        else: # generated from line 45, col 1
            write(u'''<div id="timers">
''')
            if len(VFFSL(SL,"timers",True)) == 0: # generated from line 47, col 2
                write(u'''\t\t<p><a href="#addtimer" class="link--skinned" data-toggle="modal" data-target="#TimerModal" id="timerbutton0"><i class="material-icons material-icons-centered">alarm_add</i>''')
                _v = VFFSL(SL,"tstrings",True)['add_timer'] # u"$tstrings['add_timer']" on line 48, col 175
                if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['add_timer']")) # from line 48, col 175.
                write(u'''</a></p>
''')
        write(u'''
''')
        for timer in VFFSL(SL,"timers",True): # generated from line 52, col 1
            write(u'''
''')
            sref = quote(VFFSL(SL,"timer.serviceref",True), safe=' ~@#$&()*!+=:;,.?/\'')
            tname = quote(VFFSL(SL,"timer.name",True))
            metadata = VFFSL(SL,"dumps",False)({ 'sref': quote(VFFSL(SL,"timer.serviceref",True)), 'begin': VFFSL(SL,"timer.begin",True), 'end': VFFSL(SL,"timer.end",True) }, indent=None, separators=(",", ":"))
            write(u'''
<div ''')
            if VFFSL(SL,"MinTimerList",True) == 'checked' : # generated from line 58, col 6
                _v =  'class="row row-striped clearfix pad-top-15"' 
                if _v is not None: write(_filter(_v))
            else:
                _v =  '' 
                if _v is not None: write(_filter(_v))
            write(u''' id="''')
            _v = VFFSL(SL,"timer.begin",True) # u'$timer.begin' on line 58, col 102
            if _v is not None: write(_filter(_v, rawExpr=u'$timer.begin')) # from line 58, col 102.
            write(u'''-''')
            _v = VFFSL(SL,"timer.end",True) # u'$timer.end' on line 58, col 115
            if _v is not None: write(_filter(_v, rawExpr=u'$timer.end')) # from line 58, col 115.
            write(u'''" data-metadata=\'''')
            _v = VFFSL(SL,"metadata",True) # u'$metadata' on line 58, col 142
            if _v is not None: write(_filter(_v, rawExpr=u'$metadata')) # from line 58, col 142.
            write(u"""'>

""")
            if MinTimerList == 'checked': # generated from line 60, col 1
                write(u'''<div class="col-xs-12 col-md-6">
\t<b>
''')
                if VFFSL(SL,"timer.disabled",True): # generated from line 63, col 2
                    write(u'''\t\t<i class="material-icons material-icons-centered">alarm_off</i>
''')
                else: # generated from line 65, col 2
                    write(u'''\t\t<i class="material-icons material-icons-centered">alarm_on</i>
''')
                write(u'''\t\t''')
                _v = VFFSL(SL,"timer.name",True) # u'$timer.name' on line 68, col 3
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.name')) # from line 68, col 3.
                write(u''' - ''')
                _v = VFFSL(SL,"timer.servicename",True) # u'$timer.servicename' on line 68, col 17
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.servicename')) # from line 68, col 17.
                write(u'''
\t</b>
\t</div>
\t<div class="col-xs-12 col-md-3">
\t<b>''')
                _v = VFFSL(SL,"tstrings",True)[("day_" + (time.strftime("%w", time.localtime(VFFSL(SL,"timer.begin",True)))))] # u'$tstrings[("day_" + (time.strftime("%w", time.localtime($timer.begin))))]' on line 72, col 5
                if _v is not None: write(_filter(_v, rawExpr=u'$tstrings[("day_" + (time.strftime("%w", time.localtime($timer.begin))))]')) # from line 72, col 5.
                write(u'''</b>
\t<time>''')
                _v = VFFSL(SL,"timer.realbegin",True) # u'$timer.realbegin' on line 73, col 8
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.realbegin')) # from line 73, col 8.
                write(u'''</time> - <time>''')
                _v = VFFSL(SL,"timer.realend",True) # u'$timer.realend' on line 73, col 40
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.realend')) # from line 73, col 40.
                write(u'''</time>
\t<b>
''')
                if VFFSL(SL,"timer.disabled",True): # generated from line 75, col 2
                    write(u'''\t\t''')
                    _v = VFFSL(SL,"tstrings",True)['disabled'] # u"$tstrings['disabled']" on line 76, col 3
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['disabled']")) # from line 76, col 3.
                    write(u'''
''')
                elif VFFSL(SL,"timer.state",True) == 0: # generated from line 77, col 2
                    write(u'''\t\t''')
                    _v = VFFSL(SL,"tstrings",True)['waiting'] # u"$tstrings['waiting']" on line 78, col 3
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['waiting']")) # from line 78, col 3.
                    write(u'''
''')
                elif VFFSL(SL,"timer.state",True) == 2: # generated from line 79, col 2
                    write(u'''\t\t''')
                    _v = VFFSL(SL,"tstrings",True)['running'] # u"$tstrings['running']" on line 80, col 3
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['running']")) # from line 80, col 3.
                    write(u'''
''')
                elif VFFSL(SL,"timer.state",True) == 3: # generated from line 81, col 2
                    write(u'''\t\t''')
                    _v = VFFSL(SL,"tstrings",True)['finished'] # u"$tstrings['finished']" on line 82, col 3
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['finished']")) # from line 82, col 3.
                    write(u'''
''')
                write(u'''\t</b>
''')
                if VFFSL(SL,"timer.repeated",True) != 0: # generated from line 85, col 1
                    write(u'''\t<div>
\t''')
                    _v = VFFSL(SL,"tstrings",True)['every_timer'] # u"$tstrings['every_timer']" on line 87, col 2
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['every_timer']")) # from line 87, col 2.
                    write(u'''
''')
                    flags = VFFSL(SL,"timer.repeated",True)
                    timerDays = []
                    for day in [VFFSL(SL,"tstrings",True)['monday'],VFFSL(SL,"tstrings",True)['tuesday'],VFFSL(SL,"tstrings",True)['wednesday'],VFFSL(SL,"tstrings",True)['thursday'],VFFSL(SL,"tstrings",True)['friday'],VFFSL(SL,"tstrings",True)['saturday'],VFFSL(SL,"tstrings",True)['sunday']]: # generated from line 90, col 2
                        if VFFSL(SL,"flags",True)&1: # generated from line 91, col 3
                            write(u'''\t\t\t''')
                            _v = VFN(VFFSL(SL,"timerDays",True),"append",False)(VFFSL(SL,"day",True)) # u'$timerDays.append($day)' on line 92, col 4
                            if _v is not None: write(_filter(_v, rawExpr=u'$timerDays.append($day)')) # from line 92, col 4.
                            write(u'''
''')
                        flags = VFFSL(SL,"flags",True) >> 1
                    _v = ', '.join(VFFSL(SL,"timerDays",True))
                    if _v is not None: write(_filter(_v))
                    write(u'''\t</div>
''')
                write(u'''</div>
<div class="col-xs-12 col-md-3 align-right">
\t<a href="#edittimer" class="link--skinned" data-toggle="modal" data-target="#TimerModal" data-ref="''')
                _v = VFFSL(SL,"sref",True) # u'$sref' on line 101, col 101
                if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 101, col 101.
                write(u'''" data-begin="''')
                _v = VFFSL(SL,"timer.begin",True) # u'$timer.begin' on line 101, col 120
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.begin')) # from line 101, col 120.
                write(u'''" data-end="''')
                _v = VFFSL(SL,"timer.end",True) # u'$timer.end' on line 101, col 144
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.end')) # from line 101, col 144.
                write(u'''" title="''')
                _v = VFFSL(SL,"tstrings",True)['edit_timer'] # u"$tstrings['edit_timer']" on line 101, col 163
                if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['edit_timer']")) # from line 101, col 163.
                write(u'''">
\t\t<i class="material-icons material-icons-mg-right">edit</i>
\t</a>
''')
                if VFFSL(SL,"timer.disabled",True): # generated from line 104, col 1
                    write(u'''\t<a href="javascript:void(0);" class="link--skinned" onclick="toggleTimerStatus(\'''')
                    _v = VFFSL(SL,"sref",True) # u'$sref' on line 105, col 82
                    if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 105, col 82.
                    write(u"""', '""")
                    _v = VFFSL(SL,"timer.begin",True) # u'$timer.begin' on line 105, col 91
                    if _v is not None: write(_filter(_v, rawExpr=u'$timer.begin')) # from line 105, col 91.
                    write(u"""', '""")
                    _v = VFFSL(SL,"timer.end",True) # u'$timer.end' on line 105, col 107
                    if _v is not None: write(_filter(_v, rawExpr=u'$timer.end')) # from line 105, col 107.
                    write(u'''\'); lastcontenturl=\'\'; setTimeout(function(){load_maincontent(\'ajax/timers\')}, 200); return false;" title="''')
                    _v = VFFSL(SL,"tstrings",True)['enable_timer'] # u"$tstrings['enable_timer']" on line 105, col 224
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['enable_timer']")) # from line 105, col 224.
                    write(u'''">
\t\t<i class="material-icons material-icons-mg-right">alarm_on</i>
\t</a>
''')
                else: # generated from line 108, col 1
                    write(u'''\t<a href="javascript:void(0);" class="link--skinned" onclick="toggleTimerStatus(\'''')
                    _v = VFFSL(SL,"sref",True) # u'$sref' on line 109, col 82
                    if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 109, col 82.
                    write(u"""', '""")
                    _v = VFFSL(SL,"timer.begin",True) # u'$timer.begin' on line 109, col 91
                    if _v is not None: write(_filter(_v, rawExpr=u'$timer.begin')) # from line 109, col 91.
                    write(u"""', '""")
                    _v = VFFSL(SL,"timer.end",True) # u'$timer.end' on line 109, col 107
                    if _v is not None: write(_filter(_v, rawExpr=u'$timer.end')) # from line 109, col 107.
                    write(u'''\'); lastcontenturl=\'\'; setTimeout(function(){load_maincontent(\'ajax/timers\')}, 200); return false;" title="''')
                    _v = VFFSL(SL,"tstrings",True)['disable_timer'] # u"$tstrings['disable_timer']" on line 109, col 224
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['disable_timer']")) # from line 109, col 224.
                    write(u'''">
\t\t<i class="material-icons material-icons-mg-right">alarm_off</i>
\t</a>
''')
                write(u'''\t<a href="javascript:void(0);" class="link--skinned" onclick="deleteTimer(\'''')
                _v = VFFSL(SL,"sref",True) # u'$sref' on line 113, col 76
                if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 113, col 76.
                write(u"""', '""")
                _v = VFFSL(SL,"timer.begin",True) # u'$timer.begin' on line 113, col 85
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.begin')) # from line 113, col 85.
                write(u"""', '""")
                _v = VFFSL(SL,"timer.end",True) # u'$timer.end' on line 113, col 101
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.end')) # from line 113, col 101.
                write(u"""', '""")
                _v = VFFSL(SL,"tname",True) # u'$tname' on line 113, col 115
                if _v is not None: write(_filter(_v, rawExpr=u'$tname')) # from line 113, col 115.
                write(u'''\'); lastcontenturl=\'\'; setTimeout(function(){load_maincontent(\'ajax/timers\')}, 200); return false;" title="''')
                _v = VFFSL(SL,"tstrings",True)['delete_timer'] # u"$tstrings['delete_timer']" on line 113, col 228
                if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['delete_timer']")) # from line 113, col 228.
                write(u'''">
\t\t<i class="material-icons material-icons-mg-right">delete</i>
\t</a>
</div></div>

''')
            else: # generated from line 118, col 1
                write(u'''<div class="card">
\t<div class="header">
\t\t<div class="row clearfix m-b--20">
\t\t<div class="col-xs-6">
\t\t\t<h2 style="line-height: 1.4;">
''')
                if VFFSL(SL,"timer.disabled",True): # generated from line 124, col 2
                    write(u'''\t\t\t\t<i class="material-icons material-icons-centered">alarm_off</i>
''')
                elif VFFSL(SL,"timer.state",True) == 0: # generated from line 126, col 2
                    if VFFSL(SL,"timer.justplay",True) == 1: # generated from line 127, col 3
                        write(u'''\t\t\t\t<i class="material-icons material-icons-centered">settings_remote</i>
''')
                    else: # generated from line 129, col 3
                        write(u'''\t\t\t\t<i class="material-icons material-icons-centered">alarm</i>
''')
                elif VFFSL(SL,"timer.state",True) == 2: # generated from line 132, col 2
                    write(u'''\t\t\t\t<i class="material-icons material-icons-centered">update</i>
''')
                elif VFFSL(SL,"timer.state",True) == 3: # generated from line 134, col 2
                    write(u'''\t\t\t\t<i class="material-icons material-icons-centered">done</i>
''')
                write(u'''\t\t\t\t''')
                _v = VFFSL(SL,"timer.name",True) # u'$timer.name' on line 137, col 5
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.name')) # from line 137, col 5.
                write(u'''
\t\t\t\t<span style="opacity: 0.4;"> - ''')
                _v = VFFSL(SL,"timer.servicename",True) # u'$timer.servicename' on line 138, col 36
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.servicename')) # from line 138, col 36.
                write(u'''</span>
\t\t\t</h2>
\t\t</div>
\t\t<div class="col-xs-6">
''')
                sref = quote(VFFSL(SL,"timer.serviceref",True), safe=' ~@#$&()*!+=:;,.?/\'')
                tname = quote(VFFSL(SL,"timer.name",True))
                write(u'''
\t\t<ul class="header-dropdown" style="top: 0; right: 5px;">
\t\t\t<li><span role="button"><a href="#edittimer" data-toggle="modal" data-target="#TimerModal" title="''')
                _v = VFFSL(SL,"tstrings",True)['edit_timer'] # u"$tstrings['edit_timer']" on line 146, col 102
                if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['edit_timer']")) # from line 146, col 102.
                write(u'''"><i class="material-icons material-icons-mg-right">edit</i></a></span></li>
\t\t\t<li><span role="button"><a href="javascript:void(0);" onclick="toggleTimerStatus(\'''')
                _v = VFFSL(SL,"sref",True) # u'$sref' on line 147, col 86
                if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 147, col 86.
                write(u"""', '""")
                _v = VFFSL(SL,"timer.begin",True) # u'$timer.begin' on line 147, col 95
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.begin')) # from line 147, col 95.
                write(u"""', '""")
                _v = VFFSL(SL,"timer.end",True) # u'$timer.end' on line 147, col 111
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.end')) # from line 147, col 111.
                write(u'''\'); lastcontenturl=\'\'; setTimeout(function(){load_maincontent(\'ajax/timers\')}, 200); return false;"
''')
                if VFFSL(SL,"timer.disabled",True): # generated from line 148, col 4
                    write(u'''\t\t\t\ttitle="''')
                    _v = VFFSL(SL,"tstrings",True)['enable_timer'] # u"$tstrings['enable_timer']" on line 149, col 12
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['enable_timer']")) # from line 149, col 12.
                    write(u'''"><i class="material-icons material-icons-mg-right">alarm_on</i></a></span></li>
''')
                else: # generated from line 150, col 4
                    write(u'''\t\t\t\ttitle="''')
                    _v = VFFSL(SL,"tstrings",True)['disable_timer'] # u"$tstrings['disable_timer']" on line 151, col 12
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['disable_timer']")) # from line 151, col 12.
                    write(u'''"><i class="material-icons material-icons-mg-right">alarm_off</i></a></span></li>
''')
                write(u'''\t\t\t<li><span role="button"><a href="javascript:void(0);" onclick="deleteTimer(\'''')
                _v = VFFSL(SL,"sref",True) # u'$sref' on line 153, col 80
                if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 153, col 80.
                write(u"""', '""")
                _v = VFFSL(SL,"timer.begin",True) # u'$timer.begin' on line 153, col 89
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.begin')) # from line 153, col 89.
                write(u"""', '""")
                _v = VFFSL(SL,"timer.end",True) # u'$timer.end' on line 153, col 105
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.end')) # from line 153, col 105.
                write(u"""', '""")
                _v = VFFSL(SL,"tname",True) # u'$tname' on line 153, col 119
                if _v is not None: write(_filter(_v, rawExpr=u'$tname')) # from line 153, col 119.
                write(u'''\'); lastcontenturl=\'\'; setTimeout(function(){load_maincontent(\'ajax/timers\')}, 200); return false;" title="''')
                _v = VFFSL(SL,"tstrings",True)['delete_timer'] # u"$tstrings['delete_timer']" on line 153, col 232
                if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['delete_timer']")) # from line 153, col 232.
                write(u'''"><i class="material-icons material-icons-mg-right">delete</i></a></span></li>
\t\t</ul>
\t\t</div>
\t</div>
</div>

\t<div class="body">
\t\t<div class="row clearfix m-b--20">
\t\t\t<div class="col-sm-4">
\t\t\t\t<time style="white-space: nowrap;">''')
                _v = VFFSL(SL,"timer.realbegin",True) # u'$timer.realbegin' on line 162, col 40
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.realbegin')) # from line 162, col 40.
                write(u'''</time>
''')
                if VFFSL(SL,"timer.justplay",True) != 1: # generated from line 163, col 4
                    write(u'''\t\t\t\t - <time style="white-space: nowrap;">''')
                    _v = VFFSL(SL,"timer.realend",True) # u'$timer.realend' on line 164, col 43
                    if _v is not None: write(_filter(_v, rawExpr=u'$timer.realend')) # from line 164, col 43.
                    write(u'''</time>
\t\t\t\t <span class="event__duration" style="opacity: 0.4; margin-left: 0.4ch;">(''')
                    _v = VFFSL(SL,"int",False)(VFFSL(SL,"timer.duration",True) / 60) # u'$int($timer.duration / 60)' on line 165, col 79
                    if _v is not None: write(_filter(_v, rawExpr=u'$int($timer.duration / 60)')) # from line 165, col 79.
                    write(u''' ''')
                    _v = VFFSL(SL,"tstrings",True)['mins'] # u"$tstrings['mins']" on line 165, col 106
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['mins']")) # from line 165, col 106.
                    write(u''')</span>
''')
                if VFFSL(SL,"timer.repeated",True) != 0: # generated from line 167, col 4
                    write(u'''\t\t\t\t<div>
\t\t\t\t''')
                    _v = VFFSL(SL,"tstrings",True)['every_timer'] # u"$tstrings['every_timer']" on line 169, col 5
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['every_timer']")) # from line 169, col 5.
                    write(u'''
''')
                    flags = VFFSL(SL,"timer.repeated",True)
                    timerDays = []
                    for day in [VFFSL(SL,"tstrings",True)['monday'],VFFSL(SL,"tstrings",True)['tuesday'],VFFSL(SL,"tstrings",True)['wednesday'],VFFSL(SL,"tstrings",True)['thursday'],VFFSL(SL,"tstrings",True)['friday'],VFFSL(SL,"tstrings",True)['saturday'],VFFSL(SL,"tstrings",True)['sunday']]: # generated from line 172, col 5
                        if VFFSL(SL,"flags",True)&1: # generated from line 173, col 6
                            write(u'''\t\t\t\t\t\t''')
                            _v = VFN(VFFSL(SL,"timerDays",True),"append",False)(VFFSL(SL,"day",True)) # u'$timerDays.append($day)' on line 174, col 7
                            if _v is not None: write(_filter(_v, rawExpr=u'$timerDays.append($day)')) # from line 174, col 7.
                            write(u'''
''')
                        flags = VFFSL(SL,"flags",True) >> 1
                    _v = ', '.join(VFFSL(SL,"timerDays",True))
                    if _v is not None: write(_filter(_v))
                    write(u'''\t\t\t\t</div>
''')
                write(u'''
\t\t\t\t<div class="m-t-10" style="font-weight: bold;">
''')
                if VFFSL(SL,"timer.disabled",True): # generated from line 183, col 5
                    write(u'''\t\t\t\t\t''')
                    _v = VFFSL(SL,"tstrings",True)['disabled'] # u"$tstrings['disabled']" on line 184, col 6
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['disabled']")) # from line 184, col 6.
                    write(u'''
''')
                elif VFFSL(SL,"timer.state",True) == 0: # generated from line 185, col 5
                    write(u'''\t\t\t\t\t''')
                    _v = VFFSL(SL,"tstrings",True)['waiting'] # u"$tstrings['waiting']" on line 186, col 6
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['waiting']")) # from line 186, col 6.
                    write(u'''
''')
                elif VFFSL(SL,"timer.state",True) == 2: # generated from line 187, col 5
                    write(u'''\t\t\t\t\t''')
                    _v = VFFSL(SL,"tstrings",True)['running'] # u"$tstrings['running']" on line 188, col 6
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['running']")) # from line 188, col 6.
                    write(u'''
''')
                elif VFFSL(SL,"timer.state",True) == 3: # generated from line 189, col 5
                    write(u'''\t\t\t\t\t''')
                    _v = VFFSL(SL,"tstrings",True)['finished'] # u"$tstrings['finished']" on line 190, col 6
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['finished']")) # from line 190, col 6.
                    write(u'''
''')
                write(u'''\t\t\t\t</div>
\t\t\t</div>
\t\t\t<div class="col-sm-8">
\t\t\t\t''')
                _v = VFFSL(SL,"timer.description",True) # u'$timer.description' on line 195, col 5
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.description')) # from line 195, col 5.
                write(u'''
\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
</div>

''')
            write(u'''
''')
        write(u"""
</div>
</div>
</div>
</div>
</div>
</div>
</div>

<script>
\tvar reloadTimers = true;
\tjQuery(function() {
\t\tif (!timeredit_initialized) {
\t\t\tjQuery('#editTimerForm').load('ajax/edittimer');
\t\t}
\t});
</script>
""")
        _filter = self._CHEETAH__currentFilter = _orig_filter_95783845
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        
    ##################################################
    ## CHEETAH GENERATED ATTRIBUTES


    _CHEETAH__instanceInitialized = False

    _CHEETAH_version = __CHEETAH_version__

    _CHEETAH_versionTuple = __CHEETAH_versionTuple__

    _CHEETAH_genTime = __CHEETAH_genTime__

    _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__

    _CHEETAH_src = __CHEETAH_src__

    _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__

    _mainCheetahMethod_for_timers= 'respond'

## END CLASS DEFINITION

if not hasattr(timers, '_initCheetahAttributes'):
    templateAPIClass = getattr(timers, '_CHEETAH_templateClass', Template)
    templateAPIClass._addCheetahPlumbingCodeToClass(timers)


# CHEETAH was developed by Tavis Rudd and Mike Orr
# with code, advice and input from many other volunteers.
# For more information visit http://www.CheetahTemplate.org/

##################################################
## if run from command line:
if __name__ == '__main__':
    from Cheetah.TemplateCmdLineIface import CmdLineIface
    CmdLineIface(templateObj=timers()).run()


