phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/templates/default entity.xsl, NONE, 1.1 admi


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] property/templates/default entity.xsl, NONE, 1.1 admin_entity.xsl, 1.2, 1.3 attributes_form.xsl, 1.7, 1.8
Date: Sat, 18 Oct 2003 22:15:54 +0000

Update of /cvsroot/phpgroupware/property/templates/default
In directory subversions:/tmp/cvs-serv30781/templates/default

Modified Files:
        admin_entity.xsl attributes_form.xsl 
Added Files:
        entity.xsl 
Log Message:
no message

Index: admin_entity.xsl
===================================================================
RCS file: /cvsroot/phpgroupware/property/templates/default/admin_entity.xsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** admin_entity.xsl    15 Oct 2003 17:27:37 -0000      1.2
--- admin_entity.xsl    18 Oct 2003 22:15:52 -0000      1.3
***************
*** 6,12 ****
--- 6,18 ----
                                <xsl:apply-templates select="edit"/>
                        </xsl:when>
+                       <xsl:when test="edit_status">
+                               <xsl:apply-templates select="edit_status"/>
+                       </xsl:when>
                        <xsl:when test="list_attribute">
                                <xsl:apply-templates select="list_attribute"/>
                        </xsl:when>
+                       <xsl:when test="list_status">
+                               <xsl:apply-templates select="list_status"/>
+                       </xsl:when>
                        <xsl:when test="edit_attrib">
                                <xsl:apply-templates select="edit_attrib"/>
***************
*** 117,120 ****
--- 123,215 ----
        </xsl:template>
        
+       <xsl:template match="list_status">              
+               <xsl:call-template name="menu"/> 
+               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
+                       <tr>
+                               <td align="right">
+                                       <xsl:call-template name="search_field"/>
+                               </td>
+                       </tr>
+                       <tr>
+                               <td class="th_text" align="left">
+                                       <xsl:value-of select="lang_entity"/>
+                                       <xsl:text>: </xsl:text>
+                                       <xsl:value-of select="entity_name"/>
+                               </td>
+                       </tr>
+                       <tr>
+                               <td class="th_text" align="left">
+                                       <xsl:value-of select="lang_category"/>
+                                       <xsl:text>: </xsl:text>
+                                       <xsl:value-of select="category_name"/>
+                               </td>
+                       </tr>
+                       <tr>
+                               <td colspan="3" width="100%">
+                                       <xsl:call-template name="nextmatchs"/>
+                               </td>
+                       </tr>
+               </table>
+               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
+                               <xsl:apply-templates 
select="table_header_status"/>
+                               <xsl:apply-templates select="values_status"/>
+                               <xsl:apply-templates select="table_add"/>
+               </table>
+       </xsl:template>
+ 
+       <xsl:template match="table_header_status">
+               <xsl:variable name="sort_id"><xsl:value-of 
select="sort_id"/></xsl:variable>
+               <xsl:variable name="sort_name"><xsl:value-of 
select="sort_name"/></xsl:variable>
+               <tr class="th">
+                       <td class="th_text" width="10%" align="right">
+                               <a href="{$sort_id}"><xsl:value-of 
select="lang_id"/></a>
+                       </td>
+                       <td class="th_text" width="20%" align="center">
+                               <xsl:value-of select="lang_descr"/>
+                       </td>
+                       <td class="th_text" width="5%" align="center">
+                               <xsl:value-of select="lang_edit"/>
+                       </td>
+                       <td class="th_text" width="5%" align="center">
+                               <xsl:value-of select="lang_delete"/>
+                       </td>
+               </tr>
+       </xsl:template>
+ 
+       <xsl:template match="values_status"> 
+               <xsl:variable name="lang_edit_standardtext"><xsl:value-of 
select="lang_edit_standardtext"/></xsl:variable>
+               <xsl:variable name="lang_delete_standardtext"><xsl:value-of 
select="lang_delete_standardtext"/></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="right">
+                                       <xsl:value-of select="id"/>
+                               </td>
+                               <td align="left">
+                                       <xsl:value-of select="descr"/>
+                               </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_standardtext}';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_standardtext}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_delete"/></a>
+                               </td>
+                       </tr>
+       </xsl:template>
+       
        <xsl:template match="list_category">            
                <xsl:call-template name="menu"/> 
