fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [12210] display-adjustments on control


From: Erik Holm-Larsen
Subject: [Fmsystem-commits] [12210] display-adjustments on control
Date: Tue, 21 Oct 2014 07:41:34 +0000

Revision: 12210
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12210
Author:   erikhl
Date:     2014-10-21 07:41:31 +0000 (Tue, 21 Oct 2014)
Log Message:
-----------
display-adjustments on control

Modified Paths:
--------------
    trunk/controller/inc/class.uicheck_list.inc.php
    trunk/controller/inc/class.uicontrol.inc.php
    trunk/controller/inc/class.uiprocedure.inc.php
    trunk/controller/templates/base/check_list/print_check_list.xsl
    trunk/controller/templates/base/procedure/print_procedure.xsl

Modified: trunk/controller/inc/class.uicheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list.inc.php     2014-10-20 22:37:37 UTC 
(rev 12209)
+++ trunk/controller/inc/class.uicheck_list.inc.php     2014-10-21 07:41:31 UTC 
(rev 12210)
@@ -679,6 +679,11 @@
 
                        $control = 
$this->so_control->get_single($check_list->get_control_id());
                        $control_groups = 
$this->so_control_group_list->get_control_groups_by_control($control->get_id());
+                        
+                        $location_code = $check_list->get_location_code();
+                        $location_array = 
execMethod('property.bolocation.read_single', array('location_code' => 
$location_code));
+                        $level = 
$this->location_finder->get_location_level($location_code);
+                        //var_dump($location_array);
 
                        $saved_groups_with_items_array = array();
 
@@ -695,7 +700,10 @@
                        $data = array
                        (
                                'saved_groups_with_items_array' => 
$saved_groups_with_items_array,
-                               'check_list' => $check_list
+                               'check_list' => $check_list,
+                                'control' => $control->toArray(),
+                                'location_array' => $location_array,
+                                'location_level' => $level
                        );
 
                        
self::render_template_xsl('check_list/print_check_list', $data);

Modified: trunk/controller/inc/class.uicontrol.inc.php
===================================================================
--- trunk/controller/inc/class.uicontrol.inc.php        2014-10-20 22:37:37 UTC 
(rev 12209)
+++ trunk/controller/inc/class.uicontrol.inc.php        2014-10-21 07:41:31 UTC 
(rev 12210)
@@ -143,7 +143,7 @@
                        $cats->supress_info     = true;
 
                        $control_areas = 
$cats->formatted_xslt_list(array('format'=>'filter','selected' => 
$control_area_id,'globals' => true,'use_acl' => $this->_category_acl));
-                       array_unshift($control_areas['cat_list'],array 
('cat_id'=>'','name'=> lang('select value')));
+                        array_unshift($control_areas['cat_list'],array 
('cat_id'=>'','name'=> lang('select value')));
                        $control_areas_array = array();
                        foreach($control_areas['cat_list'] as $cat_list)
                        {

Modified: trunk/controller/inc/class.uiprocedure.inc.php
===================================================================
--- trunk/controller/inc/class.uiprocedure.inc.php      2014-10-20 22:37:37 UTC 
(rev 12209)
+++ trunk/controller/inc/class.uiprocedure.inc.php      2014-10-21 07:41:31 UTC 
(rev 12210)
@@ -615,6 +615,7 @@
                                'procedure'     => $procedure->toArray(),
                                'dateformat'                    => 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']
                        );
+                        //var_dump($procedure->toArray());
                        
                        if( !empty($control_group_id) )
                        {

Modified: trunk/controller/templates/base/check_list/print_check_list.xsl
===================================================================
--- trunk/controller/templates/base/check_list/print_check_list.xsl     
2014-10-20 22:37:37 UTC (rev 12209)
+++ trunk/controller/templates/base/check_list/print_check_list.xsl     
2014-10-21 07:41:31 UTC (rev 12210)
@@ -1,6 +1,16 @@
 <!-- $Id: choose_control_items.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
 
 <xsl:template match="data">
+    
+    <h1><xsl:value-of select="control/title" /></h1>
+    <xsl:choose>
+        <xsl:when test="location_level = 1">
+                <h2>Eiendom: <xsl:value-of 
select="location_array/loc1_name"/></h2>
+        </xsl:when>
+        <xsl:otherwise>
+                <h2>Bygg: <xsl:value-of 
select="location_array/loc2_name"/></h2>
+        </xsl:otherwise>
+    </xsl:choose>
 
 <ul class="groups">
        <xsl:for-each select="saved_groups_with_items_array">
@@ -27,7 +37,7 @@
                                                <li class="list_item">
                                                        <span 
class="order_nr"><xsl:number/></span>. <xsl:value-of select="title"/><input 
type="hidden" name="order_nr[]" value="{$order_tag}" />
                                                        <br/><i>Hva skal 
utføres</i><br/><xsl:value-of select="what_to_do" 
disable-output-escaping="yes"/>
-                                                       
<br/><i>Utførelsesbeskrivelse</i><br/><xsl:value-of select="how_to_do" 
disable-output-escaping="yes"/><br/><br/>
+                                                       
<br/><br/><i>Utførelsesbeskrivelse</i><br/><xsl:value-of select="how_to_do" 
disable-output-escaping="yes"/><br/>
                                                </li>
                                        </xsl:for-each>
                                </ul>
@@ -55,6 +65,10 @@
        list-style: none outside none;
 }
 
+li.list_item ol li{
+    list-style: decimal;
+}
+    
 ul.groups li {
     padding: 3px 0;
 }

Modified: trunk/controller/templates/base/procedure/print_procedure.xsl
===================================================================
--- trunk/controller/templates/base/procedure/print_procedure.xsl       
2014-10-20 22:37:37 UTC (rev 12209)
+++ trunk/controller/templates/base/procedure/print_procedure.xsl       
2014-10-21 07:41:31 UTC (rev 12210)
@@ -17,8 +17,10 @@
                </div>
                <div>
                        <label for="start_date"><xsl:value-of 
select="php:function('lang','Procedure valid from date')" /></label>
-                       <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 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>
                        <label for="revision_date"><xsl:value-of 
select="php:function('lang','Procedure revision date')" /></label>
@@ -41,7 +43,7 @@
                </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" /></span>
+                       <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>
@@ -109,6 +111,10 @@
            font-size: 18px;
            margin: 0 0 5px;
        }
+    
+        #procedure ul li{
+            list-style: disc;
+        }
                
 </style>
 </xsl:template>
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]