Skip to content

Commit

Permalink
Implement Qualtrics rating
Browse files Browse the repository at this point in the history
From the meeting with Asya, we need an empty
<div> container with an id.

For this two parameter are introduced:

* generate.qualtrics.div (default 0)
  When this parameter is set to 1, the empty div
  container is created.

* qualtrics.id (default "suse-qualtrics")
  The default id to reference in Qualtrics. Any
  non-empty value will be used

Keep in mind, only when $generate.qualtrics.div != 0
AND $qualtrics.id != '' are set that the empty <div> is
generated. This avoids a <div id=""> container.
  • Loading branch information
tomschr committed Jul 26, 2023
1 parent 92502d1 commit 7053373
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions suse2022-ns/xhtml/docbook.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,12 @@
</xsl:template>


<xsl:template name="qualtrics.rating">
<xsl:if test="number($generate.qualtrics.div) != 0 and $qualtrics.id != ''">
<div id="{$qualtrics.id}"></div>
</xsl:if>
</xsl:template>

<xsl:template name="generate.sourcelink">
<xsl:param name="node" select="."/>
<xsl:variable name="meta-bugtracker" select="$node/ancestor-or-self::*/d:info/d:meta[@name='bugtracker']/d:phrase[@role='editurl']"/>
Expand Down Expand Up @@ -974,6 +980,7 @@ if (window.location.protocol.toLowerCase() != 'file:') {

<xsl:call-template name="give.feedback"/>
<xsl:call-template name="share.and.print"/>
<xsl:call-template name="qualtrics.rating"/>

<xsl:text> </xsl:text>
</aside>
Expand Down
5 changes: 5 additions & 0 deletions suse2022-ns/xhtml/param.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -459,4 +459,9 @@ task before
<xsl:param name="include.ssi.footer">/docserv/fragments/{{#language#}}/suse-footer.fragment.html</xsl:param>

<xsl:variable name="placeholder.ssi.language">{{#language#}}</xsl:variable>

<!-- The ID for the Qualtricks <div> -->
<xsl:param name="generate.qualtrics.div" select="0"/>
<xsl:param name="qualtrics.id">suse-qualtrics</xsl:param>

</xsl:stylesheet>

0 comments on commit 7053373

Please sign in to comment.