#!/usr/bin/env python
##################################################
## 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
##################################################
## 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.0rc8'
__CHEETAH_versionTuple__ = (2, 0, 0, 'candidate', 8)
__CHEETAH_genTime__ = 1189741981.14429
__CHEETAH_genTimestamp__ = 'Thu Sep 13 23:53:01 2007'
__CHEETAH_src__ = 'PSInterviewDetailsView.tmpl'
__CHEETAH_srcLastModified__ = 'Wed Aug 22 23:06:30 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 PSInterviewDetailsView(Template):
##################################################
## CHEETAH GENERATED METHODS
def __init__(self, *args, **KWs):
Template.__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 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('''<h1>Interview: ''')
_v = VFFSL(SL,"iw_name",True) # '$iw_name' on line 2, col 16
if _v is not None: write(_filter(_v, rawExpr='$iw_name')) # from line 2, col 16.
write('''</h1>\r
<div id="error_div" class="errmsg">''')
_v = VFFSL(SL,"err_msg",True) # '$err_msg' on line 3, col 36
if _v is not None: write(_filter(_v, rawExpr='$err_msg')) # from line 3, col 36.
write('''</div>\r
<div id="status_div" class="statmsg">''')
_v = VFFSL(SL,"status_msg",True) # '$status_msg' on line 4, col 38
if _v is not None: write(_filter(_v, rawExpr='$status_msg')) # from line 4, col 38.
write('''</div>\r
<input type="hidden" name="top_status" id="top_status" value="ready"/>\r
<p/>\r
\r
<input type="hidden" name="iname" id="iw_iname" value="''')
_v = VFFSL(SL,"iw_name",True) # '$iw_name' on line 8, col 56
if _v is not None: write(_filter(_v, rawExpr='$iw_name')) # from line 8, col 56.
write('''"/>\r
<h2><a href="javascript:void do_view_interview_pc(\'iw_iname\')">[Pre-Conditions]</a></h2>\r
\r
<h2>Pages for the Interview</h2>\r
\r
<p>\r
The Interview \'''')
_v = VFFSL(SL,"iw_name",True) # '$iw_name' on line 14, col 16
if _v is not None: write(_filter(_v, rawExpr='$iw_name')) # from line 14, col 16.
write('''\' has the following Pages:\r
</p>\r
\r
<table border="0">\r
<tr>\r
<td>\r
<div id="iw_page_table_div" class="datatable">\r
<table>\r
<thead>\r
<tr>\r
<th>Order</th>\r
<th>Page Name</th>\r
</tr>\r
</thead>\r
<tbody>\r
<tr><td/><td/></tr>\r
''')
for row in VFFSL(SL,"pages_result",True): # generated from line 30, col 25
write(''' <tr>\r
<td class="question_order_td">''')
_v = VFN(VFFSL(SL,"row",True)["?order"],"get_int",False)() # '$row["?order"].get_int()' on line 32, col 59
if _v is not None: write(_filter(_v, rawExpr='$row["?order"].get_int()')) # from line 32, col 59.
write('''</td>\r
<td class="question_name_td">''')
_v = VFN(VFFSL(SL,"row",True)["?page_name"],"get_string",False)() # '$row["?page_name"].get_string()' on line 33, col 58
if _v is not None: write(_filter(_v, rawExpr='$row["?page_name"].get_string()')) # from line 33, col 58.
write('''</td>\r
</tr>\r
''')
write(''' </tbody>\r
</table>\r
</div>\r
</td>\r
<td>\r
<input class="dt_button" id="ed_button" type="submit" value="View Details" disabled="y" onclick="do_view_page_details(\'rm_pname\')"/>\r
<input type="hidden" name="pname" id="rm_pname" value=""/>\r
<input type="hidden" name="iname_index" id="rm_iname" value="''')
_v = VFFSL(SL,"iw_index",True) # '$iw_index' on line 43, col 74
if _v is not None: write(_filter(_v, rawExpr='$iw_index')) # from line 43, col 74.
write('''"/>\r
<input class="dt_button" id="opu_button" type="button" value="Move Up" disabled="y" onclick="get_order_page(\'order_up\')"/>\r
<input class="dt_button" id="opd_button" type="button" value="Move Down" disabled="y" onclick="get_order_page(\'order_down\')"/>\r
<input class="dt_button" id="rm_button" type="button" value="Remove Page" disabled="y" onclick="get_rmiw_page()"/>\r
</td>\r
</tr>\r
<tr>\r
<td colspan="2">\r
<!-- add Page auto-complete -->\r
<div class="add_autocomplete" id="add_page_div">\r
<table border="0">\r
<tr>\r
<td>\r
<label class="reqlabel" for="add_page_input">Add Page:</label>\r
</td>\r
<td>\r
<div class="autocomplete_div" id="ysearchautocomplete2">\r
<input class="text_input" id="add_page_input" onclick="enable_button(\'addiw_button\')">\r
<div class="ac_container_result" id="add_page_input_ac"></div>\r
</div>\r
</td>\r
<td>\r
<input type="hidden" name="iname_index_name" id="addiw_iname" value="''')
_v = VFFSL(SL,"iw_index",True) # '$iw_index' on line 65, col 98
if _v is not None: write(_filter(_v, rawExpr='$iw_index')) # from line 65, col 98.
write('''"/>\r
<input id="addiw_button" type="button" value="Add" disabled="y" onclick="get_addiw_page()"/>\r
</td>\r
</tr>\r
</table>\r
</div>\r
</td>\r
</tr>\r
</table>\r
\r
\r
<h3>Outcome Tag Categories (OTC) for the Interview</h3>\r
<p>\r
Outcome Tag Categories provide a simple way to infer an outcome once the Interview is completed.\r
The Tags that are member of the selected Tag Categories below will be displayed on the Interview completion\r
page. These Tags can be infered based on User Rules or can be answers to questions along the Interview.\r
The Interview \'''')
_v = VFFSL(SL,"iw_name",True) # '$iw_name' on line 81, col 16
if _v is not None: write(_filter(_v, rawExpr='$iw_name')) # from line 81, col 16.
write('''\' has the following Outcome Tag Categories:\r
</p>\r
\r
<table border="0">\r
<tr>\r
<td>\r
<div id="iw_otc_table_div" class="datatable">\r
<table>\r
<thead>\r
<tr>\r
<th>Tag Category Name</th>\r
</tr>\r
</thead>\r
<tbody>\r
<tr><td/></tr>\r
''')
for row in VFFSL(SL,"otc_result",True): # generated from line 96, col 25
write(''' <tr><td>''')
_v = VFN(VFFSL(SL,"row",True)["?name"],"get_string",False)() # '$row["?name"].get_string()' on line 97, col 37
if _v is not None: write(_filter(_v, rawExpr='$row["?name"].get_string()')) # from line 97, col 37.
write('''</td></tr>\r
''')
write(''' </tbody>\r
</table>\r
</div>\r
</td>\r
<td>\r
<input type="hidden" name="cname" id="otc_rm_cname" value=""/>\r
<input type="hidden" name="iname_index_name" id="otc_rm_iname" value="''')
_v = VFFSL(SL,"iw_index",True) # '$iw_index' on line 105, col 83
if _v is not None: write(_filter(_v, rawExpr='$iw_index')) # from line 105, col 83.
write('''"/>\r
<input class="dt_button" id="otc_rm_button" type="button" value="Remove OTC" disabled="y" onclick="get_otc_rm()"/>\r
</td>\r
</tr>\r
<tr>\r
<td colspan="2">\r
<!-- add OTC auto-complete -->\r
<div class="add_autocomplete" id="otc_add_div">\r
<table border="0">\r
<tr>\r
<td>\r
<label class="reqlabel" for="otc_add_input">Add OTC:</label>\r
</td>\r
<td>\r
<div class="autocomplete_div" id="otc_add_autocomplete_div">\r
<input class="text_input" id="otc_add_input" onclick="enable_button(\'otc_add_button\')">\r
<div class="ac_container_result" id="otc_add_input_ac"></div>\r
</div>\r
</td>\r
<td>\r
<input type="hidden" name="iname_index_name" id="otc_add_iname" value="''')
_v = VFFSL(SL,"iw_index",True) # '$iw_index' on line 125, col 100
if _v is not None: write(_filter(_v, rawExpr='$iw_index')) # from line 125, col 100.
write('''"/>\r
<input id="otc_add_button" type="button" value="Add" disabled="y" onclick="get_otc_add()"/>\r
</td>\r
</tr>\r
</table>\r
</div>\r
</td>\r
</tr>\r
</table>\r
\r
<input class="go_back_button" id="bk_button" type="submit" value="< Back to Interviews" onclick="do_view_all_interviews()"/>\r
''')
########################################
## 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_PSInterviewDetailsView= 'respond'
## END CLASS DEFINITION
if not hasattr(PSInterviewDetailsView, '_initCheetahAttributes'):
templateAPIClass = getattr(PSInterviewDetailsView, '_CHEETAH_templateClass', Template)
templateAPIClass._addCheetahPlumbingCodeToClass(PSInterviewDetailsView)
# 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=PSInterviewDetailsView()).run()