[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/templates/default/entity.xsl, 1.2
From: |
nomail |
Subject: |
[Phpgroupware-cvs] property/templates/default/entity.xsl, 1.2 |
Date: |
Wed, 2 Jun 2004 21:09:57 +0200 |
Update of /property/templates/default
Added Files:
Branch:
entity.xsl
date: 2004/06/02 19:09:57; author: sigurdne; state: Exp; lines: +554 -0
Log Message:
no message
=====================================================================
<!-- $Id: entity.xsl,v 1.2 2004/06/02 19:09:57 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">
<div id="overDiv" style="position:absolute;
visibility:hide;z-index:1;"></div>
<xsl:variable name="overlib_source"><xsl:value-of
select="overlib_source"/></xsl:variable>
<SCRIPT LANGUAGE="JavaScript" SRC="{$overlib_source}"></SCRIPT>
<xsl:call-template name="menu"/>
<table width="100%" cellpadding="2" cellspacing="2"
align="center">
<tr>
<td>
<xsl:call-template name="cat_filter"/>
</td>
<td>
<xsl:call-template
name="filter_district"/>
</td>
<xsl:choose>
<xsl:when test="status_list!=''">
<td align="left">
<xsl:call-template
name="status_filter"/>
</td>
</xsl:when>
</xsl:choose>
<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="7" 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">
<xsl:variable name="dateformat_source"><xsl:value-of
select="dateformat_source"/></xsl:variable>
<SCRIPT LANGUAGE="JavaScript"
SRC="{$dateformat_source}"></SCRIPT>
<script language="JavaScript">
self.name="first_Window";
<xsl:value-of select="lookup_functions"/>
</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>
<xsl:for-each select="origin_list" >
<xsl:variable name="link"><xsl:value-of
select="link"/>&id=<xsl:value-of select="id"/></xsl:variable>
<tr>
<td class="th_text">
<xsl:value-of select="name"/>
</td>
<td class="th_text">
<a href="{$link}"
onMouseover="window.status='{statustext}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of select="id"/></a>
</td>
</tr>
</xsl:for-each>
<xsl:choose>
<xsl:when test="value_ticket_id!=''">
<tr>
<td>
<xsl:value-of
select="lang_ticket"/>
</td>
<td class="th_text"
align="left">
<xsl:for-each
select="value_ticket_id" >
<xsl:variable name="link_ticket"><xsl:value-of
select="//link_ticket"/>&id=<xsl:value-of select="id"/></xsl:variable>
<a
href="{$link_ticket}"
onMouseover="window.status='{//lang_ticket_statustext}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of select="id"/></a>
<xsl:text> </xsl:text>
</xsl:for-each>
</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>
<xsl:variable name="form_action"><xsl:value-of
select="form_action"/></xsl:variable>
<form ENCTYPE="multipart/form-data" method="post"
name="form" action="{$form_action}">
<tr>
<td class="th_text">
<xsl:value-of select="lang_category"/>
<input type="hidden"
name="values[origin_type]" value="{value_origin_type}"></input>
<input type="hidden"
name="values[origin_id]" value="{value_origin_id}"></input>
</td>
<td class="th_text">
<xsl:choose>
<xsl:when test="cat_list=''">
<xsl:value-of
select="category_name"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template
name="cat_select"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<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="location_code" value="{location_code}"></input>
<input type="hidden"
name="lookup_tenant" value="{lookup_tenant}"></input>
<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="location_data!=''">
<xsl:call-template
name="location_form"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="vendor_data!=''">
<xsl:call-template name="vendor_form"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="files!=''">
<tr>
<td align="left" valign="top">
<xsl:value-of select="//lang_files"/>
</td>
<td>
<table>
<tr class="th">
<td class="th_text" width="85%"
align="left">
<xsl:value-of
select="lang_filename"/>
</td>
<td class="th_text" width="15%"
align="center">
<xsl:value-of
select="lang_delete_file"/>
</td>
</tr>
<xsl:for-each select="files" >
<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:choose>
<xsl:when
test="//link_to_files!=''">
<xsl:variable
name="link_to_file"><xsl:value-of select="//link_to_files"/>/<xsl:value-of
select="directory"/>/<xsl:value-of select="file_name"/></xsl:variable>
<a
href="{$link_to_file}" target="_blank"
onMouseover="window.status='{//lang_view_file_statustext}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of select="name"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:variable
name="link_view_file"><xsl:value-of
select="//link_view_file"/>&file_name=<xsl:value-of
select="file_name"/></xsl:variable>
<a
href="{$link_view_file}" target="_blank"
onMouseover="window.status='{//lang_view_file_statustext}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of select="name"/></a>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
</td>
<td align="center">
<input type="checkbox"
name="values[delete_file][]" value="{name}"
onMouseout="window.status='';return true;">
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="//lang_delete_file_statustext"/>
<xsl:text>';
return true;</xsl:text>
</xsl:attribute>
</input>
</td>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="cat_list='' and fileupload = 1">
<tr>
<td valign="top">
<xsl:value-of
select="lang_upload_file"/>
</td>
<td>
<input type="file"
name="file" size="40" onMouseout="window.status='';return true;">
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="lang_file_statustext"/>
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
</td>
</tr>
</xsl:when>
</xsl:choose>
<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">
<xsl:for-each select="origin_list" >
<xsl:variable name="link"><xsl:value-of
select="link"/>&id=<xsl:value-of select="id"/></xsl:variable>
<tr>
<td class="th_text">
<xsl:value-of select="name"/>
</td>
<td class="th_text">
<a href="{$link}"
onMouseover="window.status='{statustext}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of select="id"/></a>
</td>
</tr>
</xsl:for-each>
<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: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:call-template name="location_view"/>
<xsl:choose>
<xsl:when test="vendor_data!=''">
<xsl:call-template name="vendor_form"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="files!=''">
<tr>
<td align="left" valign="top">
<xsl:value-of
select="//lang_files"/>
</td>
<td>
<table>
<tr class="th">
<td class="th_text"
width="85%" align="left">
<xsl:value-of
select="lang_filename"/>
</td>
</tr>
<xsl:for-each
select="files" >
<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:choose>
<xsl:when test="//link_to_files!=''">
<xsl:variable name="link_to_file"><xsl:value-of
select="//link_to_files"/>/<xsl:value-of select="directory"/>/<xsl:value-of
select="file_name"/></xsl:variable>
<a href="{$link_to_file}" target="_blank"
onMouseover="window.status='{//lang_view_file_statustext}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of select="name"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="link_view_file"><xsl:value-of
select="//link_view_file"/>&file_name=<xsl:value-of
select="file_name"/></xsl:variable>
<a href="{$link_view_file}" target="_blank"
onMouseover="window.status='{//lang_view_file_statustext}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of select="name"/></a>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
</td>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
</xsl:when>
</xsl:choose>
<tr>
<td colspan="2" width="50%" align="left">
<xsl:apply-templates
select="attributes_view"/>
</td>
</tr>
<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"/>
<table width="100%" cellpadding="2" cellspacing="2"
align="center">
<tr>
<td>
<xsl:call-template name="cat_filter"/>
</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"/>
</table>
</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>