[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10385]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [10385] |
Date: |
Tue, 30 Oct 2012 12:51:58 +0000 |
Revision: 10385
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10385
Author: vator
Date: 2012-10-30 12:51:57 +0000 (Tue, 30 Oct 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/logistic/inc/class.uirequirement.inc.php
trunk/logistic/inc/class.uirequirement_resource_allocation.inc.php
trunk/logistic/templates/base/allocation/allocation_suggestions.xsl
trunk/logistic/templates/base/css/base.css
trunk/logistic/templates/base/requirement/requirement_overview.xsl
Modified: trunk/logistic/inc/class.uirequirement.inc.php
===================================================================
--- trunk/logistic/inc/class.uirequirement.inc.php 2012-10-30 11:05:53 UTC
(rev 10384)
+++ trunk/logistic/inc/class.uirequirement.inc.php 2012-10-30 12:51:57 UTC
(rev 10385)
@@ -230,7 +230,15 @@
'key' => 'id',
'className' =>
'requirement_id',
'hidden' => true
- )
+ ),
+ array(
+ 'id' =>
'btn_criteria_id',
+ 'name' => 'criteria_id',
+ 'value' => lang('search
criteria'),
+ 'type' => 'button',
+ 'style' => 'filter',
+ 'tab_index' => 4
+ ),
)
),
);
Modified: trunk/logistic/inc/class.uirequirement_resource_allocation.inc.php
===================================================================
--- trunk/logistic/inc/class.uirequirement_resource_allocation.inc.php
2012-10-30 11:05:53 UTC (rev 10384)
+++ trunk/logistic/inc/class.uirequirement_resource_allocation.inc.php
2012-10-30 12:51:57 UTC (rev 10385)
@@ -295,6 +295,9 @@
$criterias_array['location_id'] = $location_id;
$criterias_array['allrows'] = true;
+ $view_criterias_array = array();
+ $custom =
createObject('phpgwapi.custom_fields');
+
foreach($requirement_values as
$requirement_value)
{
$attrib_value =
$requirement_value->get_value();
@@ -313,9 +316,15 @@
{
$operator_str = ">";
}
-
- $criteria_str = $column_name . " " .
$operator_str . " " . $attrib_value;
+ $attrib_data = $custom->get('property',
".entity.{$entity_id}.{$cat_id}", $cust_attribute_id);
+
+ $view_criterias_array[] = array(
+ 'operator'
=> $operator_str,
+ 'value'
=> $attrib_value,
+ "cust_attribute_data"
=> $attrib_data
+ );
+
$condition = array(
'operator' =>
$operator_str,
'value'
=> $attrib_value,
@@ -328,12 +337,14 @@
$so_entity =
CreateObject('property.soentity',$entity_id,$cat_id);
$allocation_suggestions =
$so_entity->get_eav_list($criterias_array);
-
- print_r($allocation_suggestions);
+
+ print_r( $view_criterias_array );
+
$data = array
(
'requirement'
=> $requirement,
+ 'view_criterias_array' =>
$view_criterias_array,
'activity'
=> $activity,
'allocation_suggestions' =>
$allocation_suggestions,
'editable'
=> true
@@ -365,7 +376,6 @@
$resource_alloc_id = $this->so->store(
$resource_alloc );
}
-
$GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'logistic.uirequirement_resource_allocation.view', 'id'
=> $allocation_id));
}
Modified: trunk/logistic/templates/base/allocation/allocation_suggestions.xsl
===================================================================
--- trunk/logistic/templates/base/allocation/allocation_suggestions.xsl
2012-10-30 11:05:53 UTC (rev 10384)
+++ trunk/logistic/templates/base/allocation/allocation_suggestions.xsl
2012-10-30 12:51:57 UTC (rev 10385)
@@ -7,15 +7,12 @@
<xsl:call-template name="yui_phpgw_i18n"/>
<div id="resource-allocation" class="yui-navset yui-navset-top">
<h1>
- <xsl:value-of select="php:function('lang', 'Add resources to
activity')"/>: <xsl:value-of select="activity/name"/>
+ <xsl:value-of select="php:function('lang', 'Allocation of
requirement for')"/> <xsl:value-of select="activity/name"/>
</h1>
<div class="content-wrp">
<div id="requirement-wrp">
-
- <h2>Krav til aktiviteten</h2>
-
<ul>
<li>
<label
for="start_date">Startdato</label><span><xsl:value-of
select="php:function('date', $date_format,
number(requirement/start_date))"/></span>
@@ -28,9 +25,31 @@
<label for="no_of_items">Antall</label>
<span><xsl:value-of
select="requirement/no_of_items" /></span>
</li>
- </ul>
- </div>
+ </ul>
+ <h3>Kriterier</h3>
+ <xsl:for-each select="view_criterias_array">
+ <ul>
+ <li>
+ <label><xsl:value-of
select="cust_attribute_data/input_text"/></label>
+ <span
style="margin-right:5px;"><xsl:value-of select="operator"/></span>
+ <xsl:choose>
+ <xsl:when
test="cust_attribute_data/column_info/type = 'LB'">
+
<xsl:for-each select="cust_attribute_data/choice">
+
<xsl:if test="//value = id">
+
<span><xsl:value-of select="value"/></span>
+
</xsl:if>
+
</xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+
<span><xsl:value-of select="attrib_value"/></span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </li>
+ </ul>
+ </xsl:for-each>
+ </div>
+
<xsl:variable name="action_url">
<xsl:value-of
select="php:function('get_phpgw_link', '/index.php',
'menuaction:logistic.uirequirement_resource_allocation.save')" />
</xsl:variable>
Modified: trunk/logistic/templates/base/css/base.css
===================================================================
--- trunk/logistic/templates/base/css/base.css 2012-10-30 11:05:53 UTC (rev
10384)
+++ trunk/logistic/templates/base/css/base.css 2012-10-30 12:51:57 UTC (rev
10385)
@@ -2275,9 +2275,8 @@
padding: 20px;
}
-#requirement-wrp label{
- font-size: 16px;
-
+#requirement-wrp label {
+ font-size: 14px;
}
#requirement-wrp h2 {
Modified: trunk/logistic/templates/base/requirement/requirement_overview.xsl
===================================================================
--- trunk/logistic/templates/base/requirement/requirement_overview.xsl
2012-10-30 11:05:53 UTC (rev 10384)
+++ trunk/logistic/templates/base/requirement/requirement_overview.xsl
2012-10-30 12:51:57 UTC (rev 10385)
@@ -50,18 +50,21 @@
resizeable: true,
key: "<xsl:value-of
select="key"/>",
<xsl:if test="label">
- label: "<xsl:value-of
select="label"/>",
+ label: "<xsl:value-of
select="label"/>",
</xsl:if>
- sortable: <xsl:value-of
select="phpgw:conditional(not(sortable = 0), 'true', 'false')"/>,
+ sortable: <xsl:value-of
select="phpgw:conditional(not(sortable = 0), 'true', 'false')"/>,
<xsl:if test="hidden">
- hidden: true,
+ hidden: true,
</xsl:if>
<xsl:if test="formatter">
- formatter: <xsl:value-of
select="formatter"/>,
+ formatter:
<xsl:value-of select="formatter"/>,
</xsl:if>
<xsl:if test="editor">
- editor: <xsl:value-of
select="editor"/>,
- </xsl:if>
+ editor: <xsl:value-of
select="editor"/>,
+ </xsl:if>
+ <xsl:if test="type = 'button'">
+ formatter:"button",
+ </xsl:if>
className: "<xsl:value-of
select="className"/>"
}<xsl:value-of
select="phpgw:conditional(not(position() = last()), ',', '')"/>
</xsl:for-each>
@@ -74,8 +77,8 @@
$(document).ready(function(){
- var requirement_id = $("#requirement-container
table").find("tr:first").find("td.requirement_id").find("div").text();
- alert(requirement_id);
+ var requirement_id = $("#requirement-container
table").children("tr").eq(1).find("td.requirement_id").find("div").text();
+
updateAllocationTable( requirement_id );
});
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10385],
Torstein <=