#!/usr/bin/env python
# -*- coding: UTF-8 -*-



##################################################
## DEPENDENCIES
import sys
import os
import os.path
from os.path import getmtime, exists
import time
import types
import __builtin__
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
from Cheetah.Template import Template
from Cheetah.DummyTransaction import DummyTransaction
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
from Cheetah.CacheRegion import CacheRegion
import Cheetah.Filters as Filters
import Cheetah.ErrorCatchers as ErrorCatchers
from MessagesTemplate import MessagesTemplate
import math
import time

##################################################
## MODULE CONSTANTS
try:
    True, False
except NameError:
    True, False = (1==1), (1==0)
VFFSL=valueFromFrameOrSearchList
VFSL=valueFromSearchList
VFN=valueForName
currentTime=time.time
__CHEETAH_version__ = '2.0.1'
__CHEETAH_versionTuple__ = (2, 0, 1, 'final', 0)
__CHEETAH_genTime__ = 1225031607.839808
__CHEETAH_genTimestamp__ = 'Sun Oct 26 14:33:27 2008'
__CHEETAH_src__ = 'nav/web/templates/MessagesNewTemplate.tmpl'
__CHEETAH_srcLastModified__ = 'Fri Jan 19 14:16:23 2007'
__CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine'

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

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

class MessagesNewTemplate(MessagesTemplate):

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


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

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

    def tabcontent(self, **KWS):



        ## CHEETAH: generated from #block tabcontent at line 30, 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('''
''')
        #  Print form
        write('''
