fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8352] Property: workorder


From: Sigurd Nes
Subject: [Fmsystem-commits] [8352] Property: workorder
Date: Fri, 16 Dec 2011 18:33:21 +0000

Revision: 8352
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8352
Author:   sigurdne
Date:     2011-12-16 18:33:20 +0000 (Fri, 16 Dec 2011)
Log Message:
-----------
Property: workorder

Modified Paths:
--------------
    trunk/property/inc/class.uiworkorder.inc.php
    trunk/property/templates/base/workorder.xsl

Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php        2011-12-16 17:25:09 UTC 
(rev 8351)
+++ trunk/property/inc/class.uiworkorder.inc.php        2011-12-16 18:33:20 UTC 
(rev 8352)
@@ -1631,11 +1631,6 @@
                                        'b_group_data'                          
                        => $b_group_data,
                                        'b_account_data'                        
                        => $b_account_data,
 
-                                       'lang_no_workorders'                    
                => lang('No workorder budget'),
-                                       'workorder_link'                        
                        => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiworkorder.w_edit')),
-                                       'lang_history'                          
                        => lang('History'),
-                                       'lang_no_history'                       
                        => lang('No history'),
-
                                        'img_cal'                               
                                => 
$GLOBALS['phpgw']->common->image('phpgwapi','cal'),
                                        'lang_datetitle'                        
                        => lang('Select date'),
 
@@ -1686,7 +1681,7 @@
                                        'vendor_data'                           
                        => $vendor_data,
                                        'location_data'                         
                        => $location_data,
                                        'location_template_type'                
                => $location_template_type,
-                                       'form_action'                           
                        => $GLOBALS['phpgw']->link('/index.php',$link_data),
+                                       'form_action'                           
                        => $mode == 'edit' ? 
$GLOBALS['phpgw']->link('/index.php',$link_data) : 
$GLOBALS['phpgw']->link('/home.php'),//avoid accidents
                                        'done_action'                           
                        => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiworkorder.index')),
                                        'lang_year'                             
                                => lang('Year'),
                                        'lang_save'                             
                                => lang('save'),

Modified: trunk/property/templates/base/workorder.xsl
===================================================================
--- trunk/property/templates/base/workorder.xsl 2011-12-16 17:25:09 UTC (rev 
8351)
+++ trunk/property/templates/base/workorder.xsl 2011-12-16 18:33:20 UTC (rev 
8352)
@@ -82,7 +82,7 @@
                                </xsl:when>
                        </xsl:choose>
                        <xsl:choose>
-                               <xsl:when test="value_workorder_id!='' and 
location_template_type='form'">
+                               <xsl:when test="value_workorder_id!='' and 
mode='edit'">
                                        <td>
                                                <table>
                                                        <tr>
@@ -113,7 +113,6 @@
                        <div class="yui-navset" id="workorder_tabview">
                                <xsl:value-of disable-output-escaping="yes" 
select="tabs" />
                                <div class="yui-content">
-
                                        <div id="general">
                                                <table cellpadding="2" 
cellspacing="2" width="80%" align="center">
                                                        <xsl:choose>
@@ -257,7 +256,7 @@
                                                                                
</td>
                                                                        </tr>
                                                                        
<xsl:choose>
-                                                                               
<xsl:when test="location_template_type='form'">
+                                                                               
<xsl:when test="mode='edit'">
                                                                                
        <tr>
                                                                                
                <td>
                                                                                
                        <xsl:value-of select="lang_copy_workorder"/>
@@ -312,7 +311,7 @@
                                                        </tr>
 
                                                        <xsl:choose>
-                                                               <xsl:when 
test="value_workorder_id!='' and location_template_type='form'">
+                                                               <xsl:when 
test="value_workorder_id!='' and mode='edit'">
                                                                        <tr>
                                                                                
<td>
                                                                                
        <xsl:value-of select="lang_confirm_status"/>
@@ -328,7 +327,7 @@
                                                                </xsl:when>
                                                        </xsl:choose>
                                                        <xsl:choose>
