CVSROOT: /sources/phpgroupware Module name: property Changes by: Sigurd Nes <sigurdne> 07/10/13 20:29:15
Modified files: inc : class.uientity.inc.php templates/base : entity.xsl Log message: clean up code for destination CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uientity.inc.php?cvsroot=phpgroupware&r1=1.51&r2=1.52 http://cvs.savannah.gnu.org/viewcvs/property/templates/base/entity.xsl?cvsroot=phpgroupware&r1=1.16&r2=1.17 Patches: Index: inc/class.uientity.inc.php =================================================================== RCS file: /sources/phpgroupware/property/inc/class.uientity.inc.php,v retrieving revision 1.51 retrieving revision 1.52 diff -u -b -r1.51 -r1.52 --- inc/class.uientity.inc.php 13 Oct 2007 10:02:53 -0000 1.51 +++ inc/class.uientity.inc.php 13 Oct 2007 20:29:15 -0000 1.52 @@ -24,7 +24,7 @@ * @internal Development of this application was funded by http://www.bergen.kommune.no/bbb_/ekstern/ * @package property * @subpackage entity - * @version $Id: class.uientity.inc.php,v 1.51 2007/10/13 10:02:53 sigurdne Exp $ + * @version $Id: class.uientity.inc.php,v 1.52 2007/10/13 20:29:15 sigurdne Exp $ */ /** @@ -1014,7 +1014,6 @@ } } - for ($i=0;$i<count($values['attributes']);$i++) { if($values['attributes'][$i]['history']==1) @@ -1068,6 +1067,7 @@ 'value_origin_id' => $origin_id, 'value_destination' => $values['destination'], + 'lang_destination' => lang('destination'), 'lang_no_cat' => lang('no category'), 'lang_cat_statustext' => lang('Select the category. To do not use a category select NO CATEGORY'), 'select_name' => 'cat_id', @@ -1390,7 +1390,7 @@ 'value_origin' => $values['origin'], 'value_origin_type' => $origin, 'value_origin_id' => $origin_id, - 'value_destination_type' => 'destination', + 'lang_destination' => lang('destination'), 'value_destination' => $values['destination'], 'lang_entity' => lang('entity'), Index: templates/base/entity.xsl =================================================================== RCS file: /sources/phpgroupware/property/templates/base/entity.xsl,v retrieving revision 1.16 retrieving revision 1.17 diff -u -b -r1.16 -r1.17 --- templates/base/entity.xsl 13 Oct 2007 10:02:54 -0000 1.16 +++ templates/base/entity.xsl 13 Oct 2007 20:29:15 -0000 1.17 @@ -1,4 +1,4 @@ -<!-- $Id: entity.xsl,v 1.16 2007/10/13 10:02:54 sigurdne Exp $ --> +<!-- $Id: entity.xsl,v 1.17 2007/10/13 20:29:15 sigurdne Exp $ --> <xsl:template name="app_data"> <xsl:choose> @@ -227,28 +227,7 @@ <xsl:apply-templates select="table_apply"/> </td> </tr> - - <xsl:for-each select="value_destination" > - <xsl:variable name="link_destination_type"><xsl:value-of select="link"/></xsl:variable> - <tr> - <td class="th_text" valign ="top"> - <xsl:value-of select="descr"/> - </td> - <td> - <table> - <xsl:for-each select="data"> - <tr> - <td class="th_text" align="left" > - <a href="{$link_destination_type}&id={id}" onMouseover="window.status='{//lang_destination_statustext}';return true;" onMouseout="window.status='';return true;"><xsl:value-of select="id"/></a> - <xsl:text> </xsl:text> - </td> - </tr> - </xsl:for-each> - </table> - </td> - </tr> - </xsl:for-each> - + <xsl:call-template name="destination"/> <xsl:for-each select="origin_list" > <xsl:variable name="link"><xsl:value-of select="link"/>&id=<xsl:value-of select="id"/></xsl:variable> <tr> @@ -261,7 +240,6 @@ </tr> </xsl:for-each> - <xsl:choose> <xsl:when test="value_ticket_id!=''"> <tr> @@ -587,26 +565,7 @@ </td> </tr> </xsl:for-each> - <xsl:for-each select="value_destination" > - <xsl:variable name="link_destination_type"><xsl:value-of select="link"/></xsl:variable> - <tr> - <td class="th_text" valign ="top"> - <xsl:value-of select="descr"/> - </td> - <td> - <table> - <xsl:for-each select="data"> - <tr> - <td class="th_text" align="left" > - <a href="{$link_destination_type}&id={id}" onMouseover="window.status='{//lang_destination_statustext}';return true;" onMouseout="window.status='';return true;"><xsl:value-of select="id"/></a> - <xsl:text> </xsl:text> - </td> - </tr> - </xsl:for-each> - </table> - </td> - </tr> - </xsl:for-each> + <xsl:call-template name="destination"/> <tr> <td class="th_text"> <xsl:value-of select="lang_entity"/> @@ -760,3 +719,29 @@ </tr> </xsl:template> + <xsl:template name="destination"> + <xsl:choose> + <xsl:when test="value_destination!=''"> + <xsl:for-each select="value_destination" > + <xsl:variable name="link_destination_type"><xsl:value-of select="link"/></xsl:variable> + <tr> + <td class="th_text" valign ="top"> + <xsl:value-of select="//lang_destination"/> + </td> + <td> + <table> + <xsl:for-each select="data"> + <tr> + <td class="th_text" align="left" > + <a href="{$link_destination_type}&id={id}" onMouseover="window.status='{//lang_destination_statustext}';return true;" onMouseout="window.status='';return true;"><xsl:value-of select="type"/><xsl:text> #</xsl:text> <xsl:value-of select="id"/></a> + <xsl:text> </xsl:text> + </td> + </tr> + </xsl:for-each> + </table> + </td> + </tr> + </xsl:for-each> + </xsl:when> + </xsl:choose> + </xsl:template> _______________________________________________ phpGroupWare-cvs mailing list phpGroupWare-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs