Ignore:
Timestamp:
2021-02-22T23:39:42+13:00 (3 years ago)
Author:
davidb
Message:

Changes after new 'from country' doc added in

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/document.xsl

    r34893 r34911  
    1818   
    1919    <span style="font-weight:bold; font-size: 120%;">
    20       <xsl:call-template name="choose-title"/>
     20      <gsf:switch>
     21        <gsf:metadata name='FromCountry'/> 
     22        <gsf:when test='exists'>
     23      <gsf:metadata name='FromCountry'/>
     24      voting in
     25      <gsf:metadata name='FromCountryYear'/>
     26    </gsf:when>
     27    <gsf:otherwise>
     28      <xsl:call-template name="choose-title"/>
     29    </gsf:otherwise>
     30      </gsf:switch>
    2131    </span>
    2232
     
    3949   
    4050    <table class="esc-metadata">
    41 
     51     
     52      <gsf:switch>
     53        <gsf:metadata name='FromCountry'/>
     54        <gsf:when test='exists'>
     55      <tr>
     56        <td>
     57          Voting Type:
     58        </td>
     59        <td>
     60          <gsf:switch>
     61        <gsf:metadata name='FromCountryType'/> 
     62        <gsf:when test="equals" test-value="J">
     63          Jury
     64        </gsf:when>
     65        <gsf:otherwise>
     66          Televotes
     67        </gsf:otherwise>
     68          </gsf:switch>
     69        </td>
     70      </tr>   
     71      <tr>
     72        <td>
     73          Votes cast by:
     74        </td>
     75        <td>
     76          <gsf:metadata name="FromCountry" highlight="highlight" />
     77        </td>
     78      </tr>
     79      <tr>
     80        <td>
     81          Year:
     82        </td>
     83        <td>
     84          <gsf:metadata name="FromCountryYear" highlight="highlight" />
     85        </td>
     86      </tr>
     87    </gsf:when>
     88    <gsf:otherwise>
     89<!--     
     90      </gsf:switch>
     91     
    4292      <gsf:switch>
    4393        <gsf:metadata name='Title'/>
    4494        <gsf:when test='exists'>
     95-->
    4596      <tr>
    4697        <td>
     
    69120        </td>
    70121      </tr>
    71     </gsf:when>
     122<!--     
     123    </gsf:when>
     124-->
     125    </gsf:otherwise>
    72126      </gsf:switch>
    73127
     
    118172  </xsl:template>
    119173
    120 
    121   <xsl:template name="documentContent">
    122 
     174  <xsl:template name="documentContentFromCountry">
     175    <div id="from-country-votes">
     176      <gsf:script> 
     177    append_from_country_votes(gs.documentMetadata["Identifier"],gs.documentMetadata["FromCountryType"]);
     178      </gsf:script>
     179    </div>   
     180  </xsl:template>
     181 
     182  <xsl:template name="documentContentEntry">
    123183    <gsf:switch>
    124184      <gsf:metadata name='Abstract_en'/>
     
    130190    </gsf:switch>
    131191
    132     <div id="from-country-votes">
     192    <div id="to-country-votes">
    133193      <gsf:script>
    134     append_from_country_votes("Jury Votes","JuryVotesJSON","JuryVotesTotal");
    135     append_from_country_votes("Televotes","TeleVotesJSON","TeleVotesTotal");
     194    append_to_country_votes("Jury Votes","JuryVotesJSON","JuryVotesTotal");
     195    append_to_country_votes("Televotes","TeleVotesJSON","TeleVotesTotal");
    136196      </gsf:script>
    137197
    138198    </div>
    139    
    140     <div>
     199
     200    <div id="find-more-content">
    141201      Find more content about this Eurovision entry on-line:
    142202      <ul>
     
    204264   
    205265  </xsl:template>
     266 
     267  <xsl:template name="documentContent">
     268
     269    <gsf:switch>
     270      <gsf:metadata name='FromCountry'/>
     271      <gsf:when test='exists'>
     272    <xsl:call-template name="documentContentFromCountry"/>
     273      </gsf:when>
     274      <gsf:otherwise>
     275    <xsl:call-template name="documentContentEntry"/>
     276      </gsf:otherwise>
     277    </gsf:switch>
     278
     279  </xsl:template>
    206280
    207281</xsl:stylesheet>
Note: See TracChangeset for help on using the changeset viewer.