コード例 #1
0
ファイル: batchofprompts.py プロジェクト: daisy/lion
    def title(self, **KWS):

        ## CHEETAH: generated from #def title at line 10, col 1.
        trans = KWS.get("trans")
        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"""
"""
        )

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #2
0
ファイル: Greeting.py プロジェクト: macaww/monitor_hive
    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'''Hello, ''')
        _v = VFFSL(SL,"user",True) # u'$user' on line 1, col 8
        if _v is not None: write(_filter(_v, rawExpr=u'$user')) # from line 1, col 8.
        write(u''' firstName.
Your order (#''')
        _v = VFFSL(SL,"order",True) # u'$order' on line 2, col 14
        if _v is not None: write(_filter(_v, rawExpr=u'$order')) # from line 2, col 14.
        write(u''' id) has shipped:
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #3
0
ファイル: UserPage.py プロジェクト: casimiro/albergue-amigo
    def body(self, **KWS):



        ## CHEETAH: generated from #def body at line 7, col 1.
        trans = KWS.get("trans")
        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'''<h2>''')
        _v = VFSL([locals()]+SL+[globals(), builtin],"user.name",True) # u'$user.name' on line 8, col 5
        if _v is not None: write(_filter(_v, rawExpr=u'$user.name')) # from line 8, col 5.
        write(u'''</h2>
<h2>Bem vindo, ''')
        _v = VFSL([locals()]+SL+[globals(), builtin],"user.name",True) # u'$user.name' on line 9, col 16
        if _v is not None: write(_filter(_v, rawExpr=u'$user.name')) # from line 9, col 16.
        write(u'''!</h2>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #4
0
    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_47080177 = _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'''<?xml version="1.0" encoding="UTF-8"?>
<e2servicelist>
''')
        for service in VFFSL(SL,"services",True): # generated from line 4, col 2
            write(u'''\t<e2service>
\t\t<e2servicereference>''')
            _v = VFFSL(SL,"service.servicereference",True) # u'$service.servicereference' on line 6, col 23
            if _v is not None: write(_filter(_v, rawExpr=u'$service.servicereference')) # from line 6, col 23.
            write(u'''</e2servicereference>
\t\t<e2servicename>''')
            _v = VFFSL(SL,"service.servicename",True) # u'$service.servicename' on line 7, col 18
            if _v is not None: write(_filter(_v, rawExpr=u'$service.servicename')) # from line 7, col 18.
            write(u'''</e2servicename>
\t\t<e2serviceisgroup>''')
            _v = VFFSL(SL,"service.isgroup",True) # u'$service.isgroup' on line 8, col 21
            if _v is not None: write(_filter(_v, rawExpr=u'$service.isgroup')) # from line 8, col 21.
            write(u'''</e2serviceisgroup>
\t\t<e2serviceismarker>''')
            _v = VFFSL(SL,"service.ismarker",True) # u'$service.ismarker' on line 9, col 22
            if _v is not None: write(_filter(_v, rawExpr=u'$service.ismarker')) # from line 9, col 22.
            write(u'''</e2serviceismarker>
\t\t<e2serviceisprotected>''')
            _v = VFFSL(SL,"service.isprotected",True) # u'$service.isprotected' on line 10, col 25
            if _v is not None: write(_filter(_v, rawExpr=u'$service.isprotected')) # from line 10, col 25.
            write(u'''</e2serviceisprotected>
\t</e2service>
''')
        write(u'''</e2servicelist>
''')
        _filter = self._CHEETAH__currentFilter = _orig_filter_47080177
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #5
0
    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'''<script type="text/javascript">
\t$(document).ready(function() {
\t\tload_maincontent(\'ajax/tv\');
\t});
</script>''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #6
0
ファイル: main.py プロジェクト: pli3/Openwebif
    def searchMenu(self, **KWS):



        ## CHEETAH: generated from #def searchMenu at line 100, col 4.
        trans = KWS.get("trans")
        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'''\t\t\t<form action="" onSubmit="open_epg_search_pop(); return false;">\r
\t\t\t\t<div style="width:100%; text-align:center; padding-top:5px;"><input type="text" id="epgSearch" size="14" /></div>\r
\t\t\t\t<div style="width:100%; text-align:center;padding-top:5px; padding-bottom:7px;" class="epgsearch"><button>Search</button></div>\r
\t\t\t</form>\r
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #7
0
ファイル: main.py プロジェクト: pli3/Openwebif
    def controlMenu(self, **KWS):



        ## CHEETAH: generated from #def controlMenu at line 72, col 4.
        trans = KWS.get("trans")
        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'''\t\t\t<ul>\r
\t\t\t\t<li><a href=\'#\' onclick="load_maincontent(\'ajax/powerstate\'); return false;">Power Control</a></li>\r
\t\t\t\t<li><a href=\'#\' onclick="load_maincontent(\'ajax/screenshot\'); return false;">Grab Screenshot</a></li>\r
\t\t\t\t<li><a href=\'#\' onclick="load_maincontent(\'ajax/message\'); return false;">Send a Message</a></li>\r
\t\t\t\t<li><a href=\'#\' onclick="load_maincontent(\'ajax/timers\'); return false;">Timers</a></li>\r
\t\t\t</ul>\r
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #8
0
ファイル: main.py プロジェクト: pli3/Openwebif
    def infoMenu(self, **KWS):



        ## CHEETAH: generated from #def infoMenu at line 81, col 4.
        trans = KWS.get("trans")
        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'''\t\t\t<ul>\r
\t\t\t\t<li><a href="#" onclick="load_maincontent(\'ajax/boxinfo\'); return false">Box Info</a></li>\r
\t\t\t\t<li><a href="#" onclick="load_maincontent(\'ajax/about\'); return false">About</a></li>\r
\t\t\t</ul>\r
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #9
0
ファイル: main.py プロジェクト: pli3/Openwebif
    def volumeMenu(self, **KWS):



        ## CHEETAH: generated from #def volumeMenu at line 61, col 4.
        trans = KWS.get("trans")
        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'''\t\t\t<div class="volslider">\r
\t\t\t\t\t<p style="text-align:center; padding-bottom:8px;"> \r
\t\t\t\t\t\t<label for="amount">Volume:</label>\r
\t\t\t\t\t\t<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold; width:40px;" />\r
\t\t\t\t\t</p>\r
\t\t\t\t<div id="slider" style="width:130px;"></div>\r
\t\t\t</div>\r
\t\t\t<div style="width:100%; text-align:center; padding-top:5px; padding-bottom:10px;"><img id="volimage" src="images/volume.png" title="" border="0"></div>\r
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #10
0
    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'''#ifndef __COMMON__H_
#define __COMMON__H_

#include <vector>

''')
        _v = VFFSL(SL,"nta.declaration",True) # u'$nta.declaration' on line 6, col 1
        if _v is not None: write(_filter(_v, rawExpr=u'$nta.declaration')) # from line 6, col 1.
        write(u'''