***************
*** 162,165 ****
--- 257,263 ----
                        </td>
                        <td class="th_text" width="5%" align="center">
+                               <xsl:value-of select="lang_status"/>
+                       </td>
+                       <td class="th_text" width="5%" align="center">
                                <xsl:value-of select="lang_attribute"/>
                        </td>
***************
*** 174,178 ****
  
        <xsl:template match="values_category"> 
!               <xsl:variable name="lang_attribute_standardtext"><xsl:value-of 
select="lang_delete_standardtext"/></xsl:variable>
                <xsl:variable name="lang_edit_standardtext"><xsl:value-of 
select="lang_edit_standardtext"/></xsl:variable>
                <xsl:variable name="lang_delete_standardtext"><xsl:value-of 
select="lang_delete_standardtext"/></xsl:variable>
--- 272,277 ----
  
        <xsl:template match="values_category"> 
!               <xsl:variable name="lang_status_standardtext"><xsl:value-of 
select="lang_status_standardtext"/></xsl:variable>
!               <xsl:variable name="lang_attribute_standardtext"><xsl:value-of 
select="lang_attribute_standardtext"/></xsl:variable>
                <xsl:variable name="lang_edit_standardtext"><xsl:value-of 
select="lang_edit_standardtext"/></xsl:variable>
                <xsl:variable name="lang_delete_standardtext"><xsl:value-of 
select="lang_delete_standardtext"/></xsl:variable>
***************
*** 205,208 ****
--- 304,311 ----
                                </td>
                                <td align="center">
+                                       <xsl:variable 
name="link_status"><xsl:value-of select="link_status"/></xsl:variable>
+                                       <a href="{$link_status}" 
onMouseover="window.status='{$lang_status_standardtext}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_status"/></a>
+                               </td>
+                               <td align="center">
                                        <xsl:variable 
name="link_attribute"><xsl:value-of select="link_attribute"/></xsl:variable>
                                        <a href="{$link_attribute}" 
onMouseover="window.status='{$lang_attribute_standardtext}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_attribute"/></a>
***************
*** 434,437 ****
--- 537,678 ----
                                </xsl:when>
                        </xsl:choose>
+ 
+                       <xsl:choose>
+                               <xsl:when test="lang_lookup_vendor != ''">
+                                       <tr>
+                                               <td>
+                                                       <xsl:value-of 
select="lang_lookup_vendor"/>
+                                               </td>
+                                               <td>
+                                                       <xsl:choose>
+                                                                       
<xsl:when test="value_lookup_vendor = 1">
+                                                                               
<input type="checkbox" name="values[lookup_vendor]" value="1" checked="checked" 
onMouseout="window.status='';return true;">
+                                                                               
        <xsl:attribute name="onMouseover">
+                                                                               
                <xsl:text>window.status='</xsl:text>
+                                                                               
                        <xsl:value-of select="lang_lookup_vendor_statustext"/>
+                                                                               
                <xsl:text>'; return true;</xsl:text>
+                                                                               
        </xsl:attribute>
+                                                                               
</input>
+                                                                       
</xsl:when>
+                                                                       
<xsl:otherwise>
+                                                                               
<input type="checkbox" name="values[lookup_vendor]" value="1" 
onMouseout="window.status='';return true;">
+                                                                               
        <xsl:attribute name="onMouseover">
+                                                                               
                <xsl:text>window.status='</xsl:text>
+                                                                               
                        <xsl:value-of select="lang_lookup_vendor_statustext"/>
+                                                                               
                <xsl:text>'; return true;</xsl:text>
+                                                                               
        </xsl:attribute>
