QUAW#38329 QR-codes aanmaken voor alle objecten

svn path=/Website/branches/v2016.2/; revision=31380
This commit is contained in:
Ruud Lipper
2016-11-08 07:28:56 +00:00
parent 12110db86c
commit 7c4848a594

View File

@@ -5,4 +5,107 @@
<!-- Revision van deze cust.xsl -->
<xsl:value-of select="substring(translate('$Revision$', '$ ', ''), 10)"/>
</xsl:variable>
<xsl:template name="qrc_ins_new_page">
<xsl:param name="p_page"/>
<xsl:param name="p_rows"/>
<xsl:param name="p_cols"/>
<table cellpadding="0" cellspacing="0" style="margin:0 0 0 2mm; padding:0">
<tr>
<td style="height: 1.7cm; width 4.5cm">&#160;</td>
<td style="height: 1.7cm; width 5.5cm">&#160;</td>
<td style="height: 1.7cm; width 4.5cm">&#160;</td>
<td style="height: 1.7cm; width 5.5cm">&#160;</td>
</tr>
<xsl:for-each select="//facilitor/rapport/rapport_data/data_row">
<xsl:sort select="FCLT_F_IDENTIFICATIE"/>
<xsl:if test="position() &gt;= (($p_page - 1)*($p_rows*$p_cols)+1) and position() &lt;= ($p_page*($p_rows*$p_cols))">
<xsl:if test="(position() mod $p_cols) = 0">
<xsl:comment>=== Na elke 1 records (1x1 passen op 1 regel) =====</xsl:comment>
<xsl:call-template name="qrc_ins_new_tr">
<xsl:with-param name="p_pos" select="position() - $p_cols + 1"/>
<xsl:with-param name="p_cols" select="$p_cols"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="(position() = last()) and (position() mod $p_cols) != 0">
<xsl:comment>=== Na elke 1 records (1x1 passen op 1 regel) =====</xsl:comment>
<xsl:call-template name="qrc_ins_new_tr">
<xsl:with-param name="p_pos" select="floor(position() div $p_cols) * $p_cols + 1"/>
<xsl:with-param name="p_cols" select="$p_cols"/>
</xsl:call-template>
</xsl:if>
</xsl:if>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template name="qrc_ins_new_tr">
<xsl:param name="p_pos"/>
<xsl:param name="p_cols"/>
<tr height="4.2cm">
<xsl:for-each select="//facilitor/rapport/rapport_data/data_row">
<xsl:sort select="FCLT_F_IDENTIFICATIE"/>
<xsl:if test="position() &gt;= $p_pos and position() &lt;= $p_pos + $p_cols - 1">
<xsl:apply-templates select="." mode="qrc"/>
</xsl:if>
</xsl:for-each>
</tr>
</xsl:template>
<xsl:template match="data_row" mode="qrc">
<td style="text-align: center; vertical-align: top; margin:0;padding:0">
<xsl:element name="img">
<xsl:attribute name="style">height: 4.25cm; width: 4.25cm; margin:0cm; padding:0; border:none</xsl:attribute>
<xsl:attribute name="src">
../../appl/shared/qrcode.asp?size=16&amp;text=/%3Fu%3D<xsl:value-of select="HIDE_F_BOOKMARK_ID"/>%26k%3D<xsl:value-of select="INS_DEEL_KEY"/>
</xsl:attribute>
</xsl:element>
</td>
<td style="text-align:left; vertical-align: top; margin:0;padding:0; font-size: 11pt; font-weight: bold">
<xsl:element name="img">
<xsl:attribute name="style">width: 5.2cm; margin: 0.5cm 0.65cm 0.2cm 0</xsl:attribute>
<xsl:attribute name="src">
../../cust/quaw/banner.png
</xsl:attribute>
</xsl:element>
<br/>&#160;&#160;&#160;<xsl:value-of select="FCLT_F_IDENTIFICATIE"/><br/>
&#160;&#160;&#160;<sub><xsl:value-of select="ALG_GEBOUW_CODE"/> - <xsl:value-of select="ALG_VERDIEPING_CODE"/></sub>
</td>
</xsl:template>
<xsl:template match="rapport">
<html>
<xsl:if test="@view = 'QUAW_V_INS_QRC' or @view = 'QUAW_V_INS_QRC_MLD'">
<xsl:variable name="p_rows" select="6"/>
<xsl:variable name="p_cols" select="2"/>
<xsl:for-each select="//facilitor/rapport/rapport_data/data_row">
<xsl:sort select="FCLT_F_IDENTIFICATIE"/>
<xsl:if test="position() mod ($p_rows * $p_cols) = 0">
<xsl:comment>=== Na elke p_rows*p_cols records (m*n passen op 1 A4) =====</xsl:comment>
<xsl:call-template name="qrc_ins_new_page">
<xsl:with-param name="p_page" select="floor(position() div ($p_rows * $p_cols))"/>
<xsl:with-param name="p_rows" select="$p_rows"/>
<xsl:with-param name="p_cols" select="$p_cols"/>
</xsl:call-template>
<div style="page-break-after:always; margin:0;padding:0">&#160;</div>
</xsl:if>
<xsl:if test="position() = last() and position() mod ($p_rows * $p_cols) != 0 ">
<xsl:comment>=== De laatste paar, zijn minder dan m*n =====</xsl:comment>
<xsl:call-template name="qrc_ins_new_page">
<xsl:with-param name="p_page" select="floor((position() div ($p_rows * $p_cols))+1)"/>
<xsl:with-param name="p_rows" select="$p_rows"/>
<xsl:with-param name="p_cols" select="$p_cols"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
</xsl:if>
</html>
</xsl:template>
</xsl:stylesheet>