Skip to content

Commit ad57931

Browse files
committed
add bookmarks feature, see sassoftware#39 and fix update behaviour at collections
Signed-off-by: Said J. <[email protected]>
1 parent e90cda8 commit ad57931

File tree

8 files changed

+838
-151
lines changed

8 files changed

+838
-151
lines changed

sas/SASEnvironment/Files/portal/genPortalMain.xslt

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,8 @@
474474
<!-- Template to handle a reference to a stored process (typically in bookmarks) -->
475475

476476
<xsl:template match="ClassifierMap[@TransformRole='StoredProcess']">
477+
<xsl:param name="showDescription"/>
478+
<xsl:param name="showLocation"/>
477479

478480
<xsl:variable name="stpProgram">
479481
<xsl:for-each select="Trees//Tree">
@@ -492,15 +494,25 @@
492494
</xsl:variable>
493495

494496
<a><xsl:attribute name="href"><xsl:value-of select="$stpURI"/></xsl:attribute><xsl:value-of select="@Name"/></a><br/>
495-
<span style="white-space: nowrap;" colspan="13" class="treeDescription">- <xsl:value-of select="@Desc"/></span><br/>
496-
<span style="white-space: nowrap;" colspan="13" class="treeDescription">- METASERVER<xsl:value-of select="$stpLocation"/></span>
497+
498+
<xsl:choose>
499+
<xsl:when test="$showDescription = 'true' and @Desc != ''">
500+
<span style="white-space: nowrap;" colspan="13" class="treeDescription">- <xsl:value-of select="@Desc"/></span><br/>
501+
</xsl:when>
502+
</xsl:choose>
503+
<xsl:choose>
504+
<xsl:when test="$showLocation = 'true' and $stpLocation != ''">
505+
<span style="white-space: nowrap;" colspan="13" class="treeDescription">- METASERVER<xsl:value-of select="$stpLocation"/></span>
506+
</xsl:when>
507+
</xsl:choose>
497508

498509
</xsl:template>
499510

500511
<!-- Template to handle a reference to a Report (typically in bookmarks)-->
501512

502513
<xsl:template match="Transformation[@TransformRole='Report']">
503-
514+
<xsl:param name="showDescription"/>
515+
<xsl:param name="showLocation"/>
504516
<!-- Unfortunately, to display a report, you need the entire path to it, thus it is required to navigate the parent tree
505517
structure.
506518
-->
@@ -515,7 +527,9 @@
515527
</xsl:variable>
516528

517529
<xsl:call-template name="reportLink">
518-
<xsl:with-param name="reportSBIPURI" select="$reportSBIPURI"/>
530+
<xsl:with-param name="reportSBIPURI" select="$reportSBIPURI"/>
531+
<xsl:with-param name="showDescription" select="$showDescription"/>
532+
<xsl:with-param name="showLocation" select="$showLocation"/>
519533
</xsl:call-template>
520534

521535
</xsl:template>
@@ -553,17 +567,17 @@
553567
In this case, we simply want to make a link to the right tab for this referenced portal page.
554568
-->
555569
<xsl:choose>
556-
<xsl:when test="name(.)='PSPortalPage'">
570+
<xsl:when test="name(.)='PSPortalPage'">
557571
<xsl:call-template name="PortalPageLink">
558-
<xsl:with-param name="showDescription" select="$showDescription"/>
559-
<xsl:with-param name="showLocation" select="$showLocation"/>
560-
</xsl:call-template>
561-
</xsl:when>
562-
<xsl:otherwise>
563-
<xsl:apply-templates select=".">
564-
<xsl:with-param name="showDescription" select="$showDescription"/>
565-
<xsl:with-param name="showLocation" select="$showLocation"/>
566-
</xsl:apply-templates>
572+
<xsl:with-param name="showDescription" select="$showDescription"/>
573+
<xsl:with-param name="showLocation" select="$showLocation"/>
574+
</xsl:call-template>
575+
</xsl:when>
576+
<xsl:otherwise>
577+
<xsl:apply-templates select=".">
578+
<xsl:with-param name="showDescription" select="$showDescription"/>
579+
<xsl:with-param name="showLocation" select="$showLocation"/>
580+
</xsl:apply-templates>
567581
</xsl:otherwise>
568582
</xsl:choose>
569583
</td>
@@ -780,8 +794,9 @@
780794
</xsl:template>
781795

