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