phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property inc/class.soentity.inc.php inc/class.u...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property inc/class.soentity.inc.php inc/class.u...
Date: Thu, 19 Oct 2006 21:39:09 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Changes by:     Sigurd Nes <sigurdne>   06/10/19 21:39:09

Modified files:
        inc            : class.soentity.inc.php class.uientity.inc.php 
        templates/base : entity.xsl 
Added files:
        templates/base : help.tpl 

Log message:
        Use template for help for custom attributes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soentity.inc.php?cvsroot=phpgroupware&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uientity.inc.php?cvsroot=phpgroupware&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/property/templates/base/entity.xsl?cvsroot=phpgroupware&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/property/templates/base/help.tpl?cvsroot=phpgroupware&rev=1.1

Patches:
Index: inc/class.soentity.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soentity.inc.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- inc/class.soentity.inc.php  19 Oct 2006 07:57:36 -0000      1.24
+++ inc/class.soentity.inc.php  19 Oct 2006 21:39:09 -0000      1.25
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage entity
-       * @version $Id: class.soentity.inc.php,v 1.24 2006/10/19 07:57:36 
sigurdne Exp $
+       * @version $Id: class.soentity.inc.php,v 1.25 2006/10/19 21:39:09 
sigurdne Exp $
        */
 
        /**
@@ -737,7 +737,7 @@
                        $this->db->query("SELECT helpmsg FROM 
fm_entity_attribute WHERE entity_id ='$entity_id' AND cat_id ='$cat_id' AND id 
= '$attrib_id'");
 
                        $this->db->next_record();
-                       $helpmsg = 
str_replace("\n","</br>",stripslashes($this->db->f('helpmsg')));
+                       $helpmsg = 
str_replace("\n","<br>",stripslashes($this->db->f('helpmsg')));
                        return $helpmsg;
                }
        }

Index: inc/class.uientity.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uientity.inc.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- inc/class.uientity.inc.php  19 Oct 2006 07:57:36 -0000      1.33
+++ inc/class.uientity.inc.php  19 Oct 2006 21:39:09 -0000      1.34
@@ -8,7 +8,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.33 2006/10/19 07:57:36 
sigurdne Exp $
+       * @version $Id: class.uientity.inc.php,v 1.34 2006/10/19 21:39:09 
sigurdne Exp $
        */
 
        /**
@@ -1036,10 +1036,11 @@
 
                function attrib_help()
                {
-                       $GLOBALS['phpgw_info']['flags']['xslt_app'] = false;
-//                     $GLOBALS['phpgw']->xslttpl->add_file(array('entity'));
-//                     $GLOBALS['phpgw_info']['flags']['noframework'] = True;
+                       $t =& $GLOBALS['phpgw']->template;
+                       $t->set_root(PHPGW_APP_TPL);
 
+                       $GLOBALS['phpgw_info']['flags']['xslt_app'] = false;
+                       $GLOBALS['phpgw_info']['flags']['nofooter'] = True;
 
                        $entity_id      = 
get_var('entity_id',array('POST','GET'));
                        $cat_id         = get_var('cat_id',array('POST','GET'));
@@ -1061,11 +1062,13 @@
                        $attrib_name    = $attrib_data['input_text'];
                        $function_msg   = lang('Help');
 
-                       echo '<H2>' . $function_msg . ':</BR>' . 
$entity_category['descr'] .  ' - "' . $attrib_name . '": ' . '</H2>';
-                       echo $help_msg;
 
-//                     $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
-//                     
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('attrib_help' => $help_msg));
+                       $t->set_file('help','help.tpl');
+                       $t->set_var('title',lang('Help') . '<br>' . 
$entity_category['descr'] .  ' - "' . $attrib_name);
+                       $t->set_var('help_msg',$help_msg );
+                                                                               
        
+                       $GLOBALS['phpgw']->common->phpgw_header();
+                       $t->pfp('out','help');
                }
                
                function delete()

Index: templates/base/entity.xsl
===================================================================
RCS file: /sources/phpgroupware/property/templates/base/entity.xsl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- templates/base/entity.xsl   18 Oct 2006 09:11:44 -0000      1.10
+++ templates/base/entity.xsl   19 Oct 2006 21:39:09 -0000      1.11
@@ -1,4 +1,4 @@
-<!-- $Id: entity.xsl,v 1.10 2006/10/18 09:11:44 sigurdne Exp $ -->
+<!-- $Id: entity.xsl,v 1.11 2006/10/19 21:39:09 sigurdne Exp $ -->
 
        <xsl:template name="app_data">
                <xsl:choose>
@@ -761,20 +761,3 @@
                                </td>
                        </tr>
        </xsl:template>
-
-<!-- attrib_help -->
-       <xsl:template match="attrib_help">
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <tr>
-                               <td align="left" width="100%">
-                                       <textarea cols="100" rows="50"  
wrap="virtual">
-                                               <xsl:attribute name="disabled">
-                                                       
<xsl:text>disabled</xsl:text>
-                                               </xsl:attribute>
-                                               <xsl:value-of 
select="//attrib_help"/>
-                                       </textarea>
-                               </td>
-                       </tr>
-               </table>
-       </xsl:template>
-

Index: templates/base/help.tpl
===================================================================
RCS file: templates/base/help.tpl
diff -N templates/base/help.tpl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ templates/base/help.tpl     19 Oct 2006 21:39:09 -0000      1.1
@@ -0,0 +1,21 @@
+<!-- BEGIN help.tpl -->
+<script type="text/javascript">
+       //<![CDATA[
+
+       //]]>
+</script>
+
+<h2>{title}</h2>
+<table>
+       <tr>
+               <td>
+                       {help_msg}
+               </td>
+       </tr>
+</table>
+
+</body>
+</html>
+
+
+<!-- END help.tpl -->




reply via email to

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