-                                                               <xsl:when 
test="need_approval='1' and location_template_type='form'">
+                                                               <xsl:when 
test="need_approval='1' and mode='edit'">
                                                                        <tr>
                                                                                
<td valign="top">
                                                                                
        <xsl:value-of select="lang_ask_approval"/>
@@ -375,8 +374,6 @@
                                                </table>
                                        </div>
 
-
-
                                        <div id="budget">
                                                <table cellpadding="2" 
cellspacing="2" width="80%" align="center">
                                                        <tr>
@@ -408,7 +405,7 @@
                                                        </tr>
 
                                                        <xsl:choose>
-                                                               <xsl:when 
test="location_template_type='form'">
+                                                               <xsl:when 
test="mode='edit'">
                                                                        
<xsl:call-template name="event_form"/>
                                                                        
<xsl:call-template name="vendor_form"/>
                                                                </xsl:when>
@@ -438,293 +435,286 @@
                                                        </tr>
 
                                                        <xsl:choose>
-                                                               <xsl:when 
test="location_template_type='form'">
+                                                               <xsl:when 
test="mode='edit'">
                                                                        
<xsl:call-template name="b_account_form"/>
                                                                </xsl:when>
                                                                <xsl:otherwise>
                                                                        
<xsl:call-template name="b_account_view"/>
                                                                </xsl:otherwise>
                                                        </xsl:choose>
-                       <tr>
-                               <td>
-                                       <xsl:value-of select="lang_cat_sub"/>
-                               </td>
-                               <td>
-                                       <xsl:call-template 
name="cat_sub_select"/>
-                               </td>
-                       </tr>
-
-
-                       <tr>
-                               <td valign="top">
-                                       <xsl:value-of 
select="php:function('lang', 'contract sum')" />
-                               </td>
-                               <td>
-                                       <input type="text" 
name="values[contract_sum]" value="{value_contract_sum}" >
-                                       </input>
-                                       <xsl:text> </xsl:text> [ <xsl:value-of 
select="currency"/> ]
-                               </td>
-                       </tr>
-                       <tr>
-                               <td valign="top">
-                                       <xsl:value-of select="lang_budget"/>
-                               </td>
-                               <td>
-                                       <input type="text" 
name="values[budget]" value="{value_budget}" 
onMouseout="window.status='';return true;">
-                                               <xsl:attribute name="title">
-                                                       <xsl:value-of 
select="lang_budget_statustext"/>
-                                               </xsl:attribute>
-                                       </input>
-                                       <xsl:text> </xsl:text> [ <xsl:value-of 
select="currency"/> ]
-                               </td>
-                       </tr>
-                       <tr>
-                               <td valign="top">
-                                       <xsl:value-of 
select="lang_addition_rs"/>
-                               </td>
-                               <td>
-                                       <input type="text" 
name="values[addition_rs]" value="{value_addition_rs}" 
onMouseout="window.status='';return true;">
-                                               <xsl:attribute name="title">
-                                                       <xsl:value-of 
select="lang_addition_rs_statustext"/>
-                                               </xsl:attribute>
-                                       </input>
-                                       <xsl:text> </xsl:text> [ <xsl:value-of 
select="currency"/> ]
-                               </td>
-                       </tr>
-                       <tr>
-                               <td valign="top">
-                                       <xsl:value-of 
select="lang_addition_percentage"/>
-                               </td>
-                               <td>
-                                       <input type="text" 
name="values[addition_percentage]" value="{value_addition_percentage}" 
onMouseout="window.status='';return true;">
-                                               <xsl:attribute name="title">
-                                                       <xsl:value-of 
select="lang_addition_percentage_statustext"/>
-                                               </xsl:attribute>
-                                       </input>
-                                       <xsl:text> </xsl:text> [ % ]
-                               </td>
-                       </tr>
-                       <tr>
-                               <td>
+                                                       <tr>
+                                                               <td>
+                                                                       
<xsl:value-of select="lang_cat_sub"/>
+                                                               </td>
+                                                               <td>
+                                                                       
<xsl:call-template name="cat_sub_select"/>
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="php:function('lang', 'contract sum')" />
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="text" name="values[contract_sum]" value="{value_contract_sum}" >
+                                                                       </input>
+                                                                       
<xsl:text> </xsl:text> [ <xsl:value-of select="currency"/> ]
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="lang_budget"/>
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="text" name="values[budget]" value="{value_budget}" 
onMouseout="window.status='';return true;">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="lang_budget_statustext"/>
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                                       
<xsl:text> </xsl:text> [ <xsl:value-of select="currency"/> ]
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="lang_addition_rs"/>
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="text" name="values[addition_rs]" value="{value_addition_rs}" 
onMouseout="window.status='';return true;">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="lang_addition_rs_statustext"/>
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                                       
<xsl:text> </xsl:text> [ <xsl:value-of select="currency"/> ]
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="lang_addition_percentage"/>
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="text" name="values[addition_percentage]" 
value="{value_addition_percentage}" onMouseout="window.status='';return true;">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="lang_addition_percentage_statustext"/>
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                                       
<xsl:text> </xsl:text> [ % ]
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td>
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="link_claim !=''">
+                                                                               
        <a href="{link_claim}"><xsl:value-of select="lang_charge_tenant"/></a>