#endif
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #11
0
ファイル: basebase.py プロジェクト: abshkd/eve-central.com
    def banner(self, **KWS):



        ## CHEETAH: generated from #def banner at line 13, col 1.
        trans = KWS.get("trans")
        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
        
        _v = VFFSL(SL,"title",True) # u'$title' on line 14, col 1
        if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 14, col 1.
        write(u'''
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #12
0
ファイル: batchofprompts.py プロジェクト: daisy/lion
    def writeBody(self, **KWS):

        ## CHEETAH: main method generated for this template
        trans = KWS.get("trans")
        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

        #
        # Template variables:
        # 	user = user's real name
        # 	language = language name
        # 	actions = list of menu links
        write(
            u"""
"""
        )

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #13
0
    def bodyContent(self, **KWS):



        ## CHEETAH: generated from #block bodyContent at line 27, col 9.
        trans = KWS.get("trans")
        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'''        <!-- PLACEHOLER BODYCONTENT -->
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #14
0
    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'''http://''')
        _v = VFFSL(SL,"host",True) # u'$host' on line 1, col 8
        if _v is not None: write(_filter(_v, rawExpr=u'$host')) # from line 1, col 8.
        write(u''':31339/0,''')
        _v = VFFSL(SL,"ppid",True) # u'$ppid' on line 1, col 22
        if _v is not None: write(_filter(_v, rawExpr=u'$ppid')) # from line 1, col 22.
        write(u''',''')
        _v = VFFSL(SL,"vpid",True) # u'$vpid' on line 1, col 28
        if _v is not None: write(_filter(_v, rawExpr=u'$vpid')) # from line 1, col 28.
        write(u''',''')
        _v = VFFSL(SL,"apid",True) # u'$apid' on line 1, col 34
        if _v is not None: write(_filter(_v, rawExpr=u'$apid')) # from line 1, col 34.
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #15
0
ファイル: callback.py プロジェクト: lzimm/360io
    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'''<script type="text/javascript">
    document.domain = "360.io";
    window.opener.io360.twitter.callback(''')
        _v = VFN(VFFSL(SL,"simplejson",True),"dumps",False)(VFFSL(SL,"req.result",True)) # u'$simplejson.dumps($req.result)' on line 4, col 42
        if _v is not None: write(_filter(_v, rawExpr=u'$simplejson.dumps($req.result)')) # from line 4, col 42.
        write(u''');
</script>''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #16
0
ファイル: translate.py プロジェクト: daisy/lion
    def title(self, **KWS):

        ## CHEETAH: generated from #def title at line 17, col 1.
        trans = KWS.get("trans")
        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

        _v = VFFSL(SL, "appname", True)  # u'$appname' on line 18, col 1
        if _v is not None:
            write(_filter(_v, rawExpr=u"$appname"))  # from line 18, col 1.
        write(u""" translation for """)
        _v = VFFSL(SL, "language", True)  # u'$language' on line 18, col 26
        if _v is not None:
            write(_filter(_v, rawExpr=u"$language"))  # from line 18, col 26.
        write(
            u"""
"""
        )

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #17
0
ファイル: query.py プロジェクト: AlevtinaGlonina/IMASimulator
    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'''A[] forall (i : int[0,numOfTasks-1]) forall (j : int[0,numOfTasks-1]) (i==j)||(tasks[i].partition_id != tasks[j].partition_id)|| not (tasks[j].executing && tasks[i].executing)
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #18
0
    def head(self, **KWS):



        ## CHEETAH: generated from #def head at line 5, col 1.
        trans = KWS.get("trans")
        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'''<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language=pt-br"></script>
<script type="text/javascript">
  function initialize() {
    var hotel = new google.maps.LatLng(''')
        _v = VFSL([locals()]+SL+[globals(), builtin],"site.latitude",True) # u'$site.latitude' on line 9, col 40
        if _v is not None: write(_filter(_v, rawExpr=u'$site.latitude')) # from line 9, col 40.
        write(u''', ''')
        _v = VFSL([locals()]+SL+[globals(), builtin],"site.longitude",True) # u'$site.longitude' on line 9, col 56
        if _v is not None: write(_filter(_v, rawExpr=u'$site.longitude')) # from line 9, col 56.
        write(u''');
    var myOptions = {
      zoom: 16,
      center: hotel,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    var hotelMarker = new google.maps.Marker({
      position: hotel, 
      map: map, 
      title:"''')
        _v = VFSL([locals()]+SL+[globals(), builtin],"site.name",True) # u'$site.name' on line 19, col 14
        if _v is not None: write(_filter(_v, rawExpr=u'$site.name')) # from line 19, col 14.
        write(u'''"
\t});
\t
\tvar content = "S\xedtio Tur\xedstico: ''')
        _v = VFSL([locals()]+SL+[globals(), builtin],"site.name",True) # u'$site.name' on line 22, col 34
        if _v is not None: write(_filter(_v, rawExpr=u'$site.name')) # from line 22, col 34.
        write(u'''<br>"
\tvar infoWindow = new google.maps.InfoWindow({content: content});
\tinfoWindow.setPosition(hotel);
    infoWindow.open(map);
  }

</script>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #19
0
ファイル: EditUser.py プロジェクト: casimiro/albergue-amigo
    def body(self, **KWS):



        ## CHEETAH: generated from #def body at line 8, col 1.
        trans = KWS.get("trans")
        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'''<h2>Editar Usuario</h2>
<form method="post" action="/users/edit">
''')
        _v = VFSL([locals()]+SL+[globals(), builtin],"fs",True) # u'$fs' on line 11, col 1
        if _v is not None: write(_filter(_v, rawExpr=u'$fs')) # from line 11, col 1.
        write(u'''
<input type="submit" value="Salvar" />
</form>

''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #20
0
ファイル: uploadcomplete.py プロジェクト: daisy/lion
    def body(self, **KWS):



        ## CHEETAH: generated from #def body at line 5, col 1.
        trans = KWS.get("trans")
        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'''<h1>Upload Completed</h1>
<p>File upload completed!  If there are any issues with your file, you will be contacted by a member of our team.</p>
<p><a href="../../MainMenu">Return to the tasks menu</a></p>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #21
0
ファイル: main.py プロジェクト: pli3/e2-openwbif
    def infoMenu(self, **KWS):



        ## CHEETAH: generated from #def infoMenu at line 84, col 4.
        trans = KWS.get("trans")
        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'''\t\t\t<ul>\r
\t\t\t\t<li><a href="#" onclick="load_maincontent(\'ajax/boxinfo\'); return false">''')
        _v = VFFSL(SL,"tstrings",True)['box_info'] # u"$tstrings['box_info']" on line 86, col 78
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['box_info']")) # from line 86, col 78.
        write(u'''</a></li>\r
\t\t\t\t<li><a href="#" onclick="load_maincontent(\'ajax/about\'); return false">''')
        _v = VFFSL(SL,"tstrings",True)['about'] # u"$tstrings['about']" on line 87, col 76
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['about']")) # from line 87, col 76.
        write(u'''</a></li>\r
\t\t\t</ul>\r
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #22
0
    def writeBody(self, **KWS):



        ## CHEETAH: main method generated for this template
        trans = KWS.get("trans")
        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'''

''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #23
0
ファイル: register.py プロジェクト: lzimm/360io
    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

        _v = VFN(VFFSL(SL, "simplejson", True), "dumps", False)(
            VFFSL(SL, "req.result", True)
        )  # u'$simplejson.dumps($req.result)' on line 2, col 1
        if _v is not None:
            write(_filter(_v, rawExpr=u"$simplejson.dumps($req.result)"))  # from line 2, col 1.

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #24
0
ファイル: getipv6.py プロジェクト: pli3/e2-openwbif
    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'''<html>
<body>
My IP address is: ''')
        _v = VFFSL(SL,"firstpublic",True) # u'$firstpublic' on line 3, col 19
        if _v is not None: write(_filter(_v, rawExpr=u'$firstpublic')) # from line 3, col 19.
        write(u'''
</body>
</html>''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #25
0
ファイル: dict_javabean.py プロジェクト: wanglili1219/nogame
    def getFieldName(self, name, **KWS):



        ## CHEETAH: generated from #def getFieldName($name) at line 26, col 1.
        trans = KWS.get("trans")
        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
        
        name = string.capwords(VFSL([locals()]+SL+[globals(), builtin],"name",True), sep="_").replace("_", "")
        name = VFN(VFSL([locals()]+SL+[globals(), builtin],"name",True)[0],"lower",False)() + VFSL([locals()]+SL+[globals(), builtin],"name",True)[1:]
        return VFSL([locals()]+SL+[globals(), builtin],"name",True)
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #26
0
ファイル: error.py プロジェクト: daisy/lion
    def body(self, **KWS):



        ## CHEETAH: generated from #def body at line 6, col 1.
        trans = KWS.get("trans")
        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'''<h1>General error</h1>
<p>Dear user: Sorry!</p>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #27
0
ファイル: HelloWorld.py プロジェクト: bin-zhao/LearnCheetah
    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'''
You say:
\tHello, ''')
        _v = VFFSL(SL,"name",True) # u'$name' on line 6, col 9
        if _v is not None: write(_filter(_v, rawExpr=u'$name')) # from line 6, col 9.
        write(u'''!''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #28
0
ファイル: rebootdialog.py プロジェクト: pli3/e2-openwbif
    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'''<div style="height: 30px; width:250px">
\t<div>
\t\t<img src="images/spinner.gif" width="64" height="64" border="0" alt="''')
        _v = VFFSL(SL,"tstrings",True)['loading'] # u"$tstrings['loading']" on line 4, col 72
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['loading']")) # from line 4, col 72.
        write(u''' ..." style=" position:absolute; top:50%; left:50%; margin-top:-25px; margin-left:-25px;">
\t</div>
</div>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #29
0
    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"""<p>
\t"""
        )
        _v = VFFSL(SL, "description", True)  # u'$description' on line 2, col 2
        if _v is not None:
            write(_filter(_v, rawExpr=u"$description"))  # from line 2, col 2.
        write(
            u"""
</p>
"""
        )

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #30
0
ファイル: satellites.py プロジェクト: pli3/Openwebif
    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'''
<script>
\t

\t $("#accordionS").accordion({
                active:false,
                change:function(event, ui) {
                        ui.newContent.load(ui.newHeader.find(\'a\').attr(\'id\'));
                },
                autoHeight: false,
\t\t collapsible: true
            });


</script>

<div id="accordionS">

''')
        for satellite in VFFSL(SL,"satellites",True): # generated from line 20, col 1
            write(u'''\t<h1><a href="#" id="ajax/channels?id=''')
            _v = VFFSL(SL,"quote",False)(VFFSL(SL,"satellite.service",True)) # u'$quote($satellite.service)' on line 21, col 39
            if _v is not None: write(_filter(_v, rawExpr=u'$quote($satellite.service)')) # from line 21, col 39.
            write(u'''&stype=''')
            _v = VFFSL(SL,"stype",True) # u'$stype' on line 21, col 72
            if _v is not None: write(_filter(_v, rawExpr=u'$stype')) # from line 21, col 72.
            write(u'''">''')
            _v = VFFSL(SL,"satellite.name",True) # u'$satellite.name' on line 21, col 80
            if _v is not None: write(_filter(_v, rawExpr=u'$satellite.name')) # from line 21, col 80.
            write(u'''</a></h1>
<div>
loading...
\t</div>
''')
        write(u'''
</div>''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #31
0
    def body(self, **KWS):

        ## CHEETAH: generated from #def body at line 13, col 1.
        trans = KWS.get("trans")
        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("""<h1>""")
        _v = VFFSL(SL, "book.title.booktitle",
                   True)  # '$book.title.booktitle' on line 14, col 5
        if _v is not None:
            write(_filter(
                _v, rawExpr="$book.title.booktitle"))  # from line 14, col 5.
        write("""</h1>
<form class=\'editform\' method="get" action="/bookedit">
""")
        _v = VFFSL(SL, "book.object_to_form",
                   True)  # '$book.object_to_form' on line 16, col 1
        if _v is not None:
            write(_filter(
                _v, rawExpr="$book.object_to_form"))  # from line 16, col 1.
        write("""
</form>
""")

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #32
0
ファイル: cmakelists.py プロジェクト: AlevtinaGlonina/MCSSim
    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'''project(generated_components)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++11 -O3")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../simulator/core)
link_directories(${CMAKE_CURRRENT_BINARY_DIR}/../../simulator/core)

add_library(generated_components 
''')
        for a in VFFSL(SL, "nta", True):  # generated from line 7, col 1
            write(u'''\t''')
            _v = VFFSL(SL, "a.name", True)  # u'${a.name}' on line 8, col 2
            if _v is not None:
                write(_filter(_v, rawExpr=u'${a.name}'))  # from line 8, col 2.
            write(u'''.cpp
''')
        write(u'''\tcommon.cpp
)
target_link_libraries(generated_components core)
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #33
0
    def body(self, **KWS):

        ## CHEETAH: generated from #def body at line 4, col 1.
        trans = KWS.get("trans")
        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'''<h1>''')
        _v = VFFSL(SL, "title", True)  # u'$title' on line 5, col 5
        if _v is not None:
            write(_filter(_v, rawExpr=u'$title'))  # from line 5, col 5.
        write(u'''</h1>

''')
        _v = VFFSL(SL, "search_authors_form", False)(searchList=VFFSL(
            SL, "searchList", True
        ))  # u'$search_authors_form(searchList=$searchList)' on line 8, col 1
        if _v is not None:
            write(
                _filter(_v,
                        rawExpr=u'$search_authors_form(searchList=$searchList)'
                        ))  # from line 8, col 1.
        write(u'''
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #34
0
    def links(self, **KWS):



        ## CHEETAH: generated from #def links at line 51, col 1.
        trans = KWS.get("trans")
        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('''<ul class="navbar-nav">
  <li class="nav-item">
    <a class="nav-link" href="index.html">Index</a>
  </li>
''')
        if VFFSL(SL,"code",True) != -1: # generated from line 56, col 3
            write('''    <li class="nav-item">
      <a class="nav-link" href="''')
            _v = VFFSL(SL,"compressed",True) # '$compressed' on line 58, col 33
            if _v is not None: write(_filter(_v, rawExpr='$compressed')) # from line 58, col 33.
            write('''">Compressed report</a>
    </li>
''')
        write('''</ul>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #35
0
    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

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #36
0
    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'''#ifndef MESSAGE_H
#define MESSAGE_H


/*****************************************************************************
 *                                                                           *
 * ---------------------------- Public Interface --------------------------- *
 *                                                                           *
 *****************************************************************************/

void message(const char* message);

#endif \t\t// MESSAGE_H
/* -*- vim: set ts=4 sw=4 tw=78 ft=header: -*- */
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #37
0
    def rightTitle(self, **KWS):

        ## CHEETAH: generated from #def rightTitle() at line 42, col 1.
        trans = KWS.get("trans")
        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('''  <h5>Generated on ''')
        _v = VFFSL(SL, "generated_on",
                   True)  # '$generated_on' on line 43, col 20
        if _v is not None:
            write(_filter(_v,
                          rawExpr='$generated_on'))  # from line 43, col 20.
        write(''' in ''')
        _v = VFFSL(SL, "generated_in",
                   True)  # '$generated_in' on line 43, col 37
        if _v is not None:
            write(_filter(_v,
                          rawExpr='$generated_in'))  # from line 43, col 37.
        write('''</h5>
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #38
0
    def writeBody(self, **KWS):

        ## CHEETAH: main method generated for this template
        trans = KWS.get("trans")
        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

        #
        # Template variables:
        #
        # 	actions = navigation links
        # 	about = about this page
        # 	view_description = about this page view
        # 	count = number of items being displayed
        # 	form = table rows, each containing a translation form
        # 	usepages = if True, this represents a page
        # 	total_num_pages = the total number of pages
        # 	pagenum = the current page number
        # 	all_warnings = html-formatted list of warnings about the page
        write(u'''
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #39
0
    def _title(self, **KWS):

        ## CHEETAH: generated from #block _title at line 71, col 1.
        trans = KWS.get("trans")
        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'''
''')
        if VFN(VFFSL(SL, "title", True), "find",
               False)("EVE-Central") != -1:  # generated from line 73, col 1
            pass
        else:  # generated from line 75, col 1
            write(u''' EVE-Central -
''')
        write(u''' ''')
        _v = VFFSL(SL, "title", True)  # u'$title' on line 78, col 2
        if _v is not None:
            write(_filter(_v, rawExpr=u'$title'))  # from line 78, col 2.
        write(u'''
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #40
0
    def header_title(self, **KWS):

        ## CHEETAH: generated from #block header_title at line 57, col 1.
        trans = KWS.get("trans")
        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

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #41
0
ファイル: Class2_h.py プロジェクト: lopesivan/cansi-pattern
    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"""#ifndef ORDER_H
#define ORDER_H

/*
I never really dive into the details of this type.
Let's just create a dummy placeholder for the information.
*/
typedef struct
{
    unsigned long orderId;
} Order;

#endif
""")
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #42
0
    def body(self, **KWS):

        ## CHEETAH: generated from #def body at line 38, col 1.
        trans = KWS.get("trans")
        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("""<h1>Edit the Information for a Title</h1>

""")
        # if configured to show image we show an image of the title
        if VFFSL(SL, "should_show_images",
                 True):  # generated from line 42, col 1
            if VFFSL(SL, "title.images",
                     True):  # generated from line 43, col 1
                write('''<div id="main_image"><img src="''')
                _v = VFN(VFFSL(
                    SL, "title.images", True
                ), "retrieve_image_url", False)(
                    "large"
                )  # "$title.images.retrieve_image_url('large')" on line 44, col 32
                if _v is not None:
                    write(
                        _filter(
                            _v,
                            rawExpr="$title.images.retrieve_image_url('large')"
                        ))  # from line 44, col 32.
                write(""""><br></div>
""")
        write("""

""")
        # show the title info as editable form
        write("""<form class=\'editform\' method="get" action="/titleedit">
""")
        _v = VFFSL(SL, "title.object_to_form",
                   True)  # '$title.object_to_form' on line 51, col 1
        if _v is not None:
            write(_filter(
                _v, rawExpr="$title.object_to_form"))  # from line 51, col 1.
        write("""
</form>

""")
        # show the author records with button to edit each author record
        write("""<h2>Author(s):</h2>
<!-- 11/10/2008 john fixed manually -->
""")
        for a in VFFSL(SL, "title.author",
                       True):  # generated from line 57, col 1
            write("""<div><span>""")
            _v = VFFSL(SL, "a.authorName",
                       True)  # '$a.authorName' on line 58, col 12
            if _v is not None:
                write(_filter(
                    _v, rawExpr="$a.authorName"))  # from line 58, col 12.
            write("""</span><a class="listinglink" href="/authoredit?id=""")
            _v = VFFSL(SL, "a.id", True)  # '$a.id' on line 58, col 76
            if _v is not None:
                write(_filter(_v, rawExpr="$a.id"))  # from line 58, col 76.
            write("""&title_id=""")
            _v = VFFSL(SL, "title.id", True)  # '$title.id' on line 58, col 91
            if _v is not None:
                write(_filter(_v,
                              rawExpr="$title.id"))  # from line 58, col 91.
            write(
                """&new_author=False">edit</a><a class="listinglink" href="/titleedit?id="""
            )
            _v = VFFSL(SL, "title.id", True)  # '$title.id' on line 58, col 170
            if _v is not None:
                write(_filter(_v,
                              rawExpr="$title.id"))  # from line 58, col 170.
            write("""&author_id=""")
            _v = VFFSL(SL, "a.id", True)  # '$a.id' on line 58, col 190
            if _v is not None:
                write(_filter(_v, rawExpr="$a.id"))  # from line 58, col 190.
            write("""&remove_author=True&new_author=False">remove</a></div>
""")
        write("""<div><a class="listinglink" href="/authoredit?title_id=""")
        _v = VFFSL(SL, "title.id", True)  # '$title.id' on line 60, col 56
        if _v is not None:
            write(_filter(_v, rawExpr="$title.id"))  # from line 60, col 56.
        write("""&new_author=True">Add Author</a><div>

""")
        # show records for each individual copy.
        # each is editable in a book edit template
        write("""<h2>Copies</h2>
<form action="/addtocart">
""")
        for b in VFFSL(SL, "title.books",
                       True):  # generated from line 66, col 1
            write("""<div class="listinggroup">
<table>
<tr>
<td>
<ul style=\'list-style-type:none;\'>
<li><a class="listinglink" href="/bookedit?id=""")
            _v = VFFSL(SL, "b.id", True)  # '$b.id' on line 72, col 47
            if _v is not None:
                write(_filter(_v, rawExpr="$b.id"))  # from line 72, col 47.
            write("""">edit</a></li>
<li><a class="listinglink print_link" href=\'/admin/print_label?booktitle=urllib.quote_plus("""
                  )
            _v = VFFSL(SL, "b.title.booktitle",
                       True)  # '$b.title.booktitle' on line 73, col 92
            if _v is not None:
                write(_filter(
                    _v, rawExpr="$b.title.booktitle"))  # from line 73, col 92.
            write(""")&isbn=""")
            _v = VFFSL(SL, "b.title.isbn",
                       True)  # '$b.title.isbn' on line 73, col 117
            if _v is not None:
                write(_filter(
                    _v, rawExpr="$b.title.isbn"))  # from line 73, col 117.
            write("""&authorstring=urllib.quote_plus(""")
            _v = VFFSL(
                SL, "b.title.authors_as_string",
                True)  # '$b.title.authors_as_string' on line 73, col 162
            if _v is not None:
                write(_filter(_v, rawExpr="$b.title.authors_as_string")
                      )  # from line 73, col 162.
            write(""")&ourprice=""")
            _v = VFFSL(SL, "b.ourprice",
                       True)  # '$b.ourprice' on line 73, col 199
            if _v is not None:
                write(_filter(_v,
                              rawExpr="$b.ourprice"))  # from line 73, col 199.
            write("""&listprice=""")
            _v = VFFSL(SL, "b.listprice",
                       True)  # '$b.listprice' on line 73, col 221
            if _v is not None:
                write(_filter(
                    _v, rawExpr="$b.listprice"))  # from line 73, col 221.
            write("""'>Print label</li>
</ul>
</td>
<td>
<b>copy from """)
            _v = VFFSL(SL, "b.distributor",
                       True)  # '$b.distributor' on line 77, col 14
            if _v is not None:
                write(_filter(
                    _v, rawExpr="$b.distributor"))  # from line 77, col 14.
            write(""" owned by """)
            _v = VFFSL(SL, "b.owner", True)  # '$b.owner' on line 77, col 38
            if _v is not None:
                write(_filter(_v, rawExpr="$b.owner"))  # from line 77, col 38.
            write(""" <br />
inventoried on """)
            _v = VFFSL(SL, "b.inventoried_when",
                       True)  # '$b.inventoried_when' on line 78, col 16
            if _v is not None:
                write(_filter(
                    _v,
                    rawExpr="$b.inventoried_when"))  # from line 78, col 16.
            write(""" at $""")
            _v = VFFSL(SL, "b.ourprice",
                       True)  # '$b.ourprice' on line 78, col 41
            if _v is not None:
                write(_filter(_v,
                              rawExpr="$b.ourprice"))  # from line 78, col 41.
            write("""<br />
with status '""")
            _v = VFFSL(SL, "b.status", True)  # '$b.status' on line 79, col 14
            if _v is not None:
                write(_filter(_v,
                              rawExpr="$b.status"))  # from line 79, col 14.
            write("""'
""")
            if VFFSL(SL, "b.status",
                     True) != "STOCK":  # generated from line 80, col 1
                write(""" on """)
                _v = VFFSL(SL, "b.sold_when",
                           True)  # '$b.sold_when' on line 81, col 5
                if _v is not None:
                    write(_filter(
                        _v, rawExpr="$b.sold_when"))  # from line 81, col 5.
                write("""
""")
            write("""<br/>
in location '""")
            _v = VFFSL(SL, "b.location.locationName",
                       True)  # '$b.location.locationName' on line 84, col 14
            if _v is not None:
                write(_filter(_v, rawExpr="$b.location.locationName")
                      )  # from line 84, col 14.
            write("""'<br /></b>
</td>
""")
            # <td>
            # add this copy to cart: <input type="checkbox" name="copy_id" value="$b.id" />
            # [add <input style="width:80px;"type="text" length="3" name="select_x_like_$b.id" value="" /> copies like this to cart]
            # </td>
            write("""</tr>
</table>
</div>
""")
        write(
            """<input class="submit" type="submit" name="addtocart" value="Collect selected copies" /> <br /> <!--<br />
<input class="submit" type="submit" name="delete" onclick="return confirm(\'Are you sure?\');" value="Delete selected copies" />-->
</form>

""")
        # show category records. Each is editable in its own category edit template
        write("""<h2>Keywords::</h2>
""")
        for c in VFFSL(SL, "title.categorys",
                       True):  # generated from line 100, col 1
            write("""<div class="listing"><span class="listing">""")
            _v = VFFSL(SL, "c.categoryName",
                       True)  # '$c.categoryName' on line 101, col 44
            if _v is not None:
                write(_filter(
                    _v, rawExpr="$c.categoryName"))  # from line 101, col 44.
            write("""</span><a class="listinglink" href="/categoryedit?id=""")
            _v = VFFSL(SL, "c.id", True)  # '$c.id' on line 101, col 112
            if _v is not None:
                write(_filter(_v, rawExpr="$c.id"))  # from line 101, col 112.
            write("""">edit</a></div>
""")
        write("""


""")

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #43
0
    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'''#include "''')
        _v = VFN(VFFSL(SL,"state.start.name",True),"capitalize",False)() # u'${state.start.name.capitalize()}' on line 1, col 12
        if _v is not None: write(_filter(_v, rawExpr=u'${state.start.name.capitalize()}')) # from line 1, col 12.
        write(u'''State.h"
#include "''')
        _v = VFN(VFFSL(SL,"state.name",True),"capitalize",False)() # u'${state.name.capitalize()}' on line 2, col 12
        if _v is not None: write(_filter(_v, rawExpr=u'${state.name.capitalize()}')) # from line 2, col 12.
        write(u'''StateInternal.h"

/* Possible transition to the following state: */
#include "''')
        _v = VFN(VFFSL(SL,"state.start.to",True),"capitalize",False)() # u'${state.start.to.capitalize()}' on line 5, col 12
        if _v is not None: write(_filter(_v, rawExpr=u'${state.start.to.capitalize()}')) # from line 5, col 12.
        write(u'''State.h"

#include "message.h" // DEBUG

static void ''')
        _v = VFFSL(SL,"state.start.to",True) # u'${state.start.to}' on line 9, col 13
        if _v is not None: write(_filter(_v, rawExpr=u'${state.start.to}')) # from line 9, col 13.
        _v = VFN(VFFSL(SL,"state.name",True),"capitalize",False)() # u'${state.name.capitalize()}' on line 9, col 30
        if _v is not None: write(_filter(_v, rawExpr=u'${state.name.capitalize()}')) # from line 9, col 30.
        write(u''' (''')
        _v = VFN(VFFSL(SL,"state.name",True),"capitalize",False)() # u'${state.name.capitalize()}' on line 9, col 58
        if _v is not None: write(_filter(_v, rawExpr=u'${state.name.capitalize()}')) # from line 9, col 58.
        write(u'''StatePtr state)
{
    message("** ''')
        _v = VFFSL(SL,"state.start.to",True) # u'${state.start.to}' on line 11, col 17
        if _v is not None: write(_filter(_v, rawExpr=u'${state.start.to}')) # from line 11, col 17.
        _v = VFN(VFFSL(SL,"state.name",True),"capitalize",False)() # u'${state.name.capitalize()}' on line 11, col 34
        if _v is not None: write(_filter(_v, rawExpr=u'${state.name.capitalize()}')) # from line 11, col 34.
        write(u''' **");

    ''')
        _v = VFFSL(SL,"state.transitionTo.name",True) # u'${state.transitionTo.name}' on line 13, col 5
        if _v is not None: write(_filter(_v, rawExpr=u'${state.transitionTo.name}')) # from line 13, col 5.
        _v = VFN(VFFSL(SL,"state.start.to",True),"capitalize",False)() # u'${state.start.to.capitalize()}' on line 13, col 31
        if _v is not None: write(_filter(_v, rawExpr=u'${state.start.to.capitalize()}')) # from line 13, col 31.
        write(u''' (state);
}

void ''')
        _v = VFFSL(SL,"state.transitionTo.name",True) # u'${state.transitionTo.name}' on line 16, col 6
        if _v is not None: write(_filter(_v, rawExpr=u'${state.transitionTo.name}')) # from line 16, col 6.
        _v = VFN(VFFSL(SL,"state.start.name",True),"capitalize",False)() # u'${state.start.name.capitalize()}' on line 16, col 32
        if _v is not None: write(_filter(_v, rawExpr=u'${state.start.name.capitalize()}')) # from line 16, col 32.
        write(u''' (''')
        _v = VFN(VFFSL(SL,"state.name",True),"capitalize",False)() # u'${state.name.capitalize()}' on line 16, col 66
        if _v is not None: write(_filter(_v, rawExpr=u'${state.name.capitalize()}')) # from line 16, col 66.
        write(u'''StatePtr state)
{
    message("** ''')
        _v = VFFSL(SL,"state.transitionTo.name",True) # u'${state.transitionTo.name}' on line 18, col 17
        if _v is not None: write(_filter(_v, rawExpr=u'${state.transitionTo.name}')) # from line 18, col 17.
        _v = VFN(VFFSL(SL,"state.start.name",True),"capitalize",False)() # u'${state.start.name.capitalize()}' on line 18, col 43
        if _v is not None: write(_filter(_v, rawExpr=u'${state.start.name.capitalize()}')) # from line 18, col 43.
        write(u''' **");

    /* Initialize with the default implementation before
       specifying the events to be handled in the started
       state. */

    ''')
        _v = VFFSL(SL,"state.defaultImplementation.name",True) # u'${state.defaultImplementation.name}' on line 24, col 5
        if _v is not None: write(_filter(_v, rawExpr=u'${state.defaultImplementation.name}')) # from line 24, col 5.
        write(u''' (state);
    state->func = ''')
        _v = VFFSL(SL,"state.start.to",True) # u'${state.start.to}' on line 25, col 19
        if _v is not None: write(_filter(_v, rawExpr=u'${state.start.to}')) # from line 25, col 19.
        _v = VFN(VFFSL(SL,"state.name",True),"capitalize",False)() # u'${state.name.capitalize()}' on line 25, col 36
        if _v is not None: write(_filter(_v, rawExpr=u'${state.name.capitalize()}')) # from line 25, col 36.
        write(u''';
}

''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #44
0
    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'''





<!DOCTYPE html>
<html>
<!--
#    EVE-Central.com Codebase
#    Copyright (C) 2006-2017 StackFoundry LLC and Yann Ramin
''')
        write(
            u'''#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU Affero General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
''')
        write(
            u'''#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.
''')
        write(
            u'''#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->

<head>
<link href="/css/normalize.css" rel="stylesheet" type="text/css" />
<link href="/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
  (function() {
    var config = {
      kitId: \'yvc6jcj\',
      scriptTimeout: 3000
    };
    var h=document.getElementsByTagName("html")[0];h.className+=" wf-loading";var t=setTimeout(function(){h.className=h.className.replace(/(\\s|^)wf-loading(\\s|$)/g," ");h.className+=" wf-inactive"},config.scriptTimeout);var tk=document.createElement("script"),d=false;tk.src=\'//use.typekit.net/\'+config.kitId+\'.js\';tk.type="text/javascript";tk.async="true";tk.onload=tk.onreadystatechange=function(){var a=this.readyState;if(d||a&&a!="complete"&&a!="loaded")return;d=true;clearTimeout(t);try{Typekit.load(config)}catch(b){}};var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(tk,s)
  })();
</script>
<script src="//www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-84549-2";
urchinTracker();
</script>

<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/typeahead.min.js"></script>
<script type="text/javascript" src="/js/json2.js"></script>
<script type="text/javascript" src="/js/underscore-min.js"></script>
<script type="text/javascript" src="/js/backbone-min.js"></script>
<script type="text/javascript" src="/js/backbone.queryparams.js"></script>
<script type="text/javascript" src="/js/handlebars-1.0.0.beta.6.js"></script>
<script type="text/javascript" src="/js/evec.js"></script>
  <title>
''')
        self._title(trans=trans)
        write(u'''</title>
</head>
<body>

''')
        timehead = gmt()
        write(u'''
<div class="topbar">
  <ul>
    <li><a href="/"><img src="/images/evec_logo.png" height="40" width="80"></a></li>
    <li><a href="/">Market</a></li>
    <li><a href="/tradetool/">Trade Tools</a></li>
    <li><a href="/home/develop.html">API</a></li>
    <li class="right">
''')
        _v = VFN(VFFSL(SL, "timehead", True), "Format", False)(
            "%b %e %H:%M"
        )  # u'$timehead.Format("%b %e %H:%M")' on line 93, col 1
        if _v is not None:
            write(_filter(_v, rawExpr=u'$timehead.Format("%b %e %H:%M")')
                  )  # from line 93, col 1.
        write(u''' 
GMT
    </li>

    <li class="right"><form method="get" action="/home/typesearch.html">
<input type="text" name="search" placeholder="Item name"> <button type="submit" value="Search">Search</button>
</form>
    </li>
  </ul>
</div>

''')
        self._banner(trans=trans)
        write(u'''
<div id="bodyText">
''')
        _v = VFFSL(SL, "body", True)  # u'$body' on line 109, col 1
        if _v is not None:
            write(_filter(_v, rawExpr=u'$body'))  # from line 109, col 1.
        write(u'''
</div>

<div id="footer">

<table border=0>
<tr>
<td>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-8691225504311148";
/* Big Banner */
google_ad_slot = "8769907779";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="//pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
<td>

</td></tr></table>


<br />
&copy; 2005-2017 <a href="http://www.stackworks.net/">StackFoundry LLC</a>    Feedback? Bug reports? Send them to Yann at <a href="mailto:[email protected]">[email protected]</a>.  EVE-Central.com uses advertising and affiliate links to help offset the cost of co-location, servers and bandwidth. The EVE-Central.com code base is <a href="http://dev.eve-central.com/eve-central/">made available</a> under the <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">Affero GPL (AGPL) version 3.0 or later. </a> Material related to EVE-Online is used with limited permission of CCP Games hf. No official affiliation or endorsement by CCP Games hf is stated or implied.
</div>
</body>
</html>
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #45
0
ファイル: Class1_h.py プロジェクト: lopesivan/cansi-pattern
    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

        id = VFFSL(SL, "index", True)
        write(u'''#ifndef ''')
        _v = VFN(
            VFN(VFN(VFFSL(SL, "adt", True), "class", True)[id], "name",
                True), "upper",
            False)()  # u'${adt.class[id].name.upper()}' on line 2, col 10
        if _v is not None:
            write(_filter(_v, rawExpr=u'${adt.class[id].name.upper()}')
                  )  # from line 2, col 10.
        write(u'''_H
#define ''')
        _v = VFN(
            VFN(VFN(VFFSL(SL, "adt", True), "class", True)[id], "name",
                True), "upper",
            False)()  # u'${adt.class[id].name.upper()}' on line 3, col 10
        if _v is not None:
            write(_filter(_v, rawExpr=u'${adt.class[id].name.upper()}')
                  )  # from line 3, col 10.
        write(u'''_H
''')
        if len(
                VFN(
                    VFN(VFFSL(SL, "adt", True), "class", True)[id], "include",
                    True)) > 0:  # generated from line 4, col 1
            for i in range(
                    0,
                    len(
                        VFN(
                            VFN(VFFSL(SL, "adt", True), "class", True)[id],
                            "include", True))):  # generated from line 5, col 1
                write(u'''#include "''')
                _v = VFN(
                    VFN(
                        VFN(VFFSL(SL, "adt", True), "class", True)[id],
                        "include", True)[i], "name", True
                )  # u'$adt.class[id].include[i].name' on line 6, col 12
                if _v is not None:
                    write(
                        _filter(_v, rawExpr=u'$adt.class[id].include[i].name')
                    )  # from line 6, col 12.
                write(u'''"
''')
        write(u"""
/*
I never really dive into the details of this type.
Let's just create a dummy placeholder for the information.
*/
typedef struct
{
""")
        for i in range(
                0,
                len(
                    VFN(
                        VFN(VFFSL(SL, "adt", True), "class", True)[id],
                        "struct", True))):  # generated from line 16, col 1
            write(u'''    ''')
            _v = VFN(
                VFN(
                    VFN(VFFSL(SL, "adt", True), "class", True)[id], "struct",
                    True)[i], "type",
                True)  # u'${adt.class[id].struct[i].type}' on line 17, col 5
            if _v is not None:
                write(_filter(_v, rawExpr=u'${adt.class[id].struct[i].type}')
                      )  # from line 17, col 5.
            write(u''' ''')
            _v = VFN(
                VFN(
                    VFN(VFFSL(SL, "adt", True), "class", True)[id], "struct",
                    True)[i], "name",
                True)  # u'${adt.class[id].struct[i].name}' on line 17, col 37
            if _v is not None:
                write(_filter(_v, rawExpr=u'${adt.class[id].struct[i].name}')
                      )  # from line 17, col 37.
            write(u''';
''')
        write(u'''} ''')
        _v = VFN(
            VFN(VFN(VFFSL(SL, "adt", True), "class", True)[id], "name",
                True), "capitalize",
            False)()  # u'${adt.class[id].name.capitalize()}' on line 19, col 3
        if _v is not None:
            write(_filter(_v, rawExpr=u'${adt.class[id].name.capitalize()}')
                  )  # from line 19, col 3.
        write(u''';

#endif
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #46
0
ファイル: automaton_h.py プロジェクト: AlevtinaGlonina/MCSSim
    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'''#ifndef __''')
        _v = VFN(VFFSL(SL, "automaton.name", True), "upper",
                 False)()  # u'${automaton.name.upper()}' on line 1, col 12
        if _v is not None:
            write(_filter(
                _v,
                rawExpr=u'${automaton.name.upper()}'))  # from line 1, col 12.
        write(u'''__H_
#define __''')
        _v = VFN(VFFSL(SL, "automaton.name", True), "upper",
                 False)()  # u'${automaton.name.upper()}' on line 2, col 12
        if _v is not None:
            write(_filter(
                _v,
                rawExpr=u'${automaton.name.upper()}'))  # from line 2, col 12.
        write(u'''__H_

#include "automaton.h"
#include "common.h"

namespace ''')
        _v = VFFSL(SL, "automaton.name",
                   True)  # u'$automaton.name' on line 7, col 11
        if _v is not None:
            write(_filter(_v,
                          rawExpr=u'$automaton.name'))  # from line 7, col 11.
        write(u''' {

class ''')
        _v = VFFSL(SL, "automaton.name",
                   True)  # u'$automaton.name' on line 9, col 7
        if _v is not None:
            write(_filter(_v,
                          rawExpr=u'$automaton.name'))  # from line 9, col 7.
        write(u''':public Automaton {
\t''')
        _v = VFFSL(SL, "automaton.name",
                   True)  # u'$automaton.name' on line 10, col 2
        if _v is not None:
            write(_filter(_v,
                          rawExpr=u'$automaton.name'))  # from line 10, col 2.
        write(u''' *automaton;
public:
''')
        for p in VFFSL(SL, "automaton.typedParams",
                       True):  # generated from line 12, col 1
            write(u'''\t''')
            _v = VFFSL(SL, "p", True)[1]  # u'${p[1]}' on line 13, col 2
            if _v is not None:
                write(_filter(_v, rawExpr=u'${p[1]}'))  # from line 13, col 2.
            write(u'''* ''')
            _v = VFFSL(SL, "p", True)[0]  # u'${p[0]}' on line 13, col 11
            if _v is not None:
                write(_filter(_v, rawExpr=u'${p[0]}'))  # from line 13, col 11.
            write(u''';
''')
        for p in VFFSL(SL, "automaton.arrayTypedParams",
                       True):  # generated from line 15, col 1
            write(u'''\tstd::vector <''')
            _v = VFFSL(SL, "p", True)[1]  # u'${p[1]}' on line 16, col 15
            if _v is not None:
                write(_filter(_v, rawExpr=u'${p[1]}'))  # from line 16, col 15.
            write(u'''*> &''')
            _v = VFFSL(SL, "p", True)[0]  # u'${p[0]}' on line 16, col 26
            if _v is not None:
                write(_filter(_v, rawExpr=u'${p[0]}'))  # from line 16, col 26.
            write(u''';
''')
        write(u'''
''')
        for p in VFFSL(SL, "automaton.vars",
                       True):  # generated from line 19, col 1
            write(u'''\tVar* ''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 20, col 7
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 20, col 7.
            write(u''';
''')
        write(u'''
''')
        for p in VFFSL(SL, "automaton.arrayVars",
                       True):  # generated from line 23, col 1
            write(u'''\tstd::vector <Var*> &''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 24, col 22
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 24, col 22.
            write(u''';
''')
        write(u'''
''')
        for p in VFFSL(SL, "automaton.arrayArrayVars",
                       True):  # generated from line 27, col 1
            write(u'''\tstd::vector <std::vector <Var*> > &''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 28, col 37
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 28, col 37.
            write(u''';
''')
        write(u'''
''')
        for p in VFFSL(SL, "automaton.chans",
                       True):  # generated from line 31, col 1
            write(u'''\tChannel* ''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 32, col 11
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 32, col 11.
            write(u''';
''')
        write(u'''
''')
        for p in VFFSL(SL, "automaton.arrayChans",
                       True):  # generated from line 35, col 1
            write(u'''\tstd::vector <Channel*> &''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 36, col 26
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 36, col 26.
            write(u''';
''')
        write(u'''

''')
        for p in VFFSL(SL, "automaton.timers",
                       True):  # generated from line 40, col 1
            write(u'''\tTimer* ''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 41, col 9
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 41, col 9.
            write(u''';
''')
        write(u'''
''')
        for p in VFFSL(SL, "automaton.arrayTimers",
                       True):  # generated from line 44, col 1
            write(u'''\tstd::vector <Timer*> &''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 45, col 24
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 45, col 24.
            write(u''';
''')
        write(u'''
''')
        for p in VFFSL(SL, "automaton.localVars",
                       True):  # generated from line 48, col 1
            write(u'''\tVar ''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 49, col 6
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 49, col 6.
            write(u''';
''')
        write(u'''
''')
        for p in VFFSL(SL, "automaton.localClocks",
                       True):  # generated from line 52, col 1
            write(u'''\tTimer ''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 53, col 8
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 53, col 8.
            write(u''';
''')
        write(u'''
''')
        for p in VFN(VFFSL(SL, "automaton.localArrayClocks", True), "keys",
                     False)():  # generated from line 56, col 1
            write(u'''\tstd::vector <Timer*> ''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 57, col 23
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 57, col 23.
            write(u''';
''')
        write(u'''
\t''')
        _v = VFFSL(SL, "automaton.name",
                   True)  # u'${automaton.name}' on line 60, col 2
        if _v is not None:
            write(_filter(
                _v, rawExpr=u'${automaton.name}'))  # from line 60, col 2.
        write(u'''(std::string _name, Network *n, int p, bool t''')
        for p in VFFSL(SL, "automaton.typedParams",
                       True):  # generated from line 61, col 1
            write(u''', ''')
            _v = VFFSL(SL, "p", True)[1]  # u'${p[1]}' on line 62, col 3
            if _v is not None:
                write(_filter(_v, rawExpr=u'${p[1]}'))  # from line 62, col 3.
            write(u'''* _''')
            _v = VFFSL(SL, "p", True)[0]  # u'${p[0]}' on line 62, col 13
            if _v is not None:
                write(_filter(_v, rawExpr=u'${p[0]}'))  # from line 62, col 13.
        for p in VFFSL(SL, "automaton.arrayTypedParams",
                       True):  # generated from line 64, col 1
            write(u''', std::vector <''')
            _v = VFFSL(SL, "p", True)[1]  # u'${p[1]}' on line 65, col 16
            if _v is not None:
                write(_filter(_v, rawExpr=u'${p[1]}'))  # from line 65, col 16.
            write(u'''*> & _''')
            _v = VFFSL(SL, "p", True)[0]  # u'${p[0]}' on line 65, col 29
            if _v is not None:
                write(_filter(_v, rawExpr=u'${p[0]}'))  # from line 65, col 29.
        for p in VFFSL(SL, "automaton.vars",
                       True):  # generated from line 67, col 1
            write(u''', Var* _''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 68, col 9
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 68, col 9.
        for p in VFFSL(SL, "automaton.arrayVars",
                       True):  # generated from line 70, col 1
            write(u''', std::vector <Var*> &_''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 71, col 24
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 71, col 24.
        for p in VFFSL(SL, "automaton.arrayArrayVars",
                       True):  # generated from line 73, col 1
            write(u''', std::vector < std::vector <Var*> > &_''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 74, col 40
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 74, col 40.
        for p in VFFSL(SL, "automaton.chans",
                       True):  # generated from line 76, col 1
            write(u''', Channel* _''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 77, col 13
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 77, col 13.
        for p in VFFSL(SL, "automaton.arrayChans",
                       True):  # generated from line 79, col 1
            write(u''', std::vector <Channel*> &_''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 80, col 28
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 80, col 28.
        for p in VFFSL(SL, "automaton.timers",
                       True):  # generated from line 82, col 1
            write(u''', Timer* _''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 83, col 11
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 83, col 11.
        for p in VFFSL(SL, "automaton.arrayTimers",
                       True):  # generated from line 85, col 1
            write(u''', std::vector <Timer*> &_''')
            _v = VFFSL(SL, "p", True)  # u'$p' on line 86, col 26
            if _v is not None:
                write(_filter(_v, rawExpr=u'$p'))  # from line 86, col 26.
        write(u''');

''')
        _v = VFFSL(SL, "automaton.declaration",
                   True)  # u'$automaton.declaration' on line 90, col 1
        if _v is not None:
            write(_filter(
                _v, rawExpr=u'$automaton.declaration'))  # from line 90, col 1.
        write(u'''
};

''')
        VFN(VFFSL(SL, "automaton.transitions", True), "sort",
            False)(key=lambda x: x.channel_prio)
        write(u'''
''')
        tnum = 0
        for t in VFFSL(SL, "automaton.transitions",
                       True):  # generated from line 96, col 1
            write(u'''class ''')
            _v = VFN(
                VFN(VFFSL(SL, "automaton", True), "states",
                    True)[VFFSL(SL, "t.src", True)], "name",
                True)  # u'${automaton.states[$t.src].name}' on line 97, col 7
            if _v is not None:
                write(_filter(_v, rawExpr=u'${automaton.states[$t.src].name}')
                      )  # from line 97, col 7.
            write(u'''_''')
            _v = VFN(
                VFN(VFFSL(SL, "automaton", True), "states",
                    True)[VFFSL(SL, "t.dst", True)], "name",
                True)  # u'${automaton.states[$t.dst].name}' on line 97, col 40
            if _v is not None:
                write(_filter(_v, rawExpr=u'${automaton.states[$t.dst].name}')
                      )  # from line 97, col 40.
            write(u'''_''')
            _v = VFFSL(SL, "tnum", True)  # u'$tnum' on line 97, col 73
            if _v is not None:
                write(_filter(_v, rawExpr=u'$tnum'))  # from line 97, col 73.
            write(u''': public Transition {
\t''')
            _v = VFFSL(SL, "automaton.name",
                       True)  # u'${automaton.name}' on line 98, col 2
            if _v is not None:
                write(_filter(
                    _v, rawExpr=u'${automaton.name}'))  # from line 98, col 2.
            write(u'''* automaton;
\t''')
            _v = VFFSL(SL, "t.local", True)  # u'$t.local' on line 99, col 2
            if _v is not None:
                write(_filter(_v, rawExpr=u'$t.local'))  # from line 99, col 2.
            write(u'''

public:
''')
            if VFFSL(SL, "t.channel",
                     True) == "":  # generated from line 102, col 1
                write(u'''\t''')
                _v = VFN(
                    VFN(VFFSL(SL, "automaton", True), "states",
                        True)[VFFSL(SL, "t.src", True)], "name", True
                )  # u'${automaton.states[$t.src].name}' on line 103, col 2
                if _v is not None:
                    write(
                        _filter(_v,
                                rawExpr=u'${automaton.states[$t.src].name}')
                    )  # from line 103, col 2.
                write(u'''_''')
                _v = VFN(
                    VFN(VFFSL(SL, "automaton", True), "states",
                        True)[VFFSL(SL, "t.dst", True)], "name", True
                )  # u'${automaton.states[$t.dst].name}' on line 103, col 35
                if _v is not None:
                    write(
                        _filter(_v,
                                rawExpr=u'${automaton.states[$t.dst].name}')
                    )  # from line 103, col 35.
                write(u'''_''')
                _v = VFFSL(SL, "tnum", True)  # u'$tnum' on line 103, col 68
                if _v is not None:
                    write(_filter(_v,
                                  rawExpr=u'$tnum'))  # from line 103, col 68.
                write(u''' (Network *_net, Location *_next, ''')
                _v = VFFSL(SL, "automaton.name",
                           True)  # u'${automaton.name}' on line 103, col 107
                if _v is not None:
                    write(_filter(_v, rawExpr=u'${automaton.name}')
                          )  # from line 103, col 107.
                write(u''' *_aut): Transition(_net, _next), automaton(_aut) {}
''')
            else:  # generated from line 104, col 1
                write(u'''\t''')
                _v = VFN(
                    VFN(VFFSL(SL, "automaton", True), "states",
                        True)[VFFSL(SL, "t.src", True)], "name", True
                )  # u'${automaton.states[$t.src].name}' on line 105, col 2
                if _v is not None:
                    write(
                        _filter(_v,
                                rawExpr=u'${automaton.states[$t.src].name}')
                    )  # from line 105, col 2.
                write(u'''_''')
                _v = VFN(
                    VFN(VFFSL(SL, "automaton", True), "states",
                        True)[VFFSL(SL, "t.dst", True)], "name", True
                )  # u'${automaton.states[$t.dst].name}' on line 105, col 35
                if _v is not None:
                    write(
                        _filter(_v,
                                rawExpr=u'${automaton.states[$t.dst].name}')
                    )  # from line 105, col 35.
                write(u'''_''')
                _v = VFFSL(SL, "tnum", True)  # u'$tnum' on line 105, col 68
                if _v is not None:
                    write(_filter(_v,
                                  rawExpr=u'$tnum'))  # from line 105, col 68.
                write(u''' (Network *_net, Location *_next, ''')
                _v = VFFSL(SL, "automaton.name",
                           True)  # u'${automaton.name}' on line 105, col 107
                if _v is not None:
                    write(_filter(_v, rawExpr=u'${automaton.name}')
                          )  # from line 105, col 107.
                write(u''' *_aut): Transition(_net, _next), automaton(_aut)
\t{
\t\tis_sender = ''')
                _v = VFN(VFFSL(SL, "str", False)(t.is_sender), "lower", False)(
                )  # u'${str(t.is_sender).lower()}' on line 107, col 15
                if _v is not None:
                    write(_filter(_v, rawExpr=u'${str(t.is_sender).lower()}')
                          )  # from line 107, col 15.
                write(u''';
\t}
''')
            write(u'''
''')
            if VFFSL(SL, "t.guard",
                     True) != "":  # generated from line 111, col 1
                write(u'''\tvirtual bool guard()
\t{
\t\treturn ''')
                _v = VFFSL(SL, "t.guard",
                           True)  # u'$t.guard' on line 114, col 10
                if _v is not None:
                    write(_filter(
                        _v, rawExpr=u'$t.guard'))  # from line 114, col 10.
                write(u''';
\t}
''')
            write(u'''
''')
            if VFFSL(SL, "t.complex_guard",
                     True) != "":  # generated from line 118, col 1
                write(u'''\tvirtual bool guard()
\t{
\t\t''')
                _v = VFFSL(SL, "t.complex_guard",
                           True)  # u'$t.complex_guard' on line 121, col 3
                if _v is not None:
                    write(_filter(
                        _v,
                        rawExpr=u'$t.complex_guard'))  # from line 121, col 3.
                write(u'''
\t}
''')
            write(u'''

''')
            if VFFSL(SL, "t.action",
                     True) != "":  # generated from line 126, col 1
                write(u'''\tvirtual void action()
\t{
\t\t''')
                _v = VFFSL(SL, "t.action",
                           True)  # u'$t.action' on line 129, col 3
                if _v is not None:
                    write(_filter(
                        _v, rawExpr=u'$t.action'))  # from line 129, col 3.
                write(u''';
\t}
''')
            write(u'''
''')
            if VFFSL(SL, "t.channel",
                     True) != "":  # generated from line 133, col 1
                write(u'''\tvirtual bool synchronize()
\t{
\t\tchannel = &(''')
                _v = VFFSL(SL, "t.channel",
                           True)  # u'$t.channel' on line 136, col 15
                if _v is not None:
                    write(_filter(
                        _v, rawExpr=u'$t.channel'))  # from line 136, col 15.
                write(u''');
\t\treturn Transition::synchronize();
\t}

\tvirtual bool needSync()
\t{
\t\treturn true;
\t}
''')
            write(u'''
};
''')
            tnum = VFFSL(SL, "tnum", True) + 1
            write(u'''
''')
        write(u'''
''')
        for s in VFN(VFFSL(SL, "automaton.states", True), "values",
                     False)():  # generated from line 151, col 1
            write(u'''class ''')
            _v = VFFSL(SL, "s.name", True)  # u'$s.name' on line 152, col 7
            if _v is not None:
                write(_filter(_v, rawExpr=u'$s.name'))  # from line 152, col 7.
            write(u''': public Location {
\t''')
            _v = VFFSL(SL, "automaton.name",
                       True)  # u'${automaton.name}' on line 153, col 2
            if _v is not None:
                write(_filter(
                    _v, rawExpr=u'${automaton.name}'))  # from line 153, col 2.
            write(u'''* automaton;
public:
\t''')
            _v = VFFSL(SL, "s.name", True)  # u'$s.name' on line 155, col 2
            if _v is not None:
                write(_filter(_v, rawExpr=u'$s.name'))  # from line 155, col 2.
            write(
                u''' (Network *n, std::string _name, bool init, bool committed, '''
            )
            _v = VFFSL(SL, "automaton.name",
                       True)  # u'${automaton.name}' on line 155, col 69
            if _v is not None:
                write(_filter(
                    _v,
                    rawExpr=u'${automaton.name}'))  # from line 155, col 69.
            write(
                u''' *a): Location (n, _name, init, committed), automaton(a) {}
''')
            if VFFSL(SL, "len", False)(
                    VFFSL(SL, "s.timers",
                          True)) != 0:  # generated from line 156, col 1
                write(u'''\tvirtual bool checkTimer(Timer *__t)
\t{
''')
                for t in VFFSL(SL, "s.timers",
                               True):  # generated from line 159, col 1
                    write(u'''\t\tif ( __t == ''')
                    _v = VFFSL(SL, "t",
                               True)[0]  # u'${t[0]}' on line 160, col 15
                    if _v is not None:
                        write(_filter(
                            _v, rawExpr=u'${t[0]}'))  # from line 160, col 15.
                    write(u''')
\t\t\treturn ''')
                    _v = VFFSL(SL, "t",
                               True)[1]  # u'${t[1]}' on line 161, col 11
                    if _v is not None:
                        write(_filter(
                            _v, rawExpr=u'${t[1]}'))  # from line 161, col 11.
                    write(u''';
''')
                write(u'''\t\treturn true;
\t}
''')
            write(u'''};

''')
        write(u'''
}

#endif
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #47
0
    def headscripts(self, **KWS):

        ## CHEETAH: generated from #def headscripts at line 14, col 1.
        trans = KWS.get("trans")
        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(
            """<script type="text/javascript" src="/javascript/jquery.validate.min.js"></script>
<script type="text/javascript">
    jQuery(document).ready( function(){
        var inventory_data={};

        //add validator
        jQuery(\'form\').validate({
            rules: {
                        customerName: "required",
                        customerEmail: {
                            required: "#id_customerPhoneNumber:blank",
                            email: true
                        },
                        customerPhoneNumber: {
                            required: "#id_customerEmail:blank",
                            phoneUS: true
                        }
                    },
            messages:   {
                customerName: "Customer Name is required",
                customerEmail: "Customer Email or Phone Number is required",
                customerPhoneNumber: "Customer Email or Phone Number is required"
            }
        });
        
        var dlg=jQuery(\'#new_special_order_dialog\').dialog( {
            autoOpen: false,
            modal: true,
            open: function(event, ui) {
                console.log(\'opening dialog\');
            },
            //void isbn field
            //void list of attributes (title, price, etc)
            //of transaction.
            close: function() {
                inventory_data={};
                jQuery(this).find(\'.isbnfield\').val(\'\');
                jQuery(this).find(\'.title_list\').children().remove();
            },
            buttons: {
                //close button
                Cancel: function(){
                    dlg.dialog(\'close\');
                },
                //if you approve of the results from the isbn search,
                //add them to the cart
                \'Special Order\': function(){

                    //add item to cart table
                    //Should be ajax update
                    //Only if there\'s really an item.
                    if (Object.keys(inventory_data).length > 0 ) {
                        console.log(\'in add_to_special_order\')
                        
                        //add item to special order, and update page if it succeeds
                        itemargs={\'item\':JSON.stringify(inventory_data), \'specialOrderID\':jQuery(\'#sqlobject_id\').val()};
                        jQuery.post(\'/specialorder/add_to_special_order\', itemargs, function(){
                            console.log(inventory_data);
                            //special_order_string=\'<li class=\\\'special_order_item_list\\\'><ul><li>\' + inventory_data.id + \'</li><li>\' +inventory_data.isbn + \'</li><li>\' + inventory_data.title+ + \'</li><li>\' + inventory_data.authors_as_string + \'</li><li><button onclick=\\"window.location.href=\\\'\\/specialorder\\/special_order_item_edit?id=\' + inventory_data.id + \'\\">edit</button</ul></li>\'                         //<li><button onclick=\\"window.location.href=\\\'/specialorder/special_order_item_edit?id=\'inventory_data.id\'\\">edit</button></li></ul></li>\';
                            //jQuery(\'#special_order_list\').append(special_order_string);                           
                            location.reload();
                            dlg.dialog(\'close\');
                        });
                    }
                    return false;
                }
            }
        });
        
        //jquery alert dialog for when isbn
        //not found in database
        jQuery( "#isbn_not_found_error" ).dialog({
            autoOpen: false,
            modal: true,
            buttons: {
                Ok: function() {
                    jQuery(this).dialog( \'close\' );
                    return false;
                }
            }
        });        
        
        //add button to make new special order
        jQuery(\'#new_special_order_item\').button().click( function( event ) {
            event.preventDefault();
            dlg.dialog(\'open\');
            return false;
         });
         
        //listener function to search database for isbn
        //and return item info and info applicable to transaction
        //i.e., if its taxable
        isbn_listener = function(evt) {

            var event_target=jQuery(evt.target)
            var isbnstring=event_target.val();
            var title_list=event_target.closest(\'div\').find(\'.title_list\')
            //cache isbn_not_found dialog
            var isbn_error_alert=event_target.closest(\'body\').find(\'#isbn_not_found_error\');
            isbnstring=isbnstring.toLowerCase();
            isbnstring=isbnstring.replace(/\\s+/g, \' \');

            //scrub isbn of spaces and hyphens if it is a potential 
            //real isbn
            if (isbnstring.length>11) {
                isbnstring=isbnstring.replace(/[\\s-]/g, \'\');
            }
            
            //if there\'s an isbn, then search database for it.
            if (isbnstring.length>0) {
                if (isbnstring.match( /\\d{13}|\\d{12}|\\d{9}[0-9xX]{1}/ )) {
                    console.log(\'isbn will try to search\');

                    jQuery.getJSON( \'/search_isbn\', {\'isbn\':isbnstring}, function(inventory_data1){
                        inventory_data1[0];
                        inventory_data=inventory_data1[0];

                        console.log(inventory_data1);
                        
                        //if item is an inventoried item and there\'s a real result
                        //add all item info to dialog so user can approve add
                        //to inventory or not. If no results, open isbn error alert.
                        if ((inventory_data !== undefined) && (inventory_data.title !==undefined)) {
                            title_list.empty();
                            title_list.append(\'<li>\'+inventory_data.title+\'</li><li>\'+ inventory_data.authors_as_string +\'</li>\');
                        } else {
                            isbn_error_alert.dialog(\'open\');
                        }
                    });
                } else {
                    window.open(\'/specialorder/select_special_order_search?authorOrTitle=\'+escape(isbnstring) + \'&special_order=\' + jQuery(\'#sqlobject_id\').val(), \'_self\');
                }  
            } 

            if ( event_target.val() != isbnstring) {
                event_target.val(isbnstring);
            }
            
            evt.preventDefault();
            return false;
        }
        
        //prevent return from triggering submit.
        //we want to actually approve the data before we submit.
        jQuery(\'.isbnfield\').keypress( function(evt) {
            if (evt.keyCode == 13) {
                console.log(\'in key press traps return\');
                jQuery(this).closest(\'.ui-dialog\').find(\'.ui-button\')[1].focus();
                isbn_listener(evt);
                evt.preventDefault();
            }
        });
    });
</script
"""
        )

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #48
0
    def mainContent(self, **KWS):



        ## CHEETAH: generated from #def mainContent() at line 3, col 1.
        trans = KWS.get("trans")
        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('''<div class="row">
  <div class="col">
''')
        if VFFSL(SL,"code",True) == -1: # generated from line 6, col 5
            write('''      <p>
        An exception occured, while executing repoclosure for this repository:
        <pre>''')
            _v = VFFSL(SL,"errors",True) # '$errors' on line 9, col 14
            if _v is not None: write(_filter(_v, rawExpr='$errors')) # from line 9, col 14.
            write('''</pre>
      </p>
''')
        else: # generated from line 11, col 5
            if VFFSL(SL,"code",True) == 0: # generated from line 12, col 7
                write('''        <p>
          Repoclosure ended with exit code 0.
        </p>
''')
            else: # generated from line 16, col 7
                write('''        <p>
          Repoclosure ended with exit code ''')
                _v = VFFSL(SL,"code",True) # '${code}' on line 18, col 44
                if _v is not None: write(_filter(_v, rawExpr='${code}')) # from line 18, col 44.
                write(''', stderr:
          <pre>''')
                _v = VFFSL(SL,"errors",True) # '$errors' on line 19, col 16
                if _v is not None: write(_filter(_v, rawExpr='$errors')) # from line 19, col 16.
                write('''</pre>
        </p>
''')
            write('''      <p>
        ''')
            _v = VFFSL(SL,"count",True) # '$count' on line 23, col 9
            if _v is not None: write(_filter(_v, rawExpr='$count')) # from line 23, col 9.
            write(''' out of ''')
            _v = VFFSL(SL,"total_count",True) # '${total_count}' on line 23, col 23
            if _v is not None: write(_filter(_v, rawExpr='${total_count}')) # from line 23, col 23.
            write('''(''')
            _v = VFFSL(SL,"percent",True) # '${percent}' on line 23, col 38
            if _v is not None: write(_filter(_v, rawExpr='${percent}')) # from line 23, col 38.
            write('''%) packages have unresolved dependencies.
      </p>
      <table class="table table-hover table-sm table-bordered">
        <thead class="thead-light">
          <th scope="col">#</th>
          <th scope="col">Package</th>
          <th scope="col">SRPM</th>
          <th scope="col">Uresolved dependencies</th>
        </thead>
        <tbody>
''')
            cnt = 1
            for nevra, src, unresolved in VFFSL(SL,"bad_packages",True): # generated from line 34, col 11
                write('''            <tr>
              <th scope="row">''')
                _v = VFFSL(SL,"cnt",True) # '$cnt' on line 36, col 31
                if _v is not None: write(_filter(_v, rawExpr='$cnt')) # from line 36, col 31.
                write('''</th>
              <td>''')
                _v = VFFSL(SL,"nevra",True) # '$nevra' on line 37, col 19
                if _v is not None: write(_filter(_v, rawExpr='$nevra')) # from line 37, col 19.
                write('''</td>
              <td>''')
                _v = VFFSL(SL,"src",True) # '$src' on line 38, col 19
                if _v is not None: write(_filter(_v, rawExpr='$src')) # from line 38, col 19.
                write('''</td>
              <td>
                <pre>''')
                _v = VFFSL(SL,"unresolved",True) # '$unresolved' on line 40, col 22
                if _v is not None: write(_filter(_v, rawExpr='$unresolved')) # from line 40, col 22.
                write('''</pre>
              </td>
            </tr>
''')
                cnt = VFFSL(SL,"cnt",True) + 1
            write('''        </tbody>
      </table>
''')
        write('''  </div>
</div>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
コード例 #49
0
    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'''\\documentclass{article}
\\usepackage{amsmath}
\\begin {document}


\\begin{description}
''')
        for bf in VFSL([locals()] + SL + [globals(), builtin], "bfs",
                       True):  # generated from line 7, col 1
            if VFSL([locals()] + SL + [globals(), builtin], "bf.error",
                    True):  # generated from line 8, col 2
                write(u'''\t\t''')
                _v = VFSL([locals()] + SL + [globals(), builtin], "bf.error",
                          True)  # u'$bf.error' on line 9, col 3
                if _v is not None:
                    write(_filter(_v,
                                  rawExpr=u'$bf.error'))  # from line 9, col 3.
                write(u'''
''')
                continue
            write(u'''        \\item[''')
            _v = VFN(VFSL([locals()] + SL + [globals(), builtin], "bf", True),
                     "latex", False)()  # u'$bf.latex()' on line 12, col 15
            if _v is not None:
                write(_filter(_v,
                              rawExpr=u'$bf.latex()'))  # from line 12, col 15.
            write(u'''] \\hfill \\\\
\t\\begin{tabular}{
''')
            for __i0 in range(
                    len(
                        VFSL([locals()] + SL +
                             [globals(), builtin], "bf.args", True)) +
                    1):  # generated from line 14, col 2
                write(u'''\t|c 
''')
            write(u'''\t|}
\t\\hline

\t''')
            _v = VFN(VFSL([locals()] + SL + [globals(), builtin], "bf", True),
                     "args", True)[0]  # u'$bf.args[0]' on line 20, col 2
            if _v is not None:
                write(_filter(_v,
                              rawExpr=u'$bf.args[0]'))  # from line 20, col 2.
            write(u''' ''')
            for arg in VFN(
                    VFSL([locals()] + SL + [globals(), builtin], "bf", True),
                    "args", True)[1:]:  # generated from line 21, col 2
                write(u'''\t\t& ''')
                _v = VFSL([locals()] + SL + [globals(), builtin], "arg",
                          True)  # u'$arg' on line 22, col 5
                if _v is not None:
                    write(_filter(_v, rawExpr=u'$arg'))  # from line 22, col 5.
                write(u''' ''')
            write(u'''\t& ''')
            _v = VFSL([locals()] + SL + [globals(), builtin], "bf.name",
                      True)  # u'$bf.name' on line 24, col 4
            if _v is not None:
                write(_filter(_v, rawExpr=u'$bf.name'))  # from line 24, col 4.
            write(u''' \\\\
\t\\hline
''')
            for row in VFN(
                    VFSL([locals()] + SL + [globals(), builtin], "bf", True),
                    "truth_table", False)():  # generated from line 26, col 2
                write(u'''\t\t
\t\t''')
                _v = VFSL([locals()] + SL + [globals(), builtin], "row",
                          True)[0]  # u'$row[0]' on line 28, col 3
                if _v is not None:
                    write(_filter(_v,
                                  rawExpr=u'$row[0]'))  # from line 28, col 3.
                write(u''' ''')
                for val in VFSL([locals()] + SL + [globals(), builtin], "row",
                                True)[1:]:  # generated from line 29, col 3
                    write(u'''\t\t\t& ''')
                    _v = VFSL([locals()] + SL + [globals(), builtin], "val",
                              True)  # u'$val' on line 30, col 6
                    if _v is not None:
                        write(_filter(_v,
                                      rawExpr=u'$val'))  # from line 30, col 6.
                    write(u''' ''')
                write(u'''\t\t\\\\
''')
            write(u'''\t\\hline
\t\\end{tabular}
''')
        write(u'''\\end{description}
\\end{document}''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #50
0
    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

        try:  # generated from line 12, col 1
            verr = VFFSL(SL, "errorMsg", True)
        except:  # generated from line 14, col 1
            verr = None
        write(u'''<!DOCTYPE html>
<html lang="''')
        _v = VFN(VFFSL(SL, "conf", True)["main"]["lang"], "split", False)('-')[
            0]  # u'$(conf["main"]["lang"].split(\'-\')[0])' on line 18, col 13
        if _v is not None:
            write(
                _filter(_v, rawExpr=u'$(conf["main"]["lang"].split(\'-\')[0])')
            )  # from line 18, col 13.
        write(u'''">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="description" content="''')
        _v = VFN(VFFSL(SL, "zoo", True), "_", False)(
            "MapMint: Professional SDI manager"
        )  # u'$zoo._("MapMint: Professional SDI manager")' on line 24, col 35
        if _v is not None:
            write(
                _filter(_v,
                        rawExpr=u'$zoo._("MapMint: Professional SDI manager")')
            )  # from line 24, col 35.
        write(u'''">
<meta name="keywords" content="MapMint, SDI, Geospatial, Web GIS, GIS, WPS, WMS, WFS, WCS, ZOO-Project, ZOO, ZOO WPS, MapServer, GDAL, OSGeo, FOSS4G, OGC, OWS">
<meta name="copyright" content="''')
        _v = VFFSL(SL, "conf", True)["provider"][
            "providerName"]  # u'$conf["provider"]["providerName"]' on line 26, col 33
        if _v is not None:
            write(_filter(_v, rawExpr=u'$conf["provider"]["providerName"]')
                  )  # from line 26, col 33.
        write(u'''">
<meta name="author" content="''')
        _v = VFFSL(SL, "conf", True)["provider"][
            "providerName"]  # u'$conf["provider"]["providerName"]' on line 27, col 30
        if _v is not None:
            write(_filter(_v, rawExpr=u'$conf["provider"]["providerName"]')
                  )  # from line 27, col 30.
        write(u'''">
<link rel="shortcut icon" href="''')
        _v = VFFSL(SL, "conf", True)["main"][
            "mmAddress"]  # u'$conf["main"]["mmAddress"]' on line 28, col 33
        if _v is not None:
            write(_filter(_v, rawExpr=u'$conf["main"]["mmAddress"]')
                  )  # from line 28, col 33.
        write(u'''/favicon.ico" />
<link rel="alternate" type="application/rss+xml" title="MapMint RSS Feed" href="'''
              )
        _v = VFFSL(SL, "conf", True)["main"][
            "applicationAddress"]  # u'$(conf["main"]["applicationAddress"])' on line 29, col 81
        if _v is not None:
            write(_filter(_v, rawExpr=u'$(conf["main"]["applicationAddress"])')
                  )  # from line 29, col 81.
        write(u'''public/rss" />
<title>''')
        _v = VFFSL(SL, "page_title", True)  # u'$page_title' on line 30, col 8
        if _v is not None:
            write(_filter(_v, rawExpr=u'$page_title'))  # from line 30, col 8.
        write(u'''</title>

''')
        if VFN(
                VFN(VFFSL(SL, "conf", True)["mm"], "keys", False)(), "count",
                False)("useCdn") > 0 and VFFSL(
                    SL, "conf", True
                )["mm"]["useCdn"] == "true":  # generated from line 32, col 1
            write(
                u'''<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
''')
        else:  # generated from line 35, col 1
            write(u'''<link href="''')
            _v = VFFSL(SL, "conf", True)["main"][
                "publicationUrl"]  # u'$conf["main"]["publicationUrl"]' on line 36, col 13
            if _v is not None:
                write(_filter(_v, rawExpr=u'$conf["main"]["publicationUrl"]')
                      )  # from line 36, col 13.
            write(u'''/css/bootstrap.min.css" rel="stylesheet">
<link href="''')
            _v = VFFSL(SL, "conf", True)["main"][
                "publicationUrl"]  # u'$conf["main"]["publicationUrl"]' on line 37, col 13
            if _v is not None:
                write(_filter(_v, rawExpr=u'$conf["main"]["publicationUrl"]')
                      )  # from line 37, col 13.
            write(u'''/css/bootstrap-theme.min.css" rel="stylesheet">
''')
        write(u'''<link href="''')
        _v = VFFSL(SL, "conf", True)["main"][
            "publicationUrl"]  # u'$conf["main"]["publicationUrl"]' on line 39, col 13
        if _v is not None:
            write(_filter(_v, rawExpr=u'$conf["main"]["publicationUrl"]')
                  )  # from line 39, col 13.
        write(u'''/css/mapmint-admin.css" rel="stylesheet">
<link href="''')
        _v = VFFSL(SL, "conf", True)["main"][
            "publicationUrl"]  # u'$conf["main"]["publicationUrl"]' on line 40, col 13
        if _v is not None:
            write(_filter(_v, rawExpr=u'$conf["main"]["publicationUrl"]')
                  )  # from line 40, col 13.
        write(u'''/assets/css/mm-font.css" rel="stylesheet">
<link href="''')
        _v = VFFSL(SL, "conf", True)["main"][
            "publicationUrl"]  # u'$conf["main"]["publicationUrl"]' on line 41, col 13
        if _v is not None:
            write(_filter(_v, rawExpr=u'$conf["main"]["publicationUrl"]')
                  )  # from line 41, col 13.
        write(u'''/assets/css/loader.css" rel="stylesheet">
<link href="''')
        _v = VFFSL(SL, "conf", True)["main"][
            "publicationUrl"]  # u'$conf["main"]["publicationUrl"]' on line 42, col 13
        if _v is not None:
            write(_filter(_v, rawExpr=u'$conf["main"]["publicationUrl"]')
                  )  # from line 42, col 13.
        write(u'''/css/mm_icons.css" rel="stylesheet">
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet">
<link href="''')
        _v = VFFSL(SL, "conf", True)["main"][
            "publicationUrl"]  # u'$conf["main"]["publicationUrl"]' on line 44, col 13
        if _v is not None:
            write(_filter(_v, rawExpr=u'$conf["main"]["publicationUrl"]')
                  )  # from line 44, col 13.
        write(u'''/css/metisMenu.min.css" rel="stylesheet">
<link href="''')
        _v = VFFSL(SL, "conf", True)["main"][
            "publicationUrl"]  # u'$conf["main"]["publicationUrl"]' on line 45, col 13
        if _v is not None:
            write(_filter(_v, rawExpr=u'$conf["main"]["publicationUrl"]')
                  )  # from line 45, col 13.
        write(u'''/assets/css/bootstrap-notify.css" rel="stylesheet">
<link href="''')
        _v = VFFSL(SL, "conf", True)["main"][
            "publicationUrl"]  # u'$conf["main"]["publicationUrl"]' on line 46, col 13
        if _v is not None:
            write(_filter(_v, rawExpr=u'$conf["main"]["publicationUrl"]')
                  )  # from line 46, col 13.
        write(u'''/assets/css/summernote.css" rel="stylesheet">


''')
        if VFFSL(SL, "istyles",
                 True) is not None:  # generated from line 49, col 1
            _v = VFFSL(SL, "istyles", True)  # u'$istyles' on line 50, col 1
            if _v is not None:
                write(_filter(_v, rawExpr=u'$istyles'))  # from line 50, col 1.
            write(u'''
''')
        write(u'''
<link href="''')
        _v = VFFSL(SL, "conf", True)["main"][
            "publicationUrl"]  # u'$conf["main"]["publicationUrl"]' on line 53, col 13
        if _v is not None:
            write(_filter(_v, rawExpr=u'$conf["main"]["publicationUrl"]')
                  )  # from line 53, col 13.
        write(u'''/assets/css/mapmint-fixes.css" rel="stylesheet">

</head>
<body>
''')
        self._handleCheetahInclude(
            (VFFSL(SL, "conf", True)["main"]["templatesPath"] +
             "/loader_bs.tmpl"),
            trans=trans,
            includeFrom="file",
            raw=False)
        write(u'''
''')
        if VFFSL(SL, "mmodule",
                 True) != "public":  # generated from line 59, col 1
            if (VFN(
                    VFN(VFFSL(SL, "conf", True), "keys", False)
                (), "count", False)("senv") > 0 and VFN(
                    VFN(VFFSL(SL, "conf", True)["senv"], "keys", False)
                    (), "count", False)("loggedin") > 0 and VFN(
                        VFN(VFFSL(SL, "conf", True)["senv"], "keys", False)
                        (), "count", False)("lastname") > 0
                    and VFFSL(SL, "conf", True)["senv"]["loggedin"] != "false"
                ) and not (VFFSL(SL, "verr",
                                 True)):  # generated from line 60, col 1
                write(u'''<div id="wrapper">
''')
                lfonts = {
                    "dashboard": "tachometer",
                    "distiller": "cubes",
                    "manager": "map-o",
                    "tables": "table",
                    "themes": "th",
                    "territories": "sitemap",
                    "indicators": "bar-chart",
                    "documents": "file-text-o",
                    "publisher": "laptop",
                    "georeferencer": "globe",
                    "importers": "upload"
                }
                write(u'''  <!-- Navigation -->
  <nav class="navbar navbar-default navbar-fixed-top" role="navigation" style="margin-bottom: 0">
   <div class="navbar-header">
     <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
     <span class="sr-only">Toggle navigation</span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
     </button>
''')
                try:  # generated from line 84, col 1
                    cfont = VFFSL(SL, "lfonts", True)[VFN(
                        VFN(VFFSL(SL, "mmodule", True), "lower", False)(),
                        "replace", False)("-public", "")]
                except:  # generated from line 86, col 1
                    cfont = "question"
                write(u'''<!-- ''')
                _v = VFFSL(SL, "mmodule",
                           True)  # u'$mmodule' on line 89, col 6
                if _v is not None:
                    write(_filter(_v,
                                  rawExpr=u'$mmodule'))  # from line 89, col 6.
                write(u''' -->
''')
                if VFFSL(SL, "mmodule", True
                         ) == "tables-public":  # generated from line 90, col 1
                    write(
                        u'''     <a class="navbar-brand" href="#"><i class="fa fa-'''
                    )
                    _v = VFFSL(SL, "cfont",
                               True)  # u'$cfont' on line 91, col 55
                    if _v is not None:
                        write(_filter(
                            _v, rawExpr=u'$cfont'))  # from line 91, col 55.
                    write(u'''"></i> <span class="hid">''')
                    _v = VFN(VFFSL(SL, "zoo", True), "_", False)(
                        "Tables")  # u'$zoo._("Tables")' on line 91, col 86
                    if _v is not None:
                        write(_filter(_v, rawExpr=u'$zoo._("Tables")')
                              )  # from line 91, col 86.
                    write(u'''</span></a>
''')
                else:  # generated from line 92, col 1
                    write(
                        u'''     <a class="navbar-brand" href="#"><i class="fa fa-'''
                    )
                    _v = VFFSL(SL, "cfont",
                               True)  # u'$cfont' on line 93, col 55
                    if _v is not None:
                        write(_filter(
                            _v, rawExpr=u'$cfont'))  # from line 93, col 55.
                    write(u'''"></i> <span class="hid">''')
                    _v = VFN(VFFSL(SL, "zoo", True), "_", False)(VFFSL(
                        SL, "mmodule",
                        True))  # u'$zoo._($mmodule)' on line 93, col 86
                    if _v is not None:
                        write(_filter(_v, rawExpr=u'$zoo._($mmodule)')
                              )  # from line 93, col 86.
                    write(u'''</span></a>
''')
                write(u'''   </div>
   <!-- /.navbar-header -->

   <ul class="nav navbar-top-links navbar-right" id="admin-submenu">
''')
                if VFFSL(SL, "admin_menu",
                         True) is not None:  # generated from line 99, col 1
                    write(u'''    ''')
                    _v = VFFSL(SL, "admin_menu",
                               True)  # u'$admin_menu' on line 100, col 5
                    if _v is not None:
                        write(_filter(
                            _v,
                            rawExpr=u'$admin_menu'))  # from line 100, col 5.
                    write(u'''
''')
                write(u'''     <li class="dropdown">
       <a class="dropdown-toggle" data-toggle="dropdown" href="#empty">
         <i class="fa fa-user fa-fw"></i>  <i class="fa fa-caret-down"></i>
       </a>
       <ul class="dropdown-menu dropdown-user">
\t <li><a href="#" id="mmmUserPreferences"><i class="fa fa-user fa-fw"></i> '''
                      )
                _v = VFN(VFFSL(SL, "zoo", True), "_", False)(
                    "User Profile"
                )  # u'$zoo._("User Profile")' on line 107, col 76
                if _v is not None:
                    write(_filter(_v, rawExpr=u'$zoo._("User Profile")')
                          )  # from line 107, col 76.
                write(u'''</a>
\t </li>
\t <li class="divider"></li>
\t <li><a href="#" id="mmmUserLogOut"><i class="fa fa-sign-out fa-fw"></i> ''')
                _v = VFN(VFFSL(SL, "zoo", True), "_", False)(
                    "Logout")  # u'$zoo._("Logout")' on line 110, col 75
                if _v is not None:
                    write(_filter(
                        _v,
                        rawExpr=u'$zoo._("Logout")'))  # from line 110, col 75.
                write(u'''</a>
\t </li>
       </ul>
       <!-- /.dropdown-user -->
     </li>
   </ul>

''')
                if VFFSL(SL, "mmenu0",
                         True) is None:  # generated from line 117, col 1
                    if VFN(
                            VFN(VFFSL(SL, "conf", True)["mm"], "keys",
                                False)(), "count", False
                    )('indicators'
                      ) > 0 and VFFSL(SL, "conf", True)["main"][
                          "indicators"] == "true":  # generated from line 118, col 1
                        menu = [
                            'Dashboard', 'Distiller', 'Territories',
                            'Indicators', 'Themes', 'Documents', 'Manager',
                            'Publisher'
                        ]
                    else:  # generated from line 120, col 1
                        if VFN(
                                VFN(
                                    VFFSL(SL, "conf", True)["mm"], "keys",
                                    False)(), "count", False
                        )('indicators'
                          ) > 0 and VFFSL(SL, "conf", True)["mm"][
                              "documents"] == "true":  # generated from line 121, col 1
                            menu = [
                                'Dashboard', 'Distiller', 'Manager', 'Themes',
                                'Documents', 'Publisher'
                            ]
                        else:  # generated from line 123, col 1
                            menu = [
                                'Dashboard', 'Distiller', 'Manager', 'Themes',
                                'Publisher'
                            ]
                    if VFN(
                            VFN(VFFSL(SL, "conf", True)["mm"], "keys",
                                False)(), "count", False
                    )('tables'
                      ) > 0 and VFFSL(SL, "conf", True)["mm"][
                          "tables"] == "true":  # generated from line 127, col 1
                        mmenu0 = []
                        for a in range(0, len(VFFSL(
                                SL, "menu",
                                True))):  # generated from line 129, col 1
                            mmenu0 += [VFFSL(SL, "menu", True)[a]]
                            if a == 4:  # generated from line 131, col 1
                                mmenu0 += ["Tables"]
                        menu = VFFSL(SL, "mmenu0", True)
                else:  # generated from line 137, col 1
                    menu = VFFSL(SL, "mmenu0", True)
                write(u'''
''')
                if VFN(
                        VFN(VFFSL(SL, "conf", True)["mm"], "keys",
                            False)(), "count", False
                )('importers'
                  ) > 0 and VFFSL(SL, "conf", True)["mm"][
                      "importers"] == "true":  # generated from line 141, col 1
                    mmenu0 = []
                    for a in range(0, len(
                            VFFSL(SL, "menu",
                                  True))):  # generated from line 143, col 1
                        mmenu0 += [VFFSL(SL, "menu", True)[a]]
                        if a == 5:  # generated from line 145, col 1
                            mmenu0 += ["Importers"]
                    menu = VFFSL(SL, "mmenu0", True)
                write(u'''
\t  <div class="navbar-default sidebar" role="navigation">
\t  <div class="sidebar-nav navbar-collapse">
\t    <ul class="nav" id="side-menu">

''')
                for a in VFFSL(SL, "menu",
                               True):  # generated from line 156, col 1
                    write(u'''\t      <li ''')
                    if VFFSL(SL, "inputs", True)['tmpl']['value'] == VFFSL(
                            SL, "a",
                            True) + "_bs":  # generated from line 157, col 12
                        write(u'''class="active"''')
                    write(u'''>
\t      <a href="''')
                    if VFFSL(SL, "inputs", True)['tmpl']['value'] == VFFSL(
                            SL, "a",
                            True) + "_bs":  # generated from line 158, col 17
                        write(u'''#" class="active"''')
                    else:  # generated from line 158, col 74
                        write(u'''./''')
                        _v = VFFSL(SL, "a",
                                   True)  # u'$(a)' on line 158, col 82
                        if _v is not None:
                            write(_filter(
                                _v, rawExpr=u'$(a)'))  # from line 158, col 82.
                        write(u'''_bs"''')
                    write(u'''><i class="fa fa-''')
                    _v = VFFSL(SL, "lfonts", True)[a.lower(
                    )]  # u'$(lfonts[a.lower()])' on line 158, col 115
                    if _v is not None:
                        write(_filter(_v, rawExpr=u'$(lfonts[a.lower()])')
                              )  # from line 158, col 115.
                    write(u''' fa-fw"></i> ''')
                    _v = VFN(VFFSL(SL, "zoo", True), "_", False)(VFFSL(
                        SL, "a", True))  # u'$zoo._($a)' on line 158, col 148
                    if _v is not None:
                        write(_filter(
                            _v,
                            rawExpr=u'$zoo._($a)'))  # from line 158, col 148.
                    write(u'''
''')
                    if VFFSL(SL, "mmenu", True) is not None and VFFSL(
                            SL, "inputs", True)['tmpl']['value'] == VFFSL(
                                SL, "a", True
                            ) + "_bs":  # generated from line 159, col 1
                        write(u'''<span class="fa arrow"></span>
\t      </a>
\t      ''')
                        _v = VFFSL(SL, "mmenu",
                                   True)  # u'$mmenu' on line 162, col 8
                        if _v is not None:
                            write(_filter(
                                _v,
                                rawExpr=u'$mmenu'))  # from line 162, col 8.
                        write(u'''
''')
                    else:  # generated from line 163, col 1
                        write(u'''\t      </a>
''')
                    write(u'''\t      </li>
''')
                if VFN(VFFSL(SL, "menu", True), "count", False)(VFN(
                        VFFSL(SL, "inputs", True)['tmpl']['value'], "replace",
                        False)("_bs",
                               "")) == 0:  # generated from line 168, col 1
                    write(u'''\t      ''')
                    _v = VFFSL(SL, "mmenu",
                               True)  # u'$mmenu' on line 169, col 8
                    if _v is not None:
                        write(_filter(
                            _v, rawExpr=u'$mmenu'))  # from line 169, col 8.
                    write(u'''
''')
                write(u'''
\t    </ul>
\t  </div>
\t  <!-- /.sidebar-collapse -->
          </div>
\t  <!-- /.navbar-static-side -->
        </nav>

\t<div id="page-wrapper">

\t<div class=\'notifications top-right\'></div>
''')
        write(u'''
''')
        _v = VFFSL(SL, "body", True)  # u'$body' on line 185, col 1
        if _v is not None:
            write(_filter(_v, rawExpr=u'$body'))  # from line 185, col 1.
        write(u'''

''')
        if VFFSL(SL, "tfooter",
                 True) is not None:  # generated from line 187, col 1
            _v = VFFSL(SL, "tfooter", True)  # u'$tfooter' on line 188, col 1
            if _v is not None:
                write(_filter(_v,
                              rawExpr=u'$tfooter'))  # from line 188, col 1.
            write(u'''
''')
        write(u'''\t</div>
''')
        if VFFSL(SL, "mmodule", True) != "public" and (VFN(
                VFN(VFFSL(SL, "conf", True), "keys", False)
            (), "count", False)("senv") > 0 and VFFSL(
                SL, "conf", True)["senv"]["loggedin"] != "false" and VFN(
                    VFN(VFFSL(SL, "conf", True)["senv"], "keys", False)
                    (), "count", False)("firstname") > 0) and not (VFFSL(
                        SL, "verr", True)):  # generated from line 191, col 1
            write(u'''<div class="ui-layout-south hide"></div>
''')
        else:  # generated from line 193, col 1
            if VFN(
                    VFN(VFFSL(SL, "conf", True)["mm"], "keys", False)(),
                    "count", False)("nofooter") == 0 or (
                        VFFSL(SL, "conf", True)["mm"]["nofooter"] != "true"
                        and VFN(
                            VFN(VFFSL(SL, "conf", True)["mm"], "keys", False)
                            (), "count", False)
                        ("nofooter") > 0):  # generated from line 194, col 1
                write(u'''<footer>
  <div class="container text-center">
''')
                d = datetime.today()
                write(u'''    <p>Copyright &copy; <a href="''')
                _v = VFFSL(SL, "conf", True)["provider"][
                    "providerSite"]  # u'$conf["provider"]["providerSite"]' on line 199, col 34
                if _v is not None:
                    write(
                        _filter(_v,
                                rawExpr=u'$conf["provider"]["providerSite"]')
                    )  # from line 199, col 34.
                write(u'''">''')
                _v = VFFSL(SL, "conf", True)["provider"][
                    "providerName"]  # u'$conf["provider"]["providerName"]' on line 199, col 69
                if _v is not None:
                    write(
                        _filter(_v,
                                rawExpr=u'$conf["provider"]["providerName"]')
                    )  # from line 199, col 69.
                write(u'''</a> ''')
                _v = VFFSL(SL, "d.year",
                           True)  # u'$d.year' on line 199, col 107
                if _v is not None:
                    write(_filter(
                        _v, rawExpr=u'$d.year'))  # from line 199, col 107.
                write(u'''</p>
  </div>
</footer>
''')
        write(u'''
<!--
<button style="position:absolute;bottom:0px" onclick="if($(\'.sidebar\').is(\':visible\')){$(\'#page-wrapper\').css({\'margin\':\'50px 0 0 0px\'});$(\'.sidebar\').hide();}else{$(\'#page-wrapper\').css({\'margin\':\'50px 0 0 250px\'});$(\'.sidebar\').show();}" class="btn btn-default"><i class="fa fa-eye"></i></button>
-->
</div>

<!-- User Preferences Modal -->
<div class="modal fade" id="userPreferencesModal" tabindex="-1" role="dialog" aria-labelledby="removeModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="removeModalLabel"><i class="fa fa-user"></i> '''
              )
        _v = VFN(VFFSL(SL, "zoo", True), "_", False)(
            "User Settings")  # u'$zoo._("User Settings")' on line 216, col 82
        if _v is not None:
            write(_filter(
                _v,
                rawExpr=u'$zoo._("User Settings")'))  # from line 216, col 82.
        write(u''' </h4>
      </div>
      <div class="modal-body">
        <div class="myWell">
\t</div>
      </div>
    </div>
  </div>
</div>

<script data-main="''')
        _v = VFFSL(SL, "conf", True)["main"][
            "mmAddress"]  # u'$conf["main"]["mmAddress"]' on line 226, col 20
        if _v is not None:
            write(_filter(_v, rawExpr=u'$conf["main"]["mmAddress"]')
                  )  # from line 226, col 20.
        write(u'''/admin;module=''')
        _v = VFFSL(SL, "mmodule", True)  # u'$mmodule' on line 226, col 60
        if _v is not None:
            write(_filter(_v, rawExpr=u'$mmodule'))  # from line 226, col 60.
        write(u'''" src="''')
        _v = VFFSL(SL, "conf", True)["main"][
            "publicationUrl"]  # u'$conf["main"]["publicationUrl"]' on line 226, col 75
        if _v is not None:
            write(_filter(_v, rawExpr=u'$conf["main"]["publicationUrl"]')
                  )  # from line 226, col 75.
        write(u'''/assets/js/lib/require.js"></script>

</body>
</html>
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #51
0
ファイル: common_h.py プロジェクト: AlevtinaGlonina/MCSSim
    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'''#ifndef __COMMON__H_
#define __COMMON__H_

#include <vector>
#include <string>
#include "network.h"
#include "channel.h"
#include "timer.h"
#include "var.h"

#define DUMMY_NUM 100000000

''')
        for n in VFFSL(SL, "declarations",
                       True):  # generated from line 13, col 1
            _v = VFFSL(SL, "n", True)  # u'$n' on line 14, col 1
            if _v is not None:
                write(_filter(_v, rawExpr=u'$n'))  # from line 14, col 1.
            write(u'''
''')
        write(u'''
''')
        for i in VFN(VFFSL(SL, "base", True), "keys",
                     False)():  # generated from line 17, col 1
            write(u'''void create''')
            _v = VFFSL(SL, "i", True)  # u'$i' on line 18, col 12
            if _v is not None:
                write(_filter(_v, rawExpr=u'$i'))  # from line 18, col 12.
            write(
                u''' (std::string type, std::string _name, Network *n, int p, bool t'''
            )
            automaton = VFFSL(SL, "base", True)[i][0]
            for p in VFFSL(SL, "automaton.typedParams",
                           True):  # generated from line 20, col 1
                write(u''', ''')
                _v = VFFSL(SL, "p", True)[1]  # u'${p[1]}' on line 21, col 3
                if _v is not None:
                    write(_filter(_v,
                                  rawExpr=u'${p[1]}'))  # from line 21, col 3.
                write(u'''* _''')
                _v = VFFSL(SL, "p", True)[0]  # u'${p[0]}' on line 21, col 13
                if _v is not None:
                    write(_filter(_v,
                                  rawExpr=u'${p[0]}'))  # from line 21, col 13.
            for p in VFFSL(SL, "automaton.arrayTypedParams",
                           True):  # generated from line 23, col 1
                write(u''', std::vector <''')
                _v = VFFSL(SL, "p", True)[1]  # u'${p[1]}' on line 24, col 16
                if _v is not None:
                    write(_filter(_v,
                                  rawExpr=u'${p[1]}'))  # from line 24, col 16.
                write(u'''*> & _''')
                _v = VFFSL(SL, "p", True)[0]  # u'${p[0]}' on line 24, col 29
                if _v is not None:
                    write(_filter(_v,
                                  rawExpr=u'${p[0]}'))  # from line 24, col 29.
            for p in VFFSL(SL, "automaton.vars",
                           True):  # generated from line 26, col 1
                write(u''', Var* _''')
                _v = VFFSL(SL, "p", True)  # u'$p' on line 27, col 9
                if _v is not None:
                    write(_filter(_v, rawExpr=u'$p'))  # from line 27, col 9.
            for p in VFFSL(SL, "automaton.arrayVars",
                           True):  # generated from line 29, col 1
                write(u''', std::vector <Var*> &_''')
                _v = VFFSL(SL, "p", True)  # u'$p' on line 30, col 24
                if _v is not None:
                    write(_filter(_v, rawExpr=u'$p'))  # from line 30, col 24.
            for p in VFFSL(SL, "automaton.arrayArrayVars",
                           True):  # generated from line 32, col 1
                write(u''', std::vector < std::vector <Var*> > &_''')
                _v = VFFSL(SL, "p", True)  # u'$p' on line 33, col 40
                if _v is not None:
                    write(_filter(_v, rawExpr=u'$p'))  # from line 33, col 40.
            for p in VFFSL(SL, "automaton.chans",
                           True):  # generated from line 35, col 1
                write(u''', Channel* _''')
                _v = VFFSL(SL, "p", True)  # u'$p' on line 36, col 13
                if _v is not None:
                    write(_filter(_v, rawExpr=u'$p'))  # from line 36, col 13.
            for p in VFFSL(SL, "automaton.arrayChans",
                           True):  # generated from line 38, col 1
                write(u''', std::vector <Channel*> &_''')
                _v = VFFSL(SL, "p", True)  # u'$p' on line 39, col 28
                if _v is not None:
                    write(_filter(_v, rawExpr=u'$p'))  # from line 39, col 28.
            for p in VFFSL(SL, "automaton.timers",
                           True):  # generated from line 41, col 1
                write(u''', Timer* _''')
                _v = VFFSL(SL, "p", True)  # u'$p' on line 42, col 11
                if _v is not None:
                    write(_filter(_v, rawExpr=u'$p'))  # from line 42, col 11.
            for p in VFFSL(SL, "automaton.arrayTimers",
                           True):  # generated from line 44, col 1
                write(u''', std::vector <Timer*> &_''')
                _v = VFFSL(SL, "p", True)  # u'$p' on line 45, col 26
                if _v is not None:
                    write(_filter(_v, rawExpr=u'$p'))  # from line 45, col 26.
            write(u''');
''')
        write(u'''
#endif
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #52
0
    def body(self, **KWS):

        ## CHEETAH: generated from #def body at line 8, col 1.
        trans = KWS.get("trans")
        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("""<h1>Your cart contains:</h1>
<form action="/checkout">
<table>
""")
        for q in VFFSL(SL, "quantities",
                       True):  # generated from line 12, col 1
            write("""<tr><td><b>""")
            _v = VFFSL(SL, "q", True)[1]  # '${q[1]}' on line 13, col 12
            if _v is not None:
                write(_filter(_v, rawExpr="${q[1]}"))  # from line 13, col 12.
            write("""</b></td><td><b>""")
            _v = VFN(VFFSL(SL, "q", True)[0], "title.booktitle",
                     True)  # '${q[0].title.booktitle}' on line 13, col 35
            if _v is not None:
                write(_filter(_v, rawExpr="${q[0].title.booktitle}")
                      )  # from line 13, col 35.
            write("""</b></td></tr>
""")
        write('''</table>
<br />
<input class="submit-inline" type="submit" name="change" value="change quantities"/><br />
Change status from: <input label="from" type="text" name="status_from" value="'''
              )
        _v = VFFSL(SL, "status_from",
                   True)  # '$status_from' on line 18, col 79
        if _v is not None:
            write(_filter(_v, rawExpr="$status_from"))  # from line 18, col 79.
        write('''">
To: <input  label="to" type="text" name="status_to" value="''')
        _v = VFFSL(SL, "status_to", True)  # '$status_to' on line 19, col 60
        if _v is not None:
            write(_filter(_v, rawExpr="$status_to"))  # from line 19, col 60.
        write("""">
<input class="submit-inline" type="submit" name="restatus" value="change status" />
<br /><br/>
Price Schedule: 
<select name="schedule">
""")
        for schedule in VFFSL(SL, "schedules",
                              True):  # generated from line 24, col 1
            write("""<option>""")
            _v = VFFSL(SL, "schedule",
                       True)[0]  # '${schedule[0]}' on line 25, col 9
            if _v is not None:
                write(_filter(
                    _v, rawExpr="${schedule[0]}"))  # from line 25, col 9.
            write("""</option>
""")
        write("""</select>
Seller: <input  type="text" name="cashier" value="" />
<input class="submit-inline" type="submit" name="finalize" value="make sale" />
<br/><br />
<input class="submit-inline" type="submit" name="delete" onclick="return confirm(\'Are you sure?\');"  value="delete collected copies" />
</form>
""")

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #53
0
    def writeBody(self, **KWS):

        ## CHEETAH: main method generated for this template
        trans = KWS.get("trans")
        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

        #  首字母大写
        self._CHEETAH__globalSetVars["g_fullLayerName"] = '%s.%sLayer' % (
            VFFSL(SL, "namespace", True), VFFSL(SL, "name", True))
        self._CHEETAH__globalSetVars[
            "g_guiFileName"] = 'res/UI/%s/Layer%s.json' % (VFFSL(
                SL, "namespace", True), VFFSL(SL, "name", True))
        #  首字母大写
        self._CHEETAH__globalSetVars["g_modelName"] = 'model.%sModel' % VFFSL(
            SL, "model", True)
        #  首字母大写
        self._CHEETAH__globalSetVars[
            "g_globalEventName"] = 'common.NotifyType.%s_EVENT' % VFFSL(
                SL, "name", True)
        #  首字母大写
        self._CHEETAH__globalSetVars[
            "g_globalEventFuncName"] = '__on%sEvent' % VFFSL(SL, "name", True)
        self._CHEETAH__globalSetVars[
            "g_mediatorName"] = '%sLayerMediator' % VFFSL(SL, "name", True)
        self._CHEETAH__globalSetVars[
            "g_fullMediatorName"] = '%s.$sLayerMediator' % (VFFSL(
                SL, "namespace", True), VFFSL(SL, "name", True))
        write(u'''//
// ''')
        _v = VFFSL(SL, "comment", True)  # u'$comment' on line 12, col 4
        if _v is not None:
            write(_filter(_v, rawExpr=u'$comment'))  # from line 12, col 4.
        write(u'''
//


/**
 * \u521d\u59cb\u5316\u3001\u6e05\u7406\uff0c\u4e0d\u8d1f\u8d23\u5176\u4ed6\u903b\u8f91
 *
 */
''')
        _v = VFFSL(SL, "g_fullLayerName",
                   True)  # u'$g_fullLayerName' on line 20, col 1
        if _v is not None:
            write(_filter(_v,
                          rawExpr=u'$g_fullLayerName'))  # from line 20, col 1.
        write(u'''\t\t\t\t\t\t\\= game.IView.extend({

\tUI_MAIN\t\t: ''')
        _v = VFFSL(SL, "g_guiFileName",
                   True)  # u'$g_guiFileName' on line 22, col 13
        if _v is not None:
            write(_filter(_v,
                          rawExpr=u'$g_guiFileName'))  # from line 22, col 13.
        write(u''',

\t__data\t\t: null,
\t__root\t\t: null,


\tctor:function(){
\t\tthis._super();

        //cc.log(''')
        _v = VFFSL(SL, "g_fullLayerName",
                   True)  # u'$g_fullLayerName' on line 31, col 18
        if _v is not None:
            write(_filter(
                _v, rawExpr=u'$g_fullLayerName'))  # from line 31, col 18.
        write(u"""\\.DEBUG.format('ctor'));

\t\tthis.__data\t\t= game.Facade.getModelData(""")
        _v = VFFSL(SL, "g_modelName",
                   True)  # u'$g_modelName' on line 33, col 43
        if _v is not None:
            write(_filter(_v,
                          rawExpr=u'$g_modelName'))  # from line 33, col 43.
        write(u''');

\t\tthis.__root\t\t= ccs.load(this.UI_MAIN).node;
\t\tthis.addChild(this.__root);

        var comp        = null;

''')
        if VFFSL(SL, "btn_back",
                 True) == True:  # generated from line 40, col 1
            write(
                u"""        comp            = this.__root.getChildByName('btn_back');
        if(comp){
            comp.addTouchEventListener(this.__onTouchEvent, this);
        }
""")
        write(u'''
''')
        if VFFSL(SL, "btn_close",
                 True) == True:  # generated from line 47, col 1
            write(
                u"""        comp            = this.__root.getChildByName('btn_close');
        if(comp){
            comp.addTouchEventListener(this.__onTouchEvent, this);
        }
""")
        write(u'''
\t\tthis.__update();

\t\treturn true;
\t},


    destroy:function(){

    },


    __update:function(){

\t},


    __onTouchEvent:function(sender, type){
    \tswitch(type){
        case ccui.Widget.TOUCH_ENDED:
            switch(sender.name){
''')
        if VFFSL(SL, "btn_back",
                 True) == True:  # generated from line 74, col 1
            write(u"""            case 'btn_back':
                this.send(""")
            _v = VFFSL(SL, "g_globalEventName",
                       True)  # u'$g_globalEventName' on line 76, col 27
            if _v is not None:
                write(_filter(
                    _v,
                    rawExpr=u'$g_globalEventName'))  # from line 76, col 27.
            write(u''', {
                    key             : sender.name
                });
                break;
''')
        write(u'''
''')
        if VFFSL(SL, "btn_close",
                 True) == True:  # generated from line 82, col 1
            write(u"""            case 'btn_close':
                this.send(""")
            _v = VFFSL(SL, "g_globalEventName",
                       True)  # u'$g_globalEventName' on line 84, col 27
            if _v is not None:
                write(_filter(
                    _v,
                    rawExpr=u'$g_globalEventName'))  # from line 84, col 27.
            write(u''', {
                    key             : sender.name
                });
                break;
''')
        write(u'''
            default:
''')
        if VFFSL(SL, "global_event",
                 True) == True:  # generated from line 91, col 1
            write(u'''                this.send(''')
            _v = VFFSL(SL, "g_globalEventName",
                       True)  # u'$g_globalEventName' on line 92, col 27
            if _v is not None:
                write(_filter(
                    _v,
                    rawExpr=u'$g_globalEventName'))  # from line 92, col 27.
            write(u''', {
                    key             : sender.name
                });
''')
        write(u'''                break;
            }
            break;
        }
    },

});

/********************************************************************/
/** static **/
/********************************************************************/

''')
        _v = VFFSL(SL, "g_fullLayerName",
                   True)  # u'$g_fullLayerName' on line 108, col 1
        if _v is not None:
            write(_filter(
                _v, rawExpr=u'$g_fullLayerName'))  # from line 108, col 1.
        write(u"""\\.DEBUG\t\t\t\t\t\t\t= '""")
        #  $g_fullLayerName\.{0}: ';
        write(u'''

''')
        if VFFSL(SL, "mediator",
                 True) == True:  # generated from line 110, col 1
            write(
                u'''/********************************************************************/
/** mediator **/
/********************************************************************/

''')
            _v = VFFSL(SL, "g_fullMediatorName",
                       True)  # u'$g_fullMediatorName' on line 115, col 1
            if _v is not None:
                write(_filter(
                    _v,
                    rawExpr=u'$g_fullMediatorName'))  # from line 115, col 1.
            write(u'''\t\t\t\t\t\t\t\\= game.LayerMediator.extend({


\tctor:function(view){
\t\tthis._super(view, true);

        //cc.log(''')
            _v = VFFSL(SL, "g_fullMediatorName",
                       True)  # u'$g_fullMediatorName' on line 121, col 18
            if _v is not None:
                write(_filter(
                    _v,
                    rawExpr=u'$g_fullMediatorName'))  # from line 121, col 18.
            write(u"""\\.DEBUG.format('ctor'));
\t},


\tinit:function (){
\t\ttools.UIUtils.AutoClearManager.getInstance().addSubscribe('""")
            _v = VFFSL(SL, "g_mediatorName",
                       True)  # u'$g_mediatorName' on line 126, col 62
            if _v is not None:
                write(_filter(
                    _v, rawExpr=u'$g_mediatorName'))  # from line 126, col 62.
            write(u"""',
\t\t\tg_fullMediatorName, this.""")
            _v = VFFSL(SL, "g_globalEventFuncName",
                       True)  # u'$g_globalEventFuncName' on line 127, col 29
            if _v is not None:
                write(_filter(_v, rawExpr=u'$g_globalEventFuncName')
                      )  # from line 127, col 29.
            write(u""", this);
\t},


\tshow:function(parent){
\t\tthis._super(parent);
\t\tparent.addChild(this.currLayer);
\t},


\tfreshen:function(){

\t},


\tdestroy:function(){
\t\ttools.UIUtils.AutoClearManager.getInstance().removeAll('""")
            _v = VFFSL(SL, "g_mediatorName",
                       True)  # u'$g_mediatorName' on line 143, col 59
            if _v is not None:
                write(_filter(
                    _v, rawExpr=u'$g_mediatorName'))  # from line 143, col 59.
            write(u"""');
\t},


    """)
            _v = VFFSL(SL, "g_globalEventFuncName",
                       True)  # u'$g_globalEventFuncName' on line 147, col 5
            if _v is not None:
                write(_filter(_v, rawExpr=u'$g_globalEventFuncName')
                      )  # from line 147, col 5.
            write(u''':function(obj, unusedTarget){
        switch(obj.key){
''')
            if VFFSL(SL, "btn_back",
                     True) == True:  # generated from line 149, col 1
                write(u"""        case 'btn_back':
            this.popLayer(this);
            break;
""")
            write(u'''
''')
            if VFFSL(SL, "btn_close",
                     True) == True:  # generated from line 155, col 1
                write(u"""        case 'btn_close':
            this.popLayer(this, true);
            break;
""")
            write(u'''
        default:
            break;
        }
    },

});

/********************************************************************/
/** static **/
/********************************************************************/

''')
            _v = VFFSL(SL, "g_fullMediatorName",
                       True)  # u'$g_fullMediatorName' on line 172, col 1
            if _v is not None:
                write(_filter(
                    _v,
                    rawExpr=u'$g_fullMediatorName'))  # from line 172, col 1.
            write(u"""\\.DEBUG\t\t\t\t\t\t\t= '""")
            #  $g_fullMediatorName\.{0}: ';
            write(u'''
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #54
0
    def body(self, **KWS):

        ## CHEETAH: generated from #def body at line 171, col 1.
        trans = KWS.get("trans")
        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

        if VFFSL(
            SL, "specialorder.customerName", True
        ):  # generated from line 172, col 1
            write("""    <h1>Special Order record for """)
            _v = VFFSL(
                SL, "specialorder.customerName", True
            )  # '${specialorder.customerName}' on line 173, col 34
            if _v is not None:
                write(
                    _filter(_v, rawExpr="${specialorder.customerName}")
                )  # from line 173, col 34.
            write(
                """</h1>
"""
            )
        else:  # generated from line 174, col 1
            write(
                """    <h1>New Special Order</h1>
"""
            )
        write(
            """
<form class=\'editform\' method="get" action="/specialorder/special_order_edit">
"""
        )
        _v = VFFSL(
            SL, "specialorder.object_to_form", True
        )  # '$specialorder.object_to_form' on line 179, col 1
        if _v is not None:
            write(
                _filter(_v, rawExpr="$specialorder.object_to_form")
            )  # from line 179, col 1.
        write(
            """
</form></br>

"""
        )
        if VFFSL(SL, "specialorder.titles", True):  # generated from line 182, col 1
            write(
                """    <h2>Inventoried items special ordered</h2>
"""
            )
        write(
            """
"""
        )
        if VFFSL(
            SL, "specialorder.customerName", True
        ):  # generated from line 186, col 1
            write(
                """<div id='new_special_order_group'>
    <button id='new_special_order_item' class='new_special_order_item'>New Item</button></br>
    <div id='new_special_order_dialog' class='new_special_order_dialog' title='Enter ISBN, Author/Title or Price'>
        <form action='' method='get'>
            <input class='isbnfield' type='text' name='isbn' />"""
            )
            write(
                """       </form>
       <div id='title_list_panel' class='title_list_panel' name='title_list_panel'>
            <ul id='title_list' class='title_list' name='title_list'></ul>
       </div>  
    </div>
    <div id='isbn_not_found_error' class='error_dialog' title='Error: ISBN not found'>
            Check the ISBN again or use the search button to search the inventory by attributes.
    </div>
</div>
"""
            )
        write(
            """
"""
        )
        if VFFSL(SL, "specialorder.titles", True):  # generated from line 203, col 1
            write(
                """    <ul id= 'special_order_list' class='special_order_list'>
"""
            )
            for tso in VFFSL(
                SL, "specialorder.title_pivots", True
            ):  # generated from line 205, col 9
                write(
                    """        <li class='special_order_item_list'>
            <ul>
                <li>"""
                )
                if VFFSL(SL, "tso.id", True):  # generated from line 208, col 21
                    _v = VFFSL(SL, "tso.id", True)
                    if _v is not None:
                        write(_filter(_v))
                else:
                    _v = ""
                    if _v is not None:
                        write(_filter(_v))
                write(
                    """</li>
                <li>"""
                )
                if VFFSL(SL, "tso.title.isbn", True):  # generated from line 209, col 21
                    _v = VFFSL(SL, "tso.title.isbn", True)
                    if _v is not None:
                        write(_filter(_v))
                else:
                    _v = ""
                    if _v is not None:
                        write(_filter(_v))
                write(
                    """</li>
                <li>"""
                )
                if VFFSL(
                    SL, "tso.title.booktitle", True
                ):  # generated from line 210, col 21
                    _v = VFFSL(SL, "tso.title.booktitle", True)
                    if _v is not None:
                        write(_filter(_v))
                else:
                    _v = ""
                    if _v is not None:
                        write(_filter(_v))
                write(
                    """</li>
                <li>"""
                )
                if VFFSL(
                    SL, "tso.title.authors_as_string", True
                ):  # generated from line 211, col 21
                    _v = VFFSL(SL, "tso.title.authors_as_string", True)
                    if _v is not None:
                        write(_filter(_v))
                else:
                    _v = ""
                    if _v is not None:
                        write(_filter(_v))
                write(
                    """</li>
                <li>"""
                )
                if VFFSL(
                    SL, "tso.orderStatus", True
                ):  # generated from line 212, col 21
                    _v = VFFSL(SL, "tso.orderStatus", True)
                    if _v is not None:
                        write(_filter(_v))
                else:
                    _v = ""
                    if _v is not None:
                        write(_filter(_v))
                write(
                    """</li>
                <li><button onclick="window.location.href=\'/specialorder/special_order_item_edit?id="""
                )
                _v = VFFSL(SL, "tso.id", True)  # '$tso.id' on line 213, col 101
                if _v is not None:
                    write(_filter(_v, rawExpr="$tso.id"))  # from line 213, col 101.
                write(
                    """\'">edit</button></li>
            </ul>
"""
                )
            write(
                """        </li>
    </ul>
"""
            )

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #55
0
    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'''/*--------------------------------*- C++ -*----------------------------------*\\
| =========                 |                                                 |
| \\\\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\\\    /   O peration     | Version:  2.4.0                                 |
|   \\\\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\\\/     M anipulation  |                                                 |
\\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      ''')
        _v = VFFSL(SL, "node.type.name",
                   True)  # u'$node.type.name' on line 14, col 17
        if _v is not None:
            write(_filter(_v,
                          rawExpr=u'$node.type.name'))  # from line 14, col 17.
        write(u''';
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
''')
        for child in VFN(VFFSL(SL, "node", True), "children",
                         False)():  # generated from line 17, col 1
            if 'Properties' in VFFSL(SL, "child.type.name",
                                     True):  # generated from line 18, col 1
                write(u'''dimensions      ''')
                _v = VFFSL(SL, "child.dimensions",
                           True)  # u'$child.dimensions' on line 19, col 17
                if _v is not None:
                    write(_filter(
                        _v,
                        rawExpr=u'$child.dimensions'))  # from line 19, col 17.
                write(u''';

internalField   ''')
                _v = VFFSL(SL, "child.internalField",
                           True)  # u'$child.internalField' on line 21, col 17
                if _v is not None:
                    write(_filter(_v, rawExpr=u'$child.internalField')
                          )  # from line 21, col 17.
                write(u''';

''')
        write(u'''boundaryField
{
''')
        for child in VFN(VFFSL(SL, "node", True), "children",
                         False)():  # generated from line 27, col 1
            if 'Boundary' in VFFSL(SL, "child.type.name",
                                   True):  # generated from line 28, col 1
                write(u'''\t''')
                _v = VFFSL(SL, "child.patchName",
                           True)  # u'$child.patchName' on line 29, col 2
                if _v is not None:
                    write(_filter(
                        _v,
                        rawExpr=u'$child.patchName'))  # from line 29, col 2.
                write(u'''
\t{
\t\ttype\t\t\t''')
                _v = VFFSL(SL, "child.btype",
                           True)  # u'$child.btype' on line 31, col 10
                if _v is not None:
                    write(_filter(
                        _v, rawExpr=u'$child.btype'))  # from line 31, col 10.
                write(u''';
''')
                if 'flowRateInletVelocity' in VFFSL(
                        SL, "child.btype",
                        True):  # generated from line 32, col 1
                    write(u'''\t\tmassFlowRate\t''')
                    _v = VFFSL(
                        SL, "child.massFlowRate",
                        True)  # u'$child.massFlowRate' on line 33, col 16
                    if _v is not None:
                        write(_filter(_v, rawExpr=u'$child.massFlowRate')
                              )  # from line 33, col 16.
                    write(u''';
''')
                if 'inletOutlet' in VFFSL(
                        SL, "child.btype",
                        True):  # generated from line 35, col 1
                    write(u'''\t\tinletValue\t\t''')
                    _v = VFFSL(SL, "child.inletValue",
                               True)  # u'$child.inletValue' on line 36, col 15
                    if _v is not None:
                        write(_filter(_v, rawExpr=u'$child.inletValue')
                              )  # from line 36, col 15.
                    write(u''';
''')
                if not ('zero'
                        in '$child.btype'):  # generated from line 38, col 1
                    write(u'''\t\tvalue\t\t\t''')
                    _v = VFFSL(SL, "child.value",
                               True)  # u'$child.value' on line 39, col 11
                    if _v is not None:
                        write(_filter(
                            _v,
                            rawExpr=u'$child.value'))  # from line 39, col 11.
                    write(u''';
''')
                write(u'''\t}
''')
        write(u'''}


// ************************************************************************* //
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #56
0
    def renderHTMLPage(self, **KWS):

        ## CHEETAH: main method generated for this template
        trans = KWS.get("trans")
        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'''Audio Zones
<hr/>
''')
        for i in VFFSL(SL, "zones", True):  # generated from line 5, col 1
            _v = VFFSL(SL, "zoneName",
                       False)(VFFSL(SL, "i",
                                    True))  # u'$zoneName($i)' on line 6, col 1
            if _v is not None:
                write(_filter(_v,
                              rawExpr=u'$zoneName($i)'))  # from line 6, col 1.
            write(u''' (Z''')
            _v = VFFSL(SL, "i", True)  # u'$i' on line 6, col 17
            if _v is not None:
                write(_filter(_v, rawExpr=u'$i'))  # from line 6, col 17.
            write(u''') is
''')
            if VFFSL(SL, "zoneIsOn",
                     False)(VFFSL(SL, "i",
                                  True)):  # generated from line 7, col 1
                write(u'''<b>on</b> source ''')
                _v = VFFSL(SL, "source", False)(VFFSL(
                    SL, "i", True))  # u'$source($i)' on line 8, col 18
                if _v is not None:
                    write(_filter(
                        _v, rawExpr=u'$source($i)'))  # from line 8, col 18.
                write(u'''
''')
                if VFFSL(SL, "state", False)(VFFSL(
                        SL, "i", True)) != 1:  # generated from line 9, col 1
                    write(u'''(''')
                    _v = VFFSL(SL, "stateName", False)(VFFSL(
                        SL, "i", True))  # u'$stateName($i)' on line 10, col 2
                    if _v is not None:
                        write(_filter(
                            _v,
                            rawExpr=u'$stateName($i)'))  # from line 10, col 2.
                    write(u''')
''')
            else:  # generated from line 12, col 1
                write(u'''off
''')
            write(u'''<br/>
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #57
0
ファイル: fvSchemes.py プロジェクト: DWatkins/GMEOpenFOAM
    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'''/*--------------------------------*- C++ -*----------------------------------*\\
| =========                 |                                                 |
| \\\\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\\\    /   O peration     | Version:  2.4.0                                 |
|   \\\\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\\\/     M anipulation  |                                                 |
\\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         ''')
        _v = VFFSL(SL, "node.ddtSchemes",
                   True)  # u'$node.ddtSchemes' on line 20, col 21
        if _v is not None:
            write(_filter(
                _v, rawExpr=u'$node.ddtSchemes'))  # from line 20, col 21.
        write(u''';
}

gradSchemes
{
    default         ''')
        _v = VFFSL(SL, "node.gradSchemes",
                   True)  # u'$node.gradSchemes' on line 25, col 21
        if _v is not None:
            write(_filter(
                _v, rawExpr=u'$node.gradSchemes'))  # from line 25, col 21.
        write(u''';
}

divSchemes
{
    default         none;

    div(phi,U)      bounded Gauss upwind;
    div((muEff*dev2(T(grad(U))))) Gauss linear;
    div(phi,e)      bounded Gauss upwind;
    div(phi,epsilon) bounded Gauss upwind;
    div(phi,k)      bounded Gauss upwind;
    div(phi,Ekp)    bounded Gauss upwind;
}

laplacianSchemes
{
    default         ''')
        _v = VFFSL(SL, "node.laplacianSchemes",
                   True)  # u'$node.laplacianSchemes' on line 42, col 21
        if _v is not None:
            write(_filter(
                _v,
                rawExpr=u'$node.laplacianSchemes'))  # from line 42, col 21.
        write(u''';
}

interpolationSchemes
{
    default         ''')
        _v = VFFSL(SL, "node.interpolationSchemes",
                   True)  # u'$node.interpolationSchemes' on line 47, col 21
        if _v is not None:
            write(_filter(_v, rawExpr=u'$node.interpolationSchemes')
                  )  # from line 47, col 21.
        write(u''';
}

snGradSchemes
{
    default         ''')
        _v = VFFSL(SL, "node.snGradSchemes",
                   True)  # u'$node.snGradSchemes' on line 52, col 21
        if _v is not None:
            write(_filter(
                _v, rawExpr=u'$node.snGradSchemes'))  # from line 52, col 21.
        write(u''';
}

fluxRequired
{
    default         ''')
        _v = VFFSL(SL, "node.fluxRequired",
                   True)  # u'$node.fluxRequired' on line 57, col 21
        if _v is not None:
            write(_filter(
                _v, rawExpr=u'$node.fluxRequired'))  # from line 57, col 21.
        write(u''';
    p               ;
}


// ************************************************************************* //
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #58
0
    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

        #
        # 	$title_chapter
        # 	$langid
        # 	$menus
        # 	$organized_by_menu_chapter
        # 	$other_commands_chapter
        write(u'''<?xml version="1.0" encoding="utf-8"?>\r
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">\r
\t<head>\r
\t\t<title>''')
        _v = VFN(VFFSL(SL, "title_chapter", True)[0], "caption.text",
                 True)  # u'$title_chapter[0].caption.text' on line 13, col 10
        if _v is not None:
            write(_filter(_v, rawExpr=u'$title_chapter[0].caption.text')
                  )  # from line 13, col 10.
        write(u'''</title>\r
\t\t<meta name="dc:identifier" content="amis-keyboard-shortcuts-''')
        _v = VFFSL(SL, "langid", True)  # u'$langid' on line 14, col 63
        if _v is not None:
            write(_filter(_v, rawExpr=u'$langid'))  # from line 14, col 63.
        write(u'''"/>\r
\t\t<link rel="stylesheet" type="text/css" href="style.css"/>\r
\t\t<meta name="ncc:charset" content="utf-8"/>\r
\t\t<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>\r
\t</head>\r
\t<body dir="''')
        _v = VFFSL(SL, "dir", True)  # u'$dir' on line 19, col 13
        if _v is not None:
            write(_filter(_v, rawExpr=u'$dir'))  # from line 19, col 13.
        write(u'''">\r
\t\t<h1 class="title" id="''')
        _v = VFN(VFFSL(SL, "title_chapter", True)[0], "caption.id",
                 True)  # u'$title_chapter[0].caption.id' on line 20, col 25
        if _v is not None:
            write(_filter(_v, rawExpr=u'$title_chapter[0].caption.id')
                  )  # from line 20, col 25.
        write(u'''">''')
        _v = VFN(VFFSL(SL, "title_chapter", True)[0], "caption.text",
                 True)  # u'$title_chapter[0].caption.text' on line 20, col 55
        if _v is not None:
            write(_filter(_v, rawExpr=u'$title_chapter[0].caption.text')
                  )  # from line 20, col 55.
        write(u'''</h1>\r
\t\t<p id="''')
        _v = VFN(VFFSL(SL, "title_chapter", True)[1], "caption.id",
                 True)  # u'$title_chapter[1].caption.id' on line 21, col 10
        if _v is not None:
            write(_filter(_v, rawExpr=u'$title_chapter[1].caption.id')
                  )  # from line 21, col 10.
        write(u'''">''')
        _v = VFN(VFFSL(SL, "title_chapter", True)[1], "caption.text",
                 True)  # u'$title_chapter[1].caption.text' on line 21, col 40
        if _v is not None:
            write(_filter(_v, rawExpr=u'$title_chapter[1].caption.text')
                  )  # from line 21, col 40.
        write(u'''</p>\r
\t\t\t\r
\t\t<h1 id="''')
        _v = VFN(
            VFFSL(SL, "organized_by_menu_chapter", True)[0], "caption.id", True
        )  # u'$organized_by_menu_chapter[0].caption.id' on line 23, col 11
        if _v is not None:
            write(
                _filter(_v,
                        rawExpr=u'$organized_by_menu_chapter[0].caption.id')
            )  # from line 23, col 11.
        write(u'''">''')
        _v = VFN(
            VFFSL(SL, "organized_by_menu_chapter",
                  True)[0], "caption.text", True
        )  # u'$organized_by_menu_chapter[0].caption.text' on line 23, col 53
        if _v is not None:
            write(
                _filter(_v,
                        rawExpr=u'$organized_by_menu_chapter[0].caption.text')
            )  # from line 23, col 53.
        write(u'''</h1>\r
\t\t\r
''')
        for menu in VFFSL(SL, "menus", True):  # generated from line 25, col 3
            first = True
            for menuitem in menu:  # generated from line 27, col 4
                if VFFSL(SL, "first",
                         True) == True:  # generated from line 28, col 5
                    write(u'''\t\t\t\t\t<h2 id="''')
                    _v = VFFSL(
                        SL, "menuitem.caption.id",
                        True)  # u'$menuitem.caption.id' on line 29, col 14
                    if _v is not None:
                        write(_filter(_v, rawExpr=u'$menuitem.caption.id')
                              )  # from line 29, col 14.
                    write(u'''">''')
                    _v = VFFSL(
                        SL, "menuitem.caption.text",
                        True)  # u'$menuitem.caption.text' on line 29, col 36
                    if _v is not None:
                        write(_filter(_v, rawExpr=u'$menuitem.caption.text')
                              )  # from line 29, col 36.
                    write(u''' (''')
                    _v = VFFSL(
                        SL, "menuitem.shortcut.text",
                        True)  # u'$menuitem.shortcut.text' on line 29, col 60
                    if _v is not None:
                        write(_filter(_v, rawExpr=u'$menuitem.shortcut.text')
                              )  # from line 29, col 60.
                    write(u''')</h2>\r
\t\t\t\t\t<ul>\r
''')
                    first = False
                else:  # generated from line 32, col 5
                    write(u'''\t\t\t\t\t<li>\r
\t\t\t\t\t\t<span id="''')
                    _v = VFFSL(
                        SL, "menuitem.caption.id",
                        True)  # u'$menuitem.caption.id' on line 34, col 17
                    if _v is not None:
                        write(_filter(_v, rawExpr=u'$menuitem.caption.id')
                              )  # from line 34, col 17.
                    write(u'''">''')
                    _v = VFFSL(
                        SL, "menuitem.caption.text",
                        True)  # u'$menuitem.caption.text' on line 34, col 39
                    if _v is not None:
                        write(_filter(_v, rawExpr=u'$menuitem.caption.text')
                              )  # from line 34, col 39.
                    write(u''':</span>\r
\t\t\t\t\t\t<span id="''')
                    _v = VFFSL(
                        SL, "menuitem.shortcut.id",
                        True)  # u'$menuitem.shortcut.id' on line 35, col 17
                    if _v is not None:
                        write(_filter(_v, rawExpr=u'$menuitem.shortcut.id')
                              )  # from line 35, col 17.
                    write(u'''">''')
                    _v = VFFSL(
                        SL, "menuitem.shortcut.text",
                        True)  # u'$menuitem.shortcut.text' on line 35, col 40
                    if _v is not None:
                        write(_filter(_v, rawExpr=u'$menuitem.shortcut.text')
                              )  # from line 35, col 40.
                    write(u'''</span>\r
\t\t\t\t\t</li>\r
''')
            write(u'''\t\t\t</ul>\r
''')
        write(u'''\t\t\r
''')
        first = True
        for item in VFFSL(SL, "other_commands_chapter",
                          True):  # generated from line 43, col 3
            if VFFSL(SL, "first",
                     True) == True:  # generated from line 44, col 4
                write(u'''\t\t\t\t<h1 id="''')
                _v = VFFSL(SL, "item.caption.id",
                           True)  # u'$item.caption.id' on line 45, col 13
                if _v is not None:
                    write(_filter(
                        _v,
                        rawExpr=u'$item.caption.id'))  # from line 45, col 13.
                write(u'''">''')
                _v = VFFSL(SL, "item.caption.text",
                           True)  # u'$item.caption.text' on line 45, col 31
                if _v is not None:
                    write(_filter(_v, rawExpr=u'$item.caption.text')
                          )  # from line 45, col 31.
                write(u'''</h1>\r
\t\t\t\t<ul>\r
''')
                first = False
            else:  # generated from line 48, col 4
                write(u'''\t\t\t\t<li>\r
\t\t\t\t\t<span id="''')
                _v = VFFSL(SL, "item.caption.id",
                           True)  # u'$item.caption.id' on line 50, col 16
                if _v is not None:
                    write(_filter(
                        _v,
                        rawExpr=u'$item.caption.id'))  # from line 50, col 16.
                write(u'''">''')
                _v = VFFSL(SL, "item.caption.text",
                           True)  # u'$item.caption.text' on line 50, col 34
                if _v is not None:
                    write(_filter(_v, rawExpr=u'$item.caption.text')
                          )  # from line 50, col 34.
                write(u''':</span>\r
\t\t\t\t\t<span id="''')
                _v = VFFSL(SL, "item.shortcut.id",
                           True)  # u'$item.shortcut.id' on line 51, col 16
                if _v is not None:
                    write(_filter(
                        _v,
                        rawExpr=u'$item.shortcut.id'))  # from line 51, col 16.
                write(u'''">''')
                _v = VFFSL(SL, "item.shortcut.text",
                           True)  # u'$item.shortcut.text' on line 51, col 35
                if _v is not None:
                    write(_filter(_v, rawExpr=u'$item.shortcut.text')
                          )  # from line 51, col 35.
                write(u'''</span>\r
\t\t\t\t</li>\r
''')
        write(u'''\t\t</ul>\t\r
\t</body>\r
</html>\r
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #59
0
    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'''#ifndef ''')
        _v = VFN(VFFSL(SL, "state.name", True), "upper",
                 False)()  # u'${state.name.upper()}' on line 1, col 10
        if _v is not None:
            write(_filter(
                _v, rawExpr=u'${state.name.upper()}'))  # from line 1, col 10.
        write(u'''_STATE_H
#define ''')
        _v = VFN(VFFSL(SL, "state.name", True), "upper",
                 False)()  # u'${state.name.upper()}' on line 2, col 10
        if _v is not None:
            write(_filter(
                _v, rawExpr=u'${state.name.upper()}'))  # from line 2, col 10.
        write(u'''_STATE_H

/* An incomplete type for the state representation itself. */
typedef struct ''')
        _v = VFN(VFFSL(SL, "state.name", True), "capitalize",
                 False)()  # u'${state.name.capitalize()}' on line 5, col 16
        if _v is not None:
            write(_filter(
                _v,
                rawExpr=u'${state.name.capitalize()}'))  # from line 5, col 16.
        write(u'''State* ''')
        _v = VFN(VFFSL(SL, "state.name", True), "capitalize",
                 False)()  # u'${state.name.capitalize()}' on line 5, col 49
        if _v is not None:
            write(_filter(
                _v,
                rawExpr=u'${state.name.capitalize()}'))  # from line 5, col 49.
        write(u'''StatePtr;

void ''')
        _v = VFFSL(
            SL, "state.defaultImplementation.name",
            True)  # u'${state.defaultImplementation.name}' on line 7, col 6
        if _v is not None:
            write(_filter(_v, rawExpr=u'${state.defaultImplementation.name}')
                  )  # from line 7, col 6.
        write(u''' (''')
        _v = VFN(VFFSL(SL, "state.name", True), "capitalize",
                 False)()  # u'${state.name.capitalize()}' on line 7, col 43
        if _v is not None:
            write(_filter(
                _v,
                rawExpr=u'${state.name.capitalize()}'))  # from line 7, col 43.
        write(u'''StatePtr state);

#endif
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
コード例 #60
0
    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('''Format type:keyword version: 1.1.0
begin_<object> Vehicles and Pedestrians
begin_<reference>
cartesian
longitude ''')
        _v = VFFSL(SL, "long", True)  # '$long' on line 5, col 11
        if _v is not None:
            write(_filter(_v, rawExpr='$long'))  # from line 5, col 11.
        write('''
latitude ''')
        _v = VFFSL(SL, "lat", True)  # '$lat' on line 6, col 10
        if _v is not None:
            write(_filter(_v, rawExpr='$lat'))  # from line 6, col 10.
        write('''
visible no
terrain
end_<reference>
begin_<Material> Human Dry skin 60 Ghz
Material 0
LayeredDielectric
begin_<Color> 
ambient 1.000000 1.000000 0.501961 1.000000
diffuse 1.000000 1.000000 0.501961 1.000000
specular 1.000000 1.000000 0.501961 1.000000
emission 0.000000 0.000000 0.000000 0.000000
shininess 50.000000
end_<Color>
diffuse_scattering_model none
fields_diffusively_scattered 0.400000
cross_polarized_power 0.400000
directive_alpha 4
directive_beta 4
directive_lambda 0.750000
subdivide_facets yes
reflection_coefficient_options do_not_use
nLayers 1
begin_<DielectricLayer> 
conductivity 3.640e+001
permittivity 7.975300
roughness 0.000e+000
thickness 0.000e+000
end_<DielectricLayer>
end_<Material>
begin_<Material> ITU Glass 60 GHz
Material 1
LayeredDielectric
begin_<Color> 
ambient 0.039216 0.662745 0.960784 1.000000
diffuse 0.039216 0.662745 0.960784 1.000000
specular 0.039216 0.662745 0.960784 1.000000
emission 0.000000 0.000000 0.000000 0.000000
shininess 50.000000
end_<Color>
diffuse_scattering_model none
fields_diffusively_scattered 0.000000
cross_polarized_power 0.400000
directive_alpha 4
directive_beta 4
directive_lambda 0.750000
subdivide_facets yes
reflection_coefficient_options do_not_use
nLayers 1
begin_<DielectricLayer> 
conductivity 5.674e-001
permittivity 6.270000
roughness 0.000e+000
thickness 3.000e-003
end_<DielectricLayer>
end_<Material>
begin_<Material> Metal Car
Material 2
PEC
thickness 0.000e+000
begin_<Color> 
ambient 0.576471 0.000000 0.000000 1.000000
diffuse 0.576471 0.000000 0.000000 1.000000
specular 0.576471 0.000000 0.000000 1.000000
emission 0.000000 0.000000 0.000000 0.000000
shininess 50.000000
end_<Color>
diffuse_scattering_model none
fields_diffusively_scattered 0.400000
cross_polarized_power 0.400000
directive_alpha 4
directive_beta 4
directive_lambda 0.750000
subdivide_facets yes
reflection_coefficient_options do_not_use
roughness 0.000e+000
end_<Material>
begin_<Material> Metal Bus
Material 3
PEC
thickness 0.000e+000
begin_<Color> 
ambient 1.000000 1.000000 0.000000 1.000000
diffuse 1.000000 1.000000 0.000000 1.000000
specular 1.000000 1.000000 0.000000 1.000000
emission 0.000000 0.000000 0.000000 0.000000
shininess 50.000000
end_<Color>
diffuse_scattering_model none
fields_diffusively_scattered 0.400000
cross_polarized_power 0.400000
directive_alpha 4
directive_beta 4
directive_lambda 0.750000
subdivide_facets yes
reflection_coefficient_options do_not_use
roughness 0.000e+000
end_<Material>
begin_<Material> Metal Truck
Material 4
PEC
thickness 0.000e+000
begin_<Color> 
ambient 0.000000 1.000000 0.000000 1.000000
diffuse 0.000000 1.000000 0.000000 1.000000
specular 0.000000 1.000000 0.000000 1.000000
emission 0.000000 0.000000 0.000000 0.000000
shininess 50.000000
end_<Color>
diffuse_scattering_model none
fields_diffusively_scattered 0.400000
cross_polarized_power 0.400000
directive_alpha 4
directive_beta 4
directive_lambda 0.750000
subdivide_facets yes
reflection_coefficient_options do_not_use
roughness 0.000e+000
end_<Material>
begin_<Material> Metal Drone
Material 5
PEC
thickness 0.000e+000
begin_<Color> 
ambient 0.000000 0.576471 0.000000 1.000000
diffuse 0.000000 0.576471 0.000000 1.000000
specular 0.000000 0.576471 0.000000 1.000000
emission 0.000000 0.000000 0.000000 0.000000
shininess 50.000000
end_<Color>
diffuse_scattering_model none
fields_diffusively_scattered 0.400000
cross_polarized_power 0.400000
directive_alpha 4
directive_beta 4
directive_lambda 0.750000
subdivide_facets yes
reflection_coefficient_options do_not_use
roughness 0.000e+000
end_<Material>
''')
        _v = VFFSL(SL, "a", True)  # '$a' on line 31, col 1
        if _v is not None:
            write(_filter(_v, rawExpr='$a'))  # from line 31, col 1.
        write('''
begin_<ControlVectors>
CVsVisible no
Stippled yes
CVsThickness 3
CVxLength 10.0000000000
CVyLength 10.0000000000
CVzLength 10.0000000000
CVsXaxis 1.0000000000 0.0000000000 0.0000000000
CVsZaxis 0.0000000000 0.0000000000 1.0000000000
end_<ControlVectors>
end_<object>
''')

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""