Created
February 26, 2015 16:28
-
-
Save alex-wilmer/eaf122c3ebd7567e8d27 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ddw1="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal"> | |
<xsl:output method="html" indent="no"/> | |
<xsl:param name="dvt_adhocmode">sort</xsl:param> | |
<xsl:decimal-format NaN=""/> | |
<xsl:param name="dvt_apos">'</xsl:param> | |
<xsl:param name="Today" /> | |
<xsl:param name="ManualRefresh"></xsl:param> | |
<xsl:param name="dvt_fieldsort" /> | |
<xsl:param name="dvt_filterfield" /> | |
<xsl:param name="dvt_sortdir">ascending</xsl:param> | |
<xsl:param name="dvt_sortfield" /> | |
<xsl:param name="dvt_sorttype">text</xsl:param> | |
<xsl:param name="dvt_filterfields" /> | |
<xsl:param name="dvt_partguid" /> | |
<xsl:param name="SOInvolved" /> | |
<xsl:param name="Lead" /> | |
<xsl:param name="NOInvolved" /> | |
<xsl:param name="ProjectType" /> | |
<xsl:param name="ProjectManager" /> | |
<xsl:param name="ProjectManager2" /> | |
<xsl:param name="ProjectStage" /> | |
<xsl:param name="StatusIndicator" /> | |
<xsl:param name="LifeCycleStage" /> | |
<xsl:param name="BusinessNeed" /> | |
<xsl:param name="SupporterNeed" /> | |
<xsl:param name="BusinessOwner" /> | |
<xsl:param name="Stage" /> | |
<xsl:variable name="dvt_1_automode">0</xsl:variable> | |
<xsl:template match="/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ddw1="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls"> | |
<xsl:choose> | |
<xsl:when test="($ManualRefresh = 'True')"> | |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> | |
<tr> | |
<td valign="top"> | |
<xsl:call-template name="dvt_1"/> | |
</td> | |
<td width="1%" class="ms-vb" valign="top"> | |
<img src="/_layouts/images/staticrefresh.gif" id="ManualRefresh" border="0" onclick="javascript: {ddwrt:GenFireServerEvent('__cancel')}" alt="Click here to refresh the dataview."/> | |
</td> | |
</tr> | |
</table> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:call-template name="dvt_1"/> | |
</xsl:otherwise> | |
</xsl:choose> | |
</xsl:template> | |
<xsl:template name="dvt_1"> | |
<xsl:variable name="dvt_StyleName">Table</xsl:variable> | |
<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'" /> | |
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" /> | |
<!--<xsl:variable name="Rows" select="/dsQueryResponse/Projects/Rows/Row"/>--> | |
<xsl:variable name="Rows" select="/dsQueryResponse/Projects/Rows/Row[contains(normalize-space(translate(@SONOLeadLookup, $uppercase, $smallcase)), translate($Lead, $uppercase, $smallcase)) and contains(normalize-space(translate(@SOsInvolved, $uppercase, $smallcase)), translate($SOInvolved, $uppercase, $smallcase)) and contains(normalize-space(translate(@NOsInvolved, $uppercase, $smallcase)), translate($NOInvolved, $uppercase, $smallcase)) and contains(normalize-space(translate(@Project_x0020_Type, $uppercase, $smallcase)), translate($ProjectType, $uppercase, $smallcase)) and contains(normalize-space(translate(@Project_x0020_Manager.title, $uppercase, $smallcase)), translate($ProjectManager, $uppercase, $smallcase)) and contains(normalize-space(translate(@ProjectManager2.title, $uppercase, $smallcase)), translate($ProjectManager2, $uppercase, $smallcase)) and contains(normalize-space(translate(@Status_x0020_Indicator, $uppercase, $smallcase)), translate('Completed', $uppercase, $smallcase)) and contains(normalize-space(translate(@Lifecycle_x0020_Stage, $uppercase, $smallcase)), translate($LifeCycleStage, $uppercase, $smallcase)) and contains(normalize-space(translate(@Business_x0020_Need, $uppercase, $smallcase)), translate($BusinessNeed, $uppercase, $smallcase)) and contains(normalize-space(translate(@Supporter_x0020_Need, $uppercase, $smallcase)), translate($SupporterNeed, $uppercase, $smallcase)) and contains(normalize-space(translate(@Business_x0020_Sponsor.title, $uppercase, $smallcase)), translate($BusinessOwner, $uppercase, $smallcase)) and contains(normalize-space(translate(@Stage, $uppercase, $smallcase)), translate($Stage, $uppercase, $smallcase)) ]"/> | |
<xsl:variable name="dvt_RowCount" select="count($Rows)"/> | |
<xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" /> | |
<xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0"/> | |
<xsl:choose> | |
<xsl:when test="$dvt_IsEmpty"> | |
<xsl:call-template name="dvt_1.empty"/> | |
</xsl:when> | |
<xsl:otherwise> | |
<table border="0" width="100%" cellpadding="2" cellspacing="0" class="projectDashSubTable"> | |
<tr valign="top"> | |
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1"> | |
<th class="ms-vh" width="1%" nowrap="nowrap"></th> | |
</xsl:if> | |
<th nowrap="nowrap" class="projectDashHdProjIcn"> | |
Project Icon | |
</th> | |
<th class="projectDashHdProjID"> | |
<xsl:call-template name="dvt.headerfield" ddwrt:atomic="1" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"> | |
<xsl:with-param name="fieldname">@Project_x0020_ID</xsl:with-param> | |
<xsl:with-param name="fieldtitle">Project Name</xsl:with-param> | |
<xsl:with-param name="displayname">Project ID</xsl:with-param> | |
<xsl:with-param name="sortable">1</xsl:with-param> | |
<xsl:with-param name="fieldtype">x:string</xsl:with-param> | |
</xsl:call-template> | |
</th> | |
<th class="projectDashHdProjType"> | |
<xsl:call-template name="dvt.headerfield" ddwrt:atomic="1" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"> | |
<xsl:with-param name="fieldname">@Project_x0020_Type</xsl:with-param> | |
<xsl:with-param name="fieldtitle">Project Type</xsl:with-param> | |
<xsl:with-param name="displayname">Project Type</xsl:with-param> | |
<xsl:with-param name="sortable">1</xsl:with-param> | |
<xsl:with-param name="fieldtype">x:string</xsl:with-param> | |
</xsl:call-template> | |
</th> | |
<th class="projectDashHdLdOffice">Project Lead</th> | |
<th class="projectDashHdProjMan"> | |
<xsl:call-template name="dvt.headerfield" ddwrt:atomic="1" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"> | |
<xsl:with-param name="fieldname">@ManagerName</xsl:with-param> | |
<xsl:with-param name="fieldtitle">Project Manager</xsl:with-param> | |
<xsl:with-param name="displayname">Project Manager</xsl:with-param> | |
<xsl:with-param name="sortable">1</xsl:with-param> | |
<xsl:with-param name="fieldtype">x:string</xsl:with-param> | |
</xsl:call-template> | |
</th> | |
<th class="projectDashHdStg"> | |
Stage</th> | |
<th class="projectDashHdSta"> | |
<xsl:call-template name="dvt.headerfield" ddwrt:atomic="1" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"> | |
<xsl:with-param name="fieldname">@Status_x0020_Indicator</xsl:with-param> | |
<xsl:with-param name="fieldtitle">Status</xsl:with-param> | |
<xsl:with-param name="displayname">Status Indicator</xsl:with-param> | |
<xsl:with-param name="sortable">1</xsl:with-param> | |
<xsl:with-param name="fieldtype">x:string</xsl:with-param> | |
</xsl:call-template> | |
</th> | |
<th class="projectDashHdStaCompleted"> | |
Status Update</th> | |
<th class="projectDashHdLstMod"> | |
<xsl:call-template name="dvt.headerfield" ddwrt:atomic="1" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"> | |
<xsl:with-param name="fieldname">@Modified</xsl:with-param> | |
<xsl:with-param name="fieldtitle">Last Updated</xsl:with-param> | |
<xsl:with-param name="displayname">Modified</xsl:with-param> | |
<xsl:with-param name="sortable">1</xsl:with-param> | |
<xsl:with-param name="fieldtype">x:dateTime</xsl:with-param> | |
</xsl:call-template> | |
</th> | |
<th class="projectDashHdAlert"> Alert</th> | |
</tr> | |
<xsl:call-template name="dvt_1.body"> | |
<xsl:with-param name="Rows" select="$Rows"/> | |
</xsl:call-template> | |
</table> | |
</xsl:otherwise> | |
</xsl:choose> | |
</xsl:template> | |
<xsl:template name="dvt_1.body"> | |
<xsl:param name="Rows"/> | |
<xsl:for-each select="$Rows"> | |
<xsl:sort select="*[name() = $dvt_sortfield] | @*[name() = $dvt_sortfield] | text()[name(ancestor::*[1]) = $dvt_sortfield]" order="{$dvt_sortdir}" data-type="{$dvt_sorttype}" /> | |
<xsl:sort select="@Modified" order="descending" /> | |
<xsl:call-template name="dvt_1.rowview" /> | |
</xsl:for-each> | |
</xsl:template> | |
<xsl:template name="dvt_1.rowview"> | |
<tr> | |
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1"> | |
<td class="ms-vb" width="1%" nowrap="nowrap"> | |
<span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)" ddwrt:ammode="view"></span> | |
</td> | |
</xsl:if> | |
<td class="ms-vb"> | |
<div class="projectDashProjectIconWrapper"> | |
<img> | |
<xsl:attribute name="src">/S2.0/Media%20Library/<xsl:value-of select="translate(@Project_x0020_ID,'/','-')" />ProjectIcon.jpg</xsl:attribute> | |
<xsl:attribute name="alt"><xsl:value-of select="@Project_x0020_ID" /> - <xsl:value-of select="@Title" /></xsl:attribute> | |
</img> | |
</div> | |
</td> | |
<td class="ms-vb"> | |
<div class="projectDashProjectIDTitle"><a> | |
<xsl:attribute name="href"> | |
/S2.0/Pages/Project-Detail-Pages.aspx?Select%20a%20Project=<xsl:value-of select="@Project_x0020_ID" /></xsl:attribute> | |
<xsl:value-of select="@Project_x0020_ID" /> | |
</a></div><div class="projectDashProjectName"><a> | |
<xsl:attribute name="href"> | |
/S2.0/Pages/Project-Detail-Pages.aspx?Select%20a%20Project=<xsl:value-of select="@Project_x0020_ID" /></xsl:attribute> | |
<xsl:value-of select="@Title" /> | |
</a></div></td> | |
<td class="ms-vb"> | |
<div class="projectDashProjectType"> | |
<xsl:value-of select="@Project_x0020_Type" /> | |
</div> | |
</td> | |
<td class="ms-vb"> | |
<xsl:call-template name="splitLookup"> | |
<xsl:with-param name="LookupValue" select="@SONOLeadLookup."></xsl:with-param> | |
</xsl:call-template> | |
</td> | |
<td class="ms-vb"> | |
<div class="projectDashPMIcon"> | |
<a href="/S2.0/_layouts/userdisp.aspx?ID={@Project_x0020_Manager.id}"> | |
<xsl:choose> | |
<xsl:when test="string-length(normalize-space(@Project_x0020_Manager.picture)) > 0"> | |
<img src="{@Project_x0020_Manager.picture}" width="62" height="62" border="0"/> | |
</xsl:when> | |
<xsl:otherwise> | |
<img src="/_layouts/images/person.gif" width="62" height="62" border="0"/> | |
</xsl:otherwise> | |
</xsl:choose> | |
</a> | |
</div> | |
<div class="projectDashPMUserName"> | |
<a href="/S2.0/_layouts/userdisp.aspx?ID={@Project_x0020_Manager.id}"> | |
<xsl:value-of select="@Project_x0020_Manager.title" disable-output-escaping="yes" /> | |
</a> | |
</div> | |
</td> | |
<td class="projectDashStage" > | |
<xsl:call-template name="dvt_2" /> | |
</td> | |
<td class="ms-vb"> | |
<div style="display:none;"><xsl:value-of select="@Status_x0020_Indicator" /></div><div class="projectDashStatusTD"> | |
<xsl:if test="normalize-space(@Status_x0020_Indicator) = 'On Schedule'"><img alt="On Schedule" title="On Schedule" src="/Style Library/Sponsorship20/status-icon-onschedule.png" /></xsl:if> | |
<xsl:if test="normalize-space(@Status_x0020_Indicator) = 'Behind Schedule'"><img alt="Behind Schedule" title="Behind Schedule" src="/Style Library/Sponsorship20/status-icon-behindschedule.png" width="34" height="34" /></xsl:if> | |
<xsl:if test="normalize-space(@Status_x0020_Indicator) = 'On hold'"><img alt="On hold" title="On hold" src="/Style Library/Sponsorship20/status-icon-onhold.png" /></xsl:if> | |
<xsl:if test="normalize-space(@Status_x0020_Indicator) = 'Completed'"><img alt="Completed" title="Completed" src="/Style Library/Sponsorship20/status-icon-completed.png" /></xsl:if> | |
</div></td> | |
<td class="ms-vb"> | |
<xsl:call-template name="dvt_3" /> | |
</td> | |
<td class="ms-vb"><div class="projectDashLastUpdated"><xsl:value-of select="ddwrt:FormatDateTime(string(@Modified) ,1033 ,'MMM dd, yyyy ')" /></div></td> | |
<td class="projectDashAlert" nowrap="nowrap"> | |
<xsl:call-template name="dvt_4" /> | |
</td> | |
</tr> | |
</xsl:template> | |
<xsl:template name="dvt_1.empty"> | |
<xsl:variable name="dvt_ViewEmptyText">There are no items to show in this view.</xsl:variable> | |
<table border="0" width="100%"> | |
<tr> | |
<td class="ms-vb"> | |
<xsl:value-of select="$dvt_ViewEmptyText"/> | |
</td> | |
</tr> | |
</table> | |
</xsl:template> | |
<xsl:variable name="dvt_2_automode">0</xsl:variable> | |
<xsl:template name="dvt_2"> | |
<xsl:variable name="dvt_StyleName">Table</xsl:variable> | |
<xsl:variable name="dvt_ParentRow" select="current()" /> | |
<xsl:variable name="Rows" select="../../../Project_Stages/Rows/Row[substring-after(@Related_x0020_Project., ';#')=$dvt_ParentRow/@Project_x0020_ID]" /> | |
<xsl:variable name="dvt_RowCount" select="count($Rows)" /> | |
<xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0" /> | |
<xsl:choose> | |
<xsl:when test="$dvt_IsEmpty"> | |
<xsl:call-template name="dvt_2.empty" /> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:call-template name="dvt_2.body"> | |
<xsl:with-param name="Rows" select="$Rows" /> | |
<xsl:with-param name="dvt_ParentRow" select="$dvt_ParentRow" /> | |
</xsl:call-template> | |
</xsl:otherwise> | |
</xsl:choose> | |
</xsl:template> | |
<xsl:template name="dvt_2.body"> | |
<xsl:param name="Rows" /> | |
<xsl:param name="dvt_ParentRow" /> | |
<xsl:for-each select="$Rows"> | |
<xsl:call-template name="dvt_2.rowview" /> | |
</xsl:for-each> | |
</xsl:template> | |
<xsl:template name="dvt_2.rowview"> | |
<xsl:if test="number(translate(ddwrt:FormatDateTime(string(@Stage_x0020_Date) ,1033 ,'yyyy-MM-dd '),'-','')) <= number(translate(substring-before($Today,'T'),'-','')) and number(translate(ddwrt:FormatDateTime(string(@Stage_x0020_Delivery_x0020_Date) ,1033 ,'yyyy-MM-dd '),'-','')) >= number(translate(substring-before($Today,'T'),'-',''))"> | |
<div class="projectDashStageIconWrapper"> | |
<xsl:if test="normalize-space(@Stage) = 'Develop Concept'"><img alt="Develop Concept" title="Develop Concept" src="/Style Library/Sponsorship20/stage-icon-D.png" width="34" height="34" /></xsl:if> | |
<xsl:if test="normalize-space(@Stage) = 'Proof of Concept'"><img alt="Proof of Concept" title="Proof of Concept" src="/Style Library/Sponsorship20/stage-icon-PC.png" width="34" height="34" /></xsl:if> | |
<xsl:if test="normalize-space(@Stage) = 'Test'"><img alt="Test" title="Test" src="/Style Library/Sponsorship20/stage-icon-T.png" width="34" height="34" /></xsl:if> | |
<xsl:if test="normalize-space(@Stage) = 'Business Case'"><img alt="Business Case" title="Business Case" src="/Style Library/Sponsorship20/stage-icon-BC.png" width="34" height="34" /></xsl:if> | |
<xsl:if test="normalize-space(@Stage) = 'Scale-out'"><img alt="Scale-out" title="Scale-out" src="/Style Library/Sponsorship20/stage-icon-SO.png" width="34" height="34" /></xsl:if> | |
</div> | |
<div class="projectDashStageDeliveryDate"><xsl:value-of select="ddwrt:FormatDateTime(string(@Stage_x0020_Delivery_x0020_Date) ,1033 ,'MMM dd, yyyy ')" /> | |
</div> | |
</xsl:if> | |
</xsl:template> | |
<xsl:template name="dvt_2.empty"> | |
<xsl:variable name="dvt_ViewEmptyText"></xsl:variable> | |
<table border="0" width="100%"> | |
<tr> | |
<td class="ms-vb"> | |
<xsl:value-of select="$dvt_ViewEmptyText" /> | |
</td> | |
</tr> | |
</table> | |
</xsl:template> | |
<xsl:variable name="dvt_3_automode">0</xsl:variable> | |
<xsl:template name="dvt_3"> | |
<xsl:variable name="dvt_StyleName">Table</xsl:variable> | |
<xsl:variable name="dvt_ParentRow" select="current()" /> | |
<xsl:variable name="Rows" select="../../../Project_Status_Update/Rows/Row[substring-after(@Related_x0020_Project., ';#')=$dvt_ParentRow/@Project_x0020_ID]" /> | |
<xsl:variable name="RowLimit" select="count($Rows)" /> | |
<xsl:variable name="dvt_RowCount" select="count($Rows)" /> | |
<xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" /> | |
<xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0" /> | |
<xsl:choose> | |
<xsl:when test="$dvt_IsEmpty"> | |
<xsl:call-template name="dvt_3.empty" /> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:call-template name="dvt_3.body"> | |
<xsl:with-param name="Rows" select="$Rows" /> | |
<xsl:with-param name="dvt_ParentRow" select="$dvt_ParentRow" /> | |
<xsl:with-param name="FirstRow" select="1" /> | |
<xsl:with-param name="LastRow" select="$RowLimit" /> | |
</xsl:call-template> | |
</xsl:otherwise> | |
</xsl:choose> | |
</xsl:template> | |
<xsl:template name="dvt_3.body"> | |
<xsl:param name="Rows" /> | |
<xsl:param name="dvt_ParentRow" /> | |
<xsl:param name="FirstRow" /> | |
<xsl:param name="LastRow" /> | |
<xsl:for-each select="$Rows"> | |
<xsl:sort data-type="number" select="substring-before(substring-after(substring-after(@Modified, '/'),'/'),' ')" order="descending" /> | |
<xsl:sort data-type="number" select="substring-before(@Modified,'/')" order="descending" /> | |
<xsl:sort data-type="number" select="substring-before(substring-after(@Modified,'/'),'/')" order="descending" /> | |
<xsl:sort data-type="text" select="substring-after(substring-after(substring-after(substring-after(@Modified, '/'),'/'),' '),' ')" order="descending" /> | |
<xsl:sort data-type="number" select="substring-before(substring-after(substring-after(substring-after(@Modified, '/'),'/'),' '),':')" order="descending" /> | |
<xsl:sort data-type="number" select="substring-before(substring-after(@Modified,':'),' ')" order="descending" /> | |
<xsl:variable name="dvt_KeepItemsTogether" select="false()" /> | |
<xsl:variable name="dvt_HideGroupDetail" select="false()" /> | |
<xsl:if test="(position() >= $FirstRow and position() <= $LastRow) or $dvt_KeepItemsTogether"> | |
<xsl:if test="not($dvt_HideGroupDetail) and position() = 1" ddwrt:cf_ignore="1"> | |
<xsl:call-template name="dvt_3.rowview" /> | |
</xsl:if> | |
</xsl:if> | |
</xsl:for-each> | |
</xsl:template> | |
<xsl:template name="dvt_3.rowview"> | |
<xsl:choose> | |
<xsl:when test="string-length(normalize-space(@Video_x0020_URL)) > 0"> | |
<div class="projectDashStatusUpdate"> | |
This project has a video update viewable on the project’s detail page. | |
</div> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:variable name="bodyNoHTML"> | |
<xsl:call-template name="Imtech.RemoveHtml"> | |
<xsl:with-param name="String" select="@Body"/> | |
</xsl:call-template> | |
</xsl:variable> | |
<xsl:variable name="numCharsInBody" select="string-length(normalize-space($bodyNoHTML))"/> | |
<xsl:variable name="statusUpdateLimitText" select="200"/> | |
<div class="projectDashStatusUpdate"> | |
<xsl:value-of select="substring(normalize-space($bodyNoHTML),0,$statusUpdateLimitText)" disable-output-escaping="yes"/> | |
<xsl:if test="$numCharsInBody > $statusUpdateLimitText"> | |
... | |
</xsl:if> | |
</div> | |
</xsl:otherwise> | |
</xsl:choose> | |
</xsl:template> | |
<xsl:template name="dvt_3.empty"> | |
<xsl:variable name="dvt_ViewEmptyText"></xsl:variable> | |
<div class="projectDashStatusUpdate"> | |
<xsl:value-of select="$dvt_ViewEmptyText" /> | |
</div> | |
</xsl:template> | |
<xsl:template name="Imtech.RemoveHtml"> | |
<xsl:param name="String"/> | |
<xsl:choose> | |
<xsl:when test="contains($String, '<')"> | |
<xsl:value-of select="substring-before($String, '<')"/> | |
<xsl:call-template name="Imtech.RemoveHtml"> | |
<xsl:with-param name="String" | |
select="substring-after($String, '>')"/> | |
</xsl:call-template> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:value-of select="$String"/> | |
</xsl:otherwise> | |
</xsl:choose> | |
</xsl:template> | |
<xsl:template name="dvt.headerfield"> | |
<xsl:param name="fieldname" /> | |
<xsl:param name="fieldtitle" /> | |
<xsl:param name="displayname" /> | |
<xsl:param name="sortable">1</xsl:param> | |
<xsl:param name="fieldtype">0</xsl:param> | |
<xsl:choose> | |
<xsl:when test="($dvt_adhocmode = 'sort' or $dvt_fieldsort = '1')and $sortable='1'"> | |
<xsl:variable name="sortfield"> | |
<xsl:choose> | |
<xsl:when test="substring($fieldname, string-length($fieldname) - 5) = '(text)'"> | |
<xsl:value-of select="substring($fieldname, 1, string-length($fieldname) - 6)" /> | |
</xsl:when> | |
<xsl:when test="substring($fieldname, 1, 1) = '@'"> | |
<xsl:value-of select="substring($fieldname, 2)" /> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:value-of select="$fieldname" /> | |
</xsl:otherwise> | |
</xsl:choose> | |
</xsl:variable> | |
<xsl:variable name="linkdir"> | |
<xsl:choose> | |
<xsl:when test="$dvt_sortfield = $sortfield and $dvt_sortdir = 'ascending'">descending</xsl:when> | |
<xsl:otherwise>ascending</xsl:otherwise> | |
</xsl:choose> | |
</xsl:variable> | |
<xsl:variable name="sortText"> | |
<xsl:choose> | |
<xsl:when test="$linkdir='descending'">' + 'descending' + '</xsl:when> | |
<xsl:otherwise>' + 'ascending' + '</xsl:otherwise> | |
</xsl:choose> | |
</xsl:variable> | |
<xsl:variable name="separator" select="' '" /> | |
<xsl:variable name="connector" select="';'" /> | |
<table CtxNum="1" cellspacing="0" class="ms-unselectedtitle" onmouseover="OnMouseOverAdHocFilter(this, '{concat($displayname,$separator,$fieldname, $separator,$fieldtype, $connector, 1033, $separator, $dvt_partguid)}')"> | |
<tr><td width="100%" class="ms-vb" nowrap="nowrap"> | |
<a> | |
<xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_sortfield={',$sortfield,'};dvt_sortdir={',$sortText,'}'))" />;</xsl:attribute> | |
<xsl:attribute name="onclick">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_sortfield={',$sortfield,'};dvt_sortdir={',$sortText,'}'))" />;</xsl:attribute> | |
<xsl:choose> | |
<xsl:when test="$fieldtype = 'Attachments'"> | |
<xsl:value-of select="$fieldtitle" disable-output-escaping="yes" /> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:value-of select="$fieldtitle" /> | |
</xsl:otherwise> | |
</xsl:choose> | |
<xsl:if test="$dvt_sortfield = $sortfield"> | |
<xsl:choose> | |
<xsl:when test="$dvt_sortdir = 'ascending'"> | |
<img border="0" alt="Ascending" src="{ddwrt:FieldSortImageUrl('Desc')}" /></xsl:when> | |
<xsl:when test="$dvt_sortdir = 'descending'"> | |
<img border="0" alt="Descending" src="{ddwrt:FieldSortImageUrl('Asc')}" /></xsl:when> | |
</xsl:choose> | |
</xsl:if> | |
</a> | |
<xsl:if test="contains($dvt_filterfields, concat($fieldname, ';' ))"> | |
<IMG SRC="/_layouts/images/filter.gif" BORDER="0" ALT="" /> | |
</xsl:if> | |
</td> | |
<td><img src="/_layouts/images/blank.gif" width="13" style="visibility: hidden" alt="" /></td> | |
</tr> | |
</table> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:choose> | |
<xsl:when test="$fieldtype = 'Attachments'"> | |
<xsl:value-of select="$fieldtitle" disable-output-escaping="yes" /> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:value-of select="$fieldtitle" /> | |
</xsl:otherwise> | |
</xsl:choose> | |
</xsl:otherwise> | |
</xsl:choose> | |
<xsl:if test="$dvt_filterfield=$fieldname" ddwrt:cf_ignore="1"><img alt="Filter" src="{ddwrt:FieldFilterImageUrl('')}" /></xsl:if> | |
</xsl:template> | |
<xsl:template name="splitLookup"> | |
<xsl:param name="LookupValue"></xsl:param> | |
<xsl:variable name="temp" select="substring-after($LookupValue,';#')"></xsl:variable> | |
<xsl:variable name="first"> | |
<xsl:choose> | |
<xsl:when test="contains($temp,';#')"> | |
<xsl:value-of select="substring-before($temp,';#')"/> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:value-of select="$temp"/> | |
</xsl:otherwise> | |
</xsl:choose> | |
</xsl:variable> | |
<xsl:variable name="remaining" select="substring-after($LookupValue,concat($first,';#'))"></xsl:variable> | |
<xsl:value-of select="$first" /> | |
<xsl:if test="$remaining">, | |
<xsl:call-template name="splitLookup"> | |
<xsl:with-param name="LookupValue" select="$remaining"></xsl:with-param> | |
</xsl:call-template> | |
</xsl:if> | |
</xsl:template> | |
<xsl:variable name="dvt_4_automode">0</xsl:variable> | |
<xsl:template name="dvt_4"> | |
<xsl:variable name="dvt_StyleName">Table</xsl:variable> | |
<xsl:variable name="dvt_ParentRow" select="current()" /> | |
<xsl:variable name="Rows" select="../../../MyAlertsS20/soap:Envelope/soap:Body/ddw1:GetAlertsResponse/ddw1:GetAlertsResult/ddw1:Alerts/ddw1:Alert[substring-after(ddw1:AlertForUrl, '?ID=')=$dvt_ParentRow/@ID]" /> | |
<xsl:variable name="dvt_RowCount" select="count($Rows)" /> | |
<xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0" /> | |
<xsl:choose> | |
<xsl:when test="$dvt_IsEmpty"> | |
<a href="/s2.0/_layouts/SubNew.aspx?List=663435fa-f11a-4a0b-b98b-954b548054a8&ID={@ID}&Source=/s2.0/pages/Project-Status-Dashboard.aspx"><img src="/S2.0/SiteAssets/alert-off.png" alt="Sign Up" style="border:none"/></a> | |
</xsl:when> | |
<xsl:otherwise> | |
<img src="/S2.0/SiteAssets/alert-on.png" alt="Subscribed" style="border:none"/> | |
</xsl:otherwise> | |
</xsl:choose> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment