source: main/trunk/ibisph-view/src/main/webapp/xslt/html/SiteSpecific.xslt @ 19868

Last change on this file since 19868 was 19868, checked in by GarthBraithwaite_STG, 4 years ago

view - more css tweaks. Reworked common.xml to go back to add model maps be referenced. Added complete external path for xslt access.

File size: 13.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2
3<xsl:stylesheet version="3.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
10        <xsl:import href="VideoDialog.xslt"/>
11
12
13        <ibis:doc>
14                <name>html/SiteSpecific</name>
15                <summary>
16                        Main site specific template API definitions and core page API
17                        template overrides.
18                </summary>
19                <description>
20                        This XSLT provides the core, base site specific API related template
21                        definitions.  It should contain global, general definitions like menu
22                        code and general site specific APIs.  If specific definitions are
23                        implemented then the local SiteSpecific.xslt will need to make sure
24                        that the "correct" template definition is implemented.  Otherwise high
25                        level template overrides will take precedence over lower level page
26                        specific definitions as the SiteSpecific.xslt is the last template
27                        imported.
28                </description>
29        </ibis:doc>
30
31
32        <xsl:param name="Page.applicationTitle" select="'NM-IBIS'"
33                ibis:doc="Used for the page's title element prefix text"
34        />
35
36        <xsl:param name="SiteSpecific.siteNavigationSelectionsXMLFilePathAndName" 
37                select="ibis:getContentPath('xml/selection/navigation/SiteNavigationSelections.xml')"
38        />
39
40        <xsl:param name="SiteSpecific.siteNavigationSelections"
41                ibis:doc="Menu XML document/elements which contains all the applicable
42                        'xincluded' sub files.  There are several ways to do this xinclude
43                        functionality.  1) two step process involving a Java code, 2) use
44                        an XSL processor that supports xinclude, 3) create a variable that
45                        contains the entire document fully processed.  The latter approach
46                        is used in this situation because the menu files are quite small and
47                        this option does not involve any outside dependence.  For performance
48                        xincludes might not be a good way to go but for maint it is a good
49                        solution."
50        >
51                <xsl:apply-templates select="document($SiteSpecific.siteNavigationSelectionsXMLFilePathAndName)/SELECTIONS/*" mode="ibis.copy"/>
52        </xsl:param>
53
54        <xsl:param name="PathSegments" select="'about'" ibis:doc="injected via the commonModelMapListController which most controllers inherit."/>
55        <xsl:param name="SiteSpecific.siteNavigationSelectedSelectionName" select="concat($PathSegments[1], 'Menu')"
56                ibis:doc="Used to reference the the context menu items."
57        />
58        <xsl:param name="SiteSpecific.navigationPathSelections"
59                ibis:doc="Default path segments for bread crumb trails..."
60        >
61                <xsl:for-each select="$PathSegments[position() != last()]">
62                        <xsl:variable name="currentPathSegment" select="position()"/>
63                        <SELECTION>
64                                <TITLE>
65                                        <xsl:value-of select="concat(upper-case(substring(.,1,1)), substring(., 2))"/>
66                                </TITLE>
67                                <LOCAL_URL><xsl:for-each select="$PathSegments[position() &lt;= $currentPathSegment]"><xsl:value-of select="."/>/</xsl:for-each>Introduction.html</LOCAL_URL>
68                        </SELECTION>
69                </xsl:for-each>
70        </xsl:param>
71
72
73        <xsl:param name="SiteSpecific.siteAuthenticatedUserSelectionXMLFilePathAndName" 
74                select="ibis:getContentPath('xml/selection/navigation/AuthenticatedUserSelection.xml')"
75        />
76        <xsl:param name="SiteSpecific.siteNonAuthenticatedUserSelectionXMLFilePathAndName" 
77                select="ibis:getContentPath('xml/selection/navigation/UserSelection.xml')"
78        />
79        <xsl:param name="SiteSpecific.siteAuthenticatedUserSelections">
80                <xsl:apply-templates select="document($SiteSpecific.siteAuthenticatedUserSelectionXMLFilePathAndName)/SELECTION/SELECTIONS" mode="ibis.copy"/>
81        </xsl:param>
82        <xsl:param name="SiteSpecific.siteNonAuthenticatedUserSelections">
83                <xsl:apply-templates select="document($SiteSpecific.siteNonAuthenticatedUserSelectionXMLFilePathAndName)/SELECTION/SELECTIONS" mode="ibis.copy"/>
84        </xsl:param>
85
86
87        <xsl:param name="SiteSpecific.printPageFooter" 
88                ibis:doc="contents of the print footer to show if media=print"
89        >
90                The information provided above is from the Department of Health's Center for
91                Health Data NM-IBIS web site (http://ibis.health.state.nm.us).  The information published
92                on this website may be reproduced without permission. Please use the following citation:
93                &quot;
94                        Retrieved
95                        <xsl:value-of select="ibis:getFormattedDateTime(current-dateTime())"/>
96                        from Department of Health, Center for Health Data, Indicator-Based Information
97                        System for Public Health Web site: http://ibis.health.state.gov
98                &quot;.
99
100                <xsl:if test="string-length($Page.XMLModifedDate) != 0">
101                        <br/><br/>
102                        Content updated: <xsl:value-of select="$Page.XMLModifedDate"/>
103                </xsl:if>
104        </xsl:param>
105
106
107        <xsl:param name="SiteSpecific.logoutURL" select="concat($ibis.contextPath, 'user/logout')"/>
108
109
110
111        <xsl:template name="Page.banner"/>
112
113
114        <xsl:template name="Page.header" 
115                ibis:doc="State IBIS-PH specific implementation of the 'html.header'
116                        API template.  This template provides the State and DOH banners via
117                        a siteSpecific.headerBanner template call and the blue IBIS-PH
118                        graphic with site navigation menus via the siteSpecific.siteNavigation
119                        template.  To turn off the banners, simply override it with nothing."
120        >
121                <header id="header">
122                        <div class="SiteTitle">New Mexico's Health Indicator Data &amp; Statistics</div>
123
124                        <div id="userMenu" class="{if(ibis:hasAuthorities())then 'Popup Secure' else 'Popup'}"> 
125                                <xsl:call-template name="SelectionsList.inputControl">
126                                        <xsl:with-param name="inputID"    select="'userControl'"/>
127                                        <xsl:with-param name="inputType"  select="'checkbox'"/>
128                                        <xsl:with-param name="inputClass" select="'Control'"/>
129                                        <xsl:with-param name="title"      select="'My Selections'"/>
130                                </xsl:call-template>
131
132                                <div class="Container">
133                                        <div class="Content">
134                                                <xsl:if test="ibis:isAuthenticated()">
135                                                        Welcome <xsl:value-of select="$ibis.userProfile/FULL_NAME"/><br/>
136                                                        You are logged in as: <xsl:value-of select="$ibis.userProfile/ID"/><br/>
137                                                        Click <a href="{$SiteSpecific.logoutURL}" title="Click
138                                                        to log off">logoff</a> if you want to logoff or switch
139                                                        to another user account.
140                                                        <xsl:call-template name="SelectionsList.processSelections">
141                                                                <xsl:with-param name="selections" select="$SiteSpecific.siteAuthenticatedUserSelections"/>
142                                                        </xsl:call-template>
143                                                </xsl:if>
144
145                                                <xsl:if test="not(ibis:isAuthenticated())">
146                                                        You are not <a href="{$ibis.contextPath}user/Login.html">logged
147                                                        in</a> as either an authorized partner dataset user or as
148                                                        a self registered user.
149                                                        <xsl:call-template name="SelectionsList.processSelections">
150                                                                <xsl:with-param name="selections" select="$SiteSpecific.siteNonAuthenticatedUserSelections"/>
151                                                        </xsl:call-template>
152                                                </xsl:if>
153                                        </div>
154                                </div>
155                        </div>
156
157                        <xsl:call-template name="SiteSpecific.siteNavigation"/>
158                        <img src="{$ibis.contextPath}image/logo.png" class="Logo"/>
159                </header>
160        </xsl:template>
161
162
163        <xsl:template name="SiteSpecific.siteNavigation">
164                <nav id="siteNavigation">
165                        <xsl:call-template name="MenuSelectionsList.megaMenu">
166                                <xsl:with-param name="selections"     select="$SiteSpecific.siteNavigationSelections"/>
167                                <xsl:with-param name="displayControlType" select="'input'"/>
168                                <xsl:with-param name="inputName"      select="'siteMenuPanelsControl'"/>
169                                <xsl:with-param name="containerClass" select="'HorizontalMenu'"/>
170                                <xsl:with-param name="selectedSelectionName" select="$SiteSpecific.siteNavigationSelectedSelectionName"/>
171                        </xsl:call-template>
172                </nav>
173        </xsl:template>
174
175        <xsl:template name="MenuSelectionsList.additionalPrimaryListItems">
176                <li>
177                        <form id="siteSearch" name="siteSearch" method="get" action="http://www.google.com/search" class="Search">
178                                <label for="siteSearchInput" accesskey="s" class="OffPage">Search the site:</label>
179                                <input id="siteSearchInput" name="q" 
180                                        placeholder="Search the Site..."
181                                        type="text" autocomplete="on"
182                                        dir="ltr" spellcheck="false" style="outline: none;"
183                                />
184                                <button type="submit" value="" alt="Search" title="Search" font-icon="&#xe13e;"></button>
185                                <input type="hidden" name="sitesearch" value="{$ibis.remoteRequestPath}" title="site URL to be searched"/>
186                        </form>
187                </li>
188        </xsl:template>
189
190
191        <xsl:template name="Page.content" 
192                ibis:doc="Provides the adopter specific layout by overriding the standard
193                        content container. This layout consists of one main content column. 
194                "
195        >
196                <main id="content" cellpadding="0" cellspacing="0" border="0"
197                        summary="main content container"
198                        caption="main content container"
199                >
200                        <div class="NavigationPathSocialMedia">
201                                <div id="navigationPath" title="Navigation path to get to this page.">
202                                        Path:
203                                        <xsl:call-template name="SelectionsList.processSelections">
204                                                <xsl:with-param name="selections">
205                                                        <SELECTION>
206                                                                <TITLE><xsl:value-of select="$Page.applicationTitle"/></TITLE>
207                                                                <URL><xsl:value-of select="$ibis.contextPath"/></URL>
208                                                        </SELECTION>
209                                                        <xsl:copy-of select="$SiteSpecific.navigationPathSelections"/>
210                                                </xsl:with-param>
211                                        </xsl:call-template>
212                                </div>
213                                <xsl:call-template name="SiteSpecific.socialMediaLinks"/>
214                        </div>
215
216                        <xsl:call-template name="Page.contentHeader"/>
217                        <xsl:call-template name="Page.contentBody"/>
218                        <xsl:call-template name="Page.contentFooter"/>
219                </main>
220                <xsl:call-template name="Page.videoDialog"/>
221        </xsl:template>
222
223
224        <xsl:template name="Page.footer">
225                <footer id="footer">
226                        <div class="Row">
227                                <div class="Section">
228                                        <h3>NM-IBIS</h3>
229                                        <ul>
230                                                <li><a href="{$ibis.contextPath}about/ContactInformation.html">Contact Us</a></li>
231                                                <li><a href="{$ibis.contextPath}about/ContentUsage.html">Contents and Usage</a></li>
232                                                <li><a href="{$ibis.contextPath}about/Background.html">Background</a></li>
233                                        </ul>
234                                </div>
235                                <div class="Section">
236                                        <h3>DOH</h3>
237                                        <ul>
238                                                <li><a href="http://health.utah.gov/index.html">DOH Home</a></li>
239                                                <li><a href="http://health.utah.gov/contact/index.html">Contact DOH</a></li>
240                                                <li><a href="http://health.utah.gov/about/index.html">A-Z List</a></li>
241                                                <li><a href="http://health.utah.gov/about/index.html">About Us</a></li>
242                                        </ul>
243                                </div>
244                                <div class="Section">
245                                        <h3>Legal</h3>
246                                        <ul>
247                                                <li><a href="{$ibis.contextPath}about/WebCitation.html">Web Citation</a></li>
248                                                <li><a href="http://health.utah.gov/about/privacy.html">Privacy Policy</a></li>
249                                                <li><a href="http://health.utah.gov/about/disclaimer.html">Use Disclaimer</a></li>
250                                        </ul>
251                                </div>
252                                <div class="Section">
253                                        <h3>Other</h3>
254                                        <ul>
255                                                <li><a href="http://www.utah.gov/">State Website</a></li>
256                                                <li><a href="http://epht.health.utah.gov/epht-view/" title="IBIS-PH is produced in collaboration with the Utah Environmental Public Health Tracking Program">EPHT Tracking Website</a></li>
257                                                <li><a href="http://www.ibisph.org/">IBIS-PH Community of Practice</a></li>
258                                        </ul>
259                                </div>
260                        </div>
261
262                        <div class="Row">
263                                <div class="Bottom">
264                                        <img src="{$ibis.contextPath}image/doh_logo_footer.png" 
265                                                onclick="javascript:location.href='http://health.utah.gov/'" title="UDOH Link"
266                                                alt="Department of Health Logo" 
267                                        />
268
269                                        <div>
270                                                The information published on this
271                                                website may be reproduced without permission. Please use the following
272                                                citation: &quot;Retrieved <xsl:value-of select="ibis:getFormattedDate(current-date())"/> 
273                                                from the Department of Health, Indicator-Based
274                                                Information System for Public Health Web site: http://ibis.health.gov&quot;
275                                                <xsl:if test="string-length($Page.XMLModifedDate) != 0">
276                                                        <div class="LastModified">Page Content Updated: <xsl:value-of select="$Page.XMLModifedDate"/></div>
277                                                </xsl:if>
278                                        </div>
279                                </div>
280                        </div>
281                </footer>
282
283                <!-- had to wrap a div within so FF would format correctly... -->
284                <footer id="printPageFooter">
285                        <xsl:copy-of select="$SiteSpecific.printPageFooter"/>
286                </footer>
287        </xsl:template>
288
289
290        <xsl:template name="SiteSpecific.socialMediaLinks">
291                <nav class="SocialMedia" title="options to easily share this page">
292                        share
293                        <ul>
294                                <li>
295                                        <a href="http://www.linkedin.com/shareArticle?url={$ibis.requestURL}"
296                                                title="Share this page on LinkedIn" 
297                                                rel="nofollow" target="_blank"
298                                                class="FontIcon LinkedIn"
299                                        >
300                                        </a>
301                                </li>
302                                <li>
303                                        <a href="http://www.facebook.com/sharer.php?url={$ibis.requestURL}" 
304                                                title="Share this page on Facebook" 
305                                                rel="nofollow" target="_blank"
306                                                class="FontIcon Facebook"
307                                        >
308                                        </a>
309                                </li>
310                                <li>
311                                        <a href="javascript:window.open('http://twitter.com/share?url=' + location.href)" 
312                                                title="Share this page on Twitter" 
313                                                rel="nofollow" target="_blank"
314                                                class="FontIcon Twitter"
315                                        >
316                                        </a>
317                                </li>
318                                <li>
319                                        <a href="javascript:window.open('https://plus.google.com/share?url=' + location.href)" 
320                                                title="Email this page's URL" 
321                                                rel="nofollow" target="_blank"
322                                                class="FontIcon Email"
323                                        >
324                                        </a>
325                                </li>
326                                <li>
327                                        <a href="#" onclick="window.print();return false;"
328                                                title="Print this page and share it (printer friendly version)" 
329                                                rel="nofollow" target="_blank"
330                                                class="FontIcon PrinterFriendly"
331                                        >
332                                        </a>
333                                </li>
334                        </ul>
335                </nav>
336        </xsl:template>
337
338</xsl:stylesheet>
339<!-- ============================= End of File ============================= -->
340
Note: See TracBrowser for help on using the repository browser.