+                                                                               
</xsl:when>
+                                                                               
<xsl:otherwise>
+                                                                               
        <xsl:value-of select="lang_charge_tenant"/>
+                                                                               
</xsl:otherwise>
+                                                                       
</xsl:choose>
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="checkbox" name="values[charge_tenant]" value="1">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="lang_charge_tenant_statustext"/>
+                                                                               
</xsl:attribute>
+                                                                               
<xsl:if test="charge_tenant = '1'">
+                                                                               
        <xsl:attribute name="checked">
+                                                                               
                <xsl:text>checked</xsl:text>
+                                                                               
        </xsl:attribute>
+                                                                               
</xsl:if>
+                                                                       </input>
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="lang_calculation"/>
+                                                               </td>
+                                                               <td>
+                                                                       
<xsl:value-of select="value_calculation"/>
+                                                                       
<xsl:text> </xsl:text> [ <xsl:value-of select="currency"/> ]
+                                                                       
<xsl:value-of select="lang_incl_tax"/>
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="php:function('lang', 'sum estimated cost')" />
+                                                               </td>
+                                                               <td>
+                                                                       
<xsl:value-of select="value_sum_estimated_cost"/>
+                                                                       
<xsl:text> </xsl:text> [ <xsl:value-of select="currency"/> ]
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="lang_actual_cost"/>
+                                                               </td>
+                                                               <td>
+                                                                       
<xsl:value-of select="actual_cost"/>
+                                                                       
<xsl:text> </xsl:text> [ <xsl:value-of select="currency"/> ]
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td>
+                                                                       
<xsl:value-of select="php:function('lang', 'billable hours')" />
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="text" id="values_billable_hour" name="values[billable_hours]" size="10" 
value="{value_billable_hours}" >
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="php:function('lang', 'enter the billable hour for 
the task')" />
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td colspan='2'>
+                                                                       <div 
id="paging_2"> </div>
+                                                                       <div 
id="datatable-container_2"></div>
+                                                               </td>
+                                                       </tr>
+                                               </table>
+                                       </div>
+                                       <div id="coordination">
+                                               <table cellpadding="2" 
cellspacing="2" width="80%" align="center">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="mode='edit'">
+                                                                       
<xsl:variable name="lang_contact_statustext"><xsl:value-of 
select="php:function('lang', 'click this link to select')" /></xsl:variable>
+                                                                       <tr>
+                                                                               
<td valign="top">
+                                                                               
        <a href="javascript:notify_contact_lookup()" 
title="{$lang_contact_statustext}">
+                                                                               
                <xsl:value-of select="php:function('lang', 'contact')" />
+                                                                               
        </a>
+                                                                               
</td>
+                                                                               
<td>
+                                                                               
        <table>
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <input type="hidden" id = "notify_contact" 
name="notify_contact" value="" title="{$lang_contact_statustext}">
+                                                                               
                                </input>
+                                                                               
                                <input size="30" type="text" 
name="notify_contact_name" value="" onClick="notify_contact_lookup();" readonly 
= 'readonly' title="{$lang_contact_statustext}"/>
+                                                                               
                        </td>
+                                                                               
                </tr>
+                                                                               
        </table>
+                                                                               
</td>
+                                                                       </tr>
+                                                               </xsl:when>
+                                                       </xsl:choose>
+                                                       <tr>
+                                                               <td valign = 
"top" class="th_text">
+                                                                       
<xsl:value-of select="php:function('lang', 'notify')" />
+                                                               </td>
+                                                               <td >
+                                                                       <div 
id="paging_3"> </div>
+                                                                       <div 
id="datatable-container_3"></div>
+                                                                       <div 
id="datatable-buttons_3"></div>
+                                                               </td>
+                                                       </tr>
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="suppresscoordination =''">
+                                                                       <tr>
+                                                                               
<td>
+                                                                               
        <xsl:value-of select="lang_key_fetch"/>
+                                                                               
</td>
+                                                                               
<td>
+                                                                               
        <xsl:variable name="lang_key_fetch_statustext"><xsl:value-of 
select="lang_key_fetch_statustext"/></xsl:variable>
+                                                                               
        <select name="values[key_fetch]" class="forms" 
onMouseover="window.status='{$lang_key_fetch_statustext}'; return true;" 
onMouseout="window.status='';return true;">
+                                                                               
                <option value=""><xsl:value-of 
select="lang_no_key_fetch"/></option>
+                                                                               
                <xsl:apply-templates select="key_fetch_list"/>
+                                                                               
        </select>
+                                                                               
</td>
+                                                                       </tr>
+                                                                       <tr>
+                                                                               
<td>
+                                                                               
        <xsl:value-of select="lang_key_deliver"/>
+                                                                               
</td>
+                                                                               
<td>
+                                                                               
        <xsl:variable name="lang_key_deliver_statustext"><xsl:value-of 
select="lang_key_deliver_statustext"/></xsl:variable>
+                                                                               
        <select name="values[key_deliver]" class="forms" 
onMouseover="window.status='{$lang_key_deliver_statustext}'; return true;" 
onMouseout="window.status='';return true;">
+                                                                               
                <option value=""><xsl:value-of 
select="lang_no_key_deliver"/></option>
+                                                                               
                <xsl:apply-templates select="key_deliver_list"/>
+                                                                               
        </select>
+                                                                               
</td>
+                                                                       </tr>
+                                                                       <tr>
+                                                                               
<td>
+                                                                               
        <xsl:value-of select="lang_key_responsible"/>
+                                                                               
</td>
+                                                                               
<td>
+                                                                               
        <xsl:for-each select="key_responsible_list" >
+                                                                               
                <xsl:choose>
+                                                                               
                        <xsl:when test="selected">
+                                                                               
                                <xsl:value-of select="name"/>
+                                                                               
                        </xsl:when>
+                                                                               
                </xsl:choose>
+                                                                               
        </xsl:for-each>
+                                                                               
</td>
+                                                                       </tr>
+                                                               </xsl:when>
+                                                       </xsl:choose>
+                                               </table>
+                                       </div>
                                        <xsl:choose>
-                                               <xsl:when test="link_claim 
!=''">
-                                                       <a 
href="{link_claim}"><xsl:value-of select="lang_charge_tenant"/></a>
+                                               <xsl:when 
test="value_workorder_id!=''">
+                                                       <div id="documents">
+                                                               <table 
cellpadding="2" cellspacing="2" width="80%" align="center">
+                                                                       <tr>
+                                                                               
<td align="left" valign="top">
+                                                                               
        <xsl:value-of select="//lang_files"/>
+                                                                               
</td>
+                                                                               
<td>
+                                                                               
<div id="datatable-container_1"></div>
+                                                                               
</td>
+                                                                       </tr>   
                        
