<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://sakaiproject.org/jsf/sakai" prefix="sakai" %>


<style type="text/css">

    
    .form_image {
    	vertical-align: middle;
    	width: 300px;
    	
    }
    
    .form_input {
    	text-align: left;
    	vertical-align: text-top;
    }
    
    .form_message {
    	text-align: left;
    }
    
    .form_norm_row {
    	vertical-align: middle;
    	font-size: small;
    }
    
    .form_up_row {
    	vertical-align: middle;
    }
    
    .weblab_name {
    	font-weight: bold;
    	font-size: large;

    }
    
    .weblab_text {
    	font-size: small;
    	
    }
    
    .weblab_label {
    	font-weight: bold;
    	color: #555555;
    }
    
    .short {
		clear:both;
		border:1px solid #FFFFFF;
		margin:0.4em 1em;
		width: 120px;
	}
	
	.short2 {
		clear:both;
		border:1px solid #FFFFFF;
		margin:0.8em 1em;
	}
	
    
    hr.hr2 {
		height:1px;
	}
	
	tr.dataTableHighlight 
	{
	
		background-color: #ECF3FE;
	}
	
	.nameColumn {
	    width: 100%;
	    text-align: left;
	    font-size: small;
	}
	.editColumn {
	    width: 30px;
		text-align: center;
		font-size: small;
	}
	.removeColumn {
	    width: 30px;
		text-align: center;
		font-size: small;
	}
	.row {
		height: 30px;
		vertical-align: middle;
	}
	
	.messageColumn {
		vertical-align: bottom;
	
	}
	
	.pagerColumn {
		width: 150px;
	}
	
	.subtitleColumn {
		width: 150px;
		vertical-align: bottom;
	}
	
	.subtitleStyle 
	{
		color:#555555;
		font-family:Arial,Helvetica,sans-serif;
		margin:1em 0pt 0pt;
		font-weight:bold;
		padding:0pt;
		background-color:transparent !important;
		font-size:100%;
	}
	
	.toolBarLink
	{
		font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;
		font-size:0.9em;
		margin-right:2px;
	}
		

</style>

<script type="text/javascript">

function highlight() 
{
    var previousClass = null;
    // simple script for highlighting rows
    var table = document.getElementById("dtInfraEx");
    var tbody = table.getElementsByTagName("tbody")[0];
    var rows = tbody.getElementsByTagName("tr");
    for (i=0; i < rows.length; i++) 
    {
        rows[i].onmouseover = function() { previousClass=this.className;this.className='dataTableHighlight' };
        rows[i].onmouseout = function() { this.className=previousClass };
	}

}


</script>

<%-- This file generated by Sakai App Builder --%>
<f:loadBundle basename="messages" var="msgs"/>

<f:view>
	<sakai:view title="WebLab Tool">

		<style>			
			.navIntraTool a, .navIntraTool a:link
			{
				margin-right:0px;
			}	
		</style>
		
		
		<h:form id="barActions">
			<sakai:tool_bar>
				<sakai:tool_bar_item action="#{ExperimentBean.processActionList}" value="#{msgs.new_weblab_list_link}" />
				
				<h:panelGroup rendered="#{!ExperimentBean.hasStepsCreated}"  title="Criar os passos que compoem o experimento">
					<sakai:tool_bar_spacer />
					<sakai:tool_bar_item action="#{StepBean.processActionNew}" value="Criar Passos do experimento" />
				</h:panelGroup>

				<h:panelGroup rendered="#{ExperimentBean.hasStepsCreated}">
					<sakai:tool_bar_spacer/>
					<sakai:tool_bar_item action="#{StepBean.processActionRunExperiment}" value="Executar experimento" />
				</h:panelGroup>
				
			</sakai:tool_bar>
			
		</h:form>
		
		<h:form>
		<h:commandLink styleClass="toolBarLink" action="#{ExperimentBean.processActionList}" value="#{msgs.breadcrumbs_start_text}" />
		<h:graphicImage value="/images/arrow.gif" styleClass="toolBarLink" />
		<h:outputText value="#{ExperimentBean.experimentName}" styleClass="toolBarLink" />
		</h:form>
						
		<sakai:view_title value="#{msgs.detail_weblab_title}"/>
		
		<hr width="100%" class="hr2" >
		
   		<h:panelGrid columns="2" cellpadding="5" columnClasses="form_image,form_input" rowClasses="form_norm_row" width="100%">
  				  				
  			            
            <h:panelGroup>
  				<h:graphicImage value="/getImage?file=#{ExperimentBean.imageName}" width="200" rendered="#{ExperimentBean.imageAvailable}"/>
  				<h:graphicImage value="/images/lab.jpg" width="200" rendered="#{not ExperimentBean.imageAvailable}"/>
  			</h:panelGroup>  
  			
  			<h:panelGroup>
     			
     			<h:outputText value="#{ExperimentBean.experimentName}" styleClass="weblab_name"  />
     			
     			<f:verbatim><br><br><div style="text-align:justify"></f:verbatim>
     			
    			<h:outputText id="desc" value="#{ExperimentBean.experimentDescription}" rendered="#{ExperimentBean.experimentDescription ne null}" />
    			
     			<f:verbatim></div><br><br></f:verbatim>
     			<h:form>
	            <h:commandLink value="Visualizar Protocolo" action="#{ExperimentBean.processActionListProtocol}"></h:commandLink>
	            </h:form>
            </h:panelGroup>
                                     									                    		                    
			  		
  		</h:panelGrid>
  		
  		
  		
  		
  		
  		
  				
	</sakai:view>
</f:view> 