+                                                                               
</input>
+                                                                       
</xsl:otherwise>
+                                                       </xsl:choose>
+                                               </td>
+                                       </tr>
+                               </xsl:when>
+                       </xsl:choose>
+ 
+                       <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="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                               <xsl:value-of 
select="lang_save_standardtext"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                       </input>
+                               </td>
+                       </tr>
+                       </form>
+                       <tr>
+                               <td>
+                                       <xsl:variable 
name="done_action"><xsl:value-of select="done_action"/></xsl:variable>
+                                       <xsl:variable 
name="lang_done"><xsl:value-of select="lang_done"/></xsl:variable>
+                                       <form method="post" 
action="{$done_action}">
+                                               <input type="submit" 
name="done" value="{$lang_done}" onMouseout="window.status='';return true;">
+                                                       <xsl:attribute 
name="onMouseover">
+                                                               
<xsl:text>window.status='</xsl:text>
+                                                                       
<xsl:value-of select="lang_done_standardtext"/>
+                                                               <xsl:text>'; 
return true;</xsl:text>
+                                                       </xsl:attribute>
+                                               </input>
+                                       </form>
+                               </td>
+                       </tr>
+               </table>
+               </div>
+       </xsl:template>
+ 
+ <!-- add_status / edit_status  -->
+       <xsl:template match="edit_status">
+               <div align="left">
+               
+               <table cellpadding="2" cellspacing="2" width="80%" 
align="center">
+                       <xsl:choose>
+                               <xsl:when test="msgbox_data != ''">
+                                       <tr>
+                                               <td align="left" colspan="3">
+                                                       <xsl:call-template 
name="msgbox"/>
+                                               </td>
+                                       </tr>
+                               </xsl:when>
+                       </xsl:choose>
+                       <xsl:variable name="form_action"><xsl:value-of 
select="form_action"/></xsl:variable>
+                       <form method="post" action="{$form_action}">
+                       <tr>
+                               <td class="th_text" align="left">
+                                       <xsl:value-of select="lang_entity"/>
+                               </td>
+                               <td class="th_text" align="left">
+                                       <xsl:value-of select="entity_name"/>
+                               </td>
+                       </tr>
+                       <tr>
+                               <td class="th_text" align="left">
+                                       <xsl:value-of select="lang_category"/>
+                               </td>
+                               <td class="th_text" align="left">
+                                       <xsl:value-of select="category_name"/>
+                               </td>
+                       </tr>
+                       <tr>
+                               <td valign="top">
+                                       <xsl:value-of select="lang_id"/>
+                               </td>
+                               <xsl:choose>
+                                       <xsl:when test="value_id != ''">
+                                               <td>
+                                                       <xsl:value-of 
select="value_id"/>
+                                                       <input type="hidden" 
name="values[id]" value="{value_id}"></input>
+                                               </td>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <td>
+                                                       <input type="text" 
name="values[id]" value="{value_id}" onMouseout="window.status='';return true;">
+                                                               <xsl:attribute 
name="onMouseover">
+                                                                       
<xsl:text>window.status='</xsl:text>
+                                                                               
<xsl:value-of select="lang_id_standardtext"/>
+                                                                       
<xsl:text>'; return true;</xsl:text>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </td>
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </tr>
+                       <tr>
+                               <td valign="top">
+                                       <xsl:value-of select="lang_descr"/>
+                               </td>
+                               <td>
+                                       <textarea cols="60" rows="10" 
name="values[descr]" wrap="virtual" onMouseout="window.status='';return true;">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                               <xsl:value-of 
select="lang_descr_standardtext"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                               <xsl:value-of 
select="value_descr"/>            
+                                       </textarea>
+ 
+                               </td>
+                       </tr>
+ 
                        <tr height="50">
                                <td>

Index: attributes_form.xsl
===================================================================
RCS file: /cvsroot/phpgroupware/property/templates/default/attributes_form.xsl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** attributes_form.xsl 1 Oct 2003 19:26:46 -0000       1.7
--- attributes_form.xsl 18 Oct 2003 22:15:52 -0000      1.8
***************
*** 4,8 ****
                <xsl:variable name="dateformat_source"><xsl:value-of 
