Bug 30352: Add a comment to the substatus translation
The tric of combining the XPath union operator (|) with the
value-of instruction works as a sort of ternary operation.
The value-of only picks the string value of the first node
from the union in document order.
So, if there is a translation, it will be the first node. If there
is no translation, the original substatus will be used. Note that
there will be no translation for authorised values like Staff
collection, etc.
Test plan:
None. Just comments.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c652ed4b1d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
9871a02b26
commit
105b9fc313
|
|
@ -1325,6 +1325,7 @@
|
|||
<xsl:with-param name="status_text">
|
||||
<xsl:value-of select="concat($currentbranch,': ')"/>
|
||||
<xsl:value-of select="exsl:node-set($item_status_list)/status[@english=$current_substatus]|$current_substatus"/>
|
||||
<!-- Note that value-of here picks string value of first node only from the union; keep in mind too that current_substatus may contain an authorised value -->
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="class_block" select="concat('notforloandesc_',$current_substatus)"/>
|
||||
<xsl:with-param name="class_status" select="'ItemBranch'"/>
|
||||
|
|
@ -1356,7 +1357,7 @@
|
|||
<xsl:with-param name="status_text">
|
||||
<xsl:value-of select="$currentbranch"/>
|
||||
<xsl:text>: </xsl:text>
|
||||
<xsl:value-of select="exsl:node-set($item_status_list)/status[@english=$current_substatus]|$current_substatus"/>
|
||||
<xsl:value-of select="exsl:node-set($item_status_list)/status[@english=$current_substatus]|$current_substatus"/><!-- See former comment on value-of and union -->
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="class_block" select="concat('unavailable_',items:substatus)"/>
|
||||
<xsl:with-param name="class_status" select="'ItemBranch'"/>
|
||||
|
|
@ -1375,7 +1376,7 @@
|
|||
<xsl:with-param name="items" select="$unavailable_items[items:substatus=$current_substatus]"/>
|
||||
<xsl:with-param name="max" select="0"/>
|
||||
<xsl:with-param name="status_text">
|
||||
<xsl:value-of select="exsl:node-set($item_status_list)/status[@english=$current_substatus]|$current_substatus"/>
|
||||
<xsl:value-of select="exsl:node-set($item_status_list)/status[@english=$current_substatus]|$current_substatus"/><!-- See former comment on value-of and union -->
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="class_block" select="concat('unavailable_',$current_substatus)"/>
|
||||
<xsl:with-param name="class_status" select="UnavailableSubstatus"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue