[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10990] property: inventory
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [10990] property: inventory |
Date: |
Fri, 15 Mar 2013 14:54:15 +0000 |
Revision: 10990
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10990
Author: sigurdne
Date: 2013-03-15 14:54:14 +0000 (Fri, 15 Mar 2013)
Log Message:
-----------
property: inventory
Modified Paths:
--------------
trunk/property/inc/class.uientity.inc.php
trunk/property/setup/phpgw_no.lang
trunk/property/templates/base/css/base.css
trunk/property/templates/base/entity.xsl
Modified: trunk/property/inc/class.uientity.inc.php
===================================================================
--- trunk/property/inc/class.uientity.inc.php 2013-03-14 14:33:44 UTC (rev
10989)
+++ trunk/property/inc/class.uientity.inc.php 2013-03-15 14:54:14 UTC (rev
10990)
@@ -2860,10 +2860,11 @@
$location_id = phpgw::get_var('location_id', 'int');
$item_id = phpgw::get_var('id', 'int');
$system_location =
$GLOBALS['phpgw']->locations->get_name($location_id);
+/*
_debug_array($location_id);
_debug_array($item_id);
_debug_array($system_location);
-
+*/
$this->acl_add =
$this->acl->check($system_location['location'], PHPGW_ACL_ADD,
$system_location['appname']);
if(!$this->acl_add)
@@ -2872,20 +2873,29 @@
$GLOBALS['phpgw']->common->phpgw_exit();
}
- $values = phpgw::get_var('values');
-
+ $values = phpgw::get_var('values');
+ $unit_id = $values['unit_id'];
- $unit_list = execMethod('property.bogeneric.get_list',
array('type' => 'unit', 'selected' => $unit));
+ $unit_list = execMethod('property.bogeneric.get_list',
array('type' => 'unit', 'selected' => $unit_id));
$data = array
(
'system_location' => $system_location,
- 'location_id' => $location_id,
- 'item_id' => $item_id,
- 'unit_list' => array('options' =>
$unit_list)
+ 'location_id' => $location_id,
+ 'item_id' => $item_id,
+ 'unit_list' =>
array('options' => $unit_list),
+
+ 'value_inventory' => $values['inventory'],
+ 'value_write_off' => $values['write_off'],
+ 'bookable' =>
$values['bookable'],
+ 'value_active_from' =>
$values['active_from'],
+ 'value_active_to' => $values['active_to'],
+ 'value_remark' => $values['remark'],
);
+ $GLOBALS['phpgw']->jqcal->add_listener('active_from');
+ $GLOBALS['phpgw']->jqcal->add_listener('active_to');
$GLOBALS['phpgw']->xslttpl->add_file(array('entity','attributes_form',
'files'));
$GLOBALS['phpgw_info']['flags']['noframework'] = true;
Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang 2013-03-14 14:33:44 UTC (rev 10989)
+++ trunk/property/setup/phpgw_no.lang 2013-03-15 14:54:14 UTC (rev 10990)
@@ -921,6 +921,8 @@
insert the value at the start-date as a positive amount property
no angi verdie ved startdatoen som en positiv verdi
integer property no heltall
interval property no intervall
+inventory common no Beholdning
+add inventory common no Legg til beholdning
investment property no investering
investment added ! property no Investering er lagt til
investment history property no Investerings historie
Modified: trunk/property/templates/base/css/base.css
===================================================================
--- trunk/property/templates/base/css/base.css 2013-03-14 14:33:44 UTC (rev
10989)
+++ trunk/property/templates/base/css/base.css 2013-03-15 14:54:14 UTC (rev
10990)
@@ -132,11 +132,25 @@
.hd img {
vertical-align: middle;
}
+
fieldset {
+ padding: 1em;
+ font:80%/1 sans-serif;
+ }
+label {
+ float:left;
+ width:25%;
+ margin-right:0.5em;
+ padding-top:0.2em;
+ text-align:right;
+ font-weight:bold;
+ }
+/*
+fieldset {
margin-top: 0.5em;
border:1px solid #1E90FF;
}
-
+*/
legend {
padding: 0.2em 0.5em;
border:1px solid #1E90FF;
@@ -145,14 +159,14 @@
text-align:right;
font-weight: bolder;
}
-
+/*
label {
font-size: 13px;
font-weight: bold;
margin-right: 5px;
display: inline-block;
}
-
+*/
a{
cursor: pointer;
}
@@ -507,11 +521,11 @@
select {
padding: 4px;
}
-
+/*
fieldset {
border-bottom:0px solid #ccc;
}
-
+*/
textarea{
padding: 4px;
}
Modified: trunk/property/templates/base/entity.xsl
===================================================================
--- trunk/property/templates/base/entity.xsl 2013-03-14 14:33:44 UTC (rev
10989)
+++ trunk/property/templates/base/entity.xsl 2013-03-15 14:54:14 UTC (rev
10990)
@@ -18,6 +18,13 @@
<xsl:template xmlns:php="http://php.net/xsl" match="add_inventory">
<div align = 'left'>
+
+ <xsl:variable name="action_url">
+ <xsl:value-of select="php:function('get_phpgw_link',
'/index.php', 'menuaction:property.uientity.add_inventory')" />
+ </xsl:variable>
+
+ <form name="form" id="form" action="{$action_url}"
method="post">
+
<fieldset>
<legend>
<xsl:value-of select="system_location/descr"/>
@@ -25,50 +32,155 @@
<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>
+ <table>
+ <tr>
+ <td>
+ <label><xsl:value-of
select="php:function('lang', 'id')" /></label>
+ </td>
+ <td>
<xsl:value-of
select="location_id"/>
<input type="hidden"
name="location_id" value="{location_id}"/>
<input type="hidden"
name="item_id" value="{item_id}"/>
- </dd>
-
- <dt>
- <label for="name"><xsl:value-of
select="php:function('lang', 'unit')" /></label>
- </dt>
- <dd>
- <select name="values[status]"
class="forms">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <label ><xsl:value-of
select="php:function('lang', 'where')" /></label>
+ </td>
+ <td>
+ <input type="text"
name="values[where]" value="{value_where}" size="12">
<xsl:attribute
name="title">
- <xsl:value-of
select="php:function('lang', 'Set the status of the ticket')"/>
+ <xsl:value-of
select="lang_where_statustext"/>
</xsl:attribute>
+ </input>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <label
for="unit_id"><xsl:value-of select="php:function('lang', 'unit')" /></label>
+ </td>
+ <td>
+ <select id = 'unit_id'
name="values[unit_id]" class="forms">
<xsl:apply-templates
select="unit_list/options"/>
</select>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <label
for="inventory"><xsl:value-of select="php:function('lang', 'inventory')"
/></label>
+ </td>
+ <td>
- </dd>
+ <input type="text" id =
'inventory' name="values[inventory]" value="{value_inventory}" size="12">
+ <xsl:attribute
name="title">
+ <xsl:value-of
select="lang_inventory_statustext"/>
+ </xsl:attribute>
+ </input>
+ </td>
+ </tr>
- <dt>
+ <tr>
+ <td>
+ <label ><xsl:value-of
select="php:function('lang', 'write off')" /></label>
+ </td>
+ <td>
+ <input type="text"
name="values[write_off]" value="{value_write_off}" size="12">
+ <xsl:attribute
name="title">
+ <xsl:value-of
select="lang_write_off_statustext"/>
+ </xsl:attribute>
+ </input>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <label><xsl:value-of
select="php:function('lang', 'bookable')" /></label>
+ </td>
+ <td>
+ <input type="checkbox"
name="values[bookable]" value="1">
+ <xsl:attribute
name="title">
+ <xsl:value-of
select="php:function('lang', 'bookable')"/>
+ </xsl:attribute>
+ <xsl:if test="bookable
= '1'">
+ <xsl:attribute
name="checked">
+
<xsl:text>checked</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ </input>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'active from')"/>
+ </label>
+ </td>
+ <td>
+ <input type="text"
id="active_from" name="values[active_from]" size="10"
value="{value_active_from}" readonly="readonly">
+ <xsl:attribute
name="title">
+ <xsl:value-of
select="lang_active_from_statustext"/>
+ </xsl:attribute>
+ </input>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'active to')"/>
+ </label>
+ </td>
+ <td>
+ <input type="text"
id="active_to" name="values[active_to]" size="10" value="{value_active_to}"
readonly="readonly">
+ <xsl:attribute
name="title">
+ <xsl:value-of
select="lang_active_to_statustext"/>
+ </xsl:attribute>
+ </input>
+ </td>
+ </tr>
+ <tr>
+
+ <td>
<label><xsl:value-of
select="php:function('lang', 'remark')" /></label>
- </dt>
- <dd>
+ </td>
+ <td>
<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>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ <table>
+ <tr>
+ <td valign="bottom">
+ <xsl:variable name="lang_save">
+ <xsl:value-of
select="php:function('lang', 'save')"/>
+ </xsl:variable>
+ <input type="submit"
name="values[save]" value="{$lang_save}">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="php:function('lang', 'save values and exit')"/>
+ </xsl:attribute>
+ </input>
+ </td>
+ <td align="right" valign="bottom">
+ <xsl:variable name="lang_cancel">
+ <xsl:value-of
select="php:function('lang', 'cancel')"/>
+ </xsl:variable>
+ <input type="submit"
name="values[cancel]" value="{$lang_cancel}">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="php:function('lang', 'Back to the list')"/>
+ </xsl:attribute>
+ </input>
+ </td>
+ </tr>
+ </table>
+
</form>
- </fieldset>
+
+
</div>
</xsl:template>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10990] property: inventory,
Sigurd Nes <=