select="dateformat_source"/></xsl:variable>
                <SCRIPT LANGUAGE="JavaScript" 
SRC="{$dateformat_source}"></SCRIPT>
!               <table width="80%"  cellpadding="2" cellspacing="2" 
align="center">
                <xsl:apply-templates select="attributes_header"/>
                <xsl:apply-templates select="attributes_values"/>
--- 4,8 ----
                <xsl:variable name="dateformat_source"><xsl:value-of 
select="dateformat_source"/></xsl:variable>
                <SCRIPT LANGUAGE="JavaScript" 
SRC="{$dateformat_source}"></SCRIPT>
!               <table width="80%"  cellpadding="2" cellspacing="2" 
align="left">
                <xsl:apply-templates select="attributes_header"/>
                <xsl:apply-templates select="attributes_values"/>

--- NEW FILE: entity.xsl ---
<!-- $Id: entity.xsl,v 1.1 2003/10/18 22:15:52 sigurdne Exp $ -->

        <xsl:template name="app_data">
                <xsl:choose>
                        <xsl:when test="edit">
                                <xsl:apply-templates select="edit"/>
                        </xsl:when>
                        <xsl:when test="view">
                                <xsl:apply-templates select="view"/>
                        </xsl:when>
                        <xsl:when test="empty">
                                <xsl:apply-templates select="empty"/>
                        </xsl:when>
                        <xsl:otherwise>
                                <xsl:apply-templates select="list"/>
                        </xsl:otherwise>
                </xsl:choose>
        </xsl:template>
        
        <xsl:template match="list">
                
                <xsl:call-template name="menu"/> 
                <table width="100%"  cellpadding="2" cellspacing="2" 
align="center">
                        <tr>
                                <td>
                                        <xsl:call-template 
name="filter_district"/>
                                </td>
                                <td align="left">
                                        <xsl:call-template 
name="status_filter"/>
                                </td>
                                <td align="center">
                                        <xsl:call-template 
name="user_id_filter"/>
                                </td>
                                <td align="right">
                                        <xsl:call-template name="search_field"/>
                                </td>
                                <td valign ="top">
                                <table>
                                <tr>
                                <td class="small_text" valign="top" 
align="left">
                                        <xsl:variable 
name="link_excel"><xsl:value-of select="link_excel"/></xsl:variable>
                                        <xsl:variable 
name="lang_excel_help"><xsl:value-of select="lang_excel_help"/></xsl:variable>
                                        <xsl:variable 
name="lang_excel"><xsl:value-of select="lang_excel"/></xsl:variable>
                                        <a href="javascript:var 
w=window.open('{$link_excel}','','')"
                                                
onMouseOver="overlib('{$lang_excel_help}', CAPTION, '{$lang_excel}')"
                                                onMouseOut="nd()">
                                                <xsl:value-of 
select="lang_excel"/></a>
                                </td>
                                </tr>
                                <tr>
                                <td class="small_text" valign="top" 
align="left">
                                        <xsl:variable 
name="link_columns"><xsl:value-of select="link_columns"/></xsl:variable>
                                        <xsl:variable 
name="lang_columns_help"><xsl:value-of 
select="lang_columns_help"/></xsl:variable>
                                        <xsl:variable 
name="lang_columns"><xsl:value-of select="lang_columns"/></xsl:variable>
                                        <a href="javascript:var 
w=window.open('{$link_columns}','','width=300,height=600')"
                                                
onMouseOver="overlib('{$lang_columns_help}', CAPTION, '{$lang_columns}')"
                                                onMouseOut="nd()">
                                                <xsl:value-of 
select="lang_columns"/></a>
                                </td>
                                </tr>
                                </table>
                                </td>
                        </tr>
                        <tr>
                                <td colspan="4" width="100%">
                                        <xsl:call-template name="nextmatchs"/>
                                </td>
                        </tr>
                </table>
                <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
                                <xsl:call-template name="table_header_entity"/>
                                <xsl:call-template name="values"/>
                                <xsl:choose>
                                        <xsl:when test="table_add !=''">
                                                <xsl:apply-templates 
