## ------------------------------------------------------------------------ ## File: templates/layout.vm ## ## Description: This is the default layout template. ## It handles the title, stylesheet, refresh, ## body colors, navigation, messages, log, and debug ## features. ## ## Input: $COLORS{}, ## $screen_placeholder (the actual HTML page body content), ## Optional: $title, $author, $keywords, $description ## $refresh, $stylesheet, ## $javascriptSrc[], $javascript, ## $frameset, $backgroundImage, $bodyAttributes, ## $omitHeader (inserting title as page header), ## $navigation_top, $navigation_bottom (with hyperlinks), ## $messages[], $errors[], $warnings[], $log[], ## $debug flag and $context data ## ## Output: A HTML page. ## ## Date: 2001-03-08 ## Author: Christoph.Reck@dlr.de ## Copyright: (c) 2001 Deutsches Zentrum fuer Luft und Raumfahrt ## ------------------------------------------------------------------------ ## ## ------------------------------------------------------------------------ ## HEADER ## ------------------------------------------------------------------------ $!title #if( $author ) #end #if( $keywords ) #end #if( $description ) #end ## ------------------------------------------------------------------------ ## REFRESH ## ------------------------------------------------------------------------ #if( $refresh ) #end ## ------------------------------------------------------------------------ ## STYLESHEET ## ------------------------------------------------------------------------ #if( $stylesheet ) #end ## ------------------------------------------------------------------------ ## JAVASCRIPT ## ------------------------------------------------------------------------ #if( $javascriptSrc )#foreach( $scriptURL in $javascriptSrc )#**# #end#end #if( $javascript ) #end ## ## ------------------------------------------------------------------------ ## FRAMESET ## ------------------------------------------------------------------------ #if( $frameset ) $frameset #end ## ## ------------------------------------------------------------------------ ## BODY ## ------------------------------------------------------------------------ ## ------------------------------------------------------------------------ ## NAVIGATION ## ------------------------------------------------------------------------ #if( $navigation_top ) #end ## ------------------------------------------------------------------------ ## TITLE ## ------------------------------------------------------------------------ #if( !$omitHeader ) #end ## ------------------------------------------------------------------------ ## MESSAGES ## ------------------------------------------------------------------------ #if( ($messages.size() > 0) || ($warnings.size() > 0) || ($errors.size() > 0) ) #end ## ------------------------------------------------------------------------ ## CONTENT ## ------------------------------------------------------------------------ ## ## ------------------------------------------------------------------------ ## NAVIGATION ## ------------------------------------------------------------------------ #if( $navigation_bot ) #end
#view( " " $navigation_top )#**#

$!title

#* *##if( $messages.size() > 0 ) #* *##end #* *##if( $warnings.size() > 0 ) #* *##end #* *##if( $errors.size() > 0 ) #* *##end
#* *##foreach( $l_line in $messages ) #if( $velocityCount != 1 )
#end  $l_line #* *##end
#* *##foreach( $l_line in $warnings ) #if( $velocityCount != 1 )
#end  WARNING: $l_line #* *##end
#* *##foreach( $l_line in $errors ) #if( $velocityCount != 1 )
#end  ERROR: $l_line #* *##end
#indent( " " $screen_placeholder )#**#
#view( " " $navigation_bot )#**#
## ------------------------------------------------------------------------ ## LOG ## ------------------------------------------------------------------------ ### allow toggling log display #if( !$hideLog && $log && ($log.size() != 0) ) #**#
Log:
#**##foreach( $l_line in $log ) #* *##set( $l_line = $Context.encodeMarkup($l_line) ) #* *#$Regexp.substitute('s/ /  /g', $l_line)
#**##end #**#
#end ## ## ------------------------------------------------------------------------ ## DEBUG DUMP ## ------------------------------------------------------------------------ #if( $debug ) #parse( "dump.vm" ) #end ## ## ------------------------------------------------------------------------ ## END ## ------------------------------------------------------------------------