Ignore:
Timestamp:
09/21/18 13:42:15 (4 years ago)
Author:
Garth Braithwaite
Message:

admin, java, view - temp commit of IP related common XML.

File:
1 edited

Legend:

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

    r16234 r17123  
    99>
    1010        <xsl:import href="../Page.xslt"/>
     11        <xsl:import href="../../../../xml/indicator/profile/InteractiveXML.xslt"/>
     12        <xsl:import href="../../../../json/indicator/profile/InteractiveJSON.xslt"/>
    1113        <xsl:import href="../../../Kendo.xslt"/>
    1214        <xsl:import href="../../../LeafletMap.xslt"/>
    1315        <xsl:import href="../Indicator.xslt"/>
    14         <xsl:import href="../Interactive.xslt"/>
    1516
    1617
     
    2425
    2526
     27
    2628        <xsl:param name="Page.pageTitle" ibis:doc="Page's title text based on the 'INDICATOR/TITLE' element.">
    27                 Health Indicator Report - <xsl:value-of select="ibis:getConciseIndicatorTitle($indicator)"/>
     29                Health Indicator Report - <xsl:value-of select="ibis:getIndicatorTitle($indicator)"/>
    2830        </xsl:param>
    2931        <xsl:param name="Page.sectionsTitle" ibis:doc="Page's content block title text based on the 'INDICATOR/TITLE' element.">
    30                 Health Indicator Report of <xsl:value-of select="ibis:getConciseIndicatorTitle($indicator)"/>
     32                Health Indicator Report of <xsl:value-of select="ibis:getIndicatorTitle($indicator)"/>
    3133        </xsl:param>
     34
     35
     36        <xsl:param name="Page.comparisonDimensionName"  select="'GeoState'"/>
     37        <xsl:param name="Page.comparisonDimensionValue" select="'35'"/>
     38
    3239
    3340        <xsl:param name="Indicator.contentBlockType" select="'fixed'"/>
     
    3542
    3643
    37         <xsl:template name="Page.sectionsContent"
    38                 ibis:doc="Main page content template that determines if IP or Surrogate."
    39         >
     44
     45
     46        <xsl:template name="xxxxxxxxxxxPage.specificScript" ibis:doc="Provides Kendo and Leaflet script code.">
    4047                <xsl:if test="0 = string-length($indicatorView/SURROGATE_VIEW_URL)">
    4148                        <xsl:call-template name="Page.interativeContent">
     
    4350                        </xsl:call-template>
    4451                </xsl:if>
    45 
    46                 <xsl:if test="0 != string-length($indicatorView/SURROGATE_VIEW_URL)">
    47                         <xsl:call-template name="Page.insertAJAXContent">
    48                                 <xsl:with-param name="sourceContentURL" select="$indicatorView/SURROGATE_VIEW_URL"/>
    49                         </xsl:call-template>
    50                 </xsl:if>
    5152        </xsl:template>
     53
     54
     55
     56        <xsl:template name="Page.sectionsContent" ibis:doc="Main page content template that determines if IP or Surrogate.">
     57                <xsl:choose>
     58                        <xsl:when test="0 = string-length($indicatorView/SURROGATE_VIEW_URL)">
     59                                <xsl:call-template name="Page.interativeContent">
     60                                        <xsl:with-param name="indicatorView" select="$indicatorView"/>
     61                                </xsl:call-template>
     62                        </xsl:when>
     63                        <xsl:otherwise>
     64                                <xsl:call-template name="Page.insertAJAXContent">
     65                                        <xsl:with-param name="sourceContentURL" select="$indicatorView/SURROGATE_VIEW_URL"/>
     66                                </xsl:call-template>
     67                        </xsl:otherwise>
     68                </xsl:choose>
     69        </xsl:template>
     70
    5271
    5372
     
    7089                </xsl:call-template>
    7190
    72                 <xsl:variable name="showMap" select="ibis:LeafletMap.showMap($indicatorView/MAP_NAME)"/>
     91                <xsl:variable name="showMap" select="ibis:LeafletMap.showMap()"/>  <!-- $indicatorView/MAP_NAME -->
    7392                <xsl:if test="$showMap">
    7493                        <xsl:call-template name="ContentContainer.expandable">
     
    7796                                        <xsl:call-template name="LeafletMap.mapContainer">
    7897                                                <xsl:with-param name="containerID" select="'map'"/>
    79                                                 <xsl:with-param name="title" select="ibis:getMapTitle($indicator, $indicatorView)"/>
     98                                                <xsl:with-param name="title" select="ibis:getMapTitle($indicator, $indicatorView, $Indicator.dimensions)"/>
    8099                                        </xsl:call-template>
    81100                                        <xsl:call-template name="Indicator.contentBlock">
     
    96115                                        <xsl:call-template name="Kendo.chartContainer">
    97116                                                <xsl:with-param name="containerID" select="'chart'"/>
    98                                                 <xsl:with-param name="title" select="ibis:getChartTitle($indicator, $indicatorView)"/>
     117                                                <xsl:with-param name="title" select="ibis:getChartTitle($indicator, $indicatorView, $Indicator.dimensions)"/>
    99118                                        </xsl:call-template>
    100119                                        <xsl:call-template name="Indicator.contentBlock">
     
    124143                                <xsl:call-template name="Indicator.dataNotes">
    125144                                        <xsl:with-param name="title"         select="''"/>
    126                                         <xsl:with-param name="measure"       select="$measure"/>
     145                                        <xsl:with-param name="measure"       select="$Indicator.measure"/>
    127146                                        <xsl:with-param name="indicatorView" select="$indicatorView"/>
    128147                                </xsl:call-template>
     
    200219                <xsl:call-template name="Page.leafletKendoScript">
    201220                        <xsl:with-param name="indicatorView" select="$indicatorView"/>
    202                         <xsl:with-param name="measure"       select="$measure"/>
     221                        <xsl:with-param name="measure"       select="$Indicator.measure"/>
    203222                </xsl:call-template>
    204223        </xsl:template>
     
    215234                        <xsl:call-template name="LeafletMap.choroplethJavaScript"/>
    216235                </xsl:if>
    217                 <xsl:variable name="measureValueFormatPattern" select="($indicator//VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1]"/>
     236                <xsl:variable name="measureValueFormatPattern" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1]"/>
    218237
    219238                <xsl:variable name="recordDimensionFields">
    220                         <xsl:call-template name="Interactive.recordDimensionFields">
     239                        <xsl:call-template name="InteractiveXML.getRecordDimensionFieldElements">
    221240                                <xsl:with-param name="indicatorView" select="$indicatorView"/>
    222241                        </xsl:call-template>
     
    225244                <xsl:variable name="ancillaryValueNames" select="distinct-values($indicator/DATASETS/DATASET[NAME = $indicatorView/DATASET_NAMES/DATASET_NAME]/ANCILLARY_VALUES/ANCILLARY_VALUE/NAME)"/>
    226245                <xsl:variable name="recordAncillaryValueFields">
    227                         <xsl:call-template name="Interactive.recordAncillaryValueFields">
     246                        <xsl:call-template name="InteractiveXML.getRecordAncillaryValueFieldElements">
    228247                                <xsl:with-param name="indicator"     select="$indicator"/>
    229248                                <xsl:with-param name="indicatorView" select="$indicatorView"/>
     
    235254                <xsl:variable name="datasetRecords" select="$indicator/DATASETS/DATASET[NAME = $indicatorView/DATASET_NAMES/DATASET_NAME]/RECORDS/RECORD"/>
    236255                <xsl:variable name="indicatorViewDatasetRecords">
    237                         <xsl:call-template name="Interactive.indicatorViewDatasetRecords">
     256                        <xsl:call-template name="InteractiveXML.getIndicatorViewDatasetRecords">
    238257                                <xsl:with-param name="indicatorView"  select="$indicatorView"/>
    239258                                <xsl:with-param name="datasetRecords" select="$datasetRecords"/>
     
    255274                        var records =
    256275                        [<xsl:text>&#10;</xsl:text>
    257                                 <xsl:call-template name="Interactive.getIndicatorViewJSONDataRecords">
     276                                <xsl:call-template name="InteractiveJSON.getIndicatorViewDataRecords">
    258277                                        <xsl:with-param name="datasetRecords"             select="$indicatorViewDatasetRecords"/>
    259278                                        <xsl:with-param name="recordDimensionFields"      select="$recordDimensionFields"/>
     
    297316                                ,<xsl:call-template name="Kendo.requestChartJSON">
    298317                                        <xsl:with-param name="kendoDataSourceJavascriptVariableName" select="'kendoDataSource'"/>
    299                                         <xsl:with-param name="title"         select="ibis:getChartTitle($indicator, $indicatorView)"/>
     318                                        <xsl:with-param name="title"         select="ibis:getChartTitle($indicator, $indicatorView, $Indicator.dimensions)"/>
    300319                                        <xsl:with-param name="seriesTitle"   select="$recordDimensionFields/RECORD_DIMENSION_FIELD[USAGE='series']/TITLE"/>
    301320                                        <xsl:with-param name="categoryTitle" select="$recordDimensionFields/RECORD_DIMENSION_FIELD[USAGE='category']/TITLE"/>
     
    330349        if(0 != string-length($indicatorView/DEFAULT_GEOGRAPHY_DIM_NAME))
    331350        then $indicatorView/DEFAULT_GEOGRAPHY_DIM_NAME
    332         else ($indicator/DATASETS/DATASET/DIMENSIONS/DIMENSION[
     351        else ($Indicator.dimensions/DIMENSION[
    333352                        exists(GEOGRAPHY_FLAG)
    334353                        and
     
    337356/>
    338357
    339 <xsl:message select="$indicator/DATASETS/DATASET/DIMENSIONS/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME"/>
    340 <xsl:message select="exists($indicatorView/DATASET_DIMENSION_USAGES/DATASET_DIMENSION_USAGES[DIMENSION_NAME = $indicator/DATASETS/DATASET/DIMENSIONS/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME])"/>
    341 <xsl:message select="exists($indicatorView/DATASET_DIMENSION_USAGES/DATASET_DIMENSION_USAGES[DIMENSION_NAME = $indicator/DATASETS/DATASET/DIMENSIONS/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME])"/>
    342 <xsl:message select="exists($indicatorView/DATASET_DIMENSION_USAGES/DATASET_DIMENSION_USAGES[DIMENSION_NAME = $indicator/DATASETS/DATASET/DIMENSIONS/DIMENSION[exists(GEOGRAPHY_FLAG)]])"/>
    343 <xsl:message select="$indicator/DATASETS/DATASET/DIMENSIONS/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME"/>
     358<xsl:message select="$Indicator.dimensions/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME"/>
     359<xsl:message select="exists($indicatorView/DATASET_DIMENSION_USAGES/DATASET_DIMENSION_USAGES[DIMENSION_NAME = $Indicator.dimensions/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME])"/>
     360<xsl:message select="exists($indicatorView/DATASET_DIMENSION_USAGES/DATASET_DIMENSION_USAGES[DIMENSION_NAME = $Indicator.dimensions/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME])"/>
     361<xsl:message select="exists($indicatorView/DATASET_DIMENSION_USAGES/DATASET_DIMENSION_USAGES[DIMENSION_NAME = $Indicator.dimensions/DIMENSION[exists(GEOGRAPHY_FLAG)]])"/>
     362<xsl:message select="$Indicator.dimensions/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME"/>
    344363<xsl:message select="concat('Interactive - Show Map: ', $Interactive.showMap, ', geoDimensionName:', $geoDimensionName)"/>
    345364
    346365<xsl:message select="'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX interact.xslt'"/>
    347 <xsl:message select="$Interactive.comparisonDimensionName"/>
    348 <xsl:message select="$Interactive.comparisonDimensionValue"/>
    349 <xsl:with-param name="comparisonValue" select="$indicatorViewDatasetRecords/RECORD[ DIMENSIONS[ (2 = count(DIMENSION)) and DIMENSION[(NAME = $Interactive.comparisonDimensionName)     and (VALUE = $Interactive.comparisonDimensionValue)]]]/MEASURE_VALUE"/>
     366<xsl:message select="$Page.comparisonDimensionName"/>
     367<xsl:message select="$Page.comparisonDimensionValue"/>
     368<xsl:with-param name="comparisonValue" select="$indicatorViewDatasetRecords/RECORD[ DIMENSIONS[ (2 = count(DIMENSION)) and DIMENSION[(NAME = $Page.comparisonDimensionName)     and (VALUE = $Page.comparisonDimensionValue)]]]/MEASURE/VALUE"/>
    350369
    351370Stuff to try when doing dashboard
     
    354373}
    355374kendoDataSource.bind("change", dataSource_change);
    356 select="$indicatorViewDatasetRecords/RECORD[ DIMENSIONS[ (2 = count(DIMENSION)) and DIMENSION[(NAME = $Interactive.comparisonDimensionName)     and (VALUE = $Interactive.comparisonDimensionValue)]]]/MEASURE_VALUE"/>
     375select="$indicatorViewDatasetRecords/RECORD[ DIMENSIONS[ (2 = count(DIMENSION)) and DIMENSION[(NAME = $Page.comparisonDimensionName)     and (VALUE = $Page.comparisonDimensionValue)]]]/MEASURE/VALUE"/>
    357376
    358377**********************************************
     
    435454        <xsl:with-param name="desirableIndexValue" select="$measure/DESIRABLE_VALUE"/>
    436455
    437 <xsl:with-param name="comparisonValue" select="$indicatorViewDatasetRecords/RECORD[ DIMENSIONS[ (2 = count(DIMENSION)) and DIMENSION[(NAME = $Interactive.comparisonDimensionName)     and (VALUE = $Interactive.comparisonDimensionValue)]]]/MEASURE_VALUE"/>
     456<xsl:with-param name="comparisonValue" select="$indicatorViewDatasetRecords/RECORD[ DIMENSIONS[ (2 = count(DIMENSION)) and DIMENSION[(NAME = $Page.comparisonDimensionName)     and (VALUE = $Page.comparisonDimensionValue)]]]/MEASURE/VALUE"/>
    438457
    439458</xsl:call-template>
Note: See TracChangeset for help on using the changeset viewer.