#!/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 Plugins.Extensions.OpenWebif.controllers.i18n import tstrings
from Plugins.Extensions.OpenWebif.vtiaddon import MinEPGList, showPiconBackground

##################################################
## 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__ = 1644610943.725523
__CHEETAH_genTimestamp__ = 'Fri Feb 11 20:22:23 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/epgdialog.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 epgdialog(Template):

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


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

        super(epgdialog, 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
        
        write(u'''
''')
        piconCssClass = ''
        if VFFSL(SL,"showPiconBackground",True): # generated from line 7, col 1
            piconCssClass = 'picon--with-background'
        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">view_list</i>''')
        _v = VFFSL(SL,"tstrings",True)['epgsearch'] # u"$tstrings['epgsearch']" on line 16, col 73
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['epgsearch']")) # from line 16, col 73.
        write(u'''</h2>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t\t<div class="body" id="epgcards">

''')
        if len(VFFSL(SL,"events",True)) == 0: # generated from line 22, col 1
            write(u'''\t\t\t<p>''')
            _v = VFFSL(SL,"tstrings",True)['epg_no_matches'] # u"$tstrings['epg_no_matches']" on line 23, col 7
            if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['epg_no_matches']")) # from line 23, col 7.
            write(u'''</p>
''')
        else: # generated from line 24, col 1
            write(u'''
''')
            dataid = 0
            for event in VFFSL(SL,"events",True): # generated from line 27, col 1
                metadata = VFFSL(SL,"dumps",False)({ 'sref': quote(VFFSL(SL,"event.sref",True)), 'id': VFFSL(SL,"event.id",True), 'begin': VFFSL(SL,"event.begin",True), 'end': VFFSL(SL,"event.end",True) }, indent=None, separators=(",", ":"))
                write(u'''
''')
                channel = VFN(VFFSL(SL,"event.sname",True),"replace",False)("'", r"\'")
                title = VFN(VFFSL(SL,"event.title",True),"replace",False)("'", r"\'")
                sref = quote(VFFSL(SL,"event.sref",True), safe=' ~@#$&()*!+=:;,.?/\'')
                write(u'''
''')
                if VFFSL(SL,"MinEPGList",True) == 'checked': # generated from line 34, col 1
                    write(u'''
\t\t<div class="row row-striped clearfix pad-top-15">
\t\t\t<div class="col-xs-12 col-md-6">
\t\t\t\t<div class="row" data-metadata=\'''')
                    _v = VFFSL(SL,"metadata",True) # u'$metadata' on line 38, col 37
                    if _v is not None: write(_filter(_v, rawExpr=u'$metadata')) # from line 38, col 37.
                    write(u'''\'><!-- single quotes are required for json output -->
\t\t\t\t\t<div class="col-xs-3">
\t\t\t\t\t\t<span class="epg__picon ''')
                    _v = VFFSL(SL,"piconCssClass",True) # u'$piconCssClass' on line 40, col 31
                    if _v is not None: write(_filter(_v, rawExpr=u'$piconCssClass')) # from line 40, col 31.
                    write(u'''">
\t\t\t\t\t\t\t<img src="''')
                    _v = VFFSL(SL,"event.picon",True) # u'$event.picon' on line 41, col 18
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.picon')) # from line 41, col 18.
                    write(u'''" title="" class="img-responsive" style="width:80px;margin-top:-10px">
\t\t\t\t\t\t</span>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class="col-xs-9">
\t\t\t\t\t\t\t\t<span data-toggle="collapse" data-target="#evenid''')
                    _v = VFFSL(SL,"dataid",True) # u'$dataid' on line 45, col 58
                    if _v is not None: write(_filter(_v, rawExpr=u'$dataid')) # from line 45, col 58.
                    write(u'''" aria-expanded="false"aria-controls="collapseExample" style="cursor:pointer;">
\t\t\t\t\t\t\t\t<b>''')
                    _v = VFFSL(SL,"event.sname",True) # u'$event.sname' on line 46, col 12
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.sname')) # from line 46, col 12.
                    write(u'''</b> - ''')
                    _v = VFFSL(SL,"event.title",True) # u'$event.title' on line 46, col 31
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.title')) # from line 46, col 31.
                    write(u'''<i class="material-icons material-icons-centered">expand_more</i>
\t\t\t\t\t\t\t\t</span>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class="col-xs-12 col-md-3">
\t\t\t\t\t\t<span>''')
                    _v = VFFSL(SL,"event.date",True) # u'$event.date' on line 52, col 13
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.date')) # from line 52, col 13.
                    write(u''' - ''')
                    _v = VFFSL(SL,"event.begin",True) # u'$event.begin' on line 52, col 27
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.begin')) # from line 52, col 27.
                    write(u'''&nbsp;-&nbsp;''')
                    _v = VFFSL(SL,"event.end",True) # u'$event.end' on line 52, col 52
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.end')) # from line 52, col 52.
                    write(u'''&nbsp;(''')
                    _v = VFFSL(SL,"event.duration",True) # u'$event.duration' on line 52, col 69
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.duration')) # from line 52, col 69.
                    write(u''' min.)</span>
\t\t\t\t\t</div>
\t\t\t\t\t<div class="col-xs-12 col-md-3 align-right">
\t\t\t\t\t\t<a href="javascript:void(0);" class="link--skinned" onclick="addTimerEvent(\'''')
                    _v = VFFSL(SL,"sref",True) # u'$sref' on line 55, col 83
                    if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 55, col 83.
                    write(u"""',""")
                    _v = VFFSL(SL,"event.id",True) # u'$event.id' on line 55, col 90
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.id')) # from line 55, col 90.
                    write(u''',false);return false;" title="''')
                    _v = VFFSL(SL,"tstrings",True)['add_timer'] # u"$tstrings['add_timer']" on line 55, col 129
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['add_timer']")) # from line 55, col 129.
                    write(u'''"><i class="material-icons material-icons-centered">alarm_add</i></a>
\t\t\t\t\t\t<a href="javascript:void(0);" class="deltimer link--skinned" onclick="delTimerEvent(\'''')
                    _v = VFFSL(SL,"sref",True) # u'$sref' on line 56, col 92
                    if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 56, col 92.
                    write(u"""',""")
                    _v = VFFSL(SL,"event.id",True) # u'$event.id' on line 56, col 99
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.id')) # from line 56, col 99.
                    write(u''');return false;" title="''')
                    _v = VFFSL(SL,"tstrings",True)['delete_timer'] # u"$tstrings['delete_timer']" on line 56, col 132
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['delete_timer']")) # from line 56, col 132.
                    write(u'''"></a>
\t\t\t\t\t\t<a href="javascript:void(0);" class="link--skinned" data-dismiss="modal" data-toggle="modal" data-target="#TimerModal" data-evid="''')
                    _v = VFFSL(SL,"event.id",True) # u'$event.id' on line 57, col 137
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.id')) # from line 57, col 137.
                    write(u'''" data-ref="''')
                    _v = VFFSL(SL,"sref",True) # u'$sref' on line 57, col 158
                    if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 57, col 158.
                    write(u'''" title="''')
                    _v = VFFSL(SL,"tstrings",True)['edit_timer'] # u"$tstrings['edit_timer']" on line 57, col 172
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['edit_timer']")) # from line 57, col 172.
                    write(u'''"><i class="material-icons material-icons-centered">alarm</i></a>
\t\t\t\t\t\t<a href="javascript:void(0);" class="link--skinned" onclick="addTimerEvent(\'''')
                    _v = VFFSL(SL,"sref",True) # u'$sref' on line 58, col 83
                    if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 58, col 83.
                    write(u"""',""")
                    _v = VFFSL(SL,"event.id",True) # u'$event.id' on line 58, col 90
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.id')) # from line 58, col 90.
                    write(u''',true);return false;" title="''')
                    _v = VFFSL(SL,"tstrings",True)['add_zaptimer'] # u"$tstrings['add_zaptimer']" on line 58, col 128
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['add_zaptimer']")) # from line 58, col 128.
                    write(u'''"><i class="material-icons material-icons-centered">rotate_90_degrees_ccw</i></a>
''')
                    if VFFSL(SL,"at",True): # generated from line 59, col 6
                        write(u'''\t\t\t\t\t\t<a href="javascript:void(0);" data-dismiss="modal" onclick=\'location.href="#/at/new?name=''')
                        _v = VFFSL(SL,"title",True) # u'$title' on line 60, col 96
                        if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 60, col 96.
                        write(u'''&match=''')
                        _v = VFFSL(SL,"title",True) # u'$title' on line 60, col 109
                        if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 60, col 109.
                        write(u'''&timespanFrom=''')
                        _v = VFFSL(SL,"event.begin",True) # u'$event.begin' on line 60, col 129
                        if _v is not None: write(_filter(_v, rawExpr=u'$event.begin')) # from line 60, col 129.
                        write(u'''&timespanTo=''')
                        _v = VFFSL(SL,"event.end",True) # u'$event.end' on line 60, col 153
                        if _v is not None: write(_filter(_v, rawExpr=u'$event.end')) # from line 60, col 153.
                        write(u'''&sref=''')
                        _v = VFFSL(SL,"sref",True) # u'$sref' on line 60, col 169
                        if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 60, col 169.
                        write(u'''";\' class="link--skinned" title="''')
                        _v = VFFSL(SL,"tstrings",True)['add_autotimer'] # u"$tstrings['add_autotimer']" on line 60, col 207
                        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['add_autotimer']")) # from line 60, col 207.
                        write(u'''">
\t\t\t\t\t\t\t<i class="material-icons material-icons-centered">av_timer</i>
\t\t\t\t\t\t</a>
''')
                    if VFFSL(SL,"extEventInfoProvider",True): # generated from line 64, col 6
                        write(u'''\t\t\t\t\t\t<a href="''')
                        _v = VFFSL(SL,"extEventInfoProvider",True)['url'] # u"$extEventInfoProvider['url']" on line 65, col 16
                        if _v is not None: write(_filter(_v, rawExpr=u"$extEventInfoProvider['url']")) # from line 65, col 16.
                        _v = VFFSL(SL,"quote",False)(VFFSL(SL,"event.title",True)) # u'$quote($event.title)' on line 65, col 44
                        if _v is not None: write(_filter(_v, rawExpr=u'$quote($event.title)')) # from line 65, col 44.
                        write(u'''" class="link--skinned" title="''')
                        _v = VFFSL(SL,"tstrings",True)['search_'+VFFSL(SL,"extEventInfoProvider",True)['id']] # u"$tstrings['search_'+$extEventInfoProvider['id']]" on line 65, col 95
                        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['search_'+$extEventInfoProvider['id']]")) # from line 65, col 95.
                        write(u'''" target="extdb">[''')
                        _v = VFFSL(SL,"extEventInfoProvider",True)['name'] # u"$extEventInfoProvider['name']" on line 65, col 161
                        if _v is not None: write(_filter(_v, rawExpr=u"$extEventInfoProvider['name']")) # from line 65, col 161.
                        write(u''']</a>
''')
                    write(u'''\t\t\t\t\t</div>
\t\t\t\t\t<div class="col-xs-12 collapse" id="evenid''')
                    _v = VFFSL(SL,"dataid",True) # u'$dataid' on line 68, col 48
                    if _v is not None: write(_filter(_v, rawExpr=u'$dataid')) # from line 68, col 48.
                    write(u'''">
\t\t\t\t\t<p>''')
                    _v = VFFSL(SL,"event.shortdesc",True) # u'$event.shortdesc' on line 69, col 9
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.shortdesc')) # from line 69, col 9.
                    write(u'''</p>
\t\t\t\t\t<p>
\t\t\t\t\t''')
                    _v = VFN(VFN(VFFSL(SL,"event.longdesc",True),"replace",False)('\n',r'<br/>'),"replace",False)('\8a',r'<br/>') # u"$event.longdesc.replace('\\n',r'<br/>').replace('\\8a',r'<br/>')" on line 71, col 6
                    if _v is not None: write(_filter(_v, rawExpr=u"$event.longdesc.replace('\\n',r'<br/>').replace('\\8a',r'<br/>')")) # from line 71, col 6.
                    write(u'''
\t\t\t\t\t</p>
\t\t\t\t</div>
\t\t\t</div>

''')
                else: # generated from line 76, col 1
                    write(u'''
\t\t<div class="row clearfix">
\t\t\t<div class="col-xs-12">
\t\t\t\t<div class="card" style="margin-bottom:-25px;" data-metadata=\'''')
                    _v = VFFSL(SL,"metadata",True) # u'$metadata' on line 80, col 67
                    if _v is not None: write(_filter(_v, rawExpr=u'$metadata')) # from line 80, col 67.
                    write(u'''\'><!-- single quotes are required for json output -->
\t\t\t\t\t<div class="header">
\t\t\t\t\t\t<div class="row clearfix">
\t\t\t\t\t\t\t<div class="col-xs-12 col-md-2" style="margin-bottom:-10px;">
\t\t\t\t\t\t\t\t<span class="epg__picon ''')
                    _v = VFFSL(SL,"piconCssClass",True) # u'$piconCssClass' on line 84, col 33
                    if _v is not None: write(_filter(_v, rawExpr=u'$piconCssClass')) # from line 84, col 33.
                    write(u'''">
\t\t\t\t\t\t\t\t\t<img src="''')
                    _v = VFFSL(SL,"event.picon",True) # u'$event.picon' on line 85, col 20
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.picon')) # from line 85, col 20.
                    write(u'''" title="" class="img-responsive" style="width:100px;">
\t\t\t\t\t\t\t\t</span>
\t\t\t\t\t\t\t\t<label style="display:block;">''')
                    _v = VFFSL(SL,"event.sname",True) # u'$event.sname' on line 87, col 39
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.sname')) # from line 87, col 39.
                    write(u'''</label>
''')
                    if 'ns' in VFFSL(SL,"event",True): # generated from line 88, col 9
                        write(u'''\t\t\t\t\t\t\t\t\t<br />
\t\t\t\t\t\t\t\t\t<span>
''')
                        if '4097:' in VFFSL(SL,"event.sref",True) or '5002:' in VFFSL(SL,"event.sref",True) or 'http%3a' in VFFSL(SL,"event.sref",True) or 'https%3a' in VFFSL(SL,"event.sref",True): # generated from line 91, col 10
                            write(u'''\t\t\t\t\t\t\t\t\t\tIPTV
''')
                        else: # generated from line 93, col 10
                            write(u'''\t\t\t\t\t\t\t\t\t\t''')
                            _v = VFFSL(SL,"event.service_type",True) # u'$event.service_type' on line 94, col 11
                            if _v is not None: write(_filter(_v, rawExpr=u'$event.service_type')) # from line 94, col 11.
                            write(u''' / ''')
                            _v = VFFSL(SL,"event.ns",True) # u'$event.ns' on line 94, col 33
                            if _v is not None: write(_filter(_v, rawExpr=u'$event.ns')) # from line 94, col 33.
                            write(u'''
''')
                        write(u'''\t\t\t\t\t\t\t\t\t</span>
''')
                    write(u'''\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class="col-xs-12 col-md-6" style="word-break: break-all">
\t\t\t\t\t\t\t\t<h2>''')
                    _v = VFFSL(SL,"event.title",True) # u'$event.title' on line 100, col 13
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.title')) # from line 100, col 13.
                    write(u'''</h2>
\t\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t<a href="javascript:void(0);" class="link--skinned" onclick="addTimerEvent(\'''')
                    _v = VFFSL(SL,"sref",True) # u'$sref' on line 102, col 85
                    if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 102, col 85.
                    write(u"""',""")
                    _v = VFFSL(SL,"event.id",True) # u'$event.id' on line 102, col 92
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.id')) # from line 102, col 92.
                    write(u''',false);return false;" title="''')
                    _v = VFFSL(SL,"tstrings",True)['add_timer'] # u"$tstrings['add_timer']" on line 102, col 131
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['add_timer']")) # from line 102, col 131.
                    write(u'''"><i class="material-icons material-icons-centered">alarm_add</i></a>
\t\t\t\t\t\t\t\t<a href="javascript:void(0);" class="deltimer link--skinned" onclick="delTimerEvent(\'''')
                    _v = VFFSL(SL,"sref",True) # u'$sref' on line 103, col 94
                    if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 103, col 94.
                    write(u"""',""")
                    _v = VFFSL(SL,"event.id",True) # u'$event.id' on line 103, col 101
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.id')) # from line 103, col 101.
                    write(u''');return false;" title="''')
                    _v = VFFSL(SL,"tstrings",True)['delete_timer'] # u"$tstrings['delete_timer']" on line 103, col 134
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['delete_timer']")) # from line 103, col 134.
                    write(u'''"></a>
\t\t\t\t\t\t\t\t<a href="javascript:void(0);" class="link--skinned" data-dismiss="modal" data-toggle="modal" data-target="#TimerModal" data-evid="''')
                    _v = VFFSL(SL,"event.id",True) # u'$event.id' on line 104, col 139
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.id')) # from line 104, col 139.
                    write(u'''" data-ref="''')
                    _v = VFFSL(SL,"sref",True) # u'$sref' on line 104, col 160
                    if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 104, col 160.
                    write(u'''" title="''')
                    _v = VFFSL(SL,"tstrings",True)['edit_timer'] # u"$tstrings['edit_timer']" on line 104, col 174
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['edit_timer']")) # from line 104, col 174.
                    write(u'''"><i class="material-icons material-icons-centered">alarm</i></a>
\t\t\t\t\t\t\t\t<a href="javascript:void(0);" class="link--skinned" onclick="addTimerEvent(\'''')
                    _v = VFFSL(SL,"sref",True) # u'$sref' on line 105, col 85
                    if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 105, col 85.
                    write(u"""',""")
                    _v = VFFSL(SL,"event.id",True) # u'$event.id' on line 105, col 92
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.id')) # from line 105, col 92.
                    write(u''',true);return false;" title="''')
                    _v = VFFSL(SL,"tstrings",True)['add_zaptimer'] # u"$tstrings['add_zaptimer']" on line 105, col 130
                    if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['add_zaptimer']")) # from line 105, col 130.
                    write(u'''"><i class="material-icons material-icons-centered">rotate_90_degrees_ccw</i></a>
''')
                    if VFFSL(SL,"at",True): # generated from line 106, col 8
                        write(u'''\t\t\t\t\t\t\t\t<a href="javascript:void(0);" data-dismiss="modal" onclick=\'location.href="#/at/new?name=''')
                        _v = VFFSL(SL,"title",True) # u'$title' on line 107, col 98
                        if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 107, col 98.
                        write(u'''&match=''')
                        _v = VFFSL(SL,"title",True) # u'$title' on line 107, col 111
                        if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 107, col 111.
                        write(u'''&timespanFrom=''')
                        _v = VFFSL(SL,"event.begin",True) # u'$event.begin' on line 107, col 131
                        if _v is not None: write(_filter(_v, rawExpr=u'$event.begin')) # from line 107, col 131.
                        write(u'''&timespanTo=''')
                        _v = VFFSL(SL,"event.end",True) # u'$event.end' on line 107, col 155
                        if _v is not None: write(_filter(_v, rawExpr=u'$event.end')) # from line 107, col 155.
                        write(u'''&sref=''')
                        _v = VFFSL(SL,"sref",True) # u'$sref' on line 107, col 171
                        if _v is not None: write(_filter(_v, rawExpr=u'$sref')) # from line 107, col 171.
                        write(u'''";\' class="link--skinned" title="''')
                        _v = VFFSL(SL,"tstrings",True)['add_autotimer'] # u"$tstrings['add_autotimer']" on line 107, col 209
                        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['add_autotimer']")) # from line 107, col 209.
                        write(u'''">
\t\t\t\t\t\t\t\t<i class="material-icons material-icons-centered">av_timer</i>
\t\t\t\t\t\t\t\t</a>
''')
                    if VFFSL(SL,"extEventInfoProvider",True): # generated from line 111, col 8
                        write(u'''\t\t\t\t\t\t\t\t<a href="''')
                        _v = VFFSL(SL,"extEventInfoProvider",True)['url'] # u"$extEventInfoProvider['url']" on line 112, col 18
                        if _v is not None: write(_filter(_v, rawExpr=u"$extEventInfoProvider['url']")) # from line 112, col 18.
                        _v = VFFSL(SL,"quote",False)(VFFSL(SL,"event.title",True)) # u'$quote($event.title)' on line 112, col 46
                        if _v is not None: write(_filter(_v, rawExpr=u'$quote($event.title)')) # from line 112, col 46.
                        write(u'''" class="link--skinned" title="''')
                        _v = VFFSL(SL,"tstrings",True)['search_'+VFFSL(SL,"extEventInfoProvider",True)['id']] # u"$tstrings['search_'+$extEventInfoProvider['id']]" on line 112, col 97
                        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['search_'+$extEventInfoProvider['id']]")) # from line 112, col 97.
                        write(u'''" target="extdb">''')
                        _v = VFFSL(SL,"extEventInfoProvider",True)['name'] # u"$extEventInfoProvider['name']" on line 112, col 162
                        if _v is not None: write(_filter(_v, rawExpr=u"$extEventInfoProvider['name']")) # from line 112, col 162.
                        write(u'''</a>
''')
                    write(u'''\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class="col-xs-12 col-md-4 align-right" style="word-break: break-all">
\t\t\t\t\t\t<h2>''')
                    _v = VFFSL(SL,"event.date",True) # u'$event.date' on line 117, col 11
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.date')) # from line 117, col 11.
                    write(u'''</h2>
\t\t\t\t\t\t<span>''')
                    _v = VFFSL(SL,"event.begin",True) # u'$event.begin' on line 118, col 13
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.begin')) # from line 118, col 13.
                    write(u'''&nbsp;-&nbsp;''')
                    _v = VFFSL(SL,"event.end",True) # u'$event.end' on line 118, col 38
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.end')) # from line 118, col 38.
                    write(u'''&nbsp;(''')
                    _v = VFFSL(SL,"event.duration",True) # u'$event.duration' on line 118, col 55
                    if _v is not None: write(_filter(_v, rawExpr=u'$event.duration')) # from line 118, col 55.
                    write(u''' min.)</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class="body">
\t\t\t\t\t<div class="row clearfix">
\t\t\t\t\t\t<div class="col-xs-12">
''')
                    if VFFSL(SL,"event.longdesc",True) != '': # generated from line 125, col 7
                        write(u'''\t\t\t\t\t\t<span data-toggle="collapse" data-target="#evenid''')
                        _v = VFFSL(SL,"dataid",True) # u'$dataid' on line 126, col 56
                        if _v is not None: write(_filter(_v, rawExpr=u'$dataid')) # from line 126, col 56.
                        write(u'''" aria-expanded="false"aria-controls="collapseExample" style="cursor:pointer;">
\t\t\t\t\t\t<p>''')
                        _v = VFFSL(SL,"event.shortdesc",True) # u'$event.shortdesc' on line 127, col 10
                        if _v is not None: write(_filter(_v, rawExpr=u'$event.shortdesc')) # from line 127, col 10.
                        write(u'''</p>
\t\t\t\t\t\t<i class="material-icons material-icons-centered">expand_more</i></span>
\t\t\t\t\t\t<div class="collapse" id="evenid''')
                        _v = VFFSL(SL,"dataid",True) # u'$dataid' on line 129, col 39
                        if _v is not None: write(_filter(_v, rawExpr=u'$dataid')) # from line 129, col 39.
                        write(u'''">
\t\t\t\t\t\t<p>''')
                        _v = VFN(VFN(VFFSL(SL,"event.longdesc",True),"replace",False)('\n',r'<br/>'),"replace",False)('\8a',r'<br/>') # u"$event.longdesc.replace('\\n',r'<br/>').replace('\\8a',r'<br/>')" on line 130, col 10
                        if _v is not None: write(_filter(_v, rawExpr=u"$event.longdesc.replace('\\n',r'<br/>').replace('\\8a',r'<br/>')")) # from line 130, col 10.
                        write(u'''</p>
\t\t\t\t\t\t</div>
''')
                    else: # generated from line 132, col 7
                        write(u'''\t\t\t\t\t\t<span><p>''')
                        _v = VFFSL(SL,"event.shortdesc",True) # u'$event.shortdesc' on line 133, col 16
                        if _v is not None: write(_filter(_v, rawExpr=u'$event.shortdesc')) # from line 133, col 16.
                        write(u'''</p></span>
''')
                    write(u'''\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t\t</div>
\t\t</div>

''')
                write(u'''
''')
                dataid = VFFSL(SL,"dataid",True)+1
            write(u'''
<script>
\tvar t = [
''')
            for timer in VFFSL(SL,"timers",True): # generated from line 149, col 1
                write(u"""\t\t{'begin':""")
                _v = VFFSL(SL,"timer.begin",True) # u'$timer.begin' on line 150, col 12
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.begin')) # from line 150, col 12.
                write(u""",'end':""")
                _v = VFFSL(SL,"timer.end",True) # u'$timer.end' on line 150, col 31
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.end')) # from line 150, col 31.
                write(u""",'sref':'""")
                _v = VFFSL(SL,"timer.serviceref",True) # u'$timer.serviceref' on line 150, col 50
                if _v is not None: write(_filter(_v, rawExpr=u'$timer.serviceref')) # from line 150, col 50.
                write(u"""'},
""")
            write(u'''\t];

\tvar reloadTimers = true;
\tjQuery(function() {
\t\tjQuery(\'#editTimerForm\').load(\'ajax/edittimer\');
\t\tif (t.length > 0) {
\t\t\tvar x = jQuery( ".ETV tbody" );
\t\t\tif (x != undefined)
\t\t\t\tShowTimers(t);
\t\t}
\t});
</script>

''')
        write(u'''
\t\t</div>
\t</div>
</div>
''')
        
        ########################################
        ## 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_epgdialog= 'respond'

## END CLASS DEFINITION

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


# 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=epgdialog()).run()


