Nightmare revert commit

This reverts commit ddab472883e1e39bebf374235e26f3453044644a.

# Conflicts:
#	xml/dtd/offerte.xsd
#	xml/source/snippets/offerte/en/conditions.xml
#	xml/xslt/block.xslt
#	xml/xslt/styles_off.xslt
This commit is contained in:
skyanth 2019-06-21 16:04:24 +02:00
parent dd5a1749ba
commit 8be03c5b34
6 changed files with 163 additions and 142 deletions

View File

@ -188,7 +188,7 @@
<xs:element ref="contact"/>
<xs:element ref="generate_targets"/>
<xs:element name="generate_teammembers"/>
<xs:element name="generate_service_breakdown">
<xs:element ref="signature_box"/>
<xs:complexType>
<xs:attribute name="format" use="required">
<xs:simpleType>
@ -220,13 +220,32 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="generate_offer_signature_box"/>
<xs:element name="generate_permission_parties"/>
<xs:element name="signature_box">
<xs:complexType>
<xs:all>
<xs:element ref="client_side"/>
<xs:element ref="company_side"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="client_side" type="signature_box_column"/>
<xs:element name="company_side" type="signature_box_column"/>
<xs:complexType name="signature_box_column">
<xs:sequence>
<xs:element name="signee" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="date"/>
<xs:element name="place"/>
</xs:sequence>
</xs:complexType>
<!-- Placeholders -->
<xs:group name="placeholders">
<xs:choice>
<xs:element name="latest_version_date"/>
<xs:element name="client_long"/>
<xs:element name="client_short"/>
<xs:element name="client_street"/>

View File

@ -385,6 +385,7 @@
<!-- Placeholders -->
<xs:group name="placeholders">
<xs:choice>
<xs:element name="latest_version_date"/>
<xs:element name="client_long"/>
<xs:element name="client_short"/>
<xs:element name="client_street"/>

View File

@ -309,142 +309,6 @@
</fo:block>
</xsl:template>
<xsl:template match="generate_offer_signature_box">
<xsl:call-template name="generateSignatureBox">
<xsl:with-param name="latestVersionDate" select="$latestVersionDate"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="generateSignatureBox">
<xsl:param name="latestVersionDate"/>
<fo:block keep-together.within-page="always" xsl:use-attribute-sets="signaturebox">
<fo:block xsl:use-attribute-sets="title-client">
<xsl:call-template name="getString">
<xsl:with-param name="stringID" select="'signed_dupe'"/>
</xsl:call-template>
</fo:block>
<fo:block>
<fo:table xsl:use-attribute-sets="fwtable borders">
<fo:table-column column-width="proportional-column-width(50)"
xsl:use-attribute-sets="borders"/>
<fo:table-column column-width="proportional-column-width(50)"
xsl:use-attribute-sets="borders"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell xsl:use-attribute-sets="td">
<fo:block>
<xsl:value-of select="$latestVersionDate"/>
</fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="td">
<fo:block>
<xsl:value-of select="$latestVersionDate"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell xsl:use-attribute-sets="td">
<fo:block>
<xsl:value-of select="/*/meta/permission_parties/client/city"/>
</fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="td">
<fo:block>
<xsl:value-of select="/*/meta/company/city"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell xsl:use-attribute-sets="td">
<fo:block>&#160;</fo:block>
<fo:block>&#160;</fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="td">
<fo:block>&#160;</fo:block>
<fo:block>&#160;</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell xsl:use-attribute-sets="td">
<fo:block>
<xsl:choose>
<xsl:when test="/offerte">
<xsl:value-of
select="/*/meta/permission_parties/client/legal_rep"/>
</xsl:when>
<xsl:when test="/quickscope">
<xsl:value-of select="/*/customer/legal_rep"/>
</xsl:when>
</xsl:choose>
</fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="td">
<fo:block>
<xsl:choose>
<xsl:when test="/offerte">
<xsl:value-of select="/*/meta/company/legal_rep"/>
</xsl:when>
<xsl:when test="/quickscope">
<xsl:value-of select="/*/company/legal_rep"/>
</xsl:when>
</xsl:choose>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell xsl:use-attribute-sets="td">
<fo:block xsl:use-attribute-sets="bold">
<xsl:choose>
<xsl:when test="/offerte">
<xsl:value-of
select="/*/meta/permission_parties/client/full_name"/>
</xsl:when>
<xsl:when test="/quickscope">
<xsl:value-of select="/*/customer/full_name"/>
</xsl:when>
</xsl:choose>
</fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="td">
<fo:block xsl:use-attribute-sets="bold">
<xsl:choose>
<xsl:when test="/offerte">
<xsl:value-of select="/*/meta/company/full_name"/>
</xsl:when>
<xsl:when test="/quickscope">
<xsl:value-of select="/*/company/full_name"/>
</xsl:when>
</xsl:choose>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:block>
</xsl:template>
<xsl:template match="generate_permission_parties">
<xsl:for-each select="/*/meta/permission_parties/client | /*/meta/permission_parties/party">
<xsl:if test="self::party and not(following-sibling::party)">

View File

