~ubuntu-branches/ubuntu/wily/prewikka/wily

« back to all changes in this revision

Viewing changes to prewikka/templates/MessageDetails.py

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2009-12-31 02:18:56 UTC
  • mfrom: (1.1.10 upstream) (8.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091231021856-fkctle2rfpw0z8ei
Tags: 0.9.17.1-1ubuntu1
Append --prefix=/usr to setup.py install to install all modules into
the right path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
import sys
9
9
import os
10
10
import os.path
11
 
import __builtin__
12
11
from os.path import getmtime, exists
13
12
import time
14
13
import types
 
14
import __builtin__
15
15
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
16
16
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
17
17
from Cheetah.Template import Template
18
 
from Cheetah.DummyTransaction import *
 
18
from Cheetah.DummyTransaction import DummyTransaction
19
19
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
20
20
from Cheetah.CacheRegion import CacheRegion
21
21
import Cheetah.Filters as Filters
24
24
 
25
25
##################################################
26
26
## MODULE CONSTANTS
 
27
try:
 
28
    True, False
 
29
except NameError:
 
30
    True, False = (1==1), (1==0)
27
31
VFFSL=valueFromFrameOrSearchList
28
32
VFSL=valueFromSearchList
29
33
VFN=valueForName
30
34
currentTime=time.time
31
 
__CHEETAH_version__ = '2.2.1'
32
 
__CHEETAH_versionTuple__ = (2, 2, 1, 'final', 0)
33
 
__CHEETAH_genTime__ = 1244715457.7935669
34
 
__CHEETAH_genTimestamp__ = 'Thu Jun 11 12:17:37 2009'
 
35
__CHEETAH_version__ = '2.0.1'
 
36
__CHEETAH_versionTuple__ = (2, 0, 1, 'final', 0)
 
37
__CHEETAH_genTime__ = 1252401818.293529
 
38
__CHEETAH_genTimestamp__ = 'Tue Sep  8 11:23:38 2009'
35
39
__CHEETAH_src__ = 'prewikka/templates/MessageDetails.tmpl'
36
40
__CHEETAH_srcLastModified__ = 'Tue May  5 16:55:59 2009'
37
 
__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
 
41
__CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine'
38
42
 
39
43
if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
40
44
    raise AssertionError(
53
57
 
54
58
    def __init__(self, *args, **KWs):
55
59
 
56
 
        super(MessageDetails, self).__init__(*args, **KWs)
 
60
        ClassicLayout.__init__(self, *args, **KWs)
57
61
        if not self._CHEETAH__instanceInitialized:
58
62
            cheetahKWArgs = {}
59
63
            allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
82
86
        ## START - generated method body
83
87
        
84
88
        display = ("block", "none")[VFFSL(SL,"node.hidden",True)]
85
 
        write(u'''<div class="message_details">
 
89
        write('''<div class="message_details">
86
90
\t<div class="message_details_title"><a href="#" onclick="javascript:toggleVisibility(\'section_''')
87
 
        _v = VFFSL(SL,"node.id",True) # u'$node.id' on line 7, col 95
88
 
        if _v is not None: write(_filter(_v, rawExpr=u'$node.id')) # from line 7, col 95.
89
 
        write(u'''\'); return false;">''')
90
 
        _v = VFFSL(SL,"node.name",True) # u'$node.name' on line 7, col 122
91
 
        if _v is not None: write(_filter(_v, rawExpr=u'$node.name')) # from line 7, col 122.
92
 
        write(u'''</a></div>
 
91
        _v = VFFSL(SL,"node.id",True) # '$node.id' on line 7, col 95
 
92
        if _v is not None: write(_filter(_v, rawExpr='$node.id')) # from line 7, col 95.
 
93
        write('''\'); return false;">''')
 
94
        _v = VFFSL(SL,"node.name",True) # '$node.name' on line 7, col 122
 
95
        if _v is not None: write(_filter(_v, rawExpr='$node.name')) # from line 7, col 122.
 
96
        write('''</a></div>
93
97
\t<div class="message_details_content" id="section_''')
94
 
        _v = VFFSL(SL,"node.id",True) # u'$node.id' on line 8, col 51
95
 
        if _v is not None: write(_filter(_v, rawExpr=u'$node.id')) # from line 8, col 51.
96
 
        write(u'''" style="display: ''')
97
 
        _v = VFFSL(SL,"display",True) # u'$display' on line 8, col 77
98
 
        if _v is not None: write(_filter(_v, rawExpr=u'$display')) # from line 8, col 77.
99
 
        write(u'''">
 
98
        _v = VFFSL(SL,"node.id",True) # '$node.id' on line 8, col 51
 
99
        if _v is not None: write(_filter(_v, rawExpr='$node.id')) # from line 8, col 51.
 
100
        write('''" style="display: ''')
 
101
        _v = VFFSL(SL,"display",True) # '$display' on line 8, col 77
 
102
        if _v is not None: write(_filter(_v, rawExpr='$display')) # from line 8, col 77.
 
103
        write('''">
100
104
''')
101
105
        for entry in VFFSL(SL,"node.entries",True): # generated from line 9, col 3
102
106
            if isinstance(VFFSL(SL,"entry.value",True), dict): # generated from line 10, col 4
103
 
                write(u'''\t\t\t\t''')
104
 
                _v = VFFSL(SL,"display_node",False)(VFFSL(SL,"entry.value",True)) # u'$display_node($entry.value)' on line 11, col 5
105
 
                if _v is not None: write(_filter(_v, rawExpr=u'$display_node($entry.value)')) # from line 11, col 5.
106
 
                write(u'''
 
107
                write('''\t\t\t\t''')
 
108
                _v = VFFSL(SL,"display_node",False)(VFFSL(SL,"entry.value",True)) # '$display_node($entry.value)' on line 11, col 5
 
109
                if _v is not None: write(_filter(_v, rawExpr='$display_node($entry.value)')) # from line 11, col 5.
 
110
                write('''
107
111
''')
108
112
            else: # generated from line 12, col 4
109
 
                write(u'''\t\t\t\t<div class="message_details_entry">
 
113
                write('''\t\t\t\t<div class="message_details_entry">
110
114
\t\t\t\t\t<div class="message_details_entry_name">''')
111
 
                _v = VFFSL(SL,"entry.name",True) # u'$entry.name' on line 14, col 46
112
 
                if _v is not None: write(_filter(_v, rawExpr=u'$entry.name')) # from line 14, col 46.
113
 
                write(u'''</div>
 
115
                _v = VFFSL(SL,"entry.name",True) # '$entry.name' on line 14, col 46
 
116
                if _v is not None: write(_filter(_v, rawExpr='$entry.name')) # from line 14, col 46.
 
117
                write('''</div>
114
118
\t\t\t\t\t<div class="message_details_entry_value">''')
115
 
                _v = VFFSL(SL,"entry.value",True) # u'$entry.value' on line 15, col 47
116
 
                if _v is not None: write(_filter(_v, rawExpr=u'$entry.value')) # from line 15, col 47.
117
 
                write(u'''</div>
 
119
                _v = VFFSL(SL,"entry.value",True) # '$entry.value' on line 15, col 47
 
120
                if _v is not None: write(_filter(_v, rawExpr='$entry.value')) # from line 15, col 47.
 
121
                write('''</div>
118
122
\t\t\t\t</div>
119
123
''')
120
 
        write(u'''\t</div>
 
124
        write('''\t</div>
121
125
</div>
122
126
''')
123
127
        
146
150
        ########################################
147
151
        ## START - generated method body
148
152
        
149
 
        write(u'''
 
153
        write('''
150
154
''')
151
 
        _v = VFFSL(SL,"display_node",False)(VFFSL(SL,"node",True)) # u'$display_node($node)' on line 23, col 1
152
 
        if _v is not None: write(_filter(_v, rawExpr=u'$display_node($node)')) # from line 23, col 1.
153
 
        write(u'''
 
155
        _v = VFFSL(SL,"display_node",False)(VFFSL(SL,"node",True)) # '$display_node($node)' on line 23, col 1
 
156
        if _v is not None: write(_filter(_v, rawExpr='$display_node($node)')) # from line 23, col 1.
 
157
        write('''
154
158
 
155
159
''')
156
160
        
179
183
        ########################################
180
184
        ## START - generated method body
181
185
        
182
 
        write(u'''
 
186
        write('''
183
187
''')
184
188
        self.main_content(trans=trans)
185
189