select="table_add"/>
                                        </xsl:when>
                                </xsl:choose>   
                </table>
        </xsl:template>

        <xsl:template name="table_header_entity">
                        <tr class="th">
                                <xsl:for-each select="table_header" >
                                        <td class="th_text" width="{with}" 
align="{align}">
                                                <xsl:choose>
                                                        <xsl:when 
test="sort_link!=''">
                                                                <a 
href="{sort}" onMouseover="window.status='{header}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of select="header"/></a>
                                                        </xsl:when>
                                                        <xsl:otherwise>
                                                                <xsl:value-of 
select="header"/>                                 
                                                        </xsl:otherwise>
                                                </xsl:choose>
                                        </td>
                                </xsl:for-each>
                        </tr>
        </xsl:template>

        <xsl:template name="values">
                <xsl:for-each select="values" >
                        <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>
                                <xsl:for-each select="row" >
                                        <xsl:choose>
                                                <xsl:when test="link">
                                                        <td class="small_text" 
align="center">
                                                                <a 
href="{link}" onMouseover="window.status='{statustext}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of select="text"/></a>
                                                        </td>
                                                </xsl:when>
                                                <xsl:otherwise>
                                                        <td class="small_text" 
align="left">
                                                                <xsl:value-of 
select="value"/>                                  
                                                        </td>
                                                </xsl:otherwise>
                                        </xsl:choose>
                                </xsl:for-each>
                        </tr>
                </xsl:for-each>
        </xsl:template>

        <xsl:template match="table_add">
                        <tr>
                                <td height="50">
                                        <xsl:variable 
name="add_action"><xsl:value-of select="add_action"/></xsl:variable>
                                        <xsl:variable 
name="lang_add"><xsl:value-of select="lang_add"/></xsl:variable>
                                        <form method="post" 
action="{$add_action}">
                                                <input type="submit" name="add" 
value="{$lang_add}" onMouseout="window.status='';return true;">
                                                        <xsl:attribute 
name="onMouseover">
                                                                
<xsl:text>window.status='</xsl:text>
                                                                        
<xsl:value-of select="lang_add_statustext"/>
                                                                <xsl:text>'; 
return true;</xsl:text>
                                                        </xsl:attribute>
                                                </input>
                                        </form>
                                </td>
                        </tr>
        </xsl:template>

<!-- add / edit -->

        <xsl:template match="edit">

                <script language="JavaScript">
                        var calDateFormat="<xsl:value-of select="dateformat"/>";
                </script>
                <xsl:variable name="calendar_source"><xsl:value-of 
select="calendar_source"/></xsl:variable>
                <SCRIPT LANGUAGE="JavaScript" SRC="{$calendar_source}"></SCRIPT>

                <xsl:variable name="dateformat_source"><xsl:value-of 
select="dateformat_source"/></xsl:variable>
                <SCRIPT LANGUAGE="JavaScript" 
SRC="{$dateformat_source}"></SCRIPT>

                <div align="left">
                
                <table cellpadding="2" cellspacing="2" width="80%" 
align="center">
                        <xsl:choose>
                                <xsl:when test="msgbox_data != ''">
                                        <tr>
                                                <td align="left" colspan="3">
                                                        <xsl:call-template 
name="msgbox"/>
                                                </td>
                                        </tr>
                                </xsl:when>
                        </xsl:choose>
                        <tr>
                                <td class="th_text">
                                        <xsl:value-of select="lang_entity"/>
                                </td>
                                <td class="th_text">
                                        <xsl:value-of select="entity_name"/>
                                </td>
                        </tr>
                        <tr>
                                <td class="th_text">
                                        <xsl:value-of select="lang_category"/>
                                </td>
                                <td class="th_text">
                                        <xsl:value-of select="category_name"/>
                                </td>
                        </tr>
                        <xsl:variable name="form_action"><xsl:value-of 