+                                                                       
<xsl:call-template name="file_upload"/>
+                                                               </table>
+                                                       </div>
+                                                       <div id="history">
+                                                               <div 
id="paging_0"> </div>
+                                                               <div 
id="datatable-container_0"></div>  
+                                                       </div>
                                                </xsl:when>
-                                               <xsl:otherwise>
-                                                       <xsl:value-of 
select="lang_charge_tenant"/>
-                                               </xsl:otherwise>
                                        </xsl:choose>
-                               </td>
-                               <td>
-                                       <input type="checkbox" 
name="values[charge_tenant]" value="1">
-                                               <xsl:attribute name="title">
-                                                       <xsl:value-of 
select="lang_charge_tenant_statustext"/>
-                                               </xsl:attribute>
-                                               <xsl:if test="charge_tenant = 
'1'">
-                                                       <xsl:attribute 
name="checked">
-                                                               
<xsl:text>checked</xsl:text>
-                                                       </xsl:attribute>
-                                               </xsl:if>
-                                       </input>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td valign="top">
-                                       <xsl:value-of 
select="lang_calculation"/>
-                               </td>
-                               <td>
-                                       <xsl:value-of 
select="value_calculation"/>
-                                       <xsl:text> </xsl:text> [ <xsl:value-of 
select="currency"/> ]
-                                       <xsl:value-of select="lang_incl_tax"/>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td valign="top">
-                                       <xsl:value-of 
select="php:function('lang', 'sum estimated cost')" />
-                               </td>
-                               <td>
-                                       <xsl:value-of 
select="value_sum_estimated_cost"/>
-                                       <xsl:text> </xsl:text> [ <xsl:value-of 
select="currency"/> ]
-                               </td>
-                       </tr>
+                                       <script type="text/javascript">
+                                               var property_js = <xsl:value-of 
select="property_js" />;
+                                               var base_java_url = 
<xsl:value-of select="base_java_url" />;
+                                               var datatable = new Array();
+                                               var myColumnDefs = new Array();
+                                               var myButtons = new Array();
 
-                       <tr>
-                               <td valign="top">
-                                       <xsl:value-of 
select="lang_actual_cost"/>
-                               </td>
-                               <td>
-                                       <xsl:value-of select="actual_cost"/>
-                                       <xsl:text> </xsl:text> [ <xsl:value-of 
select="currency"/> ]
-                               </td>
-                       </tr>
-                       <tr>
-                               <td>
-                                       <xsl:value-of 
select="php:function('lang', 'billable hours')" />
-                               </td>
-                               <td>
-                                       <input type="text" 
id="values_billable_hour" name="values[billable_hours]" size="10" 
value="{value_billable_hours}" >
-                                               <xsl:attribute name="title">
-                                                       <xsl:value-of 
select="php:function('lang', 'enter the billable hour for the task')" />
-                                               </xsl:attribute>
-                                       </input>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td colspan='2'>
-                                       <div id="paging_2"> </div>
-                                       <div id="datatable-container_2"></div>
-                               </td>
-                       </tr>
-               </table>
+                                               <xsl:for-each 
select="datatable">
+                                                       datatable[<xsl:value-of 
select="name"/>] = [
+                                                       {
+                                                               values          
        :       <xsl:value-of select="values"/>,
+                                                               total_records   
:       <xsl:value-of select="total_records"/>,
+                                                               edit_action     
        :       <xsl:value-of select="edit_action"/>,
+                                                               is_paginator    
:       <xsl:value-of select="is_paginator"/>,
+                                                               footer          
        :       <xsl:value-of select="footer"/>
+                                                       }
+                                               ]
+                                               </xsl:for-each>
 
-       </div>
-
-       <div id="coordination">
-               <table cellpadding="2" cellspacing="2" width="80%" 
align="center">
+                                               <xsl:for-each 
select="myColumnDefs">
+                                                       
myColumnDefs[<xsl:value-of select="name"/>] = <xsl:value-of select="values"/>
+                                               </xsl:for-each>
+                                               <xsl:for-each 
select="myButtons">
+                                                       myButtons[<xsl:value-of 
select="name"/>] = <xsl:value-of select="values"/>
+                                               </xsl:for-each>
+                                       </script>
+                               </div>
+                       </div>
                        <xsl:choose>
-                               <xsl:when test="location_template_type='form'">
-                                       <xsl:variable 
name="lang_contact_statustext"><xsl:value-of select="php:function('lang', 
'click this link to select')" /></xsl:variable>
-                                       <tr>
-                                               <td valign="top">
-                                                       <a 
href="javascript:notify_contact_lookup()" title="{$lang_contact_statustext}">
-                                                               <xsl:value-of 
select="php:function('lang', 'contact')" />
-                                                       </a>
-                                               </td>
-                                               <td>
-                                                       <table>
-                                                               <tr>
-                                                                       <td>
-                                                                               
<input type="hidden" id = "notify_contact" name="notify_contact" value="" 
title="{$lang_contact_statustext}">
-                                                                               
</input>
-                                                                               
<input size="30" type="text" name="notify_contact_name" value="" 
onClick="notify_contact_lookup();" readonly = 'readonly' 
title="{$lang_contact_statustext}"/>
-                                                                       </td>
-                                                               </tr>
-                                                       </table>
-                                               </td>
-                                       </tr>
+                               <xsl:when test="mode='edit'">
+                                       <table>
+                                               <tr height="50">
+                                                       <td>
+                                                               <xsl:variable 
name="lang_save"><xsl:value-of select="lang_save"/></xsl:variable>
+                                                               <input 
type="submit" name="values[save]" value="{$lang_save}" 
onMouseout="window.status='';return true;">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="lang_save_statustext"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </td>
+                                               </tr>
+                                       </table>
                                </xsl:when>
                        </xsl:choose>
