source: main/trunk/ibisph-view/src/main/webapp/xslt/html/community/indicators/Page.xslt @ 19905

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

view - temp CP commit to save the control UI before refactor.

File size: 14.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        <xsl:import href="../Page.xslt"/>
10
11
12        <ibis:doc>
13                <name>html/community/indicators/Page</name>
14                <summary>Default core code that produces the Community profile snapshot</summary>
15                <description>
16                        Main page templates for the community profile indicators list Report.
17                </description>
18        </ibis:doc>
19
20
21        <xsl:param name="Page.pageTitle" ibis:doc="Page's browser title text."
22                select="concat(
23                        $Page.communityDimensionValue/TITLE,
24                        ' ',
25                        ibis:getDimensionTitle($Page.communityDimension),
26                        ' Community Health Profile '
27                )"
28        />
29        <xsl:param name="Page.contentTitle" ibis:doc="Page's content title text."
30                select="concat(
31                        $Page.communityDimensionValue/TITLE,
32                        ' ',
33                        ibis:getDimensionTitle($Page.communityDimension),
34                        ' Community Health Profile'
35                )"
36        />
37
38
39        <xsl:template name="Page.contentBody"
40                ibis:doc="Main page content template."
41        >
42<!--
43                <xsl:call-template name="ContentContainer.contentBlockWithDelimitedTitleTextsNodesets">
44                        <xsl:with-param name="title"      select="'Overview'"/>
45                        <xsl:with-param name="contentBlockType" select="'expandable'"/>
46                        <xsl:with-param name="expandableContentShow" select="true()"/>
47                        <xsl:with-param name="addWikiAttribute"      select="true()"/>
48                        <xsl:with-param name="titleAndTextsNodeset"  select="$Page.communityProfile/OVERVIEWS/OVERVIEW | $indicatorProfileSet/NARRATIVE"/>
49                </xsl:call-template>
50<xsl:message select="$indicatorProfileSet"/>
51
52<br/><br/> 
53
54DimensionName: <xsl:value-of select="$DimensionName"/><br/>
55DimensionValue: <xsl:value-of select="$DimensionValue"/><br/>
56IndicatorSetName: <xsl:value-of select="$Page.indicatorSetName"/><br/>
57-->
58                <div class="ContentOptions">
59                        <h3>Community Health Profile Report Options</h3>
60
61                        <table class="ListTable">
62                                <tr>
63                                        <td><label for="dimensionValue"><xsl:value-of select="$Page.communityDimensionTitle"/>:</label></td>
64                                        <td>
65<!--
66                                                <xsl:if test="0 != string-length($Page.previousDimensionValue/TITLE)">
67                                                        <a href="javascript:requestSamePageDifferentDimensionValue('{normalize-space($Page.previousDimensionValue/text()[1])}')"
68                                                                title="show previous community value"
69                                                        >&lt;&lt; Show <xsl:value-of select="$Page.previousDimensionValue/TITLE"/></a>
70                                                </xsl:if>
71-->
72                                                <select name="dimensionValue" id="dimensionValue" onchange="location=this.value; this.value='';" style="width: 100%">
73                                                        <xsl:for-each select="$Page.communityDimension/VALUES/VALUE[not(NOT_SELECTABLE_FLAG)]">
74                                                                <xsl:sort select="SORT_ORDER" data-type="number" order="ascending"/>
75                                                                <xsl:sort select="TITLE" order="ascending"/>
76                                                                <xsl:variable name="value" select="normalize-space(text()[1])"/>
77                                                                <option value="{concat($ibis.baseRequestPath, 'community/indicators/', $Page.indicatorSetName, '/', $Page.dimensionName, '/', $value, '.html')}">
78                                                                        <xsl:if test="$value = $Page.dimensionValue">
79                                                                                <xsl:attribute name="selected">selected</xsl:attribute>
80                                                                        </xsl:if>
81                                                                        <xsl:value-of select="TITLE"/>
82                                                                </option>
83                                                        </xsl:for-each>
84                                                </select>
85<!--
86                                                <xsl:if test="0 != string-length($Page.nextDimensionValue/TITLE)">
87                                                        <a href="javascript:requestSamePageDifferentDimensionValue('{normalize-space($Page.nextDimensionValue/text()[1])}')"
88                                                                title="show next community value"
89                                                        >Show <xsl:value-of select="$Page.nextDimensionValue/TITLE"/> &gt;&gt;</a>
90                                                </xsl:if>
91-->
92                                        </td>
93                                </tr>
94                                <tr>
95                                        <td>
96                                                <label for="indicatorSetName">Set of Health Indicators:</label>
97                                        </td>
98                                        <td>
99                                                <select name="indicatorSetName" id="indicatorSetName" 
100                                                        onchange="location=this.value; this.value='';"
101                                                >
102<!--
103                                                        <option value="">All</option>
104-->
105                                                        <xsl:for-each select="$Page.communityIndicatorSet">
106                                                                <xsl:sort select="SORT_ORDER" data-type="number" order="ascending"/>
107                                                                <xsl:sort select="TITLE" order="ascending"/>
108                                                                <option value="{concat($ibis.baseRequestPath, 'community/indicators/', NAME, '/', $Page.dimensionName, '/', $Page.dimensionValue, '.html')}">
109                                                                        <xsl:if test="NAME = $Page.indicatorSetName">
110                                                                                <xsl:attribute name="selected">selected</xsl:attribute>
111                                                                        </xsl:if>
112                                                                        <xsl:value-of select="TITLE"/>
113                                                                </option>
114                                                        </xsl:for-each>
115                                                </select>
116                                        </td>
117                                        <td>
118                                                <div class="Help Popup Info FontIcon Inline">
119                                                        <div class="Container">
120                                                                <div class="Content">
121                                                                        List of health indicators based on the selected
122                                                                        set of indicators that have data for the selected
123                                                                        community. 
124                                                                       
125                                                                        You can change the set of health indicators to
126                                                                        be reported on by using the drop down list.
127
128                                                                        Click on the title link in the list
129                                                                        for a more detailed view of that community's
130                                                                        health indicator.
131                                                                </div>
132                                                        </div>
133                                                </div>
134                                        </td>
135                                </tr>
136                        <xsl:if test="exists($Page.communityProfile/FACTS_PAGE_FLAG)">
137                                <tr>
138<!--
139                                        <td><h4>About <xsl:value-of select="$Page.communityDimensionValue/TITLE"/>:</h4></td>
140-->
141                                        <td><label><xsl:value-of select="$Page.communityDimensionTitle"/> Information:</label></td>
142                                        <td>
143                                                <a title="Show this communities quick facts page."
144                                                        href="{concat($ibis.baseRequestPath, 'community/facts/', $Page.dimensionName, '/', $Page.dimensionValue, '.html')}"
145                                                        ><xsl:value-of select="$Page.communityDimensionValue/TITLE"/>'s Quick Facts</a>
146                                        </td>
147                                </tr>
148                        </xsl:if>
149                        </table>
150                </div>
151
152                <!-- have to do the table-layout:fixed and th width of 40% for weird chrome behavior -->
153                <table class="Info Comparison" style="table-layout:fixed; margin-top: 1rem;"
154                        summary="Data table of the community profile snapshot report.
155                                Listed by indicator profile then the community value
156                                followed by the comparison value.
157                        " 
158                        caption="Community profile snapshot report data table."
159                >
160                        <col class="IndicatorSet"/>
161                        <col class="CommunityValue"/>
162                        <col class="Compare"/>
163                        <col class="Compare"/>
164                        <col class="Compare"/>
165                        <col class="Compare"/>
166                        <thead>
167                                <tr>
168                                        <th scope="col" class="Row" rowspan="2">
169                                                <xsl:value-of select="$Page.indicatorSet/TITLE"/>
170                                        </th>
171
172                                        <th scope="col" class="Columns" colspan="3">Values</th>
173                                        <th scope="col" class="Columns" colspan="2">Compared To</th>
174                                </tr>
175
176                                <tr>
177                                        <th scope="col" class="Column"><xsl:value-of select="$Page.communityDimensionValue/TITLE"/>&#160; <xsl:value-of select="$Page.communityDimensionTitle"/></th>
178                                        <th scope="col" class="Column"><xsl:value-of select="$ibis.adopterTitle"/></th>
179                                        <th scope="col" class="Column">U.S.</th>
180                                        <th scope="col" class="Column"><xsl:value-of select="$ibis.adopterTitle"/></th>
181                                        <th scope="col" class="Column">U.S.</th>
182                                </tr>
183                        </thead>
184
185                        <tbody>
186                                <xsl:for-each select="$Page.indicatorSet/INDICATOR_TO_INDICATOR_SETS/INDICATOR_TO_INDICATOR_SET/INDICATOR_NAME">
187                                        <xsl:sort select="SORT_ORDER" data-type="number" order="ascending"/>
188                                        <xsl:sort select="INDICATOR_NAME" data-type="text" order="ascending"/>
189
190                                        <xsl:call-template name="indicatorProfileRow">
191                                                <xsl:with-param name="indicatorName" select="current()"/>
192                                        </xsl:call-template>
193                                </xsl:for-each>
194                        </tbody>
195                </table>
196                <div class="DataFootnote">
197                        <span class="ComparisonClass Better">Better</span> is when the community is statistically better (worst confidence limit value is better than the comparison value).<br/>
198                        <span class="ComparisonClass Similar">Similar</span> is when the community is not statistically different (comparison value is between the community lower and upper confidence limit values).<br/>
199                        <span class="ComparisonClass Worse">Worse</span> is when the community statistically worse (best limit value is worse than the comparison value).<br/>
200                </div>
201<!--
202                <ul class="DataFootnote">
203                        <li><span class="ComparisonClass Similar">Similar</span> is when the community's lower and upper confidence limit value brackets the comparison value (State or U.S.).</li>
204                        <li><span class="ComparisonClass Worse">Worse</span> is when the community's best limit value is worse than the comparison value (State or U.S.).</li>
205                        <li><span class="ComparisonClass Better">Better</span> is when the community's worst confidence limit value is better than the comparison value (State or U.S.).</li>
206                </ul>
207-->
208        </xsl:template>
209
210
211        <xsl:template match="OVERVIEWS">
212                <xsl:call-template name="ContentContainer.contentBlockWithDelimitedTitleTextsNodesets">
213                        <xsl:with-param name="title"      select="'Overview'"/>
214                        <xsl:with-param name="contentBlockType" select="'expandable'"/>
215                        <xsl:with-param name="expandableContentShow" select="true()"/>
216                        <xsl:with-param name="addWikiAttribute"      select="true()"/>
217                        <xsl:with-param name="titleAndTextsNodeset"  select="OVERVIEW"/>
218                </xsl:call-template>
219        </xsl:template>
220
221
222
223        <xsl:template name="indicatorProfileRow"
224                ibis:doc="Handles the xml/community/DIMENSION.xml type file.  Which is of
225                        the struct: COMMUNITY_PROFILE, OVERVIEWS, DIMENSION, INDICATOR_PROFILES
226                        /INDICATOR_PROFILE/COMPARATIVE_VALUES/COMPARATIVE_VALUE/ TYPE, SERIES,
227                        CAT.
228                "
229        >
230                <xsl:param name="indicatorName"/>
231                <xsl:param name="indicator" select="document(concat($Page.indicatorProfileXMLFilePath, '/', $indicatorName, '.xml'), /)/INDICATOR"/>
232
233                <xsl:if test="not($indicator/*)"><xsl:message select="concat('IP NOT FOUND: ', $indicatorName)"/></xsl:if>
234                <xsl:if test="$indicator/*">
235
236                        <xsl:variable name="indicatorComparisonValues">
237                                <xsl:call-template name="ComparisonValues.getIndicatorStateUSComparisonValues">
238                                        <xsl:with-param name="indicator"  select="$indicator"/>
239                                        <xsl:with-param name="dimensions" select="$Page.dimensions"/>
240                                        <xsl:with-param name="measures"   select="$Page.measures"/>
241                                        <xsl:with-param name="valueTypes" select="$Page.valueTypes"/>
242                                        <xsl:with-param name="communityDimensionName"  select="$Page.dimensionName"/>
243                                        <xsl:with-param name="communityDimensionValue" select="$Page.dimensionValue"/>
244                                </xsl:call-template>
245                        </xsl:variable>
246
247<!-- GARTH TODO: remove:
248<xsl:message select="concat('============indicatorComparisonValues:', $indicatorName, ', indicatorComparisonValues below:')"/>
249<xsl:message select="$indicatorComparisonValues"/>
250
251<xsl:if test="not($indicatorComparisonValues/*)">
252        <xsl:message select="'indicatorComparisonValues NOT Created.'"/>
253</xsl:if>
254-->
255                        <xsl:if test="$indicatorComparisonValues/*">
256                        <tr>
257                                <td class="Indicator">
258<!--
259<xsl:if test="$indicator/NAME = 'MentHlthYouth'">
260<xsl:message select="'values~~~~~~~~~~~~~~~'"/>
261<xsl:message select="$indicatorComparisonValues"/>
262</xsl:if>
263                                name: <xsl:value-of select="$indicatorComparisonValues/PERIOD_DIMENSION/NAME"/>
264
265                                <xsl:attribute name="class">
266                                </xsl:attribute>
267
268                                        <xsl:if test="boolean($Page.showAnyContextualData)">
269                                                <xsl:attribute name="href"  select="concat($ibis.baseRequestPath, 'indicator/view/', $indicatorName, '.html')"/>
270                                                <xsl:attribute name="title" select="concat('Go to the IBIS indicator report page for', $indicator/TITLE)"/>
271                                        </xsl:if>
272-->
273                                        <div class="Help Popup Info FontIcon Right">
274                                                <div class="Container">
275                                                        <div class="Content">
276                                                                <xsl:value-of select="$indicator/DEFINITION"/>
277                                                        </div>
278                                                </div>
279                                        </div>
280                                        <a href="{$ibis.baseRequestPath}community/indicator/{$indicatorName}/{$Page.dimensionName}/{$Page.dimensionValue}.html" 
281                                                title="Click here to see a more detailed comparison of {$indicator/TITLE}" class="Block"
282                                        >
283                                                <xsl:value-of select="$indicator/TITLE"/> 
284<!--
285                                                (<xsl:value-of select="$indicatorComparisonValues/PERIOD_DIMENSION/VALUE/TITLE"/>)
286-->
287                                        </a>
288                                        <div title="Health indicator measure and period">(<xsl:value-of select="concat($indicatorComparisonValues/MEASURE/TITLE, ', ', $indicatorComparisonValues/PERIOD_DIMENSION/VALUE/TITLE)"/>)</div>
289                                </td>
290
291                                <td class="Value TextAlignCenter" title="Community value for {$indicatorComparisonValues/PERIOD_DIMENSION/VALUE/TITLE}">
292                                        <xsl:value-of select="$indicatorComparisonValues/COMMUNITY/VALUE/TITLE"/>
293                                        <div class="Italicize SmallerFont" title="Lower and upper confidence values">
294                                                <xsl:if test="string-length($indicatorComparisonValues/COMMUNITY/LOWER_LIMIT/TITLE) != 0">
295                                                        (<xsl:value-of select="$indicatorComparisonValues/COMMUNITY/LOWER_LIMIT/TITLE"/>
296                                                         -
297                                                         <xsl:value-of select="$indicatorComparisonValues/COMMUNITY/UPPER_LIMIT/TITLE"/>)
298                                                </xsl:if>
299                                        </div>
300                                </td>
301                                <td class="Value TextAlignCenter" title="Value for {$indicatorComparisonValues/STATE/TITLE}">
302                                        <xsl:value-of select="$indicatorComparisonValues/STATE/VALUE/TITLE"/>
303                                </td>
304                                <td class="Value TextAlignCenter" title="Value for {$indicatorComparisonValues/US/TITLE}">
305                                        <xsl:value-of select="$indicatorComparisonValues/US/VALUE/TITLE"/>
306                                </td>
307
308                                <td class="Value TextAlignCenter ComparisonClass {$indicatorComparisonValues/STATE/VALUE/COMPARISON/CLASS}" title="No value - can not compare">
309
310                                        <xsl:if test="0 != string-length($indicatorComparisonValues/STATE/VALUE/COMPARISON/CLASS)">
311                                                <xsl:attribute name="title" select="concat($Page.communityDimensionValue/TITLE, ' is ', $indicatorComparisonValues/STATE/VALUE/COMPARISON/CLASS)"/>
312                                        </xsl:if>
313                                        <xsl:value-of select="$indicatorComparisonValues/STATE/VALUE/COMPARISON/CLASS"/>
314<!--
315                                        <img width="140" src="{$ibis.baseRequestPath}image/gauge/compare/{$indicatorComparisonValues/STATE/VALUE/COMPARISON/GAUGE_NAME}.png" alt="comparison gauge value"/>
316                                        &#160;
317-->
318                                </td>
319                                <td class="Value TextAlignCenter ComparisonClass {$indicatorComparisonValues/US/VALUE/COMPARISON/CLASS}" title="No value - can not compare">
320                                        <xsl:if test="0 != string-length($indicatorComparisonValues/US/VALUE/COMPARISON/CLASS)">
321                                                <xsl:attribute name="title" select="concat($Page.communityDimensionValue/TITLE, ' is ', $indicatorComparisonValues/US/VALUE/COMPARISON/CLASS)"/>
322                                        </xsl:if>
323                                        <xsl:value-of select="$indicatorComparisonValues/US/VALUE/COMPARISON/CLASS"/>
324<!--
325                                        &#160;
326-->
327                                </td>
328                        </tr>
329                        </xsl:if>
330                </xsl:if>
331        </xsl:template>
332
333</xsl:stylesheet>
334<!-- ============================= End of File ============================= -->
335
Note: See TracBrowser for help on using the repository browser.