782796
<xsl:template name="reportLink">
783-
784-
<xsl:param name = "reportSBIPURI" />
797+
<xsl:param name = "reportSBIPURI" />
798+
<xsl:param name="showDescription"/>
799+
<xsl:param name="showLocation"/>
785800

786801
<tr>
787802
<td class="portletEntry" valign="top" colspan="2">
@@ -792,15 +807,25 @@
792807
<xsl:variable name="wrsURI"><xsl:text>/SASWebReportStudio/openRVUrl.do?rsRID=</xsl:text><xsl:value-of select="$wrsProgram"/></xsl:variable>
793808

794809
<a><xsl:attribute name="href"><xsl:value-of select="$wrsURI"/></xsl:attribute><xsl:value-of select="@Name"/></a><br/>
810+
795811
<xsl:variable name="stpLocation">
796812
<xsl:for-each select="Trees//Tree">
797813
<xsl:sort select="position()" order="descending"/>
798814
<xsl:text>/</xsl:text><xsl:value-of select="@Name"/>
799815
</xsl:for-each>
800-
</xsl:variable>
816+
</xsl:variable>
817+
818+
<xsl:choose>
819+
<xsl:when test="$showDescription = 'true' and @Desc != ''">
820+
<span style="white-space: nowrap;" colspan="13" class="treeDescription">- <xsl:value-of select="@Desc"/><br/></span>
821+
</xsl:when>
822+
</xsl:choose>
823+
<xsl:choose>
824+
<xsl:when test="$showLocation = 'true' and $stpLocation != ''">
825+
<span style="white-space: nowrap;" colspan="13" class="treeDescription">- METASERVER<xsl:value-of select="$stpLocation"/></span>
826+
</xsl:when>
827+
</xsl:choose>
801828

802-
<span style="white-space: nowrap;" colspan="13" class="treeDescription">- <xsl:value-of select="@Desc"/><br/></span>
803-
<span style="white-space: nowrap;" colspan="13" class="treeDescription">- METASERVER<xsl:value-of select="$stpLocation"/></span>
804829

805830
<!--
806831
<iframe style="overflow: auto;width: 100%" frameborder="0" >
Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,4 @@
11
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
2-
3-
<!-- input xml format is the Mod_Request xml format with context information
4-
about the request is in the NewMetadata section
5-
-->
6-
7-
<xsl:template match="/">
8-
9-
<xsl:variable name="id" select="/Mod_Request/NewMetadata/Id"/>
10-
11-
<GetMetadata>
12-
<Metadata>
13-
<PSPortlet PortletType="" Name="">
14-
<xsl:attribute name="Id"><xsl:value-of select="$id"/></xsl:attribute>
15-
</PSPortlet>
16-
</Metadata>
17-
<NS>SAS</NS>
18-
<Flags>20</Flags>
19-
<Options>
20-
<Templates>
21-
<PSPortlet Id="" Name="" PortletType="">
22-
<Groups/>
23-
<PropertySets/>
24-
<Trees/>
25-
</PSPortlet>
26-
<Group>
27-
<Members/>
28-
</Group>
29-
<PropertySet Id="" Name="">
30-
<SetProperties/>
31-
<PropertySets/>
32-
</PropertySet>
33-
<Property Id="" Name="" SQLType="" DefaultValue=""/>
34-
<Extension Id="" Name="" Value=""/>
35-
<Document Id="" Name="" URIType="" URI="" TextRole="" TextType=""/>
36-
<Transformation Id="" Name="" TransformRole="">
37-
<Trees/>
38-
</Transformation>
39-
<Tree Id="" Name="">
40-
<ParentTree/>
41-
</Tree>
42-
</Templates>
43-
</Options>
44-
</GetMetadata>
45-
46-
</xsl:template>
47-
2+
<xsl:include href="SASPortalApp/sas/SASEnvironment/Files/portlet/edit.collection.get.xslt"/>
483
</xsl:stylesheet>
494

0 commit comments

Comments
 (0)