<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document SYSTEM "http://commons.omniupdate.com/dtd/standard.dtd"> 
<!-- 
Blog Listing Page for UAEX Employee Site

Contributors: Steven Hefner
Last Updated 10/30/2019
-->
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ou="http://omniupdate.com/XSL/Variables"
	xmlns:fn="http://omniupdate.com/XSL/Functions" xmlns:ouc="http://omniupdate.com/XSL/Variables"
	exclude-result-prefixes="ou xsl xs fn ouc">
	
	<xsl:import href="../emp-common.xsl"/>
	<xsl:import href="../emp-nested-nav.xsl"/>
	
	<xsl:import href="blog-functions.xsl" />
	<xsl:param name="post-year" select="/document/ouc:properties[@label='config']/parameter[@name='post-year']" />
	<xsl:param name="post-limit" select="if(string-length(/document/ouc:properties[@label='config']/parameter[@name='post-limit']) > 0) then /document/ouc:properties[@label='config']/parameter[@name='post-limit'] else 3" />
	
<xsl:template name="common-header">
		<xsl:copy-of select="ou:standardInclude('/_resources/includes/employee-nav.inc')"/>
	<xsl:copy-of select="ou:standardInclude('/_resources/includes/employee-second-nav.inc')"/>
	<xsl:comment> breadcrumbs </xsl:comment>		
	<xsl:call-template name="emp-breadcrumb">
		<xsl:with-param name="path" select="$ou:dirname"/>						
	</xsl:call-template>

</xsl:template>	
	

		
	<xsl:template name="page-content">
		
		<div id="mainbox">
		<xsl:call-template name="main"></xsl:call-template>
		</div>
	</xsl:template>
	
	<xsl:template name="main">
	
		<div class="left-card-column-support">
			<xsl:call-template name="left-nav"></xsl:call-template>
		</div>
		<div class="center-card-column-support">
		<div class="maincard-blank">
		<xsl:apply-templates select="mainheader/node()" mode="copy"/>
		<xsl:apply-templates select="content/mainbox/node()" mode="copy"/>
			
		<xsl:call-template name="blog-posts"></xsl:call-template>
		</div>
		</div>
		<xsl:apply-templates select="content/right-nav/node()" mode="copy"/>

	
	</xsl:template>

	<xsl:template name="blog-posts">
		<xsl:comment> content </xsl:comment>
		<section id="content">
			<h1><xsl:value-of select="replace(post-info/ouc:div[@label='post-title'],'//','&lt;br/&gt;')" disable-output-escaping="yes" /></h1>
			<p class="author">by <xsl:value-of select="post-info/ouc:div[@label='post-author']" /> - <xsl:value-of select="ou:displayLongDate(post-info/ouc:div[@label='post-date'])" /></p>
			<xsl:apply-templates select="content/middle/node()" mode="copy"/>
			<xsl:if test="ouc:properties[@label='config']/parameter[@name='disqus-enable']/option[@value='true']/@selected='true'">
				<div id="disqus_thread"></div>
<script type="text/javascript">

/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'zztestcomments'; // required: replace example with your forum shortname 

// The following are highly recommended additional parameters. Remove the slashes in front to use.
var disqus_url = page_id; //'[URL TO THE RESULTANT PAGE]'

/* * * DON'T EDIT BELOW THIS LINE * * */