<form action="" method="post">
''')
        edit_messageid = VFFSL(SL,"getVar",False)('edit_messageid', False)
        if VFFSL(SL,"edit_messageid",True): # generated from line 36, col 1
            write('''<input type="hidden" name="edit_messageid" value="''')
            _v = VFFSL(SL,"edit_messageid",True) # '$edit_messageid' on line 37, col 51
            if _v is not None: write(_filter(_v, rawExpr='$edit_messageid')) # from line 37, col 51.
            write('''" />
''')
        write('''
<table class="vertitable">
    <tr>
        <th>Title *</th>
        <td><input type="text" name="title" value="''')
        _v = VFFSL(SL,"getVar",False)('formtitle', '') # "$getVar('formtitle', '')" on line 43, col 52
        if _v is not None: write(_filter(_v, rawExpr="$getVar('formtitle', '')")) # from line 43, col 52.
        write('''" size="72" /></td>
    </tr>
    <tr>
        <th>Description *</th>
        <td><textarea name="description" cols="72" rows="5">''')
        _v = VFFSL(SL,"getVar",False)('description', '') # "$getVar('description', '')" on line 47, col 61
        if _v is not None: write(_filter(_v, rawExpr="$getVar('description', '')")) # from line 47, col 61.
        write('''</textarea></td>
    </tr>
    <tr>
        <th>Technical description</th>
        <td><textarea name="tech_description" cols="72" rows="5">''')
        _v = VFFSL(SL,"getVar",False)('tech_description', '') # "$getVar('tech_description', '')" on line 51, col 66
        if _v is not None: write(_filter(_v, rawExpr="$getVar('tech_description', '')")) # from line 51, col 66.
        write('''</textarea></td>
    </tr>
    <tr>
        <th>Publish from</th>
        <td>
            <select name="start_year">
''')
        current_year = int(time.strftime('%Y'))
        selected_year = VFFSL(SL,"getVar",False)('start_year', VFFSL(SL,"current_year",True))
        for year in xrange(VFFSL(SL,"current_year",True) - 1, VFFSL(SL,"current_year",True) + 5): # generated from line 59, col 1
            if VFFSL(SL,"year",True) == VFFSL(SL,"selected_year",True): # generated from line 60, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"year",True) # '$year' on line 61, col 32
                if _v is not None: write(_filter(_v, rawExpr='$year')) # from line 61, col 32.
                write('''" selected="selected">''')
                _v = VFFSL(SL,"year",True) # '$year' on line 61, col 59
                if _v is not None: write(_filter(_v, rawExpr='$year')) # from line 61, col 59.
                write('''</option>
''')
            else: # generated from line 62, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"year",True) # '$year' on line 63, col 32
                if _v is not None: write(_filter(_v, rawExpr='$year')) # from line 63, col 32.
                write('''">''')
                _v = VFFSL(SL,"year",True) # '$year' on line 63, col 39
                if _v is not None: write(_filter(_v, rawExpr='$year')) # from line 63, col 39.
                write('''</option>
''')
        write('''            </select>
            <select name="start_month">
''')
        current_month = int(time.strftime('%m'))
        selected_month = VFFSL(SL,"getVar",False)('start_month', VFFSL(SL,"current_month",True))
        for month in xrange(1, 1 + 12): # generated from line 70, col 1
            if VFFSL(SL,"month",True) == VFFSL(SL,"selected_month",True): # generated from line 71, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"month",True) # '$month' on line 72, col 32
                if _v is not None: write(_filter(_v, rawExpr='$month')) # from line 72, col 32.
                write('''" selected="selected">''')
                _v = VFFSL(SL,"month",True) # '$month' on line 72, col 60
                if _v is not None: write(_filter(_v, rawExpr='$month')) # from line 72, col 60.
                write('''</option>
''')
            else: # generated from line 73, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"month",True) # '$month' on line 74, col 32
                if _v is not None: write(_filter(_v, rawExpr='$month')) # from line 74, col 32.
                write('''">''')
                _v = VFFSL(SL,"month",True) # '$month' on line 74, col 40
                if _v is not None: write(_filter(_v, rawExpr='$month')) # from line 74, col 40.
                write('''</option>
''')
        write('''            </select>
            <select name="start_day">
''')
        current_day = int(time.strftime('%d'))
        selected_day = VFFSL(SL,"getVar",False)('start_day', VFFSL(SL,"current_day",True))
        for day in xrange(1, 1 + 31): # generated from line 81, col 1
            if VFFSL(SL,"day",True) == VFFSL(SL,"selected_day",True): # generated from line 82, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"day",True) # '$day' on line 83, col 32
                if _v is not None: write(_filter(_v, rawExpr='$day')) # from line 83, col 32.
                write('''" selected="selected">''')
                _v = VFFSL(SL,"day",True) # '$day' on line 83, col 58
                if _v is not None: write(_filter(_v, rawExpr='$day')) # from line 83, col 58.
                write('''</option>
''')
            else: # generated from line 84, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"day",True) # '$day' on line 85, col 32
                if _v is not None: write(_filter(_v, rawExpr='$day')) # from line 85, col 32.
                write('''">''')
                _v = VFFSL(SL,"day",True) # '$day' on line 85, col 38
                if _v is not None: write(_filter(_v, rawExpr='$day')) # from line 85, col 38.
                write('''</option>
''')
        write('''            </select>
            at
            <select name="start_hour">
''')
        current_hour = int(time.strftime('%H'))
        selected_hour = VFFSL(SL,"getVar",False)('start_hour', VFFSL(SL,"current_hour",True))
        for hour in xrange(0, 24): # generated from line 93, col 1
            if VFFSL(SL,"hour",True) == VFFSL(SL,"selected_hour",True): # generated from line 94, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"hour",True) # '$hour' on line 95, col 32
                if _v is not None: write(_filter(_v, rawExpr='$hour')) # from line 95, col 32.
                write('''" selected="selected">''')
                _v = VFFSL(SL,"hour",True) # '$hour' on line 95, col 59
                if _v is not None: write(_filter(_v, rawExpr='$hour')) # from line 95, col 59.
                write('''</option>
''')
            else: # generated from line 96, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"hour",True) # '$hour' on line 97, col 32
                if _v is not None: write(_filter(_v, rawExpr='$hour')) # from line 97, col 32.
                write('''">''')
                _v = VFFSL(SL,"hour",True) # '$hour' on line 97, col 39
                if _v is not None: write(_filter(_v, rawExpr='$hour')) # from line 97, col 39.
                write('''</option>
''')
        write('''            </select>
            <select name="start_min">
''')
        current_min = int(math.floor(int(time.strftime('%M')) / 5) * 5)
        selected_min = VFFSL(SL,"getVar",False)('start_min', VFFSL(SL,"current_min",True))
        selected_min = int(math.floor(VFFSL(SL,"selected_min",True) / 5) * 5)
        for min in xrange(0, 60, 5): # generated from line 105, col 1
            if VFFSL(SL,"min",True) == VFFSL(SL,"selected_min",True): # generated from line 106, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"min",True) # '$min' on line 107, col 32
                if _v is not None: write(_filter(_v, rawExpr='$min')) # from line 107, col 32.
                write('''" selected="selected">''')
                _v = VFFSL(SL,"min",True) # '$min' on line 107, col 58
                if _v is not None: write(_filter(_v, rawExpr='$min')) # from line 107, col 58.
                write('''</option>
''')
            else: # generated from line 108, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"min",True) # '$min' on line 109, col 32
                if _v is not None: write(_filter(_v, rawExpr='$min')) # from line 109, col 32.
                write('''">''')
                _v = VFFSL(SL,"min",True) # '$min' on line 109, col 38
                if _v is not None: write(_filter(_v, rawExpr='$min')) # from line 109, col 38.
                write('''</option>
''')
        write('''            </select>
        </td>
    </tr>
''')
        #  Default to one week into the future
        totime = time.localtime(int(time.time()) + 7*24*60*60)
        write('''    <tr>
        <th>Publish to</th>
        <td>
            <select name="end_year">
''')
        current_year = int(time.strftime('%Y', VFFSL(SL,"totime",True)))
        selected_year = VFFSL(SL,"getVar",False)('end_year', VFFSL(SL,"current_year",True))
        for year in xrange(VFFSL(SL,"current_year",True) - 1, VFFSL(SL,"current_year",True) + 5): # generated from line 123, col 1
            if VFFSL(SL,"year",True) == VFFSL(SL,"selected_year",True): # generated from line 124, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"year",True) # '$year' on line 125, col 32
                if _v is not None: write(_filter(_v, rawExpr='$year')) # from line 125, col 32.
                write('''" selected="selected">''')
                _v = VFFSL(SL,"year",True) # '$year' on line 125, col 59
                if _v is not None: write(_filter(_v, rawExpr='$year')) # from line 125, col 59.
                write('''</option>
''')
            else: # generated from line 126, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"year",True) # '$year' on line 127, col 32
                if _v is not None: write(_filter(_v, rawExpr='$year')) # from line 127, col 32.
                write('''">''')
                _v = VFFSL(SL,"year",True) # '$year' on line 127, col 39
                if _v is not None: write(_filter(_v, rawExpr='$year')) # from line 127, col 39.
                write('''</option>
''')
        write('''            </select>
            <select name="end_month">
''')
        current_month = int(time.strftime('%m', VFFSL(SL,"totime",True)))
        selected_month = VFFSL(SL,"getVar",False)('end_month', VFFSL(SL,"current_month",True))
        for month in xrange(1, 1 + 12): # generated from line 134, col 1
            if VFFSL(SL,"month",True) == VFFSL(SL,"selected_month",True): # generated from line 135, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"month",True) # '$month' on line 136, col 32
                if _v is not None: write(_filter(_v, rawExpr='$month')) # from line 136, col 32.
                write('''" selected="selected">''')
                _v = VFFSL(SL,"month",True) # '$month' on line 136, col 60
                if _v is not None: write(_filter(_v, rawExpr='$month')) # from line 136, col 60.
                write('''</option>
''')
            else: # generated from line 137, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"month",True) # '$month' on line 138, col 32
                if _v is not None: write(_filter(_v, rawExpr='$month')) # from line 138, col 32.
                write('''">''')
                _v = VFFSL(SL,"month",True) # '$month' on line 138, col 40
                if _v is not None: write(_filter(_v, rawExpr='$month')) # from line 138, col 40.
                write('''</option>
''')
        write('''            </select>
            <select name="end_day">
''')
        current_day = int(time.strftime('%d', VFFSL(SL,"totime",True)))
        selected_day = VFFSL(SL,"getVar",False)('end_day', VFFSL(SL,"current_day",True))
        for day in xrange(1, 1 + 31): # generated from line 145, col 1
            if VFFSL(SL,"day",True) == VFFSL(SL,"selected_day",True): # generated from line 146, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"day",True) # '$day' on line 147, col 32
                if _v is not None: write(_filter(_v, rawExpr='$day')) # from line 147, col 32.
                write('''" selected="selected">''')
                _v = VFFSL(SL,"day",True) # '$day' on line 147, col 58
                if _v is not None: write(_filter(_v, rawExpr='$day')) # from line 147, col 58.
                write('''</option>
''')
            else: # generated from line 148, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"day",True) # '$day' on line 149, col 32
                if _v is not None: write(_filter(_v, rawExpr='$day')) # from line 149, col 32.
                write('''">''')
                _v = VFFSL(SL,"day",True) # '$day' on line 149, col 38
                if _v is not None: write(_filter(_v, rawExpr='$day')) # from line 149, col 38.
                write('''</option>
''')
        write('''            </select>
            at
            <select name="end_hour">
''')
        current_hour = int(time.strftime('%H', VFFSL(SL,"totime",True)))
        selected_hour = VFFSL(SL,"getVar",False)('end_hour', VFFSL(SL,"current_hour",True))
        for hour in xrange(0, 24): # generated from line 157, col 1
            if VFFSL(SL,"hour",True) == VFFSL(SL,"selected_hour",True): # generated from line 158, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"hour",True) # '$hour' on line 159, col 32
                if _v is not None: write(_filter(_v, rawExpr='$hour')) # from line 159, col 32.
                write('''" selected="selected">''')
                _v = VFFSL(SL,"hour",True) # '$hour' on line 159, col 59
                if _v is not None: write(_filter(_v, rawExpr='$hour')) # from line 159, col 59.
                write('''</option>
''')
            else: # generated from line 160, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"hour",True) # '$hour' on line 161, col 32
                if _v is not None: write(_filter(_v, rawExpr='$hour')) # from line 161, col 32.
                write('''">''')
                _v = VFFSL(SL,"hour",True) # '$hour' on line 161, col 39
                if _v is not None: write(_filter(_v, rawExpr='$hour')) # from line 161, col 39.
                write('''</option>
''')
        write('''            </select>
            <select name="end_min">
''')
        current_min = int(math.floor(int(time.strftime('%M', VFFSL(SL,"totime",True))) / 5) * 5)
        selected_min = VFFSL(SL,"getVar",False)('end_min', VFFSL(SL,"current_min",True))
        selected_min = int(math.floor(VFFSL(SL,"selected_min",True) / 5) * 5)
        for min in xrange(0, 60, 5): # generated from line 169, col 1
            if VFFSL(SL,"min",True) == VFFSL(SL,"selected_min",True): # generated from line 170, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"min",True) # '$min' on line 171, col 32
                if _v is not None: write(_filter(_v, rawExpr='$min')) # from line 171, col 32.
                write('''" selected="selected">''')
                _v = VFFSL(SL,"min",True) # '$min' on line 171, col 58
                if _v is not None: write(_filter(_v, rawExpr='$min')) # from line 171, col 58.
                write('''</option>
''')
            else: # generated from line 172, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"min",True) # '$min' on line 173, col 32
                if _v is not None: write(_filter(_v, rawExpr='$min')) # from line 173, col 32.
                write('''">''')
                _v = VFFSL(SL,"min",True) # '$min' on line 173, col 38
                if _v is not None: write(_filter(_v, rawExpr='$min')) # from line 173, col 38.
                write('''</option>
''')
        write('''            </select>
            (default: one week)
        </td>
    </tr>
    <tr>
        <th style="white-space: normal;">Select 0..N maintenance tasks for this message<br />
            (select multiple with CTRL)</th>
        <td>
''')
        maint_tasks = VFFSL(SL,"getVar",False)('maint_tasks', [])
        write('''            <select name="maint_tasks" size="5" multiple="multiple">
''')
        if VFFSL(SL,"tasks",True) and VFFSL(SL,"maint_tasks",True): # generated from line 186, col 1
            write('''                <option value="none">(none)</option>
''')
        else: # generated from line 188, col 1
            write('''                <option value="none" selected="selected">(none)</option>
''')
        if type(VFFSL(SL,"tasks",True)) is not list: # generated from line 191, col 1
            tasks = []
        for task in VFFSL(SL,"tasks",True): # generated from line 194, col 1
            if len(VFFSL(SL,"task.description",True)) > 50: # generated from line 195, col 5
                desc = VFN(VFFSL(SL,"task",True),"description",True)[:50] + '...'
            else: # generated from line 197, col 5
                desc = VFFSL(SL,"task.description",True)
            date = VFN(VFFSL(SL,"task.maint_start",True),"strftime",False)('%Y-%m-%d')
            if VFN(VFFSL(SL,"maint_tasks",True),"count",False)(str(VFFSL(SL,"task.maint_taskid",True))): # generated from line 201, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"task.maint_taskid",True) # '$task.maint_taskid' on line 202, col 32
                if _v is not None: write(_filter(_v, rawExpr='$task.maint_taskid')) # from line 202, col 32.
                write('''" selected="selected">''')
                _v = VFFSL(SL,"date",True) # '$date' on line 202, col 72
                if _v is not None: write(_filter(_v, rawExpr='$date')) # from line 202, col 72.
                write(''': ''')
                _v = VFFSL(SL,"desc",True) # '$desc' on line 202, col 79
                if _v is not None: write(_filter(_v, rawExpr='$desc')) # from line 202, col 79.
                write('''</option>
''')
            else: # generated from line 203, col 5
                write('''                <option value="''')
                _v = VFFSL(SL,"task.maint_taskid",True) # '$task.maint_taskid' on line 204, col 32
                if _v is not None: write(_filter(_v, rawExpr='$task.maint_taskid')) # from line 204, col 32.
                write('''">''')
                _v = VFFSL(SL,"date",True) # '$date' on line 204, col 52
                if _v is not None: write(_filter(_v, rawExpr='$date')) # from line 204, col 52.
                write(''': ''')
                _v = VFFSL(SL,"desc",True) # '$desc' on line 204, col 59
                if _v is not None: write(_filter(_v, rawExpr='$desc')) # from line 204, col 59.
                write('''</option>
''')
        write('''            </select>
        </td>
    </tr>
''')
        replaces_messageid = VFFSL(SL,"getVar",False)('replaces_messageid', False)
        if VFFSL(SL,"replaces_messageid",True): # generated from line 211, col 1
            write('''    <tr>
        <th>Replaces message</th>
        <td>
            <input type="hidden" name="replaces_messageid" value="''')
            _v = VFFSL(SL,"replaces_messageid",True) # '$replaces_messageid' on line 215, col 67
            if _v is not None: write(_filter(_v, rawExpr='$replaces_messageid')) # from line 215, col 67.
            write('''" />
            <a href="view?id=''')
            _v = VFFSL(SL,"replaces_messageid",True) # '$replaces_messageid' on line 216, col 30
            if _v is not None: write(_filter(_v, rawExpr='$replaces_messageid')) # from line 216, col 30.
            write('''">''')
            _v = VFFSL(SL,"replaces_message.title",True) # '$replaces_message.title' on line 216, col 51
            if _v is not None: write(_filter(_v, rawExpr='$replaces_message.title')) # from line 216, col 51.
            write('''</a>
            from ''')
            _v = VFN(VFFSL(SL,"replaces_message.publish_start",True),"strftime",False)('%Y-%m-%d %H:%M') # "$replaces_message.publish_start.strftime('%Y-%m-%d %H:%M')" on line 217, col 18
            if _v is not None: write(_filter(_v, rawExpr="$replaces_message.publish_start.strftime('%Y-%m-%d %H:%M')")) # from line 217, col 18.
            write('''
            by ''')
            _v = VFFSL(SL,"replaces_message.author",True) # '$replaces_message.author' on line 218, col 16
            if _v is not None: write(_filter(_v, rawExpr='$replaces_message.author')) # from line 218, col 16.
            write('''
        </td>
    </tr>
''')
        write('''    <tr>
        <th></th>
        <td><input type="submit" name="submit" value="''')
        _v = VFFSL(SL,"submittext",True) # '$submittext' on line 224, col 55
        if _v is not None: write(_filter(_v, rawExpr='$submittext')) # from line 224, col 55.
        write('''" /></td>
    </tr>
</table>

</form>

''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        

    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
        
        #  $Id:$
        # 
        #  Copyright 2006 UNINETT AS
        # 
        #  This file is part of Network Administration Visualized (NAV)
        # 
        #  NAV is free software; you can redistribute it and/or modify
        #  it under the terms of the GNU General Public License as published by
        #  the Free Software Foundation; either version 2 of the License, or
        #  (at your option) any later version.
        # 
        #  NAV 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 General Public License for more details.
        # 
        #  You should have received a copy of the GNU General Public License
        #  along with NAV; if not, write to the Free Software
        #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
        # 
        # 
        #  Author: Stein Magnus Jodal <stein.magnus.jodal@uninett.no>
        # 
        write('''

''')
        self.tabcontent(trans=trans)
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        
    ##################################################
    ## CHEETAH GENERATED ATTRIBUTES


    _CHEETAH__instanceInitialized = False

    _CHEETAH_version = __CHEETAH_version__

    _CHEETAH_versionTuple = __CHEETAH_versionTuple__

    _CHEETAH_genTime = __CHEETAH_genTime__

    _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__

    _CHEETAH_src = __CHEETAH_src__

    _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__

    _mainCheetahMethod_for_MessagesNewTemplate= 'writeBody'

## END CLASS DEFINITION

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


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

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


