<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:output method="xml" indent="yes" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
	<xsl:param name="message"/>
	<xsl:param name="pageTitle">Status</xsl:param>
	<xsl:param name="name"/>
	<xsl:param name="active"/>
	<xsl:include href="namedtemplates.xsl"/>
	<xsl:template match="/">
		<html>
			<head>
				<title>
					<xsl:value-of select="$web_title"/>
				</title>
				<xsl:call-template name="common_imports"/>
			</head>
			<body onload="window.defaultStatus=''; StartFloat();">
				<xsl:call-template name="initROPage">
					<xsl:with-param name="pageName">system.py</xsl:with-param>
					<xsl:with-param name="message" select="$message"/>
				</xsl:call-template>
				<div id="displayresults">
					<h1 class="display">System</h1>
					<xsl:apply-templates/>
				</div>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="system">
		<div class="row">
			<div class="generalcell">
				<b>System Time:</b>
			</div>
			<div class="largegeneralcell">
				<xsl:value-of select="system_time"/>
			</div>
		</div>
		<div class="row">
			<div class="generalcell">
				<b>System Up Time:</b>
			</div>
			<div class="largegeneralcell">
				<xsl:value-of select="system_up_time"/>
			</div>
		</div>
		<div class="row">
			<div class="generalcell">
				<b>OS Version:</b>
			</div>
			<div class="largegeneralcell">
				<xsl:value-of select="os_version"/>
			</div>
		</div>
		<div class="row">
			<div class="generalcell">
				<b>S/W Version:</b>
			</div>
			<div class="largegeneralcell">
				<xsl:value-of select="sw_version"/>
			</div>
		</div>
		<!-- <div class="row">
			<div class="generalcell">
			</div>
			- <div class="largegeneralcell">
				<xsl:value-of select="$web_version"/>
			</div>
		</div>
-->
		<div class="row">
			<div class="generalcell">
				<b>H/W Version:</b>
			</div>
			<div class="largegeneralcell">
				<xsl:value-of select="hw_version"/>
			</div>
		</div>
		<div class="row">
			<div class="generalcell">
				<b>FPGA Version:</b>
			</div>
			<div class="largegeneralcell">
				<xsl:value-of select="fpga_version"/>
			</div>
		</div>
	</xsl:template>
	<xsl:template match="status">
		<div class="row">
			<div class="generalcell">
				<b>Mux Up Time: </b>
			</div>
			<div class="largegeneralcell">
				<xsl:value-of select="mux_up_time"/>
			</div>
		</div>
		<xsl:if test="redundancy/mux">
			<div class="row">
				<div class="generalcell">
					<b>Mux Redundancy Mode: </b>
				</div>
				<div class="largegeneralcell">
					<xsl:value-of select="redundancy/mux/mode"/>
				</div>
			</div>
		</xsl:if>
		<xsl:call-template name="userdata"/>
	</xsl:template>
	<xsl:template name ="userdata">	
		<div class="row">
			<div class="generalcell">
				<b>Auto Logout Time: </b>
			</div>
			<div class="largegeneralcell">
				<xsl:choose>
					<xsl:when test="/configuration/user_data/auto_logout_time != '0'">
						<xsl:value-of select="/configuration/user_data/auto_logout_time"/>
					</xsl:when>
					<xsl:otherwise>None</xsl:otherwise>
				</xsl:choose>
			</div>
		</div>
		<div class="row">
			<div class="generalcell">
				<b>PID Values:</b>
			</div>
			<div class="largegeneralcell">
				<xsl:choose>
					<xsl:when test="$defaultBase = '10'">Decimal</xsl:when>
					<xsl:otherwise>Hex</xsl:otherwise>
				</xsl:choose>
			</div>
		</div>
        <xsl:call-template name="features"/>
	</xsl:template>
    <xsl:template name ="features">	
        <div class="row">
			<br/>

			<h1 class="display">Features</h1>
		</div>		
        <div class="row">
            <div class="generalcell">
                    <b>Conditional Access: </b>
            </div>
            <div class="largegeneralcell">
					<xsl:value-of select="/configuration/system/features/feature[@name='cond_acc']"/>
            </div>
        </div>
        <div class="row">
            <div class="generalcell">
                    <b>Input 6: </b>
            </div> 
             <div class="largegeneralcell">
                    <xsl:value-of select="/configuration/system/features/feature[@name='input6']"/>
            </div>
        </div>
        <div class="row">
            <div class="generalcell">
                    <b>Input 7: </b>
            </div> 
             <div class="largegeneralcell">
                    <xsl:value-of select="/configuration/system/features/feature[@name='input7']"/> 
            </div>
        </div>
        <div class="row">
            <div class="generalcell">
                    <b>Input 8: </b>
            </div>
             <div class="largegeneralcell">
                    <xsl:value-of select="/configuration/system/features/feature[@name='input8']"/>
            </div>
        </div>
        <div class="row">
            <div class="generalcell">
                    <b>Input 9: </b>
            </div> 
             <div class="largegeneralcell">
                    <xsl:value-of select="/configuration/system/features/feature[@name='input9']"/> 
            </div>
        </div>
        <div class="row">
            <div class="generalcell">
                    <b>Input 10: </b>
            </div>
             <div class="largegeneralcell">
                    <xsl:value-of select="/configuration/system/features/feature[@name='input10']"/>            
	        </div>
        </div>
	</xsl:template>
	<xsl:template match="text()">
	</xsl:template>
</xsl:stylesheet>