(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();

</script>

<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>

<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>

			</xsl:if>
		</section>	
	</xsl:template>
	
<xsl:template name="left-nav">
	<xsl:comment> sideNavBar </xsl:comment>			
	<div class="maincard1">																						
		
			<xsl:comment> left navigation </xsl:comment>
			<xsl:call-template name="emp-nav-builder">
				<xsl:with-param name="top-level" select="substring($navigationStart,1,string-length($navigationStart)-1)"/>
				<xsl:with-param name="path" select="$ou:dirname" />
				<xsl:with-param name="last_crumb" select="$ou:dirname" />
			</xsl:call-template>
						
	</div>
		<div class="maincard1">
<div class="maincard-header-grey">
<h2 class="cardheader">Support Units</h2>
</div>
<ul>
				<li class="employee-li"><a id="Information Technology" title="Information Technology" href="/information-technology/default.aspx">Information Technology</a></li>
				<li class="employee-li"><a id="Financial Services" title="Financial Services" href="/financial-services/default.aspx">Financial Services</a></li>
				<li class="employee-li"><a id="Human Resources" title="Human Resources" href="/human-resources/default.aspx">Human Resources</a></li>
				<li class="employee-li"><a id="Office of Sponsored Programs" title="Office of Sponsored Programs" href="/office-of-sponsored-programs/default.aspx">Office of Sponsored Programs</a></li>
				<li class="employee-li"><a id="Professional Development" title="Professional Development" href="/professional-development/default.aspx">Professional Development</a></li>
				<li class="employee-li"><a id="Communications" title="Communications" href="/communications/default.aspx">Communications</a></li>
				<li class="employee-li"><a id="Print Services" title="Print Services" href="/print-services/default.aspx">Print Services</a></li>
				<li class="employee-li"><a id="Facilities Management" title="Facilities Management" href="/facilities-management/default.aspx">Facilities Management</a></li>
			</ul>
</div>
	<div class="maincard1">
<div class="maincard-header-grey">
<h2 class="cardheader">Training &amp; Conferencing</h2>
</div>
<ul>
<li class="employee-li"><a title="ZOOM" href="https://services.uada.edu/TDClient/33/Portal/KB/?CategoryID=17">ZOOM</a></li>
<li class="employee-li"><a title="Training - Web, Technology, Digital Media" href="https://services.uada.edu/TDClient/33/Portal/Requests/ServiceCatalog?CategoryID=12">Training - Web, Technology, Digital Media</a></li>
<li class="employee-li"><a title="Mobile Training Lab and Loaner Laptops" href="https://services.uada.edu/TDClient/33/Portal/Requests/ServiceDet?ID=32" target="_blank">Mobile Training Lab &amp; Loaner Laptop</a></li>
</ul>
</div>
<div class="maincard1">
<div class="maincard-header-grey">
<h2 class="cardheader">Applications</h2>
</div>
<ul>
								<li class="employee-li"><a title="link to workday" href="http://workday.uada.edu/" target="_blank" rel="noopener">Workday</a></li>
								<li class="employee-li"><a title="Office 365 Applications" href="https://myapps.uada.edu" target="_blank" rel="noopener">O365 Applications</a></li>
								<li class="employee-li"><a title="AIMS" href="https://aims.uada.edu/" target="_blank" rel="noopener">AIMS</a></li>
								<li class="employee-li"><a title="link opens to a new window" href="https://pears.io/accounts/signin/?next=/" target="_blank" rel="noopener">SNAP-Ed PEARS</a></li>
								<li class="employee-li"><a title="link opens to a new window" href="https://pears.io/accounts/signin/?next=/" target="_blank" rel="noopener">UADA PEARS</a></li>
</ul>
</div>

	</xsl:template>
	
<xsl:template name="template-headcode">
		<style type="text/css">
			.pagination { margin-top:20px; }
			.pagination .pageNum { text-align:center; }
			.pagination .pageNum input { display:inline; text-align:center; width:30px; }
			.pagination .newer, .pagination .older { float: left; width: 33%; }
			.pagination .pageNum { float: left; width: 34%; }
			.pagination .right { float: right; }
			.pagination .hide { display: none; }
		</style>
		<script type="text/javascript">
			//fill in from XSL
			var tags = "";
			var author = "<xsl:value-of select="ouc:properties[@label='metadata']/meta[@name='Author']/@content"/>";
			var year = "<xsl:value-of select="if (normalize-space($post-year) != '') then $post-year else ''" />";
			var firstdir = "<xsl:value-of select="$firstdir" />";
			var postlimit = <xsl:value-of select="$post-limit" />;
		</script>
		<xsl:if test="$ou:action='pub'">
			<!--adds blog javascript to any page with a blog asset, on publish-->
			<xsl:if test="not(descendant::recent-posts or descendant::featured-posts or descendant::post-tags)">
				<script type="text/javascript" src="/_resources/js/blog/listing.js"></script>
				<script type="text/javascript" src="/_resources/js/blog/blog.js"></script>
			</xsl:if>
		</xsl:if>
	</xsl:template>
	
<!-- 
	
	BEGIN TEMPLATE MATCHES FOR EDITABLE REGIONS
		
	Content will be copied in order it appears in the PCF.
	
	-->
	
	<!-- SOCIAL ICONS -->
	<xsl:template match="social" mode="copy"><!-- give links special class -->	
		<xsl:if test="contains($pageOptions,'displaySocialMedia')">
			<xsl:choose>
				<xsl:when test="$pageColumns='3'">
					<div class="social-block">	
						<xsl:apply-templates select="node()" mode="copy"/>							
					</div>		
				</xsl:when>
				<xsl:otherwise>
					<div class="connection">
					<ouc:div><xsl:apply-templates select="ouc:div/attribute()" mode="copy"/>
					<xsl:apply-templates select="ouc:editor" mode="copy"/>
						<xsl:apply-templates select=".//ul" mode="copy"/>	
					</ouc:div>			
					</div>
				</xsl:otherwise>		
			</xsl:choose>	
		</xsl:if>	
	</xsl:template>

	<xsl:template match="social//ul" mode="copy">
		<xsl:choose>
			<xsl:when test="$pageColumns='3'">
				<ul class="social-networks">
					<xsl:apply-templates select="node()" mode="copy"/>
				</ul>							
			</xsl:when>
			<xsl:otherwise>
				<div class="connection">
				<ul>
					<xsl:apply-templates select="li" mode="copy"/>	
				</ul>
				</div>
			</xsl:otherwise>		
		</xsl:choose>	
	</xsl:template>

	<!-- MAIN CONTENT AND WORDPRESS -->
	<xsl:template match="maincontent" mode="copy">	
		<xsl:if test="contains($pageOptions,'displayMain')">
			<xsl:apply-templates mode="copy"/> <!-- copy everything normally -->				
		</xsl:if>		
		<!-- add special content -->
		<xsl:if test="contains($pageOptions,'displayExternalWordpress')">
			<xsl:call-template name="WordPress"/>
		</xsl:if>	
	</xsl:template>
	
	<!-- ONE AND TWO COLUMN IMAGE BLOCKS -->
	<xsl:template match="imageblocks" mode="copy">
	<xsl:if test="contains($pageOptions,'displayImageBlocks')">
	<section class="about-block cattle-block">
		<div class="container cf">
			<xsl:choose>
				<xsl:when test="$pageColumns='1' or $pageColumns='2'">
					<div class="column">
						<xsl:apply-templates select="column[1]/node()" mode="copy"/>
					</div>
					<div class="column">
						<xsl:apply-templates select="column[2]/node()" mode="copy"/>
					</div>
				</xsl:when>
				<xsl:otherwise>
					<xsl:apply-templates select="column[1]/node()" mode="copy"/>
				</xsl:otherwise>
			</xsl:choose>
		</div>	
	</section>	
		
	</xsl:if>		
	</xsl:template>
	
	<!-- BOTTOM CONTENT (SAME AS MAINCONTENT, BUT UNDERNEATH ANY OTHER NODES -->
	<xsl:template match="bottomcontent" mode="copy">
	<xsl:if test="contains($pageOptions,'displayBottom')">
		<xsl:apply-templates select="node()" mode="copy"/>		
	</xsl:if>			
	</xsl:template>	
	
	<!-- ADDITIONAL/MEDIA LINKS -->
	<xsl:template match="additional-links" mode="copy">
		<xsl:if test="contains($pageOptions,'displayAdditional')">
		<xsl:comment> content-section </xsl:comment>
		<div class="content-section">								
			<!-- re-use page #2 additional links -->
			<xsl:apply-templates select="node()" mode="copy"/>												
		</div>							
		</xsl:if>
	</xsl:template>
	
	<!-- CONTENT/PUBLICATION LINKS -->
	<xsl:template match="contentlinks" mode="copy">
	<xsl:if test="contains($pageOptions,'displayContentLinks')">
	<xsl:comment> content-section </xsl:comment>
	<div class="content-section">	
		<!-- two column conent/publication links -->							
		<xsl:apply-templates select="node()" mode="copy"/>								
	</div>		
	</xsl:if>		
	</xsl:template>
	
</xsl:stylesheet>