-                       <tr>
-                               <td valign = "top" class="th_text">
-                                       <xsl:value-of 
select="php:function('lang', 'notify')" />
-                               </td>
-                               <td >
-                                       <div id="paging_3"> </div>
-                                       <div id="datatable-container_3"></div>
-                                       <div id="datatable-buttons_3"></div>
-                               </td>
-                       </tr>
-                       <xsl:choose>
-                               <xsl:when test="suppresscoordination =''">
-                                       <tr>
-                                               <td>
-                                                       <xsl:value-of 
select="lang_key_fetch"/>
-                                               </td>
-                                               <td>
-                                                       <xsl:variable 
name="lang_key_fetch_statustext"><xsl:value-of 
select="lang_key_fetch_statustext"/></xsl:variable>
-                                                       <select 
name="values[key_fetch]" class="forms" 
onMouseover="window.status='{$lang_key_fetch_statustext}'; return true;" 
onMouseout="window.status='';return true;">
-                                                               <option 
value=""><xsl:value-of select="lang_no_key_fetch"/></option>
-                                                               
<xsl:apply-templates select="key_fetch_list"/>
-                                                       </select>
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td>
-                                                       <xsl:value-of 
select="lang_key_deliver"/>
-                                               </td>
-                                               <td>
-                                                       <xsl:variable 
name="lang_key_deliver_statustext"><xsl:value-of 
select="lang_key_deliver_statustext"/></xsl:variable>
-                                                       <select 
name="values[key_deliver]" class="forms" 
onMouseover="window.status='{$lang_key_deliver_statustext}'; return true;" 
onMouseout="window.status='';return true;">
-                                                               <option 
value=""><xsl:value-of select="lang_no_key_deliver"/></option>
-                                                               
<xsl:apply-templates select="key_deliver_list"/>
-                                                       </select>
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td>
-                                                       <xsl:value-of 
select="lang_key_responsible"/>
-                                               </td>
-                                               <td>
-                                                       <xsl:for-each 
select="key_responsible_list" >
-                                                               <xsl:choose>
-                                                                       
<xsl:when test="selected">
-                                                                               
<xsl:value-of select="name"/>
-                                                                       
</xsl:when>
-                                                               </xsl:choose>
-                                                       </xsl:for-each>
-                                               </td>
-                                       </tr>
-                               </xsl:when>
-                       </xsl:choose>
-               </table>
-       </div>
-       <xsl:choose>
-               <xsl:when test="value_workorder_id!=''">
-                       <div id="documents">
-                               <table cellpadding="2" cellspacing="2" 
width="80%" align="center">
-                                       <tr>
-                                               <td align="left" valign="top">
-                                                       <xsl:value-of 
select="//lang_files"/>
-                                               </td>
-                                               <td>
-                                               <div 
id="datatable-container_1"></div>
-                                               </td>
-                                       </tr>                           
-                                       <xsl:call-template name="file_upload"/>
-                               </table>
-                       </div>
-                       <div id="history">
-                               <div id="paging_0"> </div>
-                               <div id="datatable-container_0"></div>  
-                       </div>
-               </xsl:when>
-       </xsl:choose>
-               <script type="text/javascript">
-                       var property_js = <xsl:value-of select="property_js" />;
-                       var base_java_url = <xsl:value-of 
select="base_java_url" />;
-                       var datatable = new Array();
-                       var myColumnDefs = new Array();
-                       var myButtons = new Array();
-
-                       <xsl:for-each select="datatable">
-                               datatable[<xsl:value-of select="name"/>] = [
-                               {
-                                       values                  :       
<xsl:value-of select="values"/>,
-                                       total_records   :       <xsl:value-of 
select="total_records"/>,
-                                       edit_action             :       
<xsl:value-of select="edit_action"/>,
-                                       is_paginator    :       <xsl:value-of 
select="is_paginator"/>,
-                                       footer                  :       
<xsl:value-of select="footer"/>
-                               }
-                               ]
-                       </xsl:for-each>
-
-                       <xsl:for-each select="myColumnDefs">
-                               myColumnDefs[<xsl:value-of select="name"/>] = 
<xsl:value-of select="values"/>
-                       </xsl:for-each>
-                       <xsl:for-each select="myButtons">
-                               myButtons[<xsl:value-of select="name"/>] = 
<xsl:value-of select="values"/>
-                       </xsl:for-each>
-               </script>
-
-</div>
-</div>
-       <xsl:choose>
-               <xsl:when test="location_template_type='form'">
-               <table>
-                       <tr height="50">
-                               <td>
-                                       <xsl:variable 
name="lang_save"><xsl:value-of select="lang_save"/></xsl:variable>
-                                       <input type="submit" 
name="values[save]" value="{$lang_save}" onMouseout="window.status='';return 
true;">
-                                               <xsl:attribute name="title">
-                                                       <xsl:value-of 
select="lang_save_statustext"/>
-                                               </xsl:attribute>
-                                       </input>
-                               </td>
-                       </tr>
-               </table>
-               </xsl:when>
-       </xsl:choose>
-
                </form>
                <table>
                        <tr>
@@ -740,7 +730,7 @@
                                        </form>
                                </td>
                                <xsl:choose>
-                                       <xsl:when 
test="location_template_type='view'">
+                                       <xsl:when test="mode='view'">
                                                <td>
                                                        <xsl:variable 
name="edit_action"><xsl:value-of select="edit_action"/></xsl:variable>
                                                        <xsl:variable 
name="lang_edit"><xsl:value-of select="lang_edit"/></xsl:variable>
@@ -759,7 +749,7 @@
                <hr noshade="noshade" width="100%" align="center" size="1"/>
 
                <xsl:choose>
-                       <xsl:when test="location_template_type='form'">
+                       <xsl:when test="mode='edit'">
                                <xsl:variable 
name="calculate_action"><xsl:value-of 
select="calculate_action"/>&amp;workorder_id=<xsl:value-of 
select="value_workorder_id"/></xsl:variable>
                                <form method="post" 
name="calculate_workorder_form" action="{$calculate_action}">
                                </form>




reply via email to

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