fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10516] property: hide placeholders


From: Sigurd Nes
Subject: [Fmsystem-commits] [10516] property: hide placeholders
Date: Mon, 19 Nov 2012 14:22:42 +0000

Revision: 10516
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10516
Author:   sigurdne
Date:     2012-11-19 14:22:41 +0000 (Mon, 19 Nov 2012)
Log Message:
-----------
property: hide placeholders

Modified Paths:
--------------
    trunk/property/inc/class.boentity.inc.php
    trunk/property/inc/class.uientity.inc.php
    trunk/property/templates/base/attributes_form.xsl

Modified: trunk/property/inc/class.boentity.inc.php
===================================================================
--- trunk/property/inc/class.boentity.inc.php   2012-11-19 13:03:06 UTC (rev 
10515)
+++ trunk/property/inc/class.boentity.inc.php   2012-11-19 14:22:41 UTC (rev 
10516)
@@ -44,6 +44,7 @@
                var $part_of_town_id;
                var $location_code;
                var $results;
+               var $acl_location;
                protected $xsl_rootdir;
 
                /**
@@ -101,6 +102,9 @@
                        $this->type_app                                 = 
$this->so->get_type_app();
 
                        $this->type                                             
= isset($type)  && $type && $this->type_app[$type] ? $type : 'entity';
+
+                       $this->acl_location                             = 
".{$type}.{$entity_id}.{$cat_id}";
+
                        $this->location_code                    = 
isset($location_code)  && $location_code ? $location_code : '';
 
                        $this->soadmin_entity                   = 
CreateObject('property.soadmin_entity',$entity_id,$cat_id);
@@ -564,7 +568,7 @@
 
                                $file = PHPGW_SERVER_ROOT . 
"/{$this->type_app[$this->type]}/inc/custom/{$GLOBALS['phpgw_info']['user']['domain']}/{$entry['file_name']}";
 
-                               if ( $entry['active'] && is_file($file) )
+                               if ( $entry['active'] && !$entry['client_side'] 
&& is_file($file) )
                                {
                                        require_once $file;
                                }

Modified: trunk/property/inc/class.uientity.inc.php
===================================================================
--- trunk/property/inc/class.uientity.inc.php   2012-11-19 13:03:06 UTC (rev 
10515)
+++ trunk/property/inc/class.uientity.inc.php   2012-11-19 14:22:41 UTC (rev 
10516)
@@ -1669,6 +1669,14 @@
 
                                                $attribute['link_history'] = 
$GLOBALS['phpgw']->link('/index.php',$link_history_data);
                                        }
+                                       
+                                       /*
+                                       * Hide dummy attributes that act as 
placeholders
+                                       */
+                                       if($attribute['datatype'] == 'R' && 
isset($attribute['choice']) && !$attribute['choice'])
+                                       {
+                                               $attribute['hide_row'] = true;
+                                       }
                                }
 
                                
phpgwapi_yui::tabview_setup('entity_edit_tabview');
@@ -2086,6 +2094,8 @@
                        
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/container/assets/skins/sam/container.css');
                        $GLOBALS['phpgw']->js->validate_file( 'yahoo', 
'entity.edit', 'property' );
 
+
+
                        $criteria = array
                                (
                                        'appname'       => 
$this->type_app[$this->type],

Modified: trunk/property/templates/base/attributes_form.xsl
===================================================================
--- trunk/property/templates/base/attributes_form.xsl   2012-11-19 13:03:06 UTC 
(rev 10515)
+++ trunk/property/templates/base/attributes_form.xsl   2012-11-19 14:22:41 UTC 
(rev 10516)
@@ -33,38 +33,43 @@
                </xsl:choose>
 
                <tr>
-                       <td align="left" width="19%" valign="top" 
title="{$statustext}">
-                               <xsl:choose>
-                                       <xsl:when test="helpmsg=1">
-                                               <xsl:variable name="help_url">
-                                                       <xsl:value-of 
select="help_url"/>
-                                               </xsl:variable>
-                                               <a href="javascript:var 
w=window.open('{$help_url}','','left=50,top=100,width=550,height=400,scrollbars')">
-                                                       <xsl:text>[</xsl:text>
-                                                       <xsl:value-of 
select="input_text"/>
-                                                       <xsl:text>]</xsl:text>
-                                               </a>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:value-of 
select="input_text"/>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                               <xsl:choose>
-                                       <xsl:when test="datatype='pwd'">
-                                               <br/>
-                                               <xsl:text>[ </xsl:text>
+                       <xsl:choose>
+                               <xsl:when test="not(hide_row)">
+                                       <td align="left" width="19%" 
valign="top" title="{$statustext}">
                                                <xsl:choose>
-                                                       <xsl:when 
test="value!=''">
-                                                               <xsl:value-of 
select="php:function('lang', 'edit')"/>
+                                                       <xsl:when 
test="helpmsg=1">
+                                                               <xsl:variable 
name="help_url">
+                                                                       
<xsl:value-of select="help_url"/>
+                                                               </xsl:variable>
+                                                               <a 
href="javascript:var 
w=window.open('{$help_url}','','left=50,top=100,width=550,height=400,scrollbars')">
+                                                                       
<xsl:text>[</xsl:text>
+                                                                       
<xsl:value-of select="input_text"/>
+                                                                       
<xsl:text>]</xsl:text>
+                                                               </a>
                                                        </xsl:when>
                                                        <xsl:otherwise>
-                                                               <xsl:value-of 
select="php:function('lang', 'add')"/>
+                                                               <xsl:value-of 
select="input_text"/>
                                                        </xsl:otherwise>
                                                </xsl:choose>
-                                               <xsl:text> ]</xsl:text>
-                                       </xsl:when>
-                               </xsl:choose>
-                       </td>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="datatype='pwd'">
+                                                               <br/>
+                                                               <xsl:text>[ 
</xsl:text>
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="value!=''">
+                                                                               
<xsl:value-of select="php:function('lang', 'edit')"/>
+                                                                       
</xsl:when>
+                                                                       
<xsl:otherwise>
+                                                                               
<xsl:value-of select="php:function('lang', 'add')"/>
+                                                                       
</xsl:otherwise>
+                                                               </xsl:choose>
+                                                               <xsl:text> 
]</xsl:text>
+                                                       </xsl:when>
+                                               </xsl:choose>
+                                       </td>
+                               </xsl:when>
+                       </xsl:choose>
+
                        <td align="left">
                                <xsl:choose>
                                        <xsl:when test="name!=''">




reply via email to

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