@ -32,15 +32,15 @@
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="li/p">
<fo:block xsl:use-attribute-sets="li">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<!-- special case for p in summary table to avoid checkiflast - all other elements can ignore mode -->
<xsl:template match="*" mode="summarytable">
<xsl:apply-templates select="."/>
</xsl:template>
@ -50,6 +50,8 @@
<xsl:apply-templates mode="summarytable"/>
</xsl:template>
<xsl:template match="pre">
<fo:block xsl:use-attribute-sets="pre">
<xsl:call-template name="checkIfLast"/>
@ -65,4 +67,125 @@
</fo:block>
</xsl:template>
<xsl:template match="signature_box">
<xsl:variable name="signee-difference"
select="count(client_side/signee) - count(company_side/signee)"/>
<fo:block keep-together.within-page="always" xsl:use-attribute-sets="signaturebox">
<fo:block xsl:use-attribute-sets="title-client">
<xsl:call-template name="getString">
<xsl:with-param name="stringID" select="'signed_dupe'"/>
</xsl:call-template>
</fo:block>
<fo:block>
<fo:table xsl:use-attribute-sets="fwtable borders">
<fo:table-column column-width="proportional-column-width(50)"
xsl:use-attribute-sets="borders"/>
<fo:table-column column-width="proportional-column-width(50)"
xsl:use-attribute-sets="borders"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell xsl:use-attribute-sets="td">
<fo:block>For <fo:inline xsl:use-attribute-sets="bold"><xsl:value-of
select="//client/full_name"/></fo:inline></fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="td">
<fo:block>For <fo:inline xsl:use-attribute-sets="bold"><xsl:value-of
select="//company/full_name"/></fo:inline></fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<!-- client side -->
<fo:table-cell xsl:use-attribute-sets="td">
<xsl:if test="$signee-difference &lt; 0">
<xsl:call-template name="insertEmptyBlocks">
<xsl:with-param name="times" select="abs($signee-difference)"/>
</xsl:call-template>
</xsl:if>
<xsl:for-each select="client_side/signee">
<xsl:call-template name="signeeBlock"/>
</xsl:for-each>
</fo:table-cell>
<!-- company side -->
<fo:table-cell xsl:use-attribute-sets="td">
<xsl:if test="$signee-difference > 0">
<xsl:call-template name="insertEmptyBlocks">
<xsl:with-param name="times" select="$signee-difference"/>
</xsl:call-template>
</xsl:if>
<xsl:for-each select="company_side/signee">
<xsl:call-template name="signeeBlock"/>
</xsl:for-each>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell xsl:use-attribute-sets="td">
<xsl:for-each select="client_side/place">
<fo:block>
<xsl:apply-templates/>
</fo:block>
</xsl:for-each>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="td">
<xsl:for-each select="company_side/place">
<fo:block>
<xsl:apply-templates/>
</fo:block>
</xsl:for-each>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell xsl:use-attribute-sets="td">
<xsl:for-each select="client_side/date">
<fo:block>
<xsl:apply-templates/>
</fo:block>
</xsl:for-each>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="td">
<xsl:for-each select="company_side/date">
<fo:block>
<xsl:apply-templates/>
</fo:block>
</xsl:for-each>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:block>
</xsl:template>
<xsl:template name="signeeBlock">
<fo:block-container xsl:use-attribute-sets="signee">
<fo:block xsl:use-attribute-sets="signee_dottedline">
<fo:leader leader-pattern="dots" leader-length="8cm"/>
</fo:block>
<fo:block xsl:use-attribute-sets="signee_name">
<xsl:apply-templates/>
</fo:block>
</fo:block-container>
</xsl:template>
<xsl:template name="emptyBlock">
<fo:block-container xsl:use-attribute-sets="signee">
<fo:block>&#160;
</fo:block>
</fo:block-container>
</xsl:template>
<xsl:template name="insertEmptyBlocks">
<xsl:param name="index" select="1"/>
<xsl:param name="times"/>
<xsl:call-template name="emptyBlock"/>
<xsl:if test="not($index = $times)">
<xsl:call-template name="insertEmptyBlocks">
<xsl:with-param name="index" select="$index + 1"/>
<xsl:with-param name="times" select="$times"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

View File

@ -25,6 +25,9 @@
<!-- PLACEHOLDERS -->
<xsl:template match="latest_version_date">
<xsl:value-of select="$latestVersionDate"/>
</xsl:template>
<xsl:template match="client_long">
<xsl:param name="placeholderElement" select="/*/meta//client/full_name"/>
<xsl:call-template name="checkPlaceholder">

View File

@ -34,5 +34,16 @@
<xsl:attribute-set name="totalRow">
<xsl:attribute name="border-top">1px solid black</xsl:attribute>
</xsl:attribute-set>
<!-- Signature box -->
<xsl:attribute-set name="signee">
<xsl:attribute name="height">2.75cm</xsl:attribute>
</xsl:attribute-set><xsl:attribute-set name="signee_name">
<xsl:attribute name="text-align">right</xsl:attribute>
<xsl:attribute name="margin-right">0.75cm</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="signee_dottedline">
<xsl:attribute name="margin-top">1.75cm</xsl:attribute>
<xsl:attribute name="text-align">right</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>