<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:lv="FlexListViewer.ListViewerObjectModel" exclude-result-prefixes="lv">

	<!-- URL to the current page (page containing the FlexListViewer-webpart) -->
	<xsl:param name="currentPage"></xsl:param>
	<!-- URL to the current site (site where the current page is hosted) -->
	<xsl:param name="currentSiteUrl">http://visp.scripps.edu/SARS/Shared%20Documents/proteome-summary.aspx</xsl:param>
	<!-- Locale-id of the current site -->
	<xsl:param name="lcid">LCID</xsl:param>
	<!-- Whether AddNewItem-option must be displayed -->
	<xsl:param name="allowAddNewItem">False</xsl:param>
	<!-- Message to display for the AddNewItem-button/label -->
	<xsl:param name="msgAddNewItem">ADDNEWITEM</xsl:param>
	<!-- Text for "Yes" in the locale of current site -->
	<xsl:param name="msgYes">Yes</xsl:param>
	<!-- Text for "No" in the locale of current site -->
	<xsl:param name="msgNo">No</xsl:param>
	
	<!-- Optional parameters that can be used for any purpose you like. -->
	<xsl:param name="param1"/><!-- Contains the path for the blog -->
	<xsl:param name="param2"/>
	<xsl:param name="param3"/>
	<xsl:param name="param4"/>
	<xsl:param name="param5"/>

	<xsl:output method="html" encoding="UTF-8" omit-xml-declaration="yes"/>
	<xsl:template match="/lv:ListView/lv:Rows/lv:ListViewRow" >

	<xsl:variable name= "LVRowValue" select="lv:RowValues/lv:ListViewRowValue" />
	<xsl:variable name="ID" select="$LVRowValue[@FieldName = 'ID']/lv:Parts/lv:ListViewRowValuePart[1]"/>
	<xsl:variable name="LinkTitle" select="$LVRowValue[@FieldName = 'LinkTitle']/lv:Parts/lv:ListViewRowValuePart[1]"/>
	<xsl:variable name="Structure" select="$LVRowValue[@FieldName = 'Structure']/lv:Parts/lv:ListViewRowValuePart[1]"/>	
	<xsl:variable name="Structure_x0020_Detail" select="$LVRowValue[@FieldName = 'Structure_x0020_Detail']/lv:Parts/lv:ListViewRowValuePart[1]"/>
    <xsl:variable name="Function" select="$LVRowValue[@FieldName = 'Function']/lv:Parts/lv:ListViewRowValuePart[1]"/>
    <xsl:variable name="Interactions" select="$LVRowValue[@FieldName = 'Interactions']/lv:Parts/lv:ListViewRowValuePart[1]"/>
    <xsl:variable name="Biological_x0020_Role" select="$LVRowValue[@FieldName = 'Biological_x0020_Role']/lv:Parts/lv:ListViewRowValuePart[1]"/>	
		
	<!-- The header containing the post date
	<h1 class="ms-PostDate">
	<xsl:value-of select="lv:Rows/lv:ListViewRow/lv:RowValues/lv:ListViewRowValue[@FieldName = 'PublishedDate']/lv:Parts/lv:ListViewRowValuePart[1]"/>
	</h1>-->
	
	<div class="ms-PostTitle">
      <a >
         <xsl:attribute name="href"><xsl:value-of select="$currentSiteUrl" disable-output-escaping="yes" />
         <xsl:value-of select="$param1" disable-output-escaping="yes"/>/Lists/Posts/Post.aspx?ID=<xsl:value-of select="$ID"/>
         </xsl:attribute><xsl:value-of select="ListViewRowValuePart"/>
         <xsl:value-of select="$LVRowValue[@FieldName = 'Title']/lv:Parts/lv:ListViewRowValuePart[1]" disable-output-escaping="yes"/>
      </a>
	
   </div>



<table style="WIDTH: 90%" summary="" border="1"><tr pady="10" padx="10"> 
<td width="16.66%">
      <xsl:value-of select="$LVRowValue[@FieldName = 'LinkTitle']/lv:Parts/lv:ListViewRowValuePart[1]" disable-output-escaping="yes"/>
</td>     
<td width="16.66%">      
     <img height="126" width="126"><xsl:attribute name="src">
      <xsl:value-of select="$LVRowValue[@FieldName = 'Structure']/lv:Parts/lv:ListViewRowValuePart[1]" /></xsl:attribute>
     </img>
</td>     
<td width="16.66%">   
      <xsl:value-of select="$LVRowValue[@FieldName = 'Structure_x0020_Detail']/lv:Parts/lv:ListViewRowValuePart[1]" disable-output-escaping="yes"/>
</td>   
     
<td width="16.66%">
   <div class="ms-PostBody">
      <xsl:value-of select="$LVRowValue[@FieldName = 'Function']/lv:Parts/lv:ListViewRowValuePart[1]" disable-output-escaping="yes"/>
   </div>
</td>
<td width="16.66%">   
   <div class="ms-PostBody2">
      <xsl:value-of select="$LVRowValue[@FieldName = 'Interactions']/lv:Parts/lv:ListViewRowValuePart[1]" disable-output-escaping="yes"/>
   </div>
</td>
<td width="16.66%">
   <div class="ms-PostBody3">
      <xsl:value-of select="$LVRowValue[@FieldName = 'Biological_x0020_Role']/lv:Parts/lv:ListViewRowValuePart[1]" disable-output-escaping="yes"/>
   </div>
</td>

   <div class="ms-PostFooter">
      <a><xsl:attribute name="href"><xsl:value-of select="$currentSiteUrl" disable-output-escaping="yes" />
      <xsl:value-of select="$param1" disable-output-escaping="yes"/><xsl:value-of select="$LVRowValue[@FieldName = 'Author']/lv:Parts/lv:ListViewRowValuePart[1]" disable-output-escaping="yes"/>
      </xsl:attribute><xsl:value-of select="$LVRowValue[@FieldName = 'Author']/lv:Parts/lv:ListViewRowValuePart[1]"/>
      </a>  <xsl:value-of select="$ID" />
	  <xsl:if test="$Interactions!='False'"> </xsl:if>
	  <xsl:if test="normalize-space($Function) != ''">  <a><xsl:attribute name="href">
	  <xsl:value-of select="$currentSiteUrl" disable-output-escaping="yes" />
	  <xsl:value-of select="$param1" disable-output-escaping="yes"/>
	  <xsl:value-of select="$LVRowValue[@FieldName = 'PostCategory']/lv:Parts/lv:ListViewRowValuePart[1]"/>
	  </xsl:attribute><xsl:value-of select="$LVRowValue[@FieldName = 'PostCategory']/lv:Parts/lv:ListViewRowValuePart[1]"/></a></xsl:if> 
   </div>


</tr></table>






</xsl:template>
		
</xsl:stylesheet>