[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16955] controller: FDV-194
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16955] controller: FDV-194 |
Date: |
Mon, 7 Aug 2017 11:54:42 -0400 (EDT) |
Revision: 16955
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16955
Author: sigurdne
Date: 2017-08-07 11:54:42 -0400 (Mon, 07 Aug 2017)
Log Message:
-----------
controller: FDV-194
Modified Paths:
--------------
trunk/controller/templates/base/procedure/print_procedure.xsl
trunk/phpgwapi/inc/class.xslttemplates.inc.php
Modified: trunk/controller/templates/base/procedure/print_procedure.xsl
===================================================================
--- trunk/controller/templates/base/procedure/print_procedure.xsl
2017-08-07 14:22:46 UTC (rev 16954)
+++ trunk/controller/templates/base/procedure/print_procedure.xsl
2017-08-07 15:54:42 UTC (rev 16955)
@@ -2,119 +2,157 @@
<!-- item -->
<xsl:template match="data" xmlns:php="http://php.net/xsl">
-<xsl:variable name="date_format"><xsl:value-of
select="php:function('get_phpgw_info', 'user|preferences|common|dateformat')"
/></xsl:variable>
-<div id="procedure">
- <h1><xsl:value-of select="procedure/title" /></h1>
+ <xsl:variable name="date_format">
+ <xsl:value-of select="php:function('get_phpgw_info',
'user|preferences|common|dateformat')" />
+ </xsl:variable>
+ <html>
+ <body>
+ <div id="procedure" style="width: 600px;">
+ <h1>
+ <xsl:value-of select="procedure/title"
/>
+ </h1>
+ <h4>
+ <xsl:value-of
select="php:function('lang','Procedure revision')" />
+ </h4>
+ <xsl:value-of select="procedure/revision_no" />
+ <h4>
+ <xsl:value-of
select="php:function('lang','Control area')" />
+ </h4>
+ <xsl:value-of
select="procedure/control_area_name" />
+ <h4>
+ <xsl:value-of
select="php:function('lang','Procedure valid from date')" />
+ </h4>
+ <xsl:if test="procedure/start_date != 0">
+ <xsl:variable name="startdate">
+ <xsl:value-of
select="procedure/start_date" />
+ </xsl:variable>
+ <xsl:value-of
select="php:function('date', $date_format, $startdate)" />
+ </xsl:if>
+ <xsl:if test="procedure/revision_date != 0">
+ <h4>
+ <xsl:value-of
select="php:function('lang','Procedure revision date')" />
+ </h4>
+ <xsl:variable name="revisiondate">
+ <xsl:value-of
select="procedure/revision_date" />
+ </xsl:variable>
+ <xsl:value-of
select="php:function('date', $date_format, $revisiondate)" />
+ </xsl:if>
+ <xsl:if test="procedure/end_date != 0">
+ <h4>
+ <xsl:value-of
select="php:function('lang','Procedure end date')" />
+ </h4>
+ <xsl:value-of
select="procedure/end_date" />
+ <xsl:variable name="enddate">
+ <xsl:value-of
select="procedure/end_date" />
+ </xsl:variable>
+ <xsl:value-of
select="php:function('date', $date_format, $enddate)" />
+ </xsl:if>
+ <h4>
+ <xsl:value-of
select="php:function('lang','Procedure purpose')" />
+ </h4>
+ <xsl:value-of select="procedure/purpose"
disable-output-escaping="yes"/>
+ <h4>
+ <xsl:value-of
select="php:function('lang','Procedure responsibility')" />
+ </h4>
+ <xsl:value-of select="procedure/responsibility"
disable-output-escaping="yes"/>
+ <h4>
+ <xsl:value-of
select="php:function('lang','Procedure description')" />
+ </h4>
+ <xsl:value-of select="procedure/description"
disable-output-escaping="yes"/>
+ <h4>
+ <xsl:value-of
select="php:function('lang','Procedure Reference')" />
+ </h4>
+ <xsl:value-of select="procedure/reference"
disable-output-escaping="yes"/>
+ </div>
+ <br/>
+ <a href="#print" class="btn"
onClick="window.print()">Skriv ut</a>
+ <style>
+ @page {
+ size: A4;
+ }
- <div>
- <label for="revision_no"><xsl:value-of
select="php:function('lang','Procedure revision')" /></label>
- <span style="display: inline-block;width:
600px;"><xsl:value-of select="procedure/revision_no" /></span>
- </div>
- <div>
- <label for="control_area"><xsl:value-of
select="php:function('lang','Control area')" /></label>
- <span style="display: inline-block;width:
600px;"><xsl:value-of select="procedure/control_area_name" /></span>
- </div>
- <div>
- <label for="start_date"><xsl:value-of
select="php:function('lang','Procedure valid from date')" /></label>
- <xsl:if test="procedure/start_date != 0">
- <xsl:variable name="startdate"><xsl:value-of
select="procedure/start_date" /></xsl:variable>
- <xsl:value-of select="php:function('date',
$date_format, $startdate)" />
- </xsl:if>
- </div>
- <div>
- <xsl:if test="procedure/revision_date != 0">
- <label for="revision_date"><xsl:value-of
select="php:function('lang','Procedure revision date')" /></label>
- <xsl:variable name="revisiondate"><xsl:value-of
select="procedure/revision_date" /></xsl:variable>
- <xsl:value-of select="php:function('date',
$date_format, $revisiondate)" />
- </xsl:if>
- </div>
- <div>
- <xsl:if test="procedure/end_date != 0">
- <label for="end_date"><xsl:value-of
select="php:function('lang','Procedure end date')" /></label>
- <xsl:value-of select="procedure/end_date" />
- <xsl:variable name="enddate"><xsl:value-of
select="procedure/end_date" /></xsl:variable>
- <xsl:value-of select="php:function('date',
$date_format, $enddate)" />
- </xsl:if>
- </div>
- <div>
- <label for="purpose"><xsl:value-of
select="php:function('lang','Procedure purpose')" /></label>
- <span style="display: inline-block;width:
600px;"><xsl:value-of select="procedure/purpose"
disable-output-escaping="yes"/></span>
- </div>
- <div>
- <label for="responsibility"><xsl:value-of
select="php:function('lang','Procedure responsibility')" /></label>
- <span style="display: inline-block;width:
600px;"><xsl:value-of select="procedure/responsibility"
disable-output-escaping="yes"/></span>
- </div>
- <div>
- <label for="description"><xsl:value-of
select="php:function('lang','Procedure description')" /></label>
- <span style="display: inline-block;width:
600px;"><xsl:value-of select="procedure/description"
disable-output-escaping="yes"/></span>
- </div>
- <div>
- <label for="reference"><xsl:value-of
select="php:function('lang','Procedure Reference')" /></label>
- <span style="display: inline-block;width: 600px;">
- <xsl:value-of select="procedure/reference"
disable-output-escaping="yes"/>
- </span>
- </div>
- <a href="#print" class="btn" onClick="window.print()">Skriv
ut</a>
-</div>
-<style>
+ @media print {
+ li {page-break-inside: avoid;}
+ h1, h2, h3, h4, h5 {
+ page-break-after: avoid;
+ }
- #procedure {
- font-family: arial;
- font-size: 15px;
- padding: 5px 25px;
- }
- #procedure h1{
- font-size: 24px;
- margin-bottom: 25px;
- }
- #procedure div {
- margin: 15px 0;
- }
- label{
- display: inline-block;
- font-weight: bold;
- vertical-align: top;
- width: 200px;
- }
+ table, figure {
+ page-break-inside: avoid;
+ }
+ }
- .btn {
- background: none repeat scroll 0 0 #4F9AEA;
- border: 1px solid #428AD7;
- border-radius: 4px 4px 4px 4px;
- color: #FFFFFF;
- cursor: pointer;
- display: inline-block;
- margin-right: 10px;
- padding: 5px 10px;
- text-decoration: none;
-}
+
+ @page:left{
+ @bottom-left {
+ content: "Page " counter(page) " of "
counter(pages);
+ }
+ }
+ @media print
+ {
+ .btn
+ {
+ display: none !important;
+ }
+ }
+ #procedure {
+ font-family: arial;
+ font-size: 15px;
+ padding: 5px 25px;
+ }
+ #procedure h1{
+ font-size: 24px;
+ margin-bottom: 25px;
+ }
+ #procedure div {
+ margin: 15px 0;
+ }
+ label{
+
+ font-weight: bold;
+ vertical-align: top;
+ width: 200px;
+ }
+
+ .btn {
+ background: none repeat scroll 0 0 #4F9AEA;
+ border: 1px solid #428AD7;
+ border-radius: 4px 4px 4px 4px;
+ color: #FFFFFF;
+ cursor: pointer;
+ margin-right: 10px;
+ padding: 5px 10px;
+ text-decoration: none;
+ }
- ol{
- margin: 15px;
- padding: 0 20px;
- }
+ ol{
+ margin: 15px;
+ padding: 0 20px;
+ }
- ul{
- list-style: none outside none;
- }
+ ul{
+ list-style: none outside none;
+ }
- ul.groups li {
- padding: 3px 0;
- }
+ ul.groups li {
+ padding: 3px 0;
+ }
- ul.groups li.odd{
- background: none repeat scroll 0 0 #DBE7F5;
- }
+ ul.groups li.odd{
+ background: none repeat scroll 0 0 #DBE7F5;
+ }
- ul.groups h3 {
- font-size: 18px;
- margin: 0 0 5px;
- }
+ ul.groups h3 {
+ font-size: 18px;
+ margin: 0 0 5px;
+ }
- #procedure ul li{
- list-style: disc;
- }
+ #procedure ul li{
+ list-style: disc;
+ }
-</style>
+ </style>
+ </body>
+ </html>
</xsl:template>
\ No newline at end of file
Modified: trunk/phpgwapi/inc/class.xslttemplates.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.xslttemplates.inc.php 2017-08-07 14:22:46 UTC
(rev 16954)
+++ trunk/phpgwapi/inc/class.xslttemplates.inc.php 2017-08-07 15:54:42 UTC
(rev 16955)
@@ -443,6 +443,11 @@
$html = preg_replace('/<!DOCTYPE([^>])+>/', '', $html);
+ if($stripped_htm)
+ {
+ $html = "<!DOCTYPE html>" . $html;
+ }
+
return $html;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16955] controller: FDV-194,
sigurdne <=