phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property inc/class.sor_agreement.inc.php inc/cl...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property inc/class.sor_agreement.inc.php inc/cl...
Date: Sun, 19 Feb 2006 16:40:43 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Branch:         
Changes by:     Sigurd Nes <address@hidden>     06/02/19 16:40:42

Modified files:
        inc            : class.sor_agreement.inc.php 
                         class.uir_agreement.inc.php 
        templates/base : r_agreement.xsl 

Log message:
        

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.sor_agreement.inc.php.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.uir_agreement.inc.php.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/templates/base/r_agreement.xsl.diff?tr1=1.9&tr2=1.10&r1=text&r2=text

Patches:
Index: property/inc/class.sor_agreement.inc.php
diff -u property/inc/class.sor_agreement.inc.php:1.8 
property/inc/class.sor_agreement.inc.php:1.9
--- property/inc/class.sor_agreement.inc.php:1.8        Sat Feb 18 11:25:46 2006
+++ property/inc/class.sor_agreement.inc.php    Sun Feb 19 16:40:42 2006
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage agreement
-       * @version $Id: class.sor_agreement.inc.php,v 1.8 2006/02/18 11:25:46 
sigurdne Exp $
+       * @version $Id: class.sor_agreement.inc.php,v 1.9 2006/02/19 16:40:42 
sigurdne Exp $
        */
 
        /**
@@ -1765,6 +1765,7 @@
                                (
                                        'agreement_id'  => $id,
                                        'common_id'     => $this->db->f('c_id'),
+                                       'id'            => $this->db->f('id'),
                                        'b_account_id'  => 
$this->db->f('b_account'),
                                        'from_date'     => 
$this->db->f('from_date'),
                                        'to_date'       => 
$this->db->f('to_date'),
Index: property/inc/class.uir_agreement.inc.php
diff -u property/inc/class.uir_agreement.inc.php:1.9 
property/inc/class.uir_agreement.inc.php:1.10
--- property/inc/class.uir_agreement.inc.php:1.9        Sat Feb 18 11:25:46 2006
+++ property/inc/class.uir_agreement.inc.php    Sun Feb 19 16:40:42 2006
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage agreement
-       * @version $Id: class.uir_agreement.inc.php,v 1.9 2006/02/18 11:25:46 
sigurdne Exp $
+       * @version $Id: class.uir_agreement.inc.php,v 1.10 2006/02/19 16:40:42 
sigurdne Exp $
        */
 
        /**
@@ -1991,19 +1991,19 @@
 
                                                if($this->acl_edit)
                                                {
-                                                       $link_edit = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uir_agreement.edit_common&r_agreement_id='
 . $common_entry['agreement_id'] . '&id=' . $common_entry['common_id']);
+                                                       $link_edit = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uir_agreement.edit_common_h&r_agreement_id='
 . $common_entry['agreement_id'] . '&common_id=' . $common_entry['common_id'] . 
'&id=' . $common_entry['id']);
                                                        $text_edit              
        = lang('edit');
                                                }
                                                if($this->acl_delete)
                                                {
-                                                       $link_delete = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uir_agreement.delete_common&r_agreement_id='
 . $common_entry['agreement_id'] . '&id=' . $common_entry['common_id']);
+                                                       $link_delete = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uir_agreement.delete_common_h&r_agreement_id='
 . $common_entry['agreement_id'] . '&common_id=' . $common_entry['common_id'] . 
'&id=' . $common_entry['id']);
                                                        $text_delete            
=lang('delete');
                                                }
 
                                                $content_common[] = array
                                                (
-                                                       'agreement_id'          
                => $common_entry['agreement_id'],
-                                                       'common_id'             
                        => $common_entry['common_id'],
+                                               //      'agreement_id'          
                => $common_entry['agreement_id'],
+                                                       'id'                    
                => $common_entry['id'],
                                                        'b_account_id'          
                => $common_entry['b_account_id'],
                                                        'from_date'             
                        => $common_entry['from_date'],
                                                        'to_date'               
                        => $common_entry['to_date'],
@@ -2012,7 +2012,7 @@
                                                        'fraction'              
                        => $common_entry['fraction'],
                                                        'override_fraction'     
                => $common_entry['override_fraction'],
                                                        'remark'                
                        => $common_entry['remark'],
-                                                       'link_view'             
                        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uir_agreement.view&agreement_id='
 . $common_entry['agreement_id']),
+                                                       'link_view'             
                        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uir_agreement.view_common_h&agreement_id='
 . $common_entry['agreement_id'] . '&common_id=' . $common_entry['common_id'] . 
'&id=' . $common_entry['id']),
                                                        'link_edit'             
                        => $link_edit,
                                                        'link_delete'           
                => $link_delete,
                                                        'lang_view_statustext'  
        => lang('view the p_of_town'),
@@ -2178,8 +2178,8 @@
                                'lang_override_fraction_statustext'=> 
lang('Override fraction of common costs'),
                                'value_override_fraction'               => 
$values['override_fraction'],
                                'value_remark'          => $values['remark'],
-                               'values_common'                                 
=> $content_common,
-                               'table_header_common'                   => 
$table_header_common,
+                               'values_common_history'                         
        => $content_common,
+                               'table_header_common_history'                   
=> $table_header_common,
 
                                
                        );
Index: property/templates/base/r_agreement.xsl
diff -u property/templates/base/r_agreement.xsl:1.9 
property/templates/base/r_agreement.xsl:1.10
--- property/templates/base/r_agreement.xsl:1.9 Sat Feb 18 11:25:46 2006
+++ property/templates/base/r_agreement.xsl     Sun Feb 19 16:40:42 2006
@@ -1810,6 +1810,8 @@
                                                        </input>
                                                </td>
                                        </tr>
+                               </xsl:otherwise>
+                       </xsl:choose>
 
                        <tr>
                                <td valign="top">
@@ -1826,6 +1828,9 @@
                                </td>
                        </tr>
 
+                       <xsl:choose>
+                               <xsl:when test="value_id=''">
+
                                <tr>
                                        <td valign="top">
                                                <xsl:value-of 
select="lang_remark"/>
@@ -1841,7 +1846,7 @@
                                                </textarea>
                                        </td>
                                </tr>
-                               </xsl:otherwise>
+                               </xsl:when>
                        </xsl:choose>
 
                        <tr height="50">
@@ -1886,7 +1891,7 @@
                </form>
                
                <xsl:choose>
-                       <xsl:when test="values_common != ''">
+                       <xsl:when test="values_common_history != ''">
                
                                <xsl:variable 
name="update_action"><xsl:value-of select="update_action"/></xsl:variable>
                                <form method="post" name="form2" 
action="{$update_action}">
@@ -1894,8 +1899,8 @@
                                        <input type="hidden" 
name="values[common_id]" value="{value_id}" ></input>
                                        <table width="100%" cellpadding="2" 
cellspacing="2" align="center">
 
-                       <xsl:apply-templates select="table_header_common"/>
-                       <xsl:apply-templates select="values_common"/>
+                       <xsl:apply-templates 
select="table_header_common_history"/>
+                       <xsl:apply-templates select="values_common_history"/>
 
                                        </table>
                                        <table width="70%" cellpadding="2" 
cellspacing="2" align="center">
@@ -1919,6 +1924,97 @@
        </xsl:template>
 
 
+       <xsl:template match="table_header_common_history">              
+                       <tr class="th">
+                               <td width="10%" align="right">
+                                       <xsl:value-of select="lang_id"/>
+                               </td>
+                               <td align="center">
+                                       <xsl:value-of select="lang_from_date"/>
+                               </td>
+                               <td align="left">
+                                       <xsl:value-of select="lang_to_date"/>
+                               </td>
+                               <td align="left">
+                                       <xsl:value-of 
select="lang_budget_cost"/>
+                               </td>
+                               <td align="left">
+                                       <xsl:value-of 
select="lang_actual_cost"/>
+                               </td>
+                               <td align="left">
+                                       <xsl:value-of select="lang_fraction"/>
+                               </td>
+                               <td align="left">
+                                       <xsl:value-of 
select="lang_override_fraction"/>
+                               </td>
+                               <td width="5%" align="center">
+                                       <xsl:value-of select="lang_view"/>
+                               </td>
+                               <td width="5%" align="center">
+                                       <xsl:value-of select="lang_edit"/>
+                               </td>
+                               <td width="5%" align="center">
+                                       <xsl:value-of select="lang_delete"/>
+                               </td>
+                       </tr>
+       </xsl:template>
+
+       <xsl:template match="values_common_history">
+               <xsl:variable name="lang_view_statustext"><xsl:value-of 
select="lang_view_statustext"/></xsl:variable>
+               <xsl:variable name="lang_edit_statustext"><xsl:value-of 
select="lang_edit_statustext"/></xsl:variable>
+               <xsl:variable name="lang_delete_statustext"><xsl:value-of 
select="lang_delete_statustext"/></xsl:variable>
+                       <tr>
+                               <xsl:attribute name="class">
+                                       <xsl:choose>
+                                               <xsl:when test="@class">
+                                                       <xsl:value-of 
select="@class"/>
+                                               </xsl:when>
+                                               <xsl:when test="position() mod 
2 = 0">
+                                                       
<xsl:text>row_off</xsl:text>
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       
<xsl:text>row_on</xsl:text>
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                               </xsl:attribute>
+
+                               <td align="left">
+                                       <xsl:value-of select="id"/>
+                               </td>
+                               <td align="center">
+                                       <xsl:value-of select="from_date"/>
+                               </td>
+                               <td align="left">
+                                       <xsl:value-of select="to_date"/>
+                               </td>
+                               <td align="left">
+                                       <xsl:value-of select="budget_cost"/>
+                               </td>
+                               <td align="left">
+                                       <xsl:value-of select="actual_cost"/>
+                               </td>
+                               <td align="left">
+                                       <xsl:value-of select="fraction"/>
+                               </td>
+                               <td align="left">
+                                       <xsl:value-of 
select="override_fraction"/>
+                               </td>
+                               <td align="center">
+                                       <xsl:variable 
name="link_view"><xsl:value-of select="link_view"/></xsl:variable>
+                                       <a href="{$link_view}" 
onMouseover="window.status='{$lang_view_statustext}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_view"/></a>
+                               </td>
+                               <td align="center">
+                                       <xsl:variable 
name="link_edit"><xsl:value-of select="link_edit"/></xsl:variable>
+                                       <a href="{$link_edit}" 
onMouseover="window.status='{$lang_edit_statustext}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_edit"/></a>
+                               </td>
+                               <td align="center">
+                                       <xsl:variable 
name="link_delete"><xsl:value-of select="link_delete"/></xsl:variable>
+                                       <a href="{$link_delete}" 
onMouseover="window.status='{$lang_delete_statustext}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_delete"/></a>
+                               </td>
+                       </tr>
+       </xsl:template>
+
+
 
 <!-- datatype_list --> 
 




reply via email to

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