#url ( $url )
##
#parse('/_templates/includes/inc_page_setup.vm')

## 
#set( $name = $req.getParameter('name') )
#set( $document = $educatorInfobitManager.getInfobit( $name ) )
#set( $docTitle = "#infobit($document.actualVersion.content.links.title)" )

## 
#if( $req.getParameter('position') )
    #set ( $position = $req.getParameter('position') )
#else
    #set ( $position = '0' )
#end
#if ($req.getParameter('loadPage'))
    #set ( $position = $navigationProvider.locateNavEntry($name, $req.getParameter('loadPage')) )
#end

## 
#set ( $currNav = $navigationProvider.getCurrentEntry($name, $position) )
#set ( $pageTitle = $currNav.getTitle() )
#if( $navigationProvider.getParent($name, $position) )
    #set ( $parent = $navigationProvider.getParent($name, $position) )
    #set ( $chapterTitle = $parent.getTitle() )
#end

## 
#set ( $infobit = $educatorInfobitManager.getInfobit( $currNav.getSrc() ) )

## 
#set ( $subchapters = $document.actualVersion.content.links.subchapters )

## 
#if( $infobit.attributeMap.get('language') && $infobit.attributeMap.get('language').trim().length() > 0 )
    #set ( $language = $infobit.attributeMap.get('language') )
#end
#if( $infobit.attributeMap.get('description') && $infobit.attributeMap.get('description').trim().length() > 0 )
    #set ( $description = $infobit.attributeMap.get('description') )
#end
#if( $document.attributeMap.get('author') && $document.attributeMap.get('author').trim().length() > 0 )
    #set ( $author = $document.attributeMap.get('author') )
#end
#if( $document.attributeMap.get('creationDate') )
    #set ( $_date = $document.attributeMap.get('creationDate') )
#end

## 
#set( $favPage = "/unitracc/information/documentations/detail/detail.vm?name=${name}" )

## 
$infobitLogManager.log($!name, $!docTitle, 'Kurs-Documentation', $req, $identity )

    #i18('topmenue.menue.text.documentations'): $!docTitle

#if( $infobit.attributeMap.get('source') && $infobit.attributeMap.get('source').trim().length() > 0 )

		Die folgende Baustellendokumentation wird Ihnen präsentiert mit freundlicher
    	Unterstützung unseres Partners:
	
    #partnerlogo($infobit)

#end

#parse("/_templates/includes/inc_titlebar.vm")

#if( $subchapters.actualVersion.content.elements && $subchapters.actualVersion.content.elements.size() > 1 )
    #if( !$position || $position.equals('0') )
    
    #if( $parent )
       
#i18('site.message.contentofchapter')
    #else
       
Inhalt der Dokumentation
    #end
    
    #foreach( $sub in $subchapters.actualVersion.content.elements )
        
-             #set ( $_content = $sub.actualVersion.content )
            #set ( $_title = $_content.links.get("title") )
            #infobit( $_title.name )
        
    #end

     #else
        #showInfobit( $infobit )
     #end

#else

    #set ( $scriptParents = $document.scriptParents )

    ##<h3>#i18('site.term.lang.versions.title')</h3>

	<h3>#i18('site.term.lang.versions')</h3>

	#if( $scriptParents && $scriptParents.size() > 0 )
	<table>
       	#set( $scriptParent = $scriptParents.get(0) )
    	#set( $parentLinks = $scriptParent.links )
        #foreach( $plKey in $parentLinks.keySet() )
        	#set( $l = $parentLinks.get($plKey) )
			#if( !$l.attributeMap.get('workflow') || !$l.attributeMap.get('workflow').equals('in_process') )
            <tr>
				#set( $flagImage = "/images/unitracc/icon_flag_${plKey}.png" )
				#set( $languageKey = "site.term.lang.${plKey}" )
            	<td><a href="$url.setPage('detail.vm').addParameter('name',$l)"><img src="$url.setPage($flagImage)" border="0" alt="${plKey}"/></a></td>
				<td><a href="$url.setPage('detail.vm').addParameter('name',$l)">#i18($languageKey)</a></td>
			</tr>
            #end
        #end
	</table>
    #end

#end

