fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10987] property: inventory


From: Sigurd Nes
Subject: [Fmsystem-commits] [10987] property: inventory
Date: Thu, 14 Mar 2013 08:43:42 +0000

Revision: 10987
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10987
Author:   sigurdne
Date:     2013-03-14 08:43:39 +0000 (Thu, 14 Mar 2013)
Log Message:
-----------
property: inventory

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

Modified: trunk/property/inc/class.uientity.inc.php
===================================================================
--- trunk/property/inc/class.uientity.inc.php   2013-03-13 20:45:24 UTC (rev 
10986)
+++ trunk/property/inc/class.uientity.inc.php   2013-03-14 08:43:39 UTC (rev 
10987)
@@ -2864,17 +2864,32 @@
 _debug_array($id);
 _debug_array($system_location);
 
-                       $this->acl_add          = 
$this->acl->check($system_location['location'], PHPGW_ACL_ADD, 
$system_location['appname']);
+                       $this->acl_add  = 
$this->acl->check($system_location['location'], PHPGW_ACL_ADD, 
$system_location['appname']);
 
                        if(!$this->acl_add)
                        {
-                               $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
true;
                                echo lang('No Access');
                                $GLOBALS['phpgw']->common->phpgw_exit();
                        }
 
+                       $values = phpgw::get_var('values');
 
+                       $data = array
+                       (
+                               'test'  => 'test'
+                       );
 
-die();
+
+                       
$GLOBALS['phpgw']->xslttpl->add_file(array('entity','attributes_form', 
'files'));
+                       $GLOBALS['phpgw_info']['flags']['noframework'] = true;
+
+//                     $GLOBALS['phpgw']->js->validate_file( 'yahoo', 
'entity.add_inventory', 'property' );
+
+                       $function_msg   = lang('add inventory');
+
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
$system_location['appname'] . '::' . $system_location['descr'] . '::' . 
$function_msg;
+                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('add_inventory' => $data));
+
+
                }
        }

Modified: trunk/property/templates/base/entity.xsl
===================================================================
--- trunk/property/templates/base/entity.xsl    2013-03-13 20:45:24 UTC (rev 
10986)
+++ trunk/property/templates/base/entity.xsl    2013-03-14 08:43:39 UTC (rev 
10987)
@@ -7,9 +7,58 @@
                        <xsl:when test="empty">
                                <xsl:apply-templates select="empty"/>
                        </xsl:when>
+                       <xsl:when test="add_inventory">
+                               <xsl:apply-templates select="add_inventory"/>
+                       </xsl:when>
                </xsl:choose>
        </xsl:template>
 
+
+       <!-- add inventory -->
+       <xsl:template xmlns:php="http://php.net/xsl"; match="add_inventory">
+
+        <fieldset>
+               <legend>
+                       <xsl:value-of select="php:function('lang', 'add 
inventory')" />
+               </legend>
+
+
+               <xsl:variable name="action_url">
+                       <xsl:value-of select="php:function('get_phpgw_link', 
'/index.php', 'menuaction:property.uicondition_survey.import')" />
+               </xsl:variable>
+
+                       <form name="form" id="form" action="{$action_url}" 
method="post">
+                       <dl>
+                                       <dt>
+                                               <label><xsl:value-of 
select="php:function('lang', 'id')" /></label>
+                                       </dt>
+                                       <dd>
+                                               <xsl:value-of 
select="survey/id"/>
+                                               <input type="hidden" 
name="location_id" value="{location_id}"/>
+                                               <input type="hidden" 
name="item_id" value="{item_id}"/>
+                                               <input type="hidden" 
name="selected_sheet_id" value="{sheet_id}"/>
+                                               <input type="hidden" 
name="start_line" value="{start_line}"/>
+                                       </dd>
+
+                                       <dt>
+                                               <label for="name"><xsl:value-of 
select="php:function('lang', 'name')" /></label>
+                                       </dt>
+                                       <dd>
+                                               <xsl:value-of 
select="survey/title" />
+                                       </dd>
+
+                                       <dt>
+                                               <label><xsl:value-of 
select="php:function('lang', 'date')" /></label>
+                                       </dt>
+                                       <dd>
+                                               <xsl:value-of 
select="survey/report_date"/>
+                                       </dd>
+                               </dl>
+                       </form>
+
+        </fieldset>
+       </xsl:template>
+
        <!-- add / edit -->
        <xsl:template xmlns:php="http://php.net/xsl"; match="edit">
                <xsl:choose>




reply via email to

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