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