[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/templates/base budget.xsl
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/templates/base budget.xsl |
Date: |
Thu, 06 Apr 2006 13:35:09 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Branch:
Changes by: Sigurd Nes <address@hidden> 06/04/06 13:35:09
Modified files:
templates/base : budget.xsl
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/templates/base/budget.xsl.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: property/templates/base/budget.xsl
diff -u property/templates/base/budget.xsl:1.1
property/templates/base/budget.xsl:1.2
--- property/templates/base/budget.xsl:1.1 Tue Apr 4 13:46:13 2006
+++ property/templates/base/budget.xsl Thu Apr 6 13:35:09 2006
@@ -36,63 +36,87 @@
</tr>
</table>
<table width="100%" cellpadding="2" cellspacing="2"
align="center">
- <xsl:call-template name="table_header"/>
- <xsl:call-template name="values"/>
+ <xsl:apply-templates
select="table_header_budget"/>
+ <xsl:apply-templates select="values_budget"/>
<xsl:apply-templates select="table_add"/>
</table>
</xsl:template>
- <xsl:template name="table_header">
- <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 match="table_header_budget">
+ <xsl:variable name="sort_district_id"><xsl:value-of
select="sort_district_id"/></xsl:variable>
+ <xsl:variable name="sort_budget_cost"><xsl:value-of
select="sort_budget_cost"/></xsl:variable>
+ <xsl:variable name="sort_b_group"><xsl:value-of
select="sort_b_group"/></xsl:variable>
+ <tr class="th">
+ <td class="th_text" width="5%" align="left">
+ <xsl:value-of select="lang_year"/>
+ </td>
+ <td class="th_text" width="5%" align="left">
+ <xsl:value-of select="lang_revision"/>
+ </td>
+ <td class="th_text" width="10%" align="left">
+ <a href="{$sort_b_group}"><xsl:value-of
select="lang_b_group"/></a>
+ </td>
+
+ <td class="th_text" width="10%" align="left">
+ <a href="{$sort_district_id}"><xsl:value-of
select="lang_district_id"/></a>
+ </td>
+ <td class="th_text" width="5%" align="center">
+ <a href="{$sort_budget_cost}"><xsl:value-of
select="lang_budget_cost"/></a>
+ </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 name="values">
- <xsl:for-each select="values" >
+ <xsl:template match="values_budget">
+ <xsl:variable name="lang_edit_text"><xsl:value-of
select="lang_edit_text"/></xsl:variable>
+ <xsl:variable name="lang_delete_text"><xsl:value-of
select="lang_delete_text"/></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>
- <xsl:for-each select="row" >
+ <xsl:attribute name="class">
<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 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>
- <td class="small_text"
align="left">
- <xsl:value-of
select="value"/>
- </td>
+
<xsl:text>row_on</xsl:text>
</xsl:otherwise>
</xsl:choose>
- </xsl:for-each>
+ </xsl:attribute>
+ <td align="left">
+ <xsl:value-of select="year"/>
+ </td>
+ <td>
+ <xsl:value-of select="revision"/>
+ </td>
+ <td>
+ <xsl:value-of select="b_group"/>
+ </td>
+ <td>
+ <xsl:value-of select="district_id"/>
+ </td>
+ <td align = "right">
+ <xsl:value-of select="budget_cost"/>
+ </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_text}';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_text}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of
select="text_delete"/></a>
+ </td>
</tr>
- </xsl:for-each>
</xsl:template>
@@ -143,15 +167,98 @@
</xsl:when>
</xsl:choose>
+ <tr>
+ <td valign="top">
+ <xsl:value-of select="lang_year"/>
+ </td>
+ <xsl:choose>
+ <xsl:when test="value_year !=''">
+ <td>
+ <xsl:value-of
select="value_year"/>
+ </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td valign="top">
+ <xsl:variable
name="lang_year_statustext"><xsl:value-of
select="lang_year_statustext"/></xsl:variable>
+ <select
name="values[year]" class="forms"
onMouseover="window.status='{$lang_year_statustext}'; return true;"
onMouseout="window.status='';return true;">
+
<xsl:apply-templates select="year"/>
+ </select>
+ </td>
+ </xsl:otherwise>
+ </xsl:choose>
+ </tr>
+
+ <tr>
+ <td valign="top">
+ <xsl:value-of select="lang_revision"/>
+ </td>
+ <xsl:choose>
+ <xsl:when test="value_revision !=''">
+ <td>
+ <xsl:value-of
select="value_revision"/>
+ </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td valign="top">
+ <xsl:variable
name="lang_revision_statustext"><xsl:value-of
select="lang_revision_statustext"/></xsl:variable>
+ <select
name="values[revision]" class="forms"
onMouseover="window.status='{$lang_revision_statustext}'; return true;"
onMouseout="window.status='';return true;">
+
<xsl:apply-templates select="revision_list"/>
+ </select>
+ </td>
+ </xsl:otherwise>
+ </xsl:choose>
+ </tr>
+
+ <tr >
+ <td align="left">
+ <xsl:value-of select="lang_district"/>
+ </td>
+
+ <xsl:choose>
+ <xsl:when test="value_district_id !=''">
+ <td>
+ <xsl:value-of
select="value_district_id"/>
+ </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td align="left">
+ <xsl:call-template
name="select_district"/>
+ </td>
+ </xsl:otherwise>
+ </xsl:choose>
+ </tr>
+
+ <tr>
+ <td valign="top">
+ <xsl:value-of select="lang_b_group"/>
+ </td>
+ <xsl:choose>
+ <xsl:when test="value_b_group !=''">
+ <td>
+ <xsl:value-of
select="value_b_group"/>
+ </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td valign="top">
+ <xsl:variable
name="lang_b_group_statustext"><xsl:value-of
select="lang_b_group_statustext"/></xsl:variable>
+ <select
name="values[b_group]" class="forms"
onMouseover="window.status='{$lang_b_group_statustext}'; return true;"
onMouseout="window.status='';return true;">
+
<xsl:apply-templates select="b_group_list"/>
+ </select>
+ </td>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </tr>
+
<tr align="left">
<td valign="top">
- <xsl:value-of select="lang_name"/>
+ <xsl:value-of
select="lang_budget_cost"/>
</td>
<td align="left">
- <input type="text" name="values[name]"
value="{value_name}" onMouseout="window.status='';return true;">
+ <input type="text"
name="values[budget_cost]" value="{value_budget_cost}"
onMouseout="window.status='';return true;">
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_name_statustext"/>
+ <xsl:value-of
select="lang_budget_cost_statustext"/>
<xsl:text>'; return
true;</xsl:text>
</xsl:attribute>
</input>
@@ -159,34 +266,21 @@
</tr>
<tr align="left">
<td valign="top" >
- <xsl:value-of select="lang_sql_text"/>
+ <xsl:value-of select="lang_remark"/>
</td>
<td align="left">
- <textarea cols="60" rows="6"
name="values[sql_text]" wrap="virtual" onMouseout="window.status='';return
true;">
+ <textarea cols="60" rows="6"
name="values[remark]" wrap="virtual" onMouseout="window.status='';return true;">
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_sql_statustext"/>
+ <xsl:value-of
select="lang_remark_statustext"/>
<xsl:text>'; return
true;</xsl:text>
</xsl:attribute>
- <xsl:value-of
select="value_sql_text"/>
+ <xsl:value-of
select="value_remark"/>
</textarea>
</td>
</tr>
- <xsl:choose>
- <xsl:when test="value_budget_id != ''">
- <tr>
- <td valign="top">
- <xsl:value-of
select="lang_columns"/>
- </td>
- <td align="right">
- <xsl:call-template
name="columns"/>
- </td>
- </tr>
- </xsl:when>
- </xsl:choose>
-
<tr height="50">
<td valign="bottom">
<xsl:variable
name="lang_save"><xsl:value-of select="lang_save"/></xsl:variable>
@@ -264,109 +358,38 @@
</table>
</xsl:template>
- <xsl:template name="columns">
- <xsl:variable name="lang_up_text"><xsl:value-of
select="lang_up_text"/></xsl:variable>
- <xsl:variable name="lang_down_text"><xsl:value-of
select="lang_down_text"/></xsl:variable>
- <table cellpadding="2" cellspacing="2" width="100%"
align="left">
- <xsl:choose>
- <xsl:when test="cols!=''">
- <tr class="th">
- <td class="th_text" width="85%"
align="left">
- <xsl:value-of
select="lang_col_name"/>
- </td>
- <td class="th_text" width="85%"
align="left">
- <xsl:value-of
select="lang_col_descr"/>
- </td>
- <td class="th_text" width="15%"
align="center">
- <xsl:value-of
select="lang_sorting"/>
- </td>
- <td class="th_text" width="15%"
align="center">
- <xsl:value-of
select="lang_delete_column"/>
- </td>
- </tr>
- <xsl:for-each select="cols" >
- <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="name"/>
- <xsl:text> </xsl:text>
- </td>
- <td align="left">
- <xsl:value-of select="descr"/>
- <xsl:text> </xsl:text>
- </td>
- <td>
- <table align="left">
- <tr>
- <td>
-
<xsl:value-of select="sorting"/>
- </td>
-
- <td
align="left">
-
<xsl:variable name="link_up"><xsl:value-of select="link_up"/></xsl:variable>
- <a
href="{$link_up}" onMouseover="window.status='{$lang_up_text}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of select="text_up"/></a>
-
<xsl:text> | </xsl:text>
-
<xsl:variable name="link_down"><xsl:value-of select="link_down"/></xsl:variable>
- <a
href="{$link_down}" onMouseover="window.status='{$lang_down_text}';return
true;" onMouseout="window.status='';return true;"><xsl:value-of
select="text_down"/></a>
- </td>
-
- </tr>
- </table>
- </td>
+ <xsl:template match="year">
+ <xsl:variable name="id"><xsl:value-of select="id"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="selected='selected'">
+ <option value="{$id}"
selected="selected"><xsl:value-of disable-output-escaping="yes"
select="id"/></option>
+ </xsl:when>
+ <xsl:otherwise>
+ <option value="{$id}"><xsl:value-of
disable-output-escaping="yes" select="id"/></option>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
- <td align="center">
- <input type="checkbox"
name="values[delete_cols][]" value="{id}" onMouseout="window.status='';return
true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="//lang_delete_cols_statustext"/>
- <xsl:text>';
return true;</xsl:text>
- </xsl:attribute>
- </input>
- </td>
- </tr>
- </xsl:for-each>
- </xsl:when>
- </xsl:choose>
- <tr>
- <td valign="top">
- <xsl:value-of select="lang_name"/>
- </td>
- <td valign="top">
- <xsl:value-of select="lang_descr"/>
- </td>
- </tr>
- <tr>
- <td>
- <input type="text"
name="values[new_name]" onMouseout="window.status='';return true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_new_name_statustext"/>
- <xsl:text>'; return
true;</xsl:text>
- </xsl:attribute>
- </input>
- </td>
- <td>
- <input type="text"
name="values[new_descr]" onMouseout="window.status='';return true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_new_descr_statustext"/>
- <xsl:text>'; return
true;</xsl:text>
- </xsl:attribute>
- </input>
- </td>
- </tr>
- </table>
+ <xsl:template match="b_group_list">
+ <xsl:variable name="id"><xsl:value-of select="id"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="selected='selected'">
+ <option value="{$id}"
selected="selected"><xsl:value-of disable-output-escaping="yes"
select="name"/></option>
+ </xsl:when>
+ <xsl:otherwise>
+ <option value="{$id}"><xsl:value-of
disable-output-escaping="yes" select="name"/></option>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
+ <xsl:template match="revision_list">
+ <xsl:variable name="id"><xsl:value-of select="id"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="selected='selected'">
+ <option value="{$id}"
selected="selected"><xsl:value-of disable-output-escaping="yes"
select="name"/></option>
+ </xsl:when>
+ <xsl:otherwise>
+ <option value="{$id}"><xsl:value-of
disable-output-escaping="yes" select="name"/></option>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>