[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7140] api: add descriptions to category list (select
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7140] api: add descriptions to category list (select) |
Date: |
Thu, 24 Mar 2011 14:06:03 +0000 |
Revision: 7140
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7140
Author: sigurdne
Date: 2011-03-24 14:06:02 +0000 (Thu, 24 Mar 2011)
Log Message:
-----------
api: add descriptions to category list (select)
Modified Paths:
--------------
trunk/phpgwapi/inc/class.categories.inc.php
trunk/phpgwapi/templates/base/categories.xsl
Modified: trunk/phpgwapi/inc/class.categories.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.categories.inc.php 2011-03-24 09:07:34 UTC (rev
7139)
+++ trunk/phpgwapi/inc/class.categories.inc.php 2011-03-24 14:06:02 UTC (rev
7140)
@@ -703,9 +703,10 @@
$cat_list[] = array
(
- 'cat_id' => $cat['id'],
- 'name' => $name,
- 'selected' => $sel_cat
+ 'cat_id' => $cat['id'],
+ 'name' => $name,
+ 'description' => $cat['description'],
+ 'selected' => $sel_cat
);
}
Modified: trunk/phpgwapi/templates/base/categories.xsl
===================================================================
--- trunk/phpgwapi/templates/base/categories.xsl 2011-03-24 09:07:34 UTC
(rev 7139)
+++ trunk/phpgwapi/templates/base/categories.xsl 2011-03-24 14:06:02 UTC
(rev 7140)
@@ -40,13 +40,16 @@
</xsl:template>
<xsl:template match="cat_list">
- <xsl:variable name="cat_id"><xsl:value-of
select="cat_id"/></xsl:variable>
- <xsl:choose>
- <xsl:when test="selected != ''">
- <option value="{$cat_id}"
selected="selected"><xsl:value-of disable-output-escaping="yes"
select="name"/></option>
- </xsl:when>
- <xsl:otherwise>
- <option value="{$cat_id}"><xsl:value-of
disable-output-escaping="yes" select="name"/></option>
- </xsl:otherwise>
- </xsl:choose>
+ <option value="{cat_id}">
+ <xsl:if test="selected != ''">
+ <xsl:attribute name="selected" value="selected"
/>
+ </xsl:if>
+ <xsl:if test="description != ''">
+ <xsl:attribute name="title">
+ <xsl:value-of select="description"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of disable-output-escaping="yes"
select="name"/>
+ </option>
</xsl:template>
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7140] api: add descriptions to category list (select),
Sigurd Nes <=