select="form_action"/></xsl:variable>
                        <form method="post" name="form" action="{$form_action}">
                        <xsl:choose>
                                <xsl:when test="value_id!=''">
                                        <tr>
                                                <td valign="top">
                                                        <xsl:value-of 
select="lang_id"/>
                                                </td>
                                                <td>
                                                        <xsl:value-of 
select="value_num"/>
                                                        <input type="hidden" 
name="values[id]" value="{value_id}"></input>
                                                        <input type="hidden" 
name="values[num]" value="{value_num}"></input>
                                                </td>
                                        </tr>
                                </xsl:when>
                        </xsl:choose>
                        <xsl:choose>
                                <xsl:when test="lookup_type='form'">
                                        <xsl:call-template 
name="location_form"/>
                                </xsl:when>
                                <xsl:otherwise>
                                        <xsl:call-template 
name="location_view"/>
                                </xsl:otherwise>
                        </xsl:choose>
                        <xsl:choose>
                                <xsl:when test="vendor_data!=''">
                                        <xsl:call-template name="vendor_form"/>
                                </xsl:when>
                        </xsl:choose>
                        <tr>
                                <td>
                                        <xsl:value-of select="lang_status"/>
                                </td>
                                <td>
                                        <xsl:call-template 
name="status_select"/>
                                </td>
                        </tr>
                        <tr>
                                <td colspan="2" width="50%" align="left">
                                        <xsl:call-template 
name="attributes_form"/>                                                     
                                </td>
                        </tr>
                        <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="onMouseover">
                                                        
<xsl:text>window.status='</xsl:text>
                                                                <xsl:value-of 
select="lang_save_statustext"/>
                                                        <xsl:text>'; return 
true;</xsl:text>
                                                </xsl:attribute>
                                        </input>
                                </td>
                        </tr>


                        </form>
                        <tr>
                                <td>
                                        <xsl:variable 
name="done_action"><xsl:value-of select="done_action"/></xsl:variable>
                                        <xsl:variable 
name="lang_done"><xsl:value-of select="lang_done"/></xsl:variable>
                                        <form method="post" 
action="{$done_action}">
                                                <input type="submit" 
name="done" value="{$lang_done}" onMouseout="window.status='';return true;">
                                                        <xsl:attribute 
name="onMouseover">
                                                                
<xsl:text>window.status='</xsl:text>
                                                                        
<xsl:value-of select="lang_done_statustext"/>
                                                                <xsl:text>'; 
return true;</xsl:text>
                                                        </xsl:attribute>
                                                </input>
                                        </form>
                                </td>
                        </tr>
                </table>
                </div>

        </xsl:template>

<!-- view -->
        <xsl:template match="view">

                <div align="left">
                
                <table cellpadding="2" cellspacing="2" width="80%" 
align="center">
                        <tr>
                                <td valign="top">
                                        <xsl:value-of select="lang_entity_id"/>
                                </td>
                                <td>
                                        <xsl:value-of select="value_entity_id"/>
                                </td>
                        </tr>
                                        <xsl:call-template 
name="location_view"/>

                        <tr>
                                <td>
                                        <xsl:value-of select="lang_vendor"/>
                                </td>
                                <td>
                                        <xsl:value-of select="value_vendor_id"/>
                                        <xsl:text>  </xsl:text>
                                        <xsl:value-of 
