Ignore:
Timestamp:
01/09/19 15:21:10 (4 years ago)
Author:
GarthBraithwaite_STG
Message:

view, db - LCL and UCL XSLT updates. added value attribute footnote template. More css tweaks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/view/Page.xslt

    r17716 r17722  
    2626
    2727
    28 
    2928        <xsl:param name="Page.pageTitle" ibis:doc="Page's title text based on the 'INDICATOR/TITLE' element.">
    3029                Health Indicator Report - <xsl:value-of select="ibis:getCompleteIndicatorViewTitle($indicator, $indicatorView, $Indicator.dimensions)"/>
     
    4140                        /INDICATOR_VIEW/DIMENSION_USAGES/DIMENSION_USAGE[USAGE='category']/NAME,
    4241                        /INDICATOR_VIEW/DIMENSION_USAGES/DIMENSION_USAGE[USAGE='series']/NAME,
    43                         '',
    4442                        $Indicator.dimensions
    4543                )"
     
    4947        <xsl:param name="Indicator.contentBlockType" select="'fixed'"/>
    5048        <xsl:param name="Indicator.contentBlockTitleLevel" select="3"/>
    51 
    5249
    5350
     
    7774                <xsl:variable name="measureName" select="$indicatorView/MEASURE_NAME"/>
    7875                <xsl:variable name="measure"     select="($indicator//MEASURE[NAME = $measureName])[1]"/>
     76
     77                <xsl:variable name="recordDimensionFields">
     78                        <xsl:call-template name="Interactive.getRecordDimensionFields">
     79                                <xsl:with-param name="dimensions"      select="$Indicator.dimensions"/>
     80                                <xsl:with-param name="dimensionUsages" select="$indicatorView/DIMENSION_USAGES"/>
     81                        </xsl:call-template>
     82                </xsl:variable>
     83                <xsl:variable name="datasetRecords" select="$indicator/DATASETS/DATASET[NAME = $indicatorView/DATASET_NAMES/DATASET_NAME]/RECORDS"/>
     84                <xsl:variable name="indicatorViewDatasetRecords">
     85                        <xsl:call-template name="Interactive.getIndicatorViewDatasetRecords">
     86                                <xsl:with-param name="datasetRecords"  select="$datasetRecords"/>
     87                                <xsl:with-param name="dimensionUsages" select="$indicatorView/DIMENSION_USAGES"/>
     88                                <xsl:with-param name="recordDimensionFields" select="$recordDimensionFields"/>
     89                        </xsl:call-template>
     90                </xsl:variable>
    7991
    8092                <xsl:call-template name="ContentContainer.expandable">
     
    154166                </xsl:call-template>
    155167
     168                <xsl:variable name="valueAttributeNames" select="distinct-values($indicatorViewDatasetRecords//VALUE_ATTRIBUTE_NAME)"/>
    156169                <xsl:call-template name="ContentContainer.expandable">
    157170                        <xsl:with-param name="title" select="'Data Table'"/>
     
    159172                                <div class="Graphic Grid ScrollableContainer">
    160173                                        <div id="grid"></div>
    161 <br/><br/>
    162 GARTH TODO: Data table footnote needs to include the VALUE ATTRIBUTE codes and titles.
    163 <br/><br/>
     174                                        <xsl:call-template name="Graphic.valueAttributeFootnote">
     175                                                <xsl:with-param name="valueAttributeNames" select="$valueAttributeNames"/>
     176                                                <xsl:with-param name="valueAttributes"     select="$Indicator.valueAttributes"/>
     177                                        </xsl:call-template>
    164178                                </div>
    165179                        </xsl:with-param>
     
    167181                        <xsl:with-param name="addWikiAttribute" select="false()"/>
    168182                </xsl:call-template>
    169 
    170183
    171184                <xsl:call-template name="ContentContainer.expandable">
     
    223236                <xsl:call-template name="Page.leafletKendoScript">
    224237                        <xsl:with-param name="indicatorView" select="$indicatorView"/>
     238                        <xsl:with-param name="indicatorViewDatasetRecords" select="$indicatorViewDatasetRecords"/>
     239                        <xsl:with-param name="recordDimensionFields" select="$recordDimensionFields"/>
    225240                        <xsl:with-param name="measure"       select="$Indicator.measure"/>
    226241                        <xsl:with-param name="showMap"       select="$Page.showMap"/>
    227242                        <xsl:with-param name="showChart"     select="$Page.showChart"/>
     243                        <xsl:with-param name="showValueAttributeColumn" select="0 != count($valueAttributeNames)"/>
    228244                        <xsl:with-param name="baseExportFilename" select="ibis:getCompleteIndicatorViewTitle($indicator, $indicatorView, $Indicator.dimensions)"/>
    229245                </xsl:call-template>
     
    234250        <xsl:template name="Page.leafletKendoScript" ibis:doc="Provides the kendo and leaflet javascript.">
    235251                <xsl:param name="indicatorView"/>
     252                <xsl:param name="indicatorViewDatasetRecords"/>
     253                <xsl:param name="recordDimensionFields"/>
     254
    236255                <xsl:param name="measure"/>
    237256                <xsl:param name="showMap"   select="$Page.showMap"/>
    238257                <xsl:param name="showChart" select="$Page.showChart"/>
     258                <xsl:param name="showValueAttributeColumn" select="false()"/>
    239259                <xsl:param name="baseExportFilename" select="$indicatorView/TITLE"/>
    240260
     
    251271                        </xsl:call-template>
    252272                </xsl:variable>
    253 
    254                 <xsl:variable name="recordDimensionFields">
    255                         <xsl:call-template name="Interactive.getRecordDimensionFields">
    256                                 <xsl:with-param name="dimensions"      select="$Indicator.dimensions"/>
    257                                 <xsl:with-param name="dimensionUsages" select="$indicatorView/DIMENSION_USAGES"/>
    258                         </xsl:call-template>
    259                 </xsl:variable>
    260                 <xsl:variable name="datasetRecords" select="$indicator/DATASETS/DATASET[NAME = $indicatorView/DATASET_NAMES/DATASET_NAME]/RECORDS"/>
    261                 <xsl:variable name="indicatorViewDatasetRecords">
    262                         <xsl:call-template name="Interactive.getIndicatorViewDatasetRecords">
    263                                 <xsl:with-param name="datasetRecords"  select="$datasetRecords"/>
    264                                 <xsl:with-param name="dimensionUsages" select="$indicatorView/DIMENSION_USAGES"/>
    265                                 <xsl:with-param name="recordDimensionFields" select="$recordDimensionFields"/>
    266                         </xsl:call-template>
    267                 </xsl:variable>
    268 
    269                 <!-- tried doing jsonp tech but callback func must be defined before doing the script jsonp
    270                         so you'd have the variable = null, call back, end of script, include jsonp, then contructor
    271                         script.  Very messy - decided just to do simple var and include it.
    272                 -->
    273273
    274274                <xsl:if test="$showMap">
     
    307307                                        <xsl:with-param name="recordDimensionFields"      select="$recordDimensionFields"/>
    308308                                        <xsl:with-param name="recordAncillaryValueFields" select="$recordAncillaryValueFields"/>
    309 <!-- GARTH TODO: note, label and VALUE ATTRIBUTE columns
    310 -->
    311 <xsl:with-param name="showValueAttributeColumn" select="exists($indicatorViewDatasetRecords/RECORD[0 != string-length(VALUE_ATTRIBUTE_NAME)])"/>
    312 <xsl:with-param name="showLabelColumn"          select="exists($indicatorViewDatasetRecords/RECORD[0 != string-length(LABEL)])"/>
    313 <xsl:with-param name="showNoteColumn"           select="exists($indicatorViewDatasetRecords/RECORD[0 != string-length(NOTE)])"/>
     309                                        <xsl:with-param name="showValueAttributeColumn" select="$showValueAttributeColumn"/>
     310                                        <xsl:with-param name="showLabelColumn"          select="exists($indicatorViewDatasetRecords/RECORD[0 != string-length(LABEL)])"/>
     311                                        <!-- Never show the note column
     312                                        <xsl:with-param name="showNoteColumn"           select="exists($indicatorViewDatasetRecords/RECORD[0 != string-length(NOTE)])"/>
     313                                        -->
    314314                                </xsl:call-template>
    315315                        );
     
    331331        <xsl:with-param name="geoIDFieldName"   select="$recordDimensionFields/RECORD_DIMENSION_FIELD[DIMENSION_NAMES/DIMENSION_NAME = $indicatorView/MAP_DIMENSION_NAME]/NAME"/>
    332332        <xsl:with-param name="geoIDFieldValuePrefixToRemove"   select="concat($indicatorView/MAP_DIMENSION_NAME, '.')"/>
    333         <xsl:with-param name="measureValueFieldName" select="'MeasureValue'"/>
    334333        <xsl:with-param name="legendTitle"   select="$measure/TITLE"/>
    335334        <xsl:with-param name="geoTypeTitle"  select="ibis:getDimensionTitle($indicator//DIMENSIONS/DIMENSION[NAME = $indicatorView/MAP_DIMENSION_NAME])"/>
Note: See TracChangeset for help on using the changeset viewer.