fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10989] property: inventory


From: Sigurd Nes
Subject: [Fmsystem-commits] [10989] property: inventory
Date: Thu, 14 Mar 2013 14:33:44 +0000

Revision: 10989
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10989
Author:   sigurdne
Date:     2013-03-14 14:33:44 +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-14 13:52:33 UTC (rev 
10988)
+++ trunk/property/inc/class.uientity.inc.php   2013-03-14 14:33:44 UTC (rev 
10989)
@@ -2858,10 +2858,10 @@
                public function add_inventory()
                {
                        $location_id    = phpgw::get_var('location_id', 'int');
-                       $id                             = phpgw::get_var('id', 
'int');
+                       $item_id                = phpgw::get_var('id', 'int');
                        $system_location = 
$GLOBALS['phpgw']->locations->get_name($location_id);
 _debug_array($location_id);
-_debug_array($id);
+_debug_array($item_id);
 _debug_array($system_location);
 
                        $this->acl_add  = 
$this->acl->check($system_location['location'], PHPGW_ACL_ADD, 
$system_location['appname']);
@@ -2874,9 +2874,15 @@
 
                        $values = phpgw::get_var('values');
 
+                       
+                       $unit_list = execMethod('property.bogeneric.get_list', 
array('type' => 'unit',  'selected' => $unit));
+                       
                        $data = array
                        (
-                               'test'  => 'test'
+                               'system_location'       => $system_location,
+                               'location_id'   => $location_id,
+                               'item_id'               => $item_id,
+                               'unit_list'             => array('options' => 
$unit_list)
                        );
 
 

Modified: trunk/property/templates/base/entity.xsl
===================================================================
--- trunk/property/templates/base/entity.xsl    2013-03-14 13:52:33 UTC (rev 
10988)
+++ trunk/property/templates/base/entity.xsl    2013-03-14 14:33:44 UTC (rev 
10989)
@@ -17,8 +17,11 @@
        <!-- add inventory -->
        <xsl:template xmlns:php="http://php.net/xsl"; match="add_inventory">
 
+        <div align = 'left'>
         <fieldset>
                <legend>
+                       <xsl:value-of select="system_location/descr"/>
+                       <xsl:text>::</xsl:text>                 
                        <xsl:value-of select="php:function('lang', 'add 
inventory')" />
                </legend>
 
@@ -33,32 +36,51 @@
                                                <label><xsl:value-of 
select="php:function('lang', 'id')" /></label>
                                        </dt>
                                        <dd>
-                                               <xsl:value-of 
select="survey/id"/>
+                                               <xsl:value-of 
select="location_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>
+                                               <label for="name"><xsl:value-of 
select="php:function('lang', 'unit')" /></label>
                                        </dt>
                                        <dd>
-                                               <xsl:value-of 
select="survey/title" />
+                                               <select name="values[status]" 
class="forms">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'Set the status of the ticket')"/>
+                                                       </xsl:attribute>
+                                                       <xsl:apply-templates 
select="unit_list/options"/>
+                                               </select>
+
                                        </dd>
 
                                        <dt>
-                                               <label><xsl:value-of 
select="php:function('lang', 'date')" /></label>
+                                               <label><xsl:value-of 
select="php:function('lang', 'remark')" /></label>
                                        </dt>
                                        <dd>
-                                               <xsl:value-of 
select="survey/report_date"/>
+                                               <textarea cols="60" rows="10" 
name="values[remark]">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'remark')"/>
+                                                       </xsl:attribute>
+                                                       <xsl:value-of 
select="value_remark"/>
+                                               </textarea>
                                        </dd>
                                </dl>
                        </form>
 
         </fieldset>
+        </div>
        </xsl:template>
 
+       <xsl:template match="options">
+               <option value="{id}">
+                       <xsl:if test="selected != 0">
+                               <xsl:attribute name="selected" 
value="selected"/>
+                       </xsl:if>
+                       <xsl:value-of disable-output-escaping="yes" 
select="name"/>
+               </option>
+       </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]