fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8780]


From: Erik Holm-Larsen
Subject: [Fmsystem-commits] [8780]
Date: Fri, 03 Feb 2012 10:19:24 +0000

Revision: 8780
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8780
Author:   erikhl
Date:     2012-02-03 10:19:24 +0000 (Fri, 03 Feb 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/class.soprocedure.inc.php
    trunk/controller/inc/class.uiprocedure.inc.php
    trunk/controller/templates/base/procedure/view_procedures_for_control.xsl

Modified: trunk/controller/inc/class.soprocedure.inc.php
===================================================================
--- trunk/controller/inc/class.soprocedure.inc.php      2012-02-03 09:34:51 UTC 
(rev 8779)
+++ trunk/controller/inc/class.soprocedure.inc.php      2012-02-03 10:19:24 UTC 
(rev 8780)
@@ -29,6 +29,7 @@
        */      
 
        phpgw::import_class('controller.socommon');
+       phpgw::import_class('controller.uidocument');
 
        include_class('controller', 'procedure', 'inc/model/');
        include_class('controller', 'document', 'inc/model/');
@@ -225,7 +226,12 @@
                                        
$document->set_description($this->unmarshal($this->db->f('document_description',
 true), 'string'));
                                        
                                        if($return_type == "return_array")
-                                               $documents_array[] = 
$document->toArray();
+                                       {
+                                               $doc_as_array = 
$document->toArray();
+                                               $doc_as_array['document_link'] 
= controller_uidocument::link(array('menuaction' => 
'controller.uidocument.view', 'id' => $document->get_id()));
+                                               //_debug_array($doc_as_array);
+                                               $documents_array[] = 
$doc_as_array;
+                                       }
                                        else
                                                $documents_array[] = $document;
                                }

Modified: trunk/controller/inc/class.uiprocedure.inc.php
===================================================================
--- trunk/controller/inc/class.uiprocedure.inc.php      2012-02-03 09:34:51 UTC 
(rev 8779)
+++ trunk/controller/inc/class.uiprocedure.inc.php      2012-02-03 10:19:24 UTC 
(rev 8780)
@@ -439,7 +439,7 @@
                                }
                                
                                $category    = 
execMethod('phpgwapi.categories.return_single', 
$procedure->get_control_area_id());
-                               
$procedure->set_control_area_name($category_name = $category[0]['name']);
+                               
$procedure->set_control_area_name($category[0]['name']);
                                
 
                                $procedure_array = $procedure->toArray();
@@ -546,6 +546,9 @@
                        
                        $procedure = $this->so->get_single($procedure_id);
                        
+                       $category    = 
execMethod('phpgwapi.categories.return_single', 
$procedure->get_control_area_id());
+                       $procedure->set_control_area_name($category[0]['name']);
+                       
                        $data = array
                        (
                                'location'      => $location_array,

Modified: 
trunk/controller/templates/base/procedure/view_procedures_for_control.xsl
===================================================================
--- trunk/controller/templates/base/procedure/view_procedures_for_control.xsl   
2012-02-03 09:34:51 UTC (rev 8779)
+++ trunk/controller/templates/base/procedure/view_procedures_for_control.xsl   
2012-02-03 10:19:24 UTC (rev 8780)
@@ -22,8 +22,9 @@
                <h4 style="margin:5px 0;">Dokumenter</h4>
                <xsl:for-each select="control_procedure/documents">
                        <div style="margin-left:10px;">
-                               <span><xsl:value-of select="title"/></span>
-                               <span style="margin-left:10px;"><xsl:value-of 
select="description"/></span>
+                               <xsl:variable name="doc_link"><xsl:value-of 
select='document_link'/></xsl:variable>
+                               <span><a href="{$doc_link}"><xsl:value-of 
select="title"/></a></span>
+                               <span style="margin-left:10px;"><xsl:value-of 
select="description" disable-output-escaping="yes"/></span>
                        </div>  
                </xsl:for-each>
        </xsl:if>
@@ -56,8 +57,9 @@
                                <h4 style="margin:5px 0;">Dokumenter</h4>
                                        <xsl:for-each select="documents">
                                                <div style="margin-left:10px;">
-                                                       <span><xsl:value-of 
select="title"/></span>
-                                                       <span 
style="margin-left:10px;"><xsl:value-of select="description"/></span>
+                                                       <xsl:variable 
name="doc_link"><xsl:value-of select='document_link'/></xsl:variable>
+                                                       <span><a 
href="{$doc_link}"><xsl:value-of select="title"/></a></span>
+                                                       <span 
style="margin-left:10px;"><xsl:value-of select="description" 
disable-output-escaping="yes"/></span>
                                                </div>  
                                        </xsl:for-each>
                                </xsl:if>




reply via email to

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