select="value_vendor_name"/>
                                </td>
                        </tr>

                        <tr>
                                <td>
                                        <xsl:value-of select="lang_category"/>
                                </td>
                                <td>
                                        <xsl:value-of select="cat_text"/>
                                </td>
                        </tr>
                        <tr>
                                <td valign="top">
                                        <xsl:value-of select="lang_date"/>
                                </td>
                                <td>
                                        <xsl:value-of select="value_date"/>
                                </td>
                        </tr>
                        <tr>
                                <td valign="top">
                                        <xsl:value-of select="lang_lifetime"/>
                                </td>
                                <td>
                                        <xsl:value-of select="value_lifetime"/>
                                        <xsl:text> </xsl:text> [ <xsl:value-of 
select="lang_year"/> ]
                                </td>
                        </tr>
                        <tr>
                                <td>
                                        <xsl:value-of select="lang_status"/>
                                </td>
                                <td>
                                        <xsl:value-of select="value_status"/>
                                </td>
                        </tr>
                        <tr>
                                <td valign="top">
                                        <xsl:value-of select="lang_cost"/>
                                </td>
                                <td>
                                        <xsl:value-of select="value_cost"/>
                                        <xsl:text> </xsl:text> [ <xsl:value-of 
select="currency"/> ]
                                </td>
                        </tr>
                        <tr>
                                <td valign="top">
                                        <xsl:value-of select="lang_descr"/>
                                </td>
                                <td>
                                        <xsl:value-of select="value_descr"/>    
        
                                </td>
                        </tr>
                        <xsl:choose>
                                <xsl:when test="value_entity_id!=''">
                                        <tr>
                                                <td>
                                                        <xsl:value-of 
select="lang_attributes"/>
                                                </td>
                                                <td colspan="2" width="50%">
                                                        <xsl:call-template 
name="attributes_view"/>                                                     
                                                </td>
                                        </tr>
                                </xsl:when>
                        </xsl:choose>

                        <tr height="50">
                                <td>
                                        <xsl:variable 
name="done_action"><xsl:value-of select="done_action"/></xsl:variable>
                                        <xsl:variable 
name="lang_done"><xsl:value-of select="lang_done"/></xsl:variable>
                                        <form method="post" 
action="{$done_action}">
                                        <input type="submit" class="forms" 
name="done" value="{$lang_done}" onMouseout="window.status='';return true;">
                                                <xsl:attribute 
name="onMouseover">
                                                        
<xsl:text>window.status='</xsl:text>
                                                                <xsl:value-of 
select="lang_done_statustext"/>
                                                        <xsl:text>'; return 
true;</xsl:text>
                                                </xsl:attribute>
                                        </input>

                                        </form>
                                        <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>
                                        <form method="post" 
action="{$edit_action}">
                                        <input type="submit" class="forms" 
name="edit" value="{$lang_edit}" onMouseout="window.status='';return true;">
                                                <xsl:attribute 
name="onMouseover">
                                                        
<xsl:text>window.status='</xsl:text>
                                                                <xsl:value-of 
select="lang_edit_statustext"/>
                                                        <xsl:text>'; return 
true;</xsl:text>
                                                </xsl:attribute>
                                        </input>
                                        </form>
                                </td>
                        </tr>
                </table>
                </div>
        </xsl:template>

<!-- emtpy -->

        <xsl:template match="empty">
                <xsl:call-template name="menu"/> 
                <div align="left">              
                <table cellpadding="2" cellspacing="2" width="80%" 
align="center">
                        <xsl:choose>
                                <xsl:when test="msgbox_data != ''">
                                        <tr>
                                                <td align="left" colspan="3">
                                                        <xsl:call-template 
name="msgbox"/>
                                                </td>
                                        </tr>
                                </xsl:when>
                        </xsl:choose>
                </table>
                </div>
        </xsl:template>

        <xsl:template match="attributes_header">
                        <tr class="th">
                                <td class="th_text" width="15%" align="left">
                                        <xsl:value-of select="lang_name"/>
                                </td>
                                <td class="th_text" width="55%" align="right">
                                        <xsl:value-of select="lang_value"/>
                                </td>
                        </tr>
        </xsl:template>

        <xsl:template name="attributes_form">
                <xsl:apply-templates select="attributes_values"/>
        </xsl:template>

        <xsl:template match="attributes_values">
                <xsl:variable name="lang_attribute_statustext"><xsl:value-of 
select="lang_attribute_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" valign="top">
                                        <xsl:value-of select="name"/>
                                        <xsl:choose>
                                                <xsl:when test="datatype='D'">
                                                        
