source: main/branches/2.1/src/main/webapps/ibisph-view/xslt/html/user/queryselections/Page.xslt @ 3548

Last change on this file since 3548 was 3548, checked in by Garth Braithwaite, 10 years ago

view webapp - secure configs and xslt code.

File size: 5.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2
3<xsl:stylesheet version="2.0" 
4        xmlns:xsl ="http://www.w3.org/1999/XSL/Transform" 
5        xmlns:ibis="http://www.ibisph.org"
6
7        exclude-result-prefixes="ibis"
8>
9        <xsl:import href="../../Page.xslt"/>
10        <xsl:import href="../../query/definition/list/QueryDefinitions.xslt"/>
11
12
13        <ibis:doc>
14                <name>html/user/queryselections/Page</name>
15                <summary>core page templates needed to produce the user's query selections.</summary>
16                <description>
17                </description>
18
19                <author>Garth Braithwaite</author>
20                <company>Software Technology Group/CDC/Utah Department of Health</company>
21        </ibis:doc>
22
23
24        <xsl:param name="Page.pageTitle" ibis:doc="Page's title text.">My Queries List</xsl:param>
25
26        <xsl:param name="QueryDefinitions"/>
27        <xsl:param name="ProtectedSelections" select="/"/>
28        <xsl:param name="UserAuthorities"/>
29
30
31
32        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TEMPLATES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
33        <xsl:template name="Page.specificScript"
34                ibis:doc="HTML API template implementation/override that provides the
35                        'selection' Javascript file links for the module selection page."
36        >
37                <!-- enhanced_element and event_manager are already loaded via \site_specific_page.xslt's standard script. -->
38                <script type="text/javascript" src="{$ibis.urlPrefix}js/ShowHideBlockControl.js"/>
39
40                <script type="text/javascript">
41                        // <![CDATA[
42                        var sectionControl = new ShowHideBlockControl("control", "ExpandableSectionControlOpen", "container", "ExpandableSectionContainerShow");
43                        var treeControl    = new ShowHideBlockControl("control", "Open", "container");
44                        // ]]>
45                </script>
46        </xsl:template>
47
48
49
50        <xsl:template name="Page.sectionsContent"
51                ibis:doc="Main page content template that displays the user's query
52                        definitions and any secure/protected query module selections.
53                "
54        >
55                <xsl:param name="authorizedSelections" select="$ProtectedSelections/SELECTIONS/SECTIONS/SECTION/SELECTIONS/SELECTION[AUTHORITIES/AUTHORITY = $UserAuthorities/AUTHORITIES/AUTHORITY]"/>
56
57                Welcome to Your Queries.  This page shows the query modules that you
58                have defined and saved or have access to.  To reach this page you must
59                be logged in.  If you have not logged in or are not seeing the selections
60                you think you should either logout and log back in as the appropriate
61                user or login for the first time.  If you think that there is a problem
62                please contact the system administrator of this application (see the
63                contact link in the footer of this page).
64                <br/><br/>
65
66                <xsl:variable name="authorizedSelectionsCount" select="count($ProtectedSelections/SELECTIONS/SECTIONS/SECTION/SELECTIONS/SELECTION[AUTHORITIES/AUTHORITY = $UserAuthorities/AUTHORITIES/AUTHORITY])"/>
67                <xsl:if test="0 = $authorizedSelectionsCount">
68                        <xsl:call-template name="QueryDefinitions.runEditSelectionList">
69                                <xsl:with-param name="queryDefinitions" select="$QueryDefinitions/QUERY_DEFINITIONS"/>
70                        </xsl:call-template>
71                </xsl:if>
72
73                <style>
74                        a.ExpandableSectionControl
75                        {
76                                background-color: #003366 !important;
77                        }
78                </style>
79                <xsl:if test="0 != $authorizedSelectionsCount">
80                        <a name="controlUserQueryDefinitions" id="controlUserQueryDefinitions" 
81                                href="javascript:sectionControl.toggle('UserQueryDefinitions');" 
82                                class="ExpandableSectionControl ExpandableSectionControlOpen" 
83                                title="User Query Definition Selections"
84                        >
85                                <span class="Icon"/>
86                                Your Saved Query Definitions
87                        </a>
88                        <div id="containerUserQueryDefinitions" class="ExpandableSectionContainer ExpandableSectionContainerShow">
89                                <xsl:call-template name="QueryDefinitions.runEditSelectionList">
90                                        <xsl:with-param name="queryDefinitions" select="$QueryDefinitions/QUERY_DEFINITIONS"/>
91                                </xsl:call-template>
92                        </div><br/>
93
94                        <a name="controlProtectedQueries" id="controlProtectedQueries" 
95                                href="javascript:sectionControl.toggle('ProtectedQueries');" 
96                                class="ExpandableSectionControl ExpandableSectionControlOpen" 
97                                title="Protected Query Selections"
98                        >
99                                <span class="Icon"/>
100                                Your Protected Query Selections
101                        </a>
102
103                        <div id="containerProtectedQueries" class="ExpandableSectionContainer ExpandableSectionContainerShow">
104                                <xsl:call-template name="Page.protectedSelections">
105                                        <xsl:with-param name="authorizedSelections" 
106                                                select="$ProtectedSelections/SELECTIONS/SECTIONS/SECTION/SELECTIONS/SELECTION[AUTHORITIES/AUTHORITY = $UserAuthorities/AUTHORITIES/AUTHORITY]"
107                                        />
108                                </xsl:call-template>
109                        </div>
110                </xsl:if>
111
112        </xsl:template>
113
114
115
116        <xsl:template name="Page.protectedSelections">
117                <xsl:param name="authorizedSelections"/>
118
119                <table cellspacing="0" cellpadding="0" border="1" class="Info ExtraCellPadding"
120                        summary="table of all your query definition selections."
121                        caption="alphabetical listing for all your query definition selections."
122                >
123                        <tr>
124                                <th scope="col" width="600" title="secure query module selections">Protected Query Selections</th>
125                        </tr>
126
127                <!-- loop for all definitions -->
128                <xsl:for-each select="$authorizedSelections">
129                <xsl:sort select="TITLE"/>
130                        <tr>
131                                <td title="protected query selection">
132                                        <a href="{$ibis.urlPrefix}{LOCAL_URL}" title="click this link to go to the query selection page.">
133                                                <xsl:value-of select="TITLE"/>
134                                        </a>
135                                </td>
136                        </tr>
137                </xsl:for-each>
138
139                </table>
140                <div class="RecordCount">Total Secure Query Selections Count: <xsl:value-of select="count($authorizedSelections)"/></div>
141        </xsl:template>
142
143</xsl:stylesheet>
144<!-- ============================= End of File ============================= -->
145
Note: See TracBrowser for help on using the repository browser.