[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10394] Merge 10383:10393 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [10394] Merge 10383:10393 from trunk |
Date: |
Wed, 31 Oct 2012 10:10:47 +0000 |
Revision: 10394
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10394
Author: sigurdne
Date: 2012-10-31 10:10:46 +0000 (Wed, 31 Oct 2012)
Log Message:
-----------
Merge 10383:10393 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/logistic/inc/class.sorequirement_resource_allocation.inc.php
branches/Version-1_0-branch/logistic/inc/class.uiactivity.inc.php
branches/Version-1_0-branch/logistic/inc/class.uirequirement.inc.php
branches/Version-1_0-branch/logistic/inc/class.uirequirement_resource_allocation.inc.php
branches/Version-1_0-branch/logistic/inc/model/class.requirement_resource_allocation.inc.php
branches/Version-1_0-branch/logistic/setup/phpgw_no.lang
branches/Version-1_0-branch/logistic/templates/base/allocation/allocation_suggestions.xsl
branches/Version-1_0-branch/logistic/templates/base/css/base.css
branches/Version-1_0-branch/logistic/templates/base/requirement/requirement_overview.xsl
branches/Version-1_0-branch/property/inc/class.bocommon.inc.php
branches/Version-1_0-branch/property/inc/class.menu.inc.php
branches/Version-1_0-branch/property/inc/class.uigeneric_test.inc.php
branches/Version-1_0-branch/property/inc/cron/default/organize_energy_pdf_bbb.php
branches/Version-1_0-branch/property/inc/soap_client/braarkiv/soap.php
Added Paths:
-----------
branches/Version-1_0-branch/logistic/js/logistic/resource_allocation.js
branches/Version-1_0-branch/property/inc/class.bocondition_survey.inc.php
branches/Version-1_0-branch/property/inc/class.socondition_survey.inc.php
branches/Version-1_0-branch/property/inc/class.uicondition_survey.inc.php
Removed Paths:
-------------
branches/Version-1_0-branch/logistic/js/logistic/allocation.js
Property Changed:
----------------
branches/Version-1_0-branch/
branches/Version-1_0-branch/property/inc/class.uigeneric_test.inc.php
branches/Version-1_0-branch/property/inc/cron/default/organize_energy_pdf_bbb.php
branches/Version-1_0-branch/property/inc/soap_client/braarkiv/services.php
branches/Version-1_0-branch/property/inc/soap_client/braarkiv/soap.php
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068,9071-9092,9094-9112,9114-9117,9119,9121-9160,9162-9166,9169-9207,9209-9211,9213-9215,9217,9219,9221-9253,9255,9257,9259-9260,9262,9264-9269,9271-9273,9275,9277-9278,9280,9282-9283,9285-9289,9291-9299,9301-9310,9312-9313,9315-9320,9322-9324,9326-9338,9340-9342,9344,9346-9348,9350-9358,9360-9362,9364-9366,9368-9374,9376-9382,9384,9386,9388-9390,9392-9396,9398-9402,9404-9410,9412,9414,9416-9417,9419-9425,9427,9429-9430,9432,9434-9463,9465-9502,9504-9506,9508-9521,9523-9526,9528,9530-9537,9539,9541-9551,9553,9555-9556,9558-9578,9580-9581,9583,9585,9587,9589,9591-9624,9626-9655,9657-9700,9702-9726,9728-9729,9731-9749,9751,9753-9754,9756-9832,9834-9836,9838-9839,9841-9846,9848-9850,9852-9858,9860-9863,9865,9867,9869-9871,9873-9893,9895,9897-9912,9914-9919,9921-9928,9930-9952,9954,9956,9958-9963,9965-9993,9995-9997,9999-10001,10003-10004,10006-10007,10009-10012,10014-10031,10033-10073,10075-10107,10109-10165,10167-10210,10222-10226,10228-10311,10313-10378,10380,10382
+
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068,9071-9092,9094-9112,9114-9117,9119,9121-9160,9162-9166,9169-9207,9209-9211,9213-9215,9217,9219,9221-9253,9255,9257,9259-9260,9262,9264-9269,9271-9273,9275,9277-9278,9280,9282-9283,9285-9289,9291-9299,9301-9310,9312-9313,9315-9320,9322-9324,9326-9338,9340-9342,9344,9346-9348,9350-9358,9360-9362,9364-9366,9368-9374,9376-9382,9384,9386,9388-9390,9392-9396,9398-9402,9404-9410,9412,9414,9416-9417,9419-9425,9427,9429-9430,9432,9434-9463,9465-9502,9504-9506,9508-9521,9523-9526,9528,9530-9537,9539,9541-9551,9553,9555-9556,9558-9578,9580-9581,9583,9585,9587,9589,9591-9624,9626-9655,9657-9700,9702-9726,9728-9729,9731-9749,9751,9753-9754,9756-9832,9834-9836,9838-9839,9841-9846,9848-9850,9852-9858,9860-9863,9865,9867,9869-9871,9873-9893,9895,9897-9912,9914-9919,9921-9928,9930-9952,9954,9956,9958-9963,9965-9993,9995-9997,9999-10001,10003-10004,10006-10007,10009-10012,10014-10031,10033-10073,10075-10107,10109-10165,10167-10210,10222-10226,10228-10311,10313-10378,10380,10382,10384-10393
Modified:
branches/Version-1_0-branch/logistic/inc/class.sorequirement_resource_allocation.inc.php
===================================================================
---
branches/Version-1_0-branch/logistic/inc/class.sorequirement_resource_allocation.inc.php
2012-10-31 10:09:22 UTC (rev 10393)
+++
branches/Version-1_0-branch/logistic/inc/class.sorequirement_resource_allocation.inc.php
2012-10-31 10:10:46 UTC (rev 10394)
@@ -142,20 +142,23 @@
$tables = "lg_requirement_resource_allocation
allocation";
-
+ $joins = " {$this->left_join} phpgw_locations ON
(phpgw_locations.location_id = allocation.location_id)";
+
if($return_count)
{
$cols = 'COUNT(DISTINCT(allocation.id)) AS
count';
}
else
{
- $cols .= "allocation.* ";
+ $cols .= "allocation.*, ";
+ $cols .= "phpgw_locations.descr AS
resource_type_descr";
+
}
-
+
$dir = $ascending ? 'ASC' : 'DESC';
$order = $sort_field ? "ORDER BY
{$this->marshal($sort_field, 'field')} $dir ": '';
-
- return "SELECT {$cols} FROM {$tables} WHERE
{$condition} {$order}";
+
+ return "SELECT {$cols} FROM {$tables} {$joins} WHERE
{$condition} {$order}";
}
protected function populate(int $allocation_id, &$allocation)
@@ -167,6 +170,7 @@
$allocation->set_location_id($this->unmarshal($this->db->f('location_id'),
'int'));
$allocation->set_requirement_id($this->unmarshal($this->db->f('requirement_id'),
'string'));
$allocation->set_resource_id($this->unmarshal($this->db->f('resource_id'),
'int'));
+
$allocation->set_resource_type_descr($this->unmarshal($this->db->f('resource_type_descr'),
'string'));
}
return $allocation;
Modified: branches/Version-1_0-branch/logistic/inc/class.uiactivity.inc.php
===================================================================
--- branches/Version-1_0-branch/logistic/inc/class.uiactivity.inc.php
2012-10-31 10:09:22 UTC (rev 10393)
+++ branches/Version-1_0-branch/logistic/inc/class.uiactivity.inc.php
2012-10-31 10:10:46 UTC (rev 10394)
@@ -146,11 +146,6 @@
(
array
(
- 'name' =>
'parent_id',
- 'source' => 'id'
- ),
- array
- (
'name' =>
'activity_id',
'source' => 'id'
),
@@ -387,57 +382,6 @@
self::render_template_xsl(array('activity/activity_item'), $data);
}
- public function view_2()
- {
- $activity_id = phpgw::get_var('id');
- $project_id = phpgw::get_var('project_id');
- if (isset($_POST['edit_activity']))
- {
- $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'logistic.uiactivity.edit', 'id' => $activity_id,
'project_id' => $project_id));
- }
- else if (isset($_POST['new_activity']))
- {
- $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'logistic.uiactivity.edit', 'project_id' => $project_id));
- }
- else
- {
- if ($activity_id && is_numeric($activity_id))
- {
- $activity =
$this->so->get_single($activity_id);
- $responsible_user =
$this->so->get_responsible_user($activity->get_responsible_user_id());
-
$activity->set_responsible_user_name($responsible_user);
- }
-
- $activity_array = $activity->toArray();
-
- if ($this->flash_msgs)
- {
- $msgbox_data =
$GLOBALS['phpgw']->common->msgbox_data($this->flash_msgs);
- $msgbox_data =
$GLOBALS['phpgw']->common->msgbox($msgbox_data);
- }
-
- $activity->set_project_id($project_id);
-
- $data = array
- (
- 'activity' => $activity->toArray()
- );
-
- if($activity->get_parent_id() > 0)
- {
- $parent_activity =
$this->so->get_single($activity->get_parent_id());
- $data['parent_activity'] =
$parent_activity->toArray();
- }
-
- echo $activity->get_id();
-
- $activity_children =
$this->so->get($activity->get_id());
-
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('logistic') . '::' . lang('Project');
-
self::render_template_xsl(array('activity/activity_item_2'), $data);
- }
- }
-
public function save()
{
$activity_id = phpgw::get_var('id');
Modified: branches/Version-1_0-branch/logistic/inc/class.uirequirement.inc.php
===================================================================
--- branches/Version-1_0-branch/logistic/inc/class.uirequirement.inc.php
2012-10-31 10:09:22 UTC (rev 10393)
+++ branches/Version-1_0-branch/logistic/inc/class.uirequirement.inc.php
2012-10-31 10:10:46 UTC (rev 10394)
@@ -144,6 +144,24 @@
}
}
+ $line_id = 0; // optional preselect
+ foreach($rows as &$entry)
+ {
+ $_checked = '';
+
+ if($entry['id'] == $line_id)
+ {
+ $_checked = 'checked="checked"';
+ }
+
+ $href = self::link(array('menuaction' =>
'logistic.uirequirement.delete', 'id' => $entry['id']));
+ $entry['delete_link'] = "<a class=\"btn-sm
delete\" href=\"{$href}\">Slett</a>";
+
+ $entry['select'] = "<input
class=\"select_line\" type =\"radio\" {$_checked} name=\"values[select_line]\"
value=\"{$entry['id']}\">";
+ $href = self::link(array('menuaction' =>
'logistic.uirequirement_resource_allocation.edit', 'requirement_id' =>
$entry['id']));
+ $entry['alloc_link'] = "<a class=\"btn-sm
alloc\" href=\"{$href}\">Alloker</a>";
+ }
+
// ... add result data
$result_data = array('results' => $rows);
@@ -174,8 +192,11 @@
phpgwapi_yui::load_widget('paginator');
$activity_id = phpgw::get_var('activity_id');
+ $activity =
$this->so_activity->get_single($activity_id);
+
$data = array(
'datatable_name' => lang('requirement'),
+ 'activity' => $activity,
'form' => array(
'toolbar' => array(
'item' => array(
@@ -195,6 +216,11 @@
'source' =>
self::link(array('menuaction' => 'logistic.uirequirement.index', 'activity_id'
=> $activity_id, 'phpgw_return_as' => 'json')),
'field' => array(
array(
+ 'key' => 'select',
+ 'label' =>
lang('select'),
+ 'sortable' => false,
+ ),
+ array(
'key' => 'id',
'label' => lang('ID'),
'sortable' => true,
@@ -224,52 +250,27 @@
'hidden' => true
),
array(
- 'key' => 'activity_id',
+ 'key' => 'id',
+ 'className' =>
'requirement_id',
'hidden' => true
- )
+ ),
+ array(
+ 'key' => 'delete_link',
+ 'label' => lang('Delete
requirement'),
+ 'sortable' => false,
+ ),
+ array(
+ 'key' => 'alloc_link',
+ 'label' =>
lang('Allocate resources'),
+ 'sortable' => false,
+ ),
)
),
);
- $parameters = array
- (
- 'parameter' => array
- (
- array
- (
- 'name' =>
'requirement_id',
- 'source' => 'id'
- ),
- array
- (
- 'name' =>
'activity_id',
- 'source' =>
'activity_id'
- ),
- )
- );
+ phpgwapi_jquery::load_widget('core');
- $data['datatable']['actions'][] = array
- (
- 'my_name' =>
'allocate_booking',
- 'text' =>
lang('t_new_booking_allocation'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php',array
- (
- 'menuaction' =>
'logistic.uirequirement_resource_allocation.edit'
- )),
- 'parameters' =>
json_encode($parameters)
- );
-
- $data['datatable']['actions'][] = array
- (
- 'my_name' =>
'view_booking_allocations',
- 'text' =>
lang('t_view_booking_allocations'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php',array
- (
- 'menuaction' =>
'logistic.uirequirement_resource_allocation.index'
- )),
- 'parameters' =>
json_encode($parameters)
- );
-
+ self::add_javascript('logistic', 'logistic',
'resource_allocation.js');
self::render_template_xsl(
'requirement/requirement_overview', $data);
}
Modified:
branches/Version-1_0-branch/logistic/inc/class.uirequirement_resource_allocation.inc.php
===================================================================
---
branches/Version-1_0-branch/logistic/inc/class.uirequirement_resource_allocation.inc.php
2012-10-31 10:09:22 UTC (rev 10393)
+++
branches/Version-1_0-branch/logistic/inc/class.uirequirement_resource_allocation.inc.php
2012-10-31 10:10:46 UTC (rev 10394)
@@ -134,6 +134,11 @@
'sortable' => true,
),
array(
+ 'key' =>
'resource_type',
+ 'label' =>
lang('Resource type'),
+ 'sortable' => true
+ ),
+ array(
'key' =>
'requirement_id',
'label' =>
lang('Requirememnt id'),
'sortable' => true
@@ -157,7 +162,6 @@
public function query()
{
-
$params = array(
'start' => phpgw::get_var('startIndex', 'int',
'REQUEST', 0),
'results' => phpgw::get_var('results', 'int',
'REQUEST', null),
@@ -203,6 +207,12 @@
switch ($query_type)
{
+ case 'requirement_id':
+ $requirement_id =
phpgw::get_var('requirement_id');
+ $filters = array('requirement_id' =>
$requirement_id);
+ $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters);
+ $object_count =
$this->so->get_count($search_for, $search_type, $filters);
+ break;
default: // ... all composites, filters (active
and vacant)
$result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters);
$object_count =
$this->so->get_count($search_for, $search_type, $filters);
@@ -289,6 +299,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();
@@ -307,9 +320,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,
@@ -322,12 +341,12 @@
$so_entity =
CreateObject('property.soentity',$entity_id,$cat_id);
$allocation_suggestions =
$so_entity->get_eav_list($criterias_array);
-
- print_r($allocation_suggestions);
+
$data = array
(
'requirement'
=> $requirement,
+ 'view_criterias_array' =>
$view_criterias_array,
'activity'
=> $activity,
'allocation_suggestions' =>
$allocation_suggestions,
'editable'
=> true
@@ -359,9 +378,8 @@
$resource_alloc_id = $this->so->store(
$resource_alloc );
}
-
- $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'logistic.uirequirement_resource_allocation.view', 'id'
=> $allocation_id));
+ $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'logistic.uirequirement_resource_allocation.index', 'id'
=> $allocation_id));
}
function convert_to_array($object_list)
Modified:
branches/Version-1_0-branch/logistic/inc/model/class.requirement_resource_allocation.inc.php
===================================================================
---
branches/Version-1_0-branch/logistic/inc/model/class.requirement_resource_allocation.inc.php
2012-10-31 10:09:22 UTC (rev 10393)
+++
branches/Version-1_0-branch/logistic/inc/model/class.requirement_resource_allocation.inc.php
2012-10-31 10:10:46 UTC (rev 10394)
@@ -38,6 +38,8 @@
protected $resource_id;
protected $location_id;
protected $create_user;
+
+ protected $resource_type_descr;
/**
* Constructor. Takes an optional ID. If a contract is
created from outside
@@ -99,7 +101,17 @@
{
return $this->create_user;
}
+
+ public function set_resource_type_descr($resource_type_descr)
+ {
+ $this->resource_type_descr = $resource_type_descr;
+ }
+ public function get_resource_type_descr()
+ {
+ return $this->resource_type_descr;
+ }
+
/**
* Get a static reference to the storage object associated with
this model object
*
@@ -118,6 +130,7 @@
{
return array(
'id' => $this->get_id(),
+ 'resource_type_descr' =>
$this->get_resource_type_descr(),
'requirement_id' => $this->get_requirement_id(),
'resource_id' => $this->get_resource_id(),
'location_id' => $this->get_location_id()
Deleted: branches/Version-1_0-branch/logistic/js/logistic/allocation.js
===================================================================
--- branches/Version-1_0-branch/logistic/js/logistic/allocation.js
2012-10-31 10:09:22 UTC (rev 10393)
+++ branches/Version-1_0-branch/logistic/js/logistic/allocation.js
2012-10-31 10:10:46 UTC (rev 10394)
@@ -1,4 +0,0 @@
-$(document).ready(function(){
-
-
-});
\ No newline at end of file
Copied: branches/Version-1_0-branch/logistic/js/logistic/resource_allocation.js
(from rev 10393, trunk/logistic/js/logistic/resource_allocation.js)
===================================================================
--- branches/Version-1_0-branch/logistic/js/logistic/resource_allocation.js
(rev 0)
+++ branches/Version-1_0-branch/logistic/js/logistic/resource_allocation.js
2012-10-31 10:10:46 UTC (rev 10394)
@@ -0,0 +1,33 @@
+$(document).ready(function(){
+
+ $("#requirement-container table tr").live("click", function(e){
+ var thisRow = $(this);
+
+ var requirement_id =
$(thisRow).find("td.requirement_id").find("div").text();
+
+ updateAllocationTable( requirement_id );
+ });
+});
+
+
+function updateAllocationTable( requirement_id ){
+
+ var oArgs = {
+
menuaction:'logistic.uirequirement_resource_allocation.index',
+ requirement_id: requirement_id,
+ type: 'requirement_id',
+ phpgw_return_as: 'json'
+ };
+
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+
+ var myColumnDefs = [
+ {key:"id", sortable:true},
+ {key:"requirement_id", sortable:true},
+ {key:"location_id", sortable:true},
+ {key:"resource_id", sortable:true}
+ ];
+
+ YAHOO.portico.inlineTableHelper('allocation-container',
requestUrl, myColumnDefs);
+}
+
Modified: branches/Version-1_0-branch/logistic/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/logistic/setup/phpgw_no.lang 2012-10-31
10:09:22 UTC (rev 10393)
+++ branches/Version-1_0-branch/logistic/setup/phpgw_no.lang 2012-10-31
10:10:46 UTC (rev 10394)
@@ -64,3 +64,6 @@
Add criterias logistic no Legg til kriterier
favorites logistic no Favoritter
toggle as favorite logistic no Legg til / fjern som favoritt
+Add allocation to requirement logistic no Alloker ressurser til
krav
+Delete requirement logistic no Slett krav
+Allocate resources logistic no Alloker ressurser
\ No newline at end of file
Modified:
branches/Version-1_0-branch/logistic/templates/base/allocation/allocation_suggestions.xsl
===================================================================
---
branches/Version-1_0-branch/logistic/templates/base/allocation/allocation_suggestions.xsl
2012-10-31 10:09:22 UTC (rev 10393)
+++
branches/Version-1_0-branch/logistic/templates/base/allocation/allocation_suggestions.xsl
2012-10-31 10:10:46 UTC (rev 10394)
@@ -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="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: branches/Version-1_0-branch/logistic/templates/base/css/base.css
===================================================================
--- branches/Version-1_0-branch/logistic/templates/base/css/base.css
2012-10-31 10:09:22 UTC (rev 10393)
+++ branches/Version-1_0-branch/logistic/templates/base/css/base.css
2012-10-31 10:10:46 UTC (rev 10394)
@@ -2275,9 +2275,8 @@
padding: 20px;
}
-#requirement-wrp label{
- font-size: 16px;
-
+#requirement-wrp label {
+ font-size: 14px;
}
#requirement-wrp h2 {
@@ -2293,10 +2292,14 @@
border: 1px solid #B0D9FF;
}
-#resource-list .resource{
- padding: 5px 0;
+#resource-list .resource {
+ padding: 10px;
}
+#resource-list .resource input[type="checkbox"]{
+ margin: 0 10px;
+}
+
#resource-list .resource.odd{
background: #fff;
}
@@ -2319,5 +2322,26 @@
background: none repeat scroll 0 0 #B0D9FF;
color: #092845;
font-weight: bold;
- padding: 5px 8px;
+ padding: 5px 20px;
+}
+
+#resource_alloc_wrp {
+ margin: 20px;
+ padding: 20px;
+}
+
+#resource_alloc_wrp #btn_menu {
+ float:left;
+ margin-left: 20px;
+}
+
+#resource_alloc_wrp input[type="submit"] {
+ font-size: 13px;
+ margin-bottom: 1px;
+ padding: 2px 0;
+ width: 160px;
+}
+
+#resource_alloc_wrp h2{
+ margin-top: 0;
}
\ No newline at end of file
Modified:
branches/Version-1_0-branch/logistic/templates/base/requirement/requirement_overview.xsl
===================================================================
---
branches/Version-1_0-branch/logistic/templates/base/requirement/requirement_overview.xsl
2012-10-31 10:09:22 UTC (rev 10393)
+++
branches/Version-1_0-branch/logistic/templates/base/requirement/requirement_overview.xsl
2012-10-31 10:10:46 UTC (rev 10394)
@@ -18,14 +18,30 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
<xsl:call-template name="yui_phpgw_i18n"/>
- <div style="margin: 20px; padding: 20px;" class="content-wrp">
- <form action="" name="acl_form" id="acl_form" method="post">
- <div id="paging"></div>
-
- <div id="requirement-container"></div>
+ <div id="resource_alloc_wrp" class="content-wrp">
- <div id="allocation-container"></div>
- </form>
+ <div id="paging"></div>
+
+ <h2>Krav</h2>
+ <div style="float:left;margin-bottom: 40px;"
id="requirement-container"></div>
+
+ <div id="btn_menu">
+ <xsl:variable name="add_requirement_url">
+ <xsl:value-of
select="php:function('get_phpgw_link', '/index.php',
'menuaction:logistic.uirequirement.edit' )" />
+ </xsl:variable>
+
+ <form action="{$add_requirement_url}"
name="acl_form" id="acl_form" method="post">
+ <input type="hidden" name="activity_id"
value="{activity/id}" />
+ <input class="btn" type="submit">
+ <xsl:attribute name="value">
+ <xsl:value-of
select="php:function('lang', 'Add requirement')" />
+ </xsl:attribute>
+ </input>
+ </form>
+ </div>
+
+ <h2 style="clear:both;">Allokerte ressurser</h2>
+ <div id="allocation-container"></div>
</div>
<xsl:call-template name="datasource-definition" />
</xsl:template>
@@ -35,69 +51,58 @@
<script>
YAHOO.util.Event.onDOMReady(function(){
- <xsl:choose>
- <xsl:when test="//datatable/actions">
- YAHOO.portico.actions = [
- <xsl:for-each
select="//datatable/actions">
- {
- my_name: "<xsl:value-of
select="my_name"/>",
- text: "<xsl:value-of
select="text"/>",
- <xsl:if
test="parameters">
- parameters:
<xsl:value-of select="parameters"/>,
- </xsl:if>
- action: "<xsl:value-of
select="action"/>"
- }<xsl:value-of
select="phpgw:conditional(not(position() = last()), ',', '')"/>
- </xsl:for-each>
- ];
- </xsl:when>
- <xsl:otherwise>
- YAHOO.portico.actions = [];
- </xsl:otherwise>
- </xsl:choose>
-
YAHOO.portico.columnDefs = [
<xsl:for-each select="//datatable/field">
{
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>
className: "<xsl:value-of
select="className"/>"
}<xsl:value-of
select="phpgw:conditional(not(position() = last()), ',', '')"/>
</xsl:for-each>
];
var reqUrl = '<xsl:value-of
select="//datatable/source"/>';
-
+
YAHOO.portico.inlineTableHelper('requirement-container', reqUrl,
YAHOO.portico.columnDefs);
-
+ });
+
+ $(document).ready(function(){
+ var requirement_id = $("#requirement-container
table").children("tr").eq(1).find("td.requirement_id").find("div").text();
+ updateAllocationTable( requirement_id );
+ });
+
+ function updateAllocationTable(requirement_id){
+
var oArgs = {
-
menuaction:'logistic.uirequirement_resource_allocation.index',
- requirement_id: '2',
- phpgw_return_as: 'json'
- };
+
menuaction:'logistic.uirequirement_resource_allocation.index',
+ requirement_id: requirement_id,
+ type: "requirement_id",
+ phpgw_return_as: 'json'
+ };
+
+ var requestUrl = phpGWLink('index.php', oArgs,
true);
- var requestUrl = phpGWLink('index.php', oArgs, true);
-
- var myColumnDefs = [
- {key:"id", sortable:true},
- {key:"requirement_id", sortable:true},
- {key:"location_id", sortable:true},
- {key:"resource_id", sortable:true}
- ];
-
- YAHOO.portico.inlineTableHelper('allocation-container',
requestUrl, myColumnDefs);
- });
+ var myColumnDefs = [
+ {key:"id", sortable:true},
+ {key:"resource_type_descr",
label:'Ressurstype', sortable:true},
+ {key:"requirement_id", sortable:true},
+ {key:"resource_id", sortable:true}
+ ];
+
+
YAHOO.portico.inlineTableHelper('allocation-container', requestUrl,
myColumnDefs);
+ }
</script>
</xsl:template>
\ No newline at end of file
Modified: branches/Version-1_0-branch/property/inc/class.bocommon.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.bocommon.inc.php
2012-10-31 10:09:22 UTC (rev 10393)
+++ branches/Version-1_0-branch/property/inc/class.bocommon.inc.php
2012-10-31 10:10:46 UTC (rev 10394)
@@ -1598,7 +1598,8 @@
$filename= str_replace('
','_',$GLOBALS['phpgw_info']['user']['account_lid']).'.xlsx';
$browser = CreateObject('phpgwapi.browser');
-
$browser->content_header($filename,'application/vnd.ms-excel');
+//
$browser->content_header($filename,'application/vnd.ms-excel');
+
$browser->content_header($filename,'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
$cacheMethod = PHPExcel_CachedObjectStorageFactory::
cache_to_phpTemp;
$cacheSettings = array( 'memoryCacheSize' => '32MB');
Copied:
branches/Version-1_0-branch/property/inc/class.bocondition_survey.inc.php (from
rev 10393, trunk/property/inc/class.bocondition_survey.inc.php)
===================================================================
--- branches/Version-1_0-branch/property/inc/class.bocondition_survey.inc.php
(rev 0)
+++ branches/Version-1_0-branch/property/inc/class.bocondition_survey.inc.php
2012-10-31 10:10:46 UTC (rev 10394)
@@ -0,0 +1,198 @@
+<?php
+ /**
+ * phpGroupWare - property: a Facilities Management System.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2003,2004,2005,2006,2007,2008,2009 Free
Software Foundation, Inc. http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
+ * @package property
+ * @subpackage admin
+ * @version $Id$
+ */
+
+ /**
+ * Description
+ * @package property
+ */
+
+ class property_bocondition_survey
+ {
+ var $start;
+ var $query;
+ var $filter;
+ var $sort;
+ var $order;
+ var $cat_id;
+ var $location_info = array();
+ var $appname;
+ var $allrows;
+ public $acl_location = '.project.bocondition_survey';
+
+ function __construct($session=false)
+ {
+ $this->so =
CreateObject('property.socondition_survey');
+ $this->custom = & $this->so->custom;
+ $this->bocommon =
CreateObject('property.bocommon');
+
+ $start =
phpgw::get_var('start', 'int', 'REQUEST', 0);
+ $query =
phpgw::get_var('query');
+ $sort =
phpgw::get_var('sort');
+ $order =
phpgw::get_var('order');
+ $filter =
phpgw::get_var('filter', 'int');
+ $cat_id =
phpgw::get_var('cat_id', 'int');
+ $allrows =
phpgw::get_var('allrows', 'bool');
+ $appname =
phpgw::get_var('appname', 'string');
+
+ if($appname)
+ {
+ $this->appname = $appname;
+ $this->so->appname = $appname;
+ }
+
+ $type =
phpgw::get_var('type');
+ $type_id =
phpgw::get_var('type_id', 'int', 'REQUEST', 0);
+ $this->type = $type;
+ $this->type_id = $type_id;
+
+ if ($session)
+ {
+ $this->read_sessiondata($type);
+ $this->use_session = true;
+ }
+
+ $this->start = $start ? $start : 0;
+ $this->query = isset($_REQUEST['query']) ?
$query : $this->query;
+ $this->sort =
isset($_REQUEST['sort']) ? $sort : $this->sort;
+ $this->order = isset($_REQUEST['order']) &&
$_REQUEST['order'] ? $order : $this->order;
+ $this->filter = isset($_REQUEST['filter']) ?
$filter : $this->filter;
+ $this->cat_id = isset($_REQUEST['cat_id']) ?
$cat_id : $this->cat_id;
+ $this->allrows = isset($allrows) ? $allrows :
false;
+
+
+ }
+
+ public function save_sessiondata($data)
+ {
+ if ($this->use_session)
+ {
+
$GLOBALS['phpgw']->session->appsession('session_data',$this->acl_location,$data);
+ }
+ }
+
+ function read_sessiondata($type)
+ {
+ $data =
$GLOBALS['phpgw']->session->appsession('session_data',$this->acl_location);
+
+ // _debug_array($data);
+
+ $this->start = $data['start'];
+ $this->query = $data['query'];
+ $this->filter = $data['filter'];
+ $this->sort = $data['sort'];
+ $this->order = $data['order'];
+ $this->cat_id = $data['cat_id'];
+ $this->allrows = $data['allrows'];
+ }
+
+ function column_list($selected='',$allrows='')
+ {
+ if(!$selected)
+ {
+ $selected =
$GLOBALS['phpgw_info']['user']['preferences']['property']["columns_{$this->acl_location}"];
+ }
+
+ $filter = array('list' => ''); // translates to "list
IS NULL"
+ $columns =
$this->custom->find('property',$this->acl_location, 0, '','','',true, false,
$filter);
+
$column_list=$this->bocommon->select_multi_list($selected,$columns);
+
+ return $column_list;
+ }
+
+ public function read($filter = array())
+ {
+ if (! $filter )
+ {
+ foreach ( $this->location_info['fields'] as
$field )
+ {
+ if (isset($field['filter']) &&
$field['filter'])
+ {
+ $filter[$field['name']] =
phpgw::get_var($field['name']);
+ }
+ }
+ }
+
+ $values = $this->so->read(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
+ 'allrows'=>$this->allrows),$filter);
+
+ $this->total_records = $this->so->total_records;
+ $this->uicols = $this->so->uicols;
+
+ return $values;
+ }
+
+ public function read_single($data=array())
+ {
+ $custom_fields = false;
+
if($GLOBALS['phpgw']->locations->get_attrib_table('property',
$this->acl_location))
+ {
+ $custom_fields = true;
+ $values = array();
+ $values['attributes'] =
$this->custom->find('property', $this->acl_location, 0, '', 'ASC',
'attrib_sort', true, true);
+ }
+
+ if(isset($data['id']) && $data['id'])
+ {
+ $values = $this->so->read_single($data,
$values);
+ }
+ if($custom_fields)
+ {
+ $values = $this->custom->prepare($values,
'property',$this->acl_location, $data['view']);
+ }
+ return $values;
+ }
+
+ public function save($data,$action='',$values_attribute =
array())
+ {
+ if(is_array($values_attribute))
+ {
+ $values_attribute =
$this->custom->convert_attribute_save($values_attribute);
+ }
+
+ if ($action=='edit')
+ {
+ if ($data['id'] != '')
+ {
+
+ $receipt =
$this->so->edit($data,$values_attribute);
+ }
+ }
+ else
+ {
+ $receipt =
$this->so->add($data,$values_attribute);
+ }
+
+ return $receipt;
+ }
+
+ public function delete($id)
+ {
+ $this->so->delete($id);
+ }
+ }
Modified: branches/Version-1_0-branch/property/inc/class.menu.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.menu.inc.php 2012-10-31
10:09:22 UTC (rev 10393)
+++ branches/Version-1_0-branch/property/inc/class.menu.inc.php 2012-10-31
10:10:46 UTC (rev 10394)
@@ -790,6 +790,12 @@
'text' =>
lang('Workorder'),
'image'
=> array('property', 'project_workorder')
),
+ 'condition_survey'
=> array
+ (
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uicondition_survey.index')),
+ 'text' =>
lang('condition survey'),
+ 'image'
=> array('property', 'project_request')
+ ),
'request' => array
(
'url' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uirequest.index')),
Copied:
branches/Version-1_0-branch/property/inc/class.socondition_survey.inc.php (from
rev 10393, trunk/property/inc/class.socondition_survey.inc.php)
===================================================================
--- branches/Version-1_0-branch/property/inc/class.socondition_survey.inc.php
(rev 0)
+++ branches/Version-1_0-branch/property/inc/class.socondition_survey.inc.php
2012-10-31 10:10:46 UTC (rev 10394)
@@ -0,0 +1,337 @@
+<?php
+ /**
+ * phpGroupWare - property: a Facilities Management System.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2003,2004,2005,2006,2007 Free Software
Foundation, Inc. http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
+ * @package property
+ * @subpackage custom
+ * @version $Id$
+ */
+
+ /**
+ * Description
+ * @package property
+ */
+
+ class property_socondition_survey
+ {
+ function __construct()
+ {
+ $this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
+ $this->db = & $GLOBALS['phpgw']->db;
+ $this->join = & $this->db->join;
+ $this->like = & $this->db->like;
+ }
+
+ function read($data)
+ {
+ if(is_array($data))
+ {
+ $start =
(isset($data['start'])?$data['start']:0);
+ $filter =
(isset($data['filter'])?$data['filter']:'none');
+ $query =
(isset($data['query'])?$data['query']:'');
+ $sort =
(isset($data['sort'])?$data['sort']:'DESC');
+ $order =
(isset($data['order'])?$data['order']:'');
+ $cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
+ $allrows =
(isset($data['allrows'])?$data['allrows']:'');
+ }
+
+ if ($order)
+ {
+ $ordermethod = " order by $order $sort";
+ }
+ else
+ {
+ $ordermethod = ' order by id DESC';
+ }
+
+ $where = 'WHERE';
+ if ($cat_id > 0)
+ {
+ $filtermethod .= " $where category='$cat_id' ";
+ $where = 'AND';
+ }
+
+ if($query)
+ {
+ $query =
$this->db->db_addslashes($query);
+ $querymethod = " $where name $this->like
'%$query%'";
+ }
+
+ $sql = "SELECT * FROM fm_custom $filtermethod
$querymethod";
+
+ $this->db->query($sql,__LINE__,__FILE__);
+ $this->total_records = $this->db->num_rows();
+
+ if(!$allrows)
+ {
+ $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
+ }
+ else
+ {
+ $this->db->query($sql .
$ordermethod,__LINE__,__FILE__);
+ }
+
+ while ($this->db->next_record())
+ {
+ $customs[] = array
+ (
+ 'custom_id' =>
$this->db->f('id'),
+ 'name' =>
stripslashes($this->db->f('name')),
+ 'entry_date' =>
$this->db->f('entry_date'),
+ 'user' =>
$GLOBALS['phpgw']->accounts->id2name($this->db->f('user_id'))
+ );
+ }
+ return $customs;
+ }
+
+ function read_single($custom_id)
+ {
+ $custom_id = (int) $custom_id;
+ $this->db->query("SELECT * from fm_custom where
id={$custom_id}",__LINE__,__FILE__);
+
+ $custom = array();
+ if ($this->db->next_record())
+ {
+ $custom = array
+ (
+ 'id' =>
(int)$this->db->f('id'),
+ 'name' =>
$this->db->f('name', true),
+ 'sql_text' =>
$this->db->f('sql_text', true),
+ 'entry_date' =>
$this->db->f('entry_date'),
+ 'cols' =>
$this->read_cols($custom_id)
+ );
+ }
+
+ return $custom;
+ }
+
+ function read_cols($custom_id)
+ {
+ $custom_id = (int) $custom_id;
+ $sql = "SELECT * FROM fm_custom_cols WHERE
custom_id={$custom_id} ORDER by sorting";
+ $this->db->query($sql);
+
+ $cols = array();
+ while ($this->db->next_record())
+ {
+ $cols[] = array
+ (
+ 'id' => $this->db->f('id'),
+ 'name' => $this->db->f('name'),
+ 'descr' =>
$this->db->f('descr', true),
+ 'sorting'=>
$this->db->f('sorting')
+ );
+
+ }
+ return $cols;
+ }
+
+ function read_custom_name($custom_id)
+ {
+ $custom_id = (int) $custom_id;
+ $this->db->query("SELECT name FROM fm_custom where
id={$custom_id}",__LINE__,__FILE__);
+ $this->db->next_record();
+ return $this->db->f('name', true);
+ }
+
+ function add($custom)
+ {
+ $custom['name'] =
$this->db->db_addslashes($custom['name']);
+ $custom['sql_text'] =
$this->db->db_addslashes(htmlspecialchars_decode($custom['sql_text']));
+
+ $this->db->transaction_begin();
+
+ $id = $this->db->next_id('fm_custom');
+
+ $this->db->query("INSERT INTO fm_custom
(id,entry_date,sql_text,name,user_id) "
+ . "VALUES ($id,'" . time() . "','" .
$custom['sql_text'] . "','" . $custom['name'] . "'," . $this->account .
")",__LINE__,__FILE__);
+
+ $receipt['custom_id']= $id;
+
+
+ $this->db->transaction_commit();
+
+ $receipt['message'][] = array('msg'=>lang('custom %1
has been saved',$receipt['custom_id']));
+ return $receipt;
+ }
+
+ function edit($custom)
+ {
+ $custom['name'] =
$this->db->db_addslashes($custom['name']);
+ $custom['sql_text'] =
$this->db->db_addslashes(htmlspecialchars_decode($custom['sql_text']));
+
+ $this->db->query("UPDATE fm_custom set
sql_text='{$custom['sql_text']}', entry_date='" . time() . "',
name='{$custom['name']}' WHERE id=" . (int)
$custom['custom_id'],__LINE__,__FILE__);
+
+ if($custom['new_name'])
+ {
+ $column_id =
$this->db->next_id('fm_custom_cols', array('custom_id'=>$custom['custom_id']));
+
+ $sql = "SELECT max(sorting) as max_sort FROM
fm_custom_cols WHERE custom_id=" . $custom['custom_id'];
+ $this->db->query($sql);
+ $this->db->next_record();
+ $sorting = $this->db->f('max_sort')+1;
+
+ $values= array(
+ $custom['custom_id'],
+ $column_id,
+ $custom['new_name'],
+
$this->db->db_addslashes($custom['new_descr']),
+ $sorting
+ );
+
+ $values = $this->db->validate_insert($values);
+
+ $this->db->query("INSERT INTO fm_custom_cols
(custom_id,id,name,descr,sorting) "
+ . "VALUES ($values)");
+ }
+
+
+ if($custom['delete_cols'])
+ {
+ for ($i=0;$i<count($custom['delete_cols']);$i++)
+ {
+
+ $sql = "SELECT sorting FROM
fm_custom_cols where custom_id=" . $custom['custom_id'] . " AND id=" .
$custom['delete_cols'][$i];
+ $this->db->query($sql);
+ $this->db->next_record();
+ $sorting =
$this->db->f('sorting');
+ $sql2 = "SELECT max(sorting) as
max_sort FROM fm_custom_cols";
+ $this->db->query($sql2);
+ $this->db->next_record();
+ $max_sort =
$this->db->f('max_sort');
+
+ if($max_sort>$sorting)
+ {
+ $sql = "UPDATE fm_custom_cols
set sorting=sorting-1 WHERE sorting > $sorting AND custom_id=" .
$custom['custom_id'];
+ $this->db->query($sql);
+ }
+
+
+ $this->db->query("DELETE FROM
fm_custom_cols WHERE custom_id=" . $custom['custom_id'] ." AND id=" .
$custom['delete_cols'][$i]);
+ }
+ }
+
+ $receipt['custom_id']= $custom['custom_id'];
+ $receipt['message'][] = array('msg'=>lang('custom %1
has been edited',$custom['custom_id']));
+ return $receipt;
+ }
+
+ function resort($data)
+ {
+ //html_print_r($data);
+ if(is_array($data))
+ {
+ $resort =
(isset($data['resort'])?$data['resort']:'up');
+ $custom_id =
(isset($data['id'])?$data['custom_id']:'');
+ $id = (isset($data['id'])?$data['id']:'');
+ }
+
+ $sql = "SELECT sorting FROM fm_custom_cols WHERE
custom_id = $custom_id AND id=$id";
+ $this->db->query($sql);
+ $this->db->next_record();
+ $sorting = $this->db->f('sorting');
+ $sql = "SELECT max(sorting) as max_sort FROM
fm_custom_cols WHERE custom_id = $custom_id";
+ $this->db->query($sql);
+ $this->db->next_record();
+ $max_sort = $this->db->f('max_sort');
+ switch($resort)
+ {
+ case 'up':
+ if($sorting>1)
+ {
+ $sql = "UPDATE fm_custom_cols
set sorting=$sorting WHERE custom_id = $custom_id AND sorting =" . ($sorting-1);
+ $this->db->query($sql);
+ $sql = "UPDATE fm_custom_cols
set sorting=" . ($sorting-1) ." WHERE custom_id = $custom_id AND id=$id";
+ $this->db->query($sql);
+ }
+ break;
+ case 'down':
+ if($max_sort > $sorting)
+ {
+ $sql = "UPDATE fm_custom_cols
set sorting=$sorting WHERE custom_id = $custom_id AND sorting =" . ($sorting+1);
+ $this->db->query($sql);
+ $sql = "UPDATE fm_custom_cols
set sorting=" . ($sorting+1) ." WHERE custom_id = $custom_id AND id=$id";
+ $this->db->query($sql);
+ }
+ break;
+ default:
+ return;
+ break;
+ }
+ }
+
+ function read_custom($data)
+ {
+ $start = isset($data['start']) &&
$data['start'] ? $data['start'] : 0;
+ $filter = isset($data['filter']) &&
$data['filter'] ? $data['filter'] : 'none';
+ $query = isset($data['query']) ?
$data['query'] : '';
+ $sort = isset($data['sort']) && $data['sort']
? $data['sort'] : 'DESC';
+ $order = isset($data['order']) ?
$data['order'] : '';
+ $allrows = isset($data['allrows']) ?
$data['allrows'] : '';
+ $custom_id = isset($data['custom_id']) &&
$data['custom_id'] ? (int)$data['custom_id'] : 0;
+
+ $this->db->query("SELECT sql_text FROM fm_custom where
id={$custom_id}",__LINE__,__FILE__);
+ $this->db->next_record();
+ $sql = $this->db->f('sql_text', true);
+
+ $uicols = $this->read_cols($custom_id);
+ $this->uicols = $uicols;
+
+ //FIXME:
+ $ordermethod = '';
+
+ $this->db->query($sql,__LINE__,__FILE__);
+ $this->total_records = $this->db->num_rows();
+
+ if(!$allrows)
+ {
+ $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
+ }
+ else
+ {
+ $this->db->query($sql .
$ordermethod,__LINE__,__FILE__);
+ }
+
+ $n=count($uicols);
+ $j=0;
+ while ($this->db->next_record())
+ {
+ for ($i=0;$i<$n;$i++)
+ {
+ $custom[$j][$uicols[$i]['name']] =
$this->db->f($uicols[$i]['name']);
+ $custom[$j]['grants'] =
(int)$grants[$this->db->f('user_id')];
+ }
+ $j++;
+ }
+
+ //_debug_array($custom);
+ return $custom;
+ }
+
+ function delete($custom_id)
+ {
+ $custom_id = (int) $custom_id;
+ $this->db->query("DELETE FROM fm_custom WHERE
id={$custom_id}",__LINE__,__FILE__);
+ $this->db->query("DELETE FROM fm_custom_cols WHERE
custom_id={$custom_id}",__LINE__,__FILE__);
+ }
+ }
Copied:
branches/Version-1_0-branch/property/inc/class.uicondition_survey.inc.php (from
rev 10393, trunk/property/inc/class.uicondition_survey.inc.php)
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uicondition_survey.inc.php
(rev 0)
+++ branches/Version-1_0-branch/property/inc/class.uicondition_survey.inc.php
2012-10-31 10:10:46 UTC (rev 10394)
@@ -0,0 +1,391 @@
+<?php
+
+ /**
+ * phpGroupWare - logistic: a part of a Facilities Management System.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2012 Free Software Foundation, Inc.
http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/
+ * @package property
+ * @subpackage logistic
+ * @version $Id$
+ */
+ phpgw::import_class('phpgwapi.uicommon');
+ phpgw::import_class('phpgwapi.jquery');
+
+ class property_uicondition_survey extends phpgwapi_uicommon
+ {
+
+ private $bo;
+ public $public_functions = array(
+ 'query' => true,
+ 'index' => true,
+ 'view' => true,
+ 'add' => true,
+ 'edit' => true,
+ 'save' => true
+ );
+
+ public function __construct()
+ {
+ parent::__construct();
+
+ $this->bo =
CreateObject('property.bocondition_survey');
+ $this->bocommon = &
$this->bo->bocommon;
+ $this->acl = &
$GLOBALS['phpgw']->acl;
+ $this->acl_location =
$this->bo->acl_location;
+ $this->acl_read =
$this->acl->check($this->acl_location, PHPGW_ACL_READ, 'property');
+ $this->acl_add =
$this->acl->check($this->acl_location, PHPGW_ACL_ADD, 'property');
+ $this->acl_edit =
$this->acl->check($this->acl_location, PHPGW_ACL_EDIT, 'property');
+ $this->acl_delete =
$this->acl->check($this->acl_location, PHPGW_ACL_DELETE, 'property');
+ $this->acl_manage =
$this->acl->check($this->acl_location, 16, 'property');
+
+ $GLOBALS['phpgw_info']['flags']['menu_selection'] =
"property::condition_survey";
+ }
+
+ public function index()
+ {
+ if (phpgw::get_var('phpgw_return_as') == 'json')
+ {
+ return $this->query();
+ }
+
+ self::add_javascript('phpgwapi', 'yahoo',
'datatable.js');
+ phpgwapi_yui::load_widget('datatable');
+ phpgwapi_yui::load_widget('paginator');
+
+ $survey_type_array = array();
+
+ $data = array(
+ 'datatable_name' => lang('condition
survey'),
+ 'form' => array(
+ 'toolbar' => array(
+ 'item' => array(
+ array('type' =>
'filter',
+ 'name' =>
'project_type',
+ 'text' =>
lang('Project_type') . ':',
+ 'list' =>
$survey_type_array,
+ ),
+ array('type' => 'text',
+ 'text' =>
lang('search'),
+ 'name' =>
'query'
+ ),
+ array(
+ 'type' =>
'submit',
+ 'name' =>
'search',
+ 'value' =>
lang('Search')
+ ),
+ array(
+ 'type' =>
'link',
+ 'value' =>
lang('t_new_project'),
+ 'href' =>
self::link(array('menuaction' => 'property.uicondition_survey.add')),
+ 'class' =>
'new_item'
+ ),
+ ),
+ ),
+ ),
+ 'datatable' => array(
+ 'source' =>
self::link(array('menuaction' => 'property.uicondition_survey.index',
'phpgw_return_as' => 'json')),
+ 'field' => array(
+ array(
+ 'key' => 'name',
+ 'label' =>
lang('Project name'),
+ 'sortable' => true
+ ),
+ array(
+ 'key' => 'id',
+ 'label' => lang('ID'),
+ 'sortable' => true,
+ 'formatter' =>
'YAHOO.portico.formatLink'
+ ),
+ array(
+ 'key' => 'description',
+ 'label' =>
lang('Project description'),
+ 'sortable' => false,
+ 'editor' => 'new
YAHOO.widget.TextboxCellEditor({disableBtns:true})'
+ ),
+ array(
+ 'key' =>
'project_type_label',
+ 'label' =>
lang('Project type'),
+ 'sortable' => false
+ ),
+ array(
+ 'key' => 'link',
+ 'hidden' => true
+ )
+ )
+ ),
+ );
+
+ $parameters = array
+ (
+ 'parameter' => array
+ (
+ array
+ (
+ 'name' =>
'project_id',
+ 'source' => 'id'
+ ),
+ )
+ );
+
+ $data['datatable']['actions'][] = array
+ (
+ 'my_name' =>
'new_activity',
+ 'text' =>
lang('t_new_activity'),
+ 'action' =>
$GLOBALS['phpgw']->link('/index.php',array
+ (
+ 'menuaction' =>
'logistic.uiactivity.edit'
+ )),
+ 'parameters' =>
json_encode($parameters)
+ );
+
+ self::render_template_xsl('datatable_common', $data);
+ }
+
+
+ public function query()
+ {
+ $params = array(
+ 'start' => phpgw::get_var('startIndex', 'int',
'REQUEST', 0),
+ 'results' => phpgw::get_var('results', 'int',
'REQUEST', null),
+ 'query' => phpgw::get_var('query'),
+ 'sort' => phpgw::get_var('sort'),
+ 'dir' => phpgw::get_var('dir'),
+ 'filters' => $filters
+ );
+
+ if
($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 0)
+ {
+ $user_rows_per_page =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+ }
+ else
+ {
+ $user_rows_per_page = 10;
+ }
+ // YUI variables for paging and sorting
+ $start_index = phpgw::get_var('startIndex', 'int');
+ $num_of_objects = phpgw::get_var('results', 'int',
'GET', $user_rows_per_page);
+ $sort_field = phpgw::get_var('sort');
+ $sort_ascending = phpgw::get_var('dir') == 'desc' ?
false : true;
+ // Form variables
+ $search_for = phpgw::get_var('query');
+ $search_type = phpgw::get_var('search_option');
+ // Create an empty result set
+ $result_objects = array();
+ $result_count = 0;
+
+ //Retrieve a project identifier and load corresponding
project
+ $project_id = phpgw::get_var('project_id');
+
+ $exp_param = phpgw::get_var('export');
+ $export = false;
+ if (isset($exp_param))
+ {
+ $export = true;
+ $num_of_objects = null;
+ }
+
+ //Retrieve the type of query and perform type specific
logic
+ $query_type = phpgw::get_var('type');
+ //var_dump($query_type);
+ switch ($query_type)
+ {
+ case 'project_type':
+ phpgwapi_cache::session_set('logistic',
'project_type_query', $search_for);
+ $search_type = 'project_type';
+ $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters);
+ $object_count =
$this->so->get_count($search_for, $search_type, $filters);
+ break;
+ default: // ... all composites, filters (active
and vacant)
+ phpgwapi_cache::session_set('logistic',
'project_query', $search_for);
+ $filters = array('project_type' =>
phpgw::get_var('project_type'));
+ $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters);
+ $object_count =
$this->so->get_count($search_for, $search_type, $filters);
+ break;
+ }
+ //var_dump($result_objects);
+ //Create an empty row set
+ $rows = array();
+ foreach ($result_objects as $result)
+ {
+ if (isset($result))
+ {
+ $rows[] = $result->serialize();
+ }
+ }
+
+ // ... add result data
+ $result_data = array('results' => $rows);
+
+ $result_data['total_records'] = $object_count;
+ $result_data['start'] = $params['start'];
+ $result_data['sort'] = $params['sort'];
+ $result_data['dir'] = $params['dir'];
+
+ $editable = phpgw::get_var('editable') == 'true' ? true
: false;
+
+ if (!$export)
+ {
+ //Add action column to each row in result table
+ if ($search_type && $search_type ==
'project_type')
+ {
+ array_walk(
+
$result_data['results'], array($this, '_add_links'),
"property.uicondition_survey.view_project_type");
+ }
+ else
+ {
+ array_walk(
+
$result_data['results'], array($this, '_add_links'),
"property.uicondition_survey.view");
+ }
+ }
+ return $this->yui_results($result_data);
+ }
+
+
+ public function view()
+ {
+ $project_id = phpgw::get_var('id');
+ if (isset($_POST['edit_project']))
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'property.uicondition_survey.edit', 'id' => $project_id));
+ }
+ else if (isset($_POST['new_activity']))
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'logistic.uiactivity.edit', 'project_id' => $project_id));
+ }
+ else
+ {
+ if ($project_id && is_numeric($project_id))
+ {
+ $project =
$this->so->get_single($project_id);
+ }
+
+ $project_array = $project->toArray();
+
+ $data = array
+ (
+ 'value_id' => !empty($project) ?
$project->get_id() : 0,
+ 'project' => $project,
+ 'view' => 'view_project'
+ );
+
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('logistic') . '::' . lang('Project');
+
self::render_template_xsl(array('project/project_item'), $data);
+ }
+ }
+
+ public function add()
+ {
+ $this->edit();
+ }
+
+ public function edit($mode = 'edit')
+ {
+ $id = phpgw::get_var('id', 'int');
+
+ if(!$this->acl_add && !$this->acl_edit)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uicondition_survey.view', 'id'=> $id));
+ }
+
+ if($mode == 'view')
+ {
+ if( !$this->acl_read)
+ {
+ $this->bocommon->no_access();
+ return;
+ }
+ }
+ else
+ {
+ if(!$this->acl_add && !$this->acl_edit)
+ {
+ $this->bocommon->no_access();
+ return;
+ }
+ }
+
+
+
+ $project_id = phpgw::get_var('id');
+ if ($project_id && is_numeric($project_id))
+ {
+ $project = $this->so->get_single($project_id);
+ }
+ else
+ {
+ if($project == null)
+ {
+ $project = new logistic_project();
+ }
+ }
+
+ $project_types = $this->so->get_project_types();
+ foreach ($project_types as &$p_type)
+ {
+ if ($project->get_project_type_id() ==
$p_type['id'])
+ {
+ $p_type['selected'] = 1;
+ }
+ }
+
+ $data = array
+ (
+ 'project' => $project,
+ 'options' => $project_types,
+ 'editable' => true
+ );
+
+ $this->use_yui_editor('description');
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('logistic') . '::' . lang('Project type');
+
+ phpgwapi_jquery::load_widget('core');
+ self::add_javascript('logistic', 'logistic',
'project.js');
+
self::render_template_xsl(array('project/project_item'), $data);
+ }
+
+ public function save()
+ {
+ $project_id = phpgw::get_var('id');
+
+ if ($project_id && is_numeric($project_id))
+ {
+ $project = $this->so->get_single($project_id);
+ }
+ else
+ {
+ $project = new logistic_project();
+ }
+
+ $project->populate();
+
+ if( $project->validate() )
+ {
+ $project_id = $this->so->store($project);
+ $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'property.uicondition_survey.view', 'id' =>
$project_id));
+ }
+ else
+ {
+ $this->edit( $project );
+ }
+ }
+ }
+
Modified: branches/Version-1_0-branch/property/inc/class.uigeneric_test.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uigeneric_test.inc.php
2012-10-31 10:09:22 UTC (rev 10393)
+++ branches/Version-1_0-branch/property/inc/class.uigeneric_test.inc.php
2012-10-31 10:10:46 UTC (rev 10394)
@@ -24,7 +24,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage admin
- * @version $Id: class.uigeneric.inc.php 8960 2012-03-02 07:35:48Z
sigurdne $
+ * @version $Id$
*/
phpgw::import_class('phpgwapi.yui');
phpgw::import_class('phpgwapi.uicommon');
Property changes on:
branches/Version-1_0-branch/property/inc/class.uigeneric_test.inc.php
___________________________________________________________________
Added: svn:keywords
+ Revision Author Id
Modified:
branches/Version-1_0-branch/property/inc/cron/default/organize_energy_pdf_bbb.php
===================================================================
---
branches/Version-1_0-branch/property/inc/cron/default/organize_energy_pdf_bbb.php
2012-10-31 10:09:22 UTC (rev 10393)
+++
branches/Version-1_0-branch/property/inc/cron/default/organize_energy_pdf_bbb.php
2012-10-31 10:10:46 UTC (rev 10394)
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage custom
- * @version $Id: organize_energy_pdf_bbb.php 6869 2011-01-27 10:28:55Z
sigurdne $
+ * @version $Id$
*/
/**
Property changes on:
branches/Version-1_0-branch/property/inc/cron/default/organize_energy_pdf_bbb.php
___________________________________________________________________
Added: svn:keywords
+ Revision Author Id
Property changes on:
branches/Version-1_0-branch/property/inc/soap_client/braarkiv/services.php
___________________________________________________________________
Added: svn:keywords
+ Revision Author Id
Modified: branches/Version-1_0-branch/property/inc/soap_client/braarkiv/soap.php
===================================================================
--- branches/Version-1_0-branch/property/inc/soap_client/braarkiv/soap.php
2012-10-31 10:09:22 UTC (rev 10393)
+++ branches/Version-1_0-branch/property/inc/soap_client/braarkiv/soap.php
2012-10-31 10:10:46 UTC (rev 10394)
@@ -24,7 +24,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package soap
* @subpackage communication
- * @version $Id: soap.php 6682 2010-12-20 09:57:35Z sigurdne $
+ * @version $Id$
*/
Property changes on:
branches/Version-1_0-branch/property/inc/soap_client/braarkiv/soap.php
___________________________________________________________________
Added: svn:keywords
+ Revision Author Id
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10394] Merge 10383:10393 from trunk,
Sigurd Nes <=