<xsl:text>[</xsl:text><xsl:value-of 
select="//lang_dateformat"/><xsl:text>]</xsl:text>                  
                                                </xsl:when>
                                        </xsl:choose>
                                </td>
                                <td align="left">
                                        <xsl:choose>
                                                <xsl:when test="name!=''">
                                                        <input type="hidden" 
name="values_attribute[{counter}][attrib_id]" value="{attrib_id}"></input>
                                                        <input type="hidden" 
name="values_attribute[{counter}][name]" value="{name}"></input>
                                                        <input type="hidden" 
name="values_attribute[{counter}][datatype]" value="{datatype}"></input>
                                                        <xsl:choose>
                                                                <xsl:when 
test="datatype='R'">
                                                                        
<xsl:call-template name="choice"/>
                                                                </xsl:when>
                                                                <xsl:when 
test="datatype='CH'">
                                                                        
<xsl:call-template name="choice"/>
                                                                </xsl:when>
                                                                <xsl:when 
test="datatype='D'">
                                                                        <input 
type="text" name="values_attribute[{counter}][value]" value="{value}" 
onFocus="{//dateformat_validate}" onKeyUp="{//onKeyUp}" onBlur="{//onBlur}" 
size="12" maxlength="10"  onMouseout="window.status='';return true;" >
                                                                                
<xsl:attribute name="onMouseover">
                                                                                
        <xsl:text>window.status='</xsl:text>
                                                                                
                <xsl:value-of select="descr"/>
                                                                                
        <xsl:text>'; return true;</xsl:text>
                                                                                
</xsl:attribute>
                                                                        </input>
                                                                </xsl:when>
                                                                <xsl:when 
test="datatype='T'">
                                                                        
<textarea cols="40" rows="6" name="values_attribute[{counter}][value]" 
wrap="virtual" onMouseout="window.status='';return true;">
                                                                                
<xsl:attribute name="onMouseover">
                                                                                
        <xsl:text>window.status='</xsl:text>
                                                                                
                <xsl:value-of select="descr"/>
                                                                                
        <xsl:text>'; return true;</xsl:text>
                                                                                
</xsl:attribute>
                                                                                
<xsl:value-of select="value"/>          
                                                                        
</textarea>
                                                                </xsl:when>
                                                                <xsl:otherwise>
                                                                        <input 
type="text" name="values_attribute[{counter}][value]" value="{value}" size="30" 
onMouseout="window.status='';return true;" >
                                                                                
<xsl:attribute name="onMouseover">
                                                                                
        <xsl:text>window.status='</xsl:text>
                                                                                
                <xsl:value-of select="descr"/>
                                                                                
        <xsl:text>'; return true;</xsl:text>
                                                                                
</xsl:attribute>
                                                                        </input>
                                                                </xsl:otherwise>
                                                        </xsl:choose>
                                                </xsl:when>
                                        </xsl:choose>
                                </td>
                        </tr>
        </xsl:template>

        <xsl:template name="choice">
                <xsl:variable name="counter"><xsl:value-of 
select="counter"/></xsl:variable>
                        <table cellpadding="2" cellspacing="2" width="50%" 
align="left">
                                <xsl:for-each select="choice" >
                                        <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="value"/>
                                                <xsl:text> </xsl:text>
                                        </td>
                                        <xsl:variable 
name="checked"><xsl:value-of select="checked"/></xsl:variable>
                                        <td align="left">
                                                <xsl:choose>
                                                        <xsl:when 
test="checked='checked'">
                                                                <input 
type="{input_type}" name="values_attribute[{$counter}][value][]" value="{id}" 
checked="$checked"></input>
                                                        </xsl:when>
                                                        <xsl:otherwise>
                                                                <input 
type="{input_type}" name="values_attribute[{$counter}][value][]" 
value="{id}"></input>
                                                        </xsl:otherwise>
                                                </xsl:choose>
                                        </td>
                                        </tr>
                                </xsl:for-each>                         
                        </table>
        </xsl:template>







reply via email to

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