[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9552] Merge 9540:9551 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [9552] Merge 9540:9551 from trunk |
Date: |
Tue, 12 Jun 2012 06:54:45 +0000 |
Revision: 9552
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9552
Author: sigurdne
Date: 2012-06-12 06:54:44 +0000 (Tue, 12 Jun 2012)
Log Message:
-----------
Merge 9540:9551 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/controller/inc/class.socontrol.inc.php
branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
branches/Version-1_0-branch/controller/inc/class.uicontrol_group.inc.php
branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php
branches/Version-1_0-branch/controller/inc/class.uiprocedure.inc.php
branches/Version-1_0-branch/controller/inc/model/class.control.inc.php
branches/Version-1_0-branch/controller/setup/setup.inc.php
branches/Version-1_0-branch/controller/setup/tables_current.inc.php
branches/Version-1_0-branch/controller/setup/tables_update.inc.php
branches/Version-1_0-branch/controller/templates/base/check_list/view_cases_for_check_list.xsl
branches/Version-1_0-branch/controller/templates/base/control/control.xsl
branches/Version-1_0-branch/controller/templates/base/control/control_tabs.xsl
branches/Version-1_0-branch/controller/templates/base/control_group/control_group_tabs.xsl
branches/Version-1_0-branch/controller/templates/base/control_location/control_location_tabs.xsl
branches/Version-1_0-branch/controller/templates/base/control_location/register_control_to_location.xsl
branches/Version-1_0-branch/controller/templates/base/control_location/view_locations_for_control.xsl
branches/Version-1_0-branch/controller/templates/base/css/base.css
branches/Version-1_0-branch/controller/templates/base/datatable.xsl
branches/Version-1_0-branch/frontend/inc/class.bofellesdata.inc.php
branches/Version-1_0-branch/phpgwapi/inc/class.custom_fields.inc.php
branches/Version-1_0-branch/phpgwapi/setup/setup.inc.php
branches/Version-1_0-branch/phpgwapi/setup/tables_current.inc.php
branches/Version-1_0-branch/phpgwapi/setup/tables_update.inc.php
branches/Version-1_0-branch/property/inc/class.uiadmin_entity.inc.php
branches/Version-1_0-branch/property/templates/base/admin_entity.xsl
Added Paths:
-----------
branches/Version-1_0-branch/controller/templates/base/control/controls_datatable.xsl
branches/Version-1_0-branch/controller/templates/base/control_group/control_groups_datatable.xsl
branches/Version-1_0-branch/controller/templates/base/control_item/control_items_datatable.xsl
branches/Version-1_0-branch/controller/templates/base/procedure/procedures_datatable.xsl
Property Changed:
----------------
branches/Version-1_0-branch/
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
+
/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
Modified: branches/Version-1_0-branch/controller/inc/class.socontrol.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socontrol.inc.php
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/controller/inc/class.socontrol.inc.php
2012-06-12 06:54:44 UTC (rev 9552)
@@ -143,8 +143,6 @@
$control->set_responsibility_id($this->unmarshal($this->db->f('responsibility_id',
true), 'int'));
$control->set_responsibility_name($this->unmarshal($this->db->f('responsibility_name',
true), 'string'));
$control->set_control_area_id($this->unmarshal($this->db->f('control_area_id',
true), 'int'));
-
$control->set_component_type_id($this->unmarshal($this->db->f('component_type_id',
true), 'int'));
-
$control->set_component_id($this->unmarshal($this->db->f('component_id', true),
'int'));
$control->set_repeat_type($this->unmarshal($this->db->f('repeat_type', true),
'int'));
$control->set_repeat_type_label($this->unmarshal($this->db->f('repeat_type',
true), 'int'));
$control->set_repeat_interval($this->unmarshal($this->db->f('repeat_interval',
true), 'int'));
@@ -185,8 +183,6 @@
$control->set_responsibility_id($this->unmarshal($this->db->f('responsibility_id',
true), 'int'));
$control->set_control_area_id($this->unmarshal($this->db->f('control_area_id',
true), 'int'));
$control->set_control_area_name($this->unmarshal($this->db->f('control_area_name',
true), 'string'));
-
$control->set_component_type_id($this->unmarshal($this->db->f('component_type_id',
true), 'int'));
-
$control->set_component_id($this->unmarshal($this->db->f('component_id', true),
'int'));
$control->set_repeat_type($this->unmarshal($this->db->f('repeat_type', true),
'int'));
$control->set_repeat_interval($this->unmarshal($this->db->f('repeat_interval',
true), 'int'));
@@ -448,7 +444,7 @@
}
else
{
- $cols = 'controller_control.id,
controller_control.title, controller_control.description,
controller_control.start_date, controller_control.end_date,
controller_control.procedure_id, controller_control.control_area_id,
controller_control.requirement_id, controller_control.costresponsibility_id,
controller_control.responsibility_id, controller_control.component_type_id,
controller_control.component_id, controller_control.repeat_type,
controller_control.repeat_interval, controller_control.enabled,
controller_procedure.title AS procedure_name, fm_responsibility_role.name AS
responsibility_name ';
+ $cols = 'controller_control.id,
controller_control.title, controller_control.description,
controller_control.start_date, controller_control.end_date,
controller_control.procedure_id, controller_control.control_area_id,
controller_control.requirement_id, controller_control.costresponsibility_id,
controller_control.responsibility_id, controller_control.repeat_type,
controller_control.repeat_interval, controller_control.enabled,
controller_procedure.title AS procedure_name, fm_responsibility_role.name AS
responsibility_name ';
}
$dir = $ascending ? 'ASC' : 'DESC';
@@ -486,8 +482,6 @@
$category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id', 'int')));
$control->set_control_area_name($category[0]['name']);
//
$control->set_control_group_id($this->unmarshal($this->db->f('control_group_id',
true), 'int'));
-
$control->set_component_type_id($this->unmarshal($this->db->f('component_type_id',
true), 'int'));
-
$control->set_component_id($this->unmarshal($this->db->f('component_id', true),
'int'));
$control->set_repeat_type($this->unmarshal($this->db->f('repeat_type', true),
'int'));
$control->set_repeat_interval($this->unmarshal($this->db->f('repeat_interval',
true), 'int'));
}
Modified: branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
2012-06-12 06:54:44 UTC (rev 9552)
@@ -1,4 +1,4 @@
-<?php
+<?php
/**
* phpGroupWare - controller: a part of a Facilities Management System.
*
@@ -28,51 +28,48 @@
* @version $Id$
*/
- phpgw::import_class('controller.uicommon');
- phpgw::import_class('property.boevent');
- phpgw::import_class('controller.socontrol');
- phpgw::import_class('controller.socontrol_group');
- phpgw::import_class('controller.socontrol_area');
- phpgw::import_class('controller.socontrol_item');
- phpgw::import_class('controller.socontrol_item_list');
- phpgw::import_class('controller.soprocedure');
+ phpgw::import_class('controller.uicommon');
+ phpgw::import_class('property.boevent');
+ phpgw::import_class('controller.socontrol');
+ phpgw::import_class('controller.socontrol_group');
+ phpgw::import_class('controller.socontrol_area');
+ phpgw::import_class('controller.socontrol_item');
+ phpgw::import_class('controller.socontrol_item_list');
+ phpgw::import_class('controller.soprocedure');
- phpgw::import_class('phpgwapi.yui');
+ phpgw::import_class('phpgwapi.yui');
- include_class('controller', 'control', 'inc/model/');
- include_class('controller', 'control_area', 'inc/model/');
- include_class('controller', 'control_item_list', 'inc/model/');
- include_class('controller', 'control_group_list', 'inc/model/');
- include_class('controller', 'check_item', 'inc/model/');
+ include_class('controller', 'control', 'inc/model/');
+ include_class('controller', 'control_area', 'inc/model/');
+ include_class('controller', 'control_item_list', 'inc/model/');
+ include_class('controller', 'control_group_list', 'inc/model/');
+ include_class('controller', 'check_item', 'inc/model/');
- class controller_uicontrol extends controller_uicommon
- {
- private $bo;
- private $so;
- private $so_procedure;
- private $so_control_group;
- private $so_control_area;
- private $so_control_item;
- private $so_control_item_list;
- private $so_control_group_list;
- private $so_check_list_list;
- private $so_check_item;
- private $_category_acl;
+ class controller_uicontrol extends controller_uicommon
+ {
+ private $bo;
+ private $so;
+ private $so_procedure;
+ private $so_control_group;
+ private $so_control_area;
+ private $so_control_item;
+ private $so_control_item_list;
+ private $so_control_group_list;
+ private $so_check_item;
+ private $_category_acl;
- public $public_functions = array
- (
- 'index'
=> true,
- 'control_list'
=> true,
- 'view'
=> true,
- 'view_control_details' =>
true,
- 'save_control_details' =>
true,
- 'view_control_groups' =>
true,
- 'save_control_groups' =>
true,
- 'view_control_items' =>
true,
- 'save_control_items' =>
true,
- 'view_check_list'
=> true,
- 'generate_check_lists_for_control' => true,
- 'view_check_lists_for_control' => true,
+ public $public_functions = array
+ (
+ 'index'
=> true,
+ 'control_list'
=> true,
+ 'view'
=> true,
+ 'view_control_details'
=> true,
+ 'save_control_details'
=> true,
+ 'view_control_groups'
=> true,
+ 'save_control_groups'
=> true,
+ 'view_control_items'
=> true,
+ 'save_control_items'
=> true,
+ 'view_check_list'
=> true,
'get_controls_by_control_area' => true,
);
@@ -188,13 +185,7 @@
'type' =>
'submit',
'name' =>
'search',
'value' =>
lang('Search')
- ),
- array(
- 'type' =>
'link',
- 'value' =>
lang('New control'),
- 'href' =>
self::link(array('menuaction' => 'controller.uicontrol.view_control_details')),
- 'class' =>
'new_item'
- ),
+ )
),
),
),
@@ -240,47 +231,8 @@
)
),
);
-/*
- * ,
- array(
- 'key' => 'actions',
- 'hidden' => true
- ),
- array(
- 'key' => 'labels',
- 'hidden' => true
- ),
- array(
- 'key' => 'ajax',
- 'hidden' => true
- )
- *
- * $parameters3 = array
- (
- 'parameter' => array
- (
- array
- (
- 'name'
=> 'search_for',
- 'source'
=> 'location_code'
- ),
- )
- );
- $data['rowactions']['action'][] = array
- (
- 'my_name'
=> 'view',
- 'text'
=> lang('composites'),
- 'action'
=> $GLOBALS['phpgw']->link('/index.php',array
- (
- 'menuaction'
=> 'rental.uicomposite.index',
- 'search_type'
=> 'location_id',
- 'populate_form'
=> 'yes'
- )),
- 'parameters' =>
$parameters3
- );*/
-//_debug_array($data);
- self::render_template_xsl('datatable', $data);
+ self::render_template_xsl(array(
'control/controls_datatable', 'datatable' ), $data);
}
/**
@@ -323,13 +275,13 @@
$data = array
(
- 'tabs'
=> $GLOBALS['phpgw']->common->create_tabs($tabs, 0),
- 'view'
=> "control_details",
- 'editable'
=> true,
- 'control'
=> ($control != null) ? $control->toArray() : null,
+ 'tabs'
=> $GLOBALS['phpgw']->common->create_tabs($tabs, 0),
+ 'view'
=> "control_details",
+ 'editable'
=> true,
+ 'control'
=> ($control != null) ? $control->toArray() : null,
'control_areas_array' =>
$control_areas_array,
'procedures_array' =>
$procedures_array,
- 'role_array' =>
$role_array,
+ 'role_array'
=> $role_array,
'repeat_type_array' =>
$repeat_type_array
);
@@ -547,10 +499,10 @@
$data = array
(
- 'tabs'
=> $GLOBALS['phpgw']->common->create_tabs($tabs, 2),
- 'view'
=> 'control_items',
- 'control_group_ids' =>
implode($control_group_ids, ","),
- 'control' =>
$control->toArray(),
+ 'tabs'
=>
$GLOBALS['phpgw']->common->create_tabs($tabs, 2),
+ 'view'
=> 'control_items',
+ 'control_group_ids'
=> implode($control_group_ids, ","),
+ 'control'
=> $control->toArray(),
'groups_with_control_items' =>
$groups_with_control_items
);
Modified:
branches/Version-1_0-branch/controller/inc/class.uicontrol_group.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicontrol_group.inc.php
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/controller/inc/class.uicontrol_group.inc.php
2012-06-12 06:54:44 UTC (rev 9552)
@@ -118,13 +118,7 @@
'type' =>
'link',
'value' =>
$_SESSION['showall'] ? lang('Show only active') : lang('Show all'),
'href' =>
self::link(array('menuaction' => $this->url_prefix.'.toggle_show_inactive'))
- ),
- array(
- 'type' =>
'link',
- 'value' =>
lang('New control group'),
- 'href' =>
self::link(array('menuaction' => 'controller.uicontrol_group.add')),
- 'class' =>
'new_item'
- ),
+ )
),
),
),
@@ -166,7 +160,7 @@
);
//_debug_array($data);
- self::render_template_xsl('datatable', $data);
+ self::render_template_xsl(array(
'control_group/control_groups_datatable', 'datatable' ), $data);
}
/**
Modified:
branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php
2012-06-12 06:54:44 UTC (rev 9552)
@@ -123,13 +123,7 @@
'type' =>
'submit',
'name' =>
'search',
'value' =>
lang('Search')
- ),
- array(
- 'type' =>
'link',
- 'value' =>
lang('New control item'),
- 'href' =>
self::link(array('menuaction' => 'controller.uicontrol_item.add')),
- 'class' =>
'new_item'
- ),
+ )
),
),
),
@@ -173,9 +167,8 @@
phpgwapi_yui::load_widget('paginator');
phpgwapi_yui::load_widget('datatable');
self::add_javascript('controller', 'yahoo',
'datatable.js');
-//_debug_array($data);
-
- self::render_template_xsl('datatable', $data);
+
+ self::render_template_xsl( array(
'control_item/control_items_datatable', 'datatable' ), $data);
}
/**
@@ -198,109 +191,73 @@
public function edit()
{
$control_item_id = phpgw::get_var('id');
-
- if(isset($control_item_id) && $control_item_id > 0)
- {
- $control_item =
$this->so->get_single($control_item_id);
- }
- else
- {
- $control_item = new controller_control_item();
- }
+
+ // Sigurd: START as categories
+ $cats = CreateObject('phpgwapi.categories', -1,
'controller', '.control');
+ $cats->supress_info = true;
+
+ $control_areas =
$cats->formatted_xslt_list(array('format'=>'filter','globals' => true,'use_acl'
=> $this->_category_acl));
+ $control_areas_array = $control_areas['cat_list'];
- if(isset($_POST['save_control_item'])) // The user has
pressed the save button
- {
- if(isset($control_item)) // Add new values to
the control item
- {
- $what_to_do_txt =
phpgw::get_var('what_to_do','html');
- $what_to_do_txt = str_replace(" ",
" ", $what_to_do_txt);
- $how_to_do_txt =
phpgw::get_var('how_to_do','html');
- $how_to_do_txt = str_replace(" ",
" ", $how_to_do_txt);
-
$control_item->set_title(phpgw::get_var('title'));
-
$control_item->set_required(phpgw::get_var('required') == 'on' ? true : false);
-
$control_item->set_type(phpgw::get_var('control_item_type'));
- $control_item->set_what_to_do(
$what_to_do_txt );
- $control_item->set_how_to_do(
$how_to_do_txt );
- $control_item->set_control_group_id(
phpgw::get_var('control_group') );
- $control_item->set_control_area_id(
phpgw::get_var('control_area') );
-
- $control_item_id =
$this->so->store($control_item);
-
- if($control_item_id > 0)
- {
- $message =
lang('messages_saved_form');
-
- if($control_item->get_type() ==
'control_item_type_3' | $control_item->get_type() == 'control_item_type_4'){
- $option_values =
phpgw::get_var('option_values');
-
- foreach($option_values
as $option_value){
-
$control_item_option = new controller_control_item_option($option_value,
$control_item_id);
-
$control_item_option_id = $this->so_control_item_option->store(
$control_item_option );
- }
- }
- }
- else
- {
- $ctrl_item_id =
$this->so->add($control_item);
- if($ctrl_item_id)
- {
- $message =
lang('messages_saved_form');
- }
- else
- {
- $error =
lang('messages_form_error');
- }
- }
+ $control_groups_array =
$this->so_control_group->get_control_group_array();
+
+ /*
+ * hack to fix display of char
+ */
+ $control_item->set_what_to_do(str_replace(" ", "
",$control_item->get_what_to_do()));
+ $control_item->set_how_to_do(str_replace(' ', ' ',
$control_item->get_how_to_do()));
-
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' =>
'controller.uicontrol_item.index', 'dir' => 'desc'));
- }
- }
- else if(isset($_POST['cancel_control_item'])) // The
user has pressed the cancel button
- {
- if(isset($control_item_id) && $control_item_id
> 0)
- {
-
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' =>
'controller.uicontrol_item.view', 'id' => $control_item_id));
- }
- else
- {
-
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' =>
'controller.uicontrol_item.index'));
- }
- }
- else
- {
- // Sigurd: START as categories
- $cats = CreateObject('phpgwapi.categories',
-1, 'controller', '.control');
- $cats->supress_info = true;
-
- $control_areas =
$cats->formatted_xslt_list(array('format'=>'filter','globals' => true,'use_acl'
=> $this->_category_acl));
- $control_areas_array =
$control_areas['cat_list'];
+ $control_item_array = $control_item->toArray();
+
+ $data = array
+ (
+ 'editable' => true,
+ 'control_item' =>
$control_item_array,
+ 'control_areas' =>
$control_areas_array,
+ 'control_groups' =>
$control_groups_array,
+ );
- $control_groups_array =
$this->so_control_group->get_control_group_array();
-
- /*
- * hack to fix display of char
- */
-
$control_item->set_what_to_do(str_replace(" ", "
",$control_item->get_what_to_do()));
-
$control_item->set_how_to_do(str_replace(' ', ' ',
$control_item->get_how_to_do()));
+ $this->use_yui_editor(array('what_to_do','how_to_do'));
+
+ self::add_javascript('controller', 'controller',
'jquery.js');
+ self::add_javascript('controller', 'controller',
'ajax.js');
+ self::add_javascript('controller', 'controller',
'jquery-ui.custom.min.js');
- $control_item_array = $control_item->toArray();
+ self::render_template_xsl('control_item/control_item',
$data);
+ }
+
+ public function save()
+ {
+ $control_item_id = phpgw::get_var('id');
+ $what_to_do_txt = phpgw::get_var('what_to_do','html');
+ $what_to_do_txt = str_replace(" ", " ",
$what_to_do_txt);
+ $how_to_do_txt = phpgw::get_var('how_to_do','html');
+ $how_to_do_txt = str_replace(" ", " ",
$how_to_do_txt);
+ $control_item->set_title(phpgw::get_var('title'));
+ $control_item->set_required(phpgw::get_var('required')
== 'on' ? true : false);
+
$control_item->set_type(phpgw::get_var('control_item_type'));
+ $control_item->set_what_to_do( $what_to_do_txt );
+ $control_item->set_how_to_do( $how_to_do_txt );
+ $control_item->set_control_group_id(
phpgw::get_var('control_group') );
+ $control_item->set_control_area_id(
phpgw::get_var('control_area') );
- $data = array
- (
- 'editable'
=> true,
- 'control_item' =>
$control_item_array,
- 'control_areas' =>
$control_areas_array,
- 'control_groups' =>
$control_groups_array,
- );
-
-
$this->use_yui_editor(array('what_to_do','how_to_do'));
+ $control_item_id = $this->so->store($control_item);
- self::add_javascript('controller',
'controller', 'jquery.js');
- self::add_javascript('controller',
'controller', 'ajax.js');
- self::add_javascript('controller',
'controller', 'jquery-ui.custom.min.js');
-
-
self::render_template_xsl('control_item/control_item', $data);
+ if($control_item_id > 0)
+ {
+ $message = lang('messages_saved_form');
+
+ if($control_item->get_type() ==
'control_item_type_3' | $control_item->get_type() == 'control_item_type_4'){
+ $option_values =
phpgw::get_var('option_values');
+
+ foreach($option_values as
$option_value){
+ $control_item_option = new
controller_control_item_option($option_value, $control_item_id);
+ $control_item_option_id =
$this->so_control_item_option->store( $control_item_option );
+ }
+ }
}
+
+ $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'controller.uicontrol_item.index', 'dir' => 'desc'));
}
public function query()
@@ -327,6 +284,7 @@
{
$filters['control_areas'] = $ctrl_area;
}
+
$ctrl_group = phpgw::get_var('control_groups');
if(isset($ctrl_group) && $ctrl_group > 0)
{
Modified: branches/Version-1_0-branch/controller/inc/class.uiprocedure.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uiprocedure.inc.php
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/controller/inc/class.uiprocedure.inc.php
2012-06-12 06:54:44 UTC (rev 9552)
@@ -118,13 +118,7 @@
'type' =>
'submit',
'name' =>
'search',
'value' =>
lang('Search')
- ),
- array(
- 'type' =>
'link',
- 'value' =>
lang('t_new_procedure'),
- 'href' =>
self::link(array('menuaction' => 'controller.uiprocedure.add')),
- 'class' =>
'new_item'
- ),
+ )
),
),
),
@@ -166,7 +160,7 @@
);
//_debug_array($data);
- self::render_template_xsl('datatable', $data);
+ self::render_template_xsl(array(
'procedure/procedures_datatable', 'datatable' ), $data);
}
public function edit()
Modified: branches/Version-1_0-branch/controller/inc/model/class.control.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/model/class.control.inc.php
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/controller/inc/model/class.control.inc.php
2012-06-12 06:54:44 UTC (rev 9552)
@@ -55,9 +55,6 @@
protected $costresponsibility_id;
protected $responsibility_id;
protected $responsibility_name;
- protected $component_id;
- protected $component_type_id;
- //protected $location_code;
protected $control_area_id;
protected $control_area_name;
@@ -199,27 +196,6 @@
public function get_responsibility_name() { return
$this->responsibility_name; }
- public function set_component_id($component_id)
- {
- $this->component_id = $component_id;
- }
-
- public function get_component_id() { return
$this->component_id; }
-
- public function set_component_type_id($component_type_id)
- {
- $this->component_type_id = $component_type_id;
- }
-
- public function get_component_type_id() { return
$this->component_type_id; }
- /*
- public function set_location_code($location_code)
- {
- $this->location_code = $location_code;
- }
-
- public function get_location_code() { return
$this->location_code; }
- */
public function set_control_area_id($control_area_id)
{
$this->control_area_id = $control_area_id;
Modified: branches/Version-1_0-branch/controller/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/setup/setup.inc.php 2012-06-12
06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/controller/setup/setup.inc.php 2012-06-12
06:54:44 UTC (rev 9552)
@@ -1,6 +1,6 @@
<?php
$setup_info['controller']['name'] = 'controller';
- $setup_info['controller']['version'] = '0.1.36';
+ $setup_info['controller']['version'] = '0.1.38';
$setup_info['controller']['app_order'] = 100;
$setup_info['controller']['enable'] = 1;
$setup_info['controller']['app_group'] = 'office';
Modified: branches/Version-1_0-branch/controller/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/setup/tables_current.inc.php
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/controller/setup/tables_current.inc.php
2012-06-12 06:54:44 UTC (rev 9552)
@@ -12,8 +12,6 @@
'costResponsibility_id' => array('type' =>
'int', 'precision' => 4, 'nullable' => True),
'responsibility_id' => array('type' => 'int',
'precision' => 4, 'nullable' => True),
'control_area_id' => array('type' => 'int',
'precision' => 4, 'nullable' => True),
- 'component_type_id' => array('type' => 'int',
'precision' => 4, 'nullable' => True),
- 'component_id' => array('type' => 'int',
'precision' => 4, 'nullable' => True),
'repeat_type' => array('type' => 'int',
'precision' => 2, 'nullable' => True),
'repeat_interval' => array('type' => 'int',
'precision' => 2, 'nullable' => True),
'enabled' => array('type' => 'int', 'precision'
=> 2, 'nullable' => True)
@@ -73,6 +71,7 @@
'completed_date' => array('type' => 'int',
'precision' => 8, 'nullable' => True),
'component_id' => array('type' => 'int',
'precision' => 4, 'nullable' => True),
'location_code' => array('type' => 'varchar',
'precision' => 30, 'nullable' => false),
+ 'location_id' => array('type' => 'int',
'precision' => 4, 'nullable' => true),
'num_open_cases' => array('type' => 'int',
'precision' => 4, 'nullable' => True),
'num_pending_cases' => array('type' => 'int',
'precision' => 4, 'nullable' => True)
),
@@ -205,17 +204,17 @@
'status' => array('type'
=> 'int', 'precision' => '4', 'nullable' => false),
'measurement' => array('type' =>
'varchar', 'precision' => '50', 'nullable' => True),
'location_id' => array('type' =>
'int', 'precision' => '4', 'nullable' => true), // representer
meldingsfregisteret
- 'location_item_id' => array('type' => 'int', 'precision'
=> '8', 'nullable' => true), //meldings id
- 'descr' => array('type' =>
'text','nullable' => true),
- 'user_id' => array('type' =>
'int','precision' => '4','nullable' => true),
- 'entry_date' => array('type' => 'int', 'precision'
=> 8,'nullable' => false),
- 'modified_date' => array('type' => 'int',
'precision' => 8,'nullable' => True),
- 'modified_by' => array('type' => 'int', 'precision'
=> 4,'nullable' => True),
- ),
- 'pk' => array('id'),
- 'fk' => array('controller_check_item' => array('check_item_id'
=> 'id')),
- 'ix' => array(),
- 'uc' => array()
+ 'location_item_id' => array('type' => 'int', 'precision' => '8',
'nullable' => true), //meldings id
+ 'descr' => array('type' => 'text','nullable' =>
true),
+ 'user_id' => array('type' => 'int','precision' =>
'4','nullable' => true),
+ 'entry_date' => array('type' => 'int', 'precision' =>
8,'nullable' => false),
+ 'modified_date' => array('type' => 'int', 'precision'
=> 8,'nullable' => True),
+ 'modified_by' => array('type' => 'int', 'precision' =>
4,'nullable' => True),
+ ),
+ 'pk' => array('id'),
+ 'fk' => array('controller_check_item' => array('check_item_id' => 'id')),
+ 'ix' => array(),
+ 'uc' => array()
),
'controller_check_item_status' => array(
'fd' => array(
Modified: branches/Version-1_0-branch/controller/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/setup/tables_update.inc.php
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/controller/setup/tables_update.inc.php
2012-06-12 06:54:44 UTC (rev 9552)
@@ -705,4 +705,31 @@
return
$GLOBALS['setup_info']['controller']['currentver'];
}
}
+
+ $test[] = '0.1.36';
+ function controller_upgrade0_1_36()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('controller_check_list','location_id',array(
+ 'type' => 'int',
+ 'precision' => 4,
+ 'nullable' => true
+ ));
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['controller']['currentver'] =
'0.1.37';
+ return
$GLOBALS['setup_info']['controller']['currentver'];
+ }
+ }
+
+ $test[] = '0.1.37';
+ function controller_upgrade0_1_37()
+ {
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('controller_control', array(),
'component_type_id');
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('controller_control', array(),
'component_id');
+
+ $GLOBALS['setup_info']['controller']['currentver'] = '0.1.38';
+ return $GLOBALS['setup_info']['controller']['currentver'];
+ }
\ No newline at end of file
Modified:
branches/Version-1_0-branch/controller/templates/base/check_list/view_cases_for_check_list.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/check_list/view_cases_for_check_list.xsl
2012-06-12 06:41:29 UTC (rev 9551)
+++
branches/Version-1_0-branch/controller/templates/base/check_list/view_cases_for_check_list.xsl
2012-06-12 06:54:44 UTC (rev 9552)
@@ -51,6 +51,11 @@
success: function(data) {
$("#load_view_content").html(data);
}
+ error: function(XMLHttpRequest, textStatus,
errorThrown) {
+ if (XMLHttpRequest.status === 401) {
+ location.href = '/';
+ }
+ }
});
}
</script>
Modified:
branches/Version-1_0-branch/controller/templates/base/control/control.xsl
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/control/control.xsl
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/controller/templates/base/control/control.xsl
2012-06-12 06:54:44 UTC (rev 9552)
@@ -99,8 +99,8 @@
<dd>
<xsl:choose>
<xsl:when test="editable">
- <input class="required"
type="text" name="title" id="title" value="{control/title}" size="80"/>
- <div
class="help_text">Angi tittel på kontrollen</div>
+ <input class="required"
type="text" name="title" id="title" value="{control/title}" size="70"/>
+ <div class="help_text
ext">Angi tittel på kontrollen</div>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="control/title" />
@@ -111,7 +111,7 @@
<label
for="start_date">Startdato</label>
</dt>
<dd>
- <input class="required" id="start_date"
name="start_date" type="text">
+ <input class="required date"
id="start_date" name="start_date" type="text">
<xsl:if test="control/start_date != ''">
<xsl:attribute
name="value"><xsl:value-of select="php:function('date', $date_format,
number(control/start_date))"/></xsl:attribute>
</xsl:if>
@@ -122,7 +122,7 @@
<label for="end_date">Sluttdato</label>
</dt>
<dd>
- <input id="end_date" name="end_date"
type="text">
+ <input class="date" id="end_date"
name="end_date" type="text">
<xsl:if test="control/end_date != 0">
<xsl:attribute
name="value"><xsl:value-of select="php:function('date', $date_format,
number(control/end_date))"/></xsl:attribute>
</xsl:if>
@@ -159,7 +159,7 @@
<xsl:choose>
<xsl:when test="editable">
<input class="required"
id="repeat_interval" size="2" type="text" name="repeat_interval"
value="{control/repeat_interval}" />
- <span class="help_text">Angi
hvilket frekvensintervall kontrollen skal ha. Hvis du velger 2, betyr det at
kontrollen skal gjennomføres annenhver dag</span>
+ <span class="help_text">Angi
hvilket frekvensintervall kontrollen skal ha. Hvis du velger 2, betyr det
eksempelvis at kontrollen skal gjennomføres annenhver dag</span>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="control/repeat_interval" />
Modified:
branches/Version-1_0-branch/controller/templates/base/control/control_tabs.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/control/control_tabs.xsl
2012-06-12 06:41:29 UTC (rev 9551)
+++
branches/Version-1_0-branch/controller/templates/base/control/control_tabs.xsl
2012-06-12 06:54:44 UTC (rev 9552)
@@ -3,6 +3,7 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
<div class="yui-navset yui-navset-top" id="control_tabview">
+
<xsl:choose>
<xsl:when test="view = 'control_details'">
<xsl:call-template name="yui_booking_i18n"/>
Copied:
branches/Version-1_0-branch/controller/templates/base/control/controls_datatable.xsl
(from rev 9551, trunk/controller/templates/base/control/controls_datatable.xsl)
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/control/controls_datatable.xsl
(rev 0)
+++
branches/Version-1_0-branch/controller/templates/base/control/controls_datatable.xsl
2012-06-12 06:54:44 UTC (rev 9552)
@@ -0,0 +1,13 @@
+<!-- $Id: view_locations_for_control.xsl 9485 2012-06-04 08:39:52Z vator $ -->
+
+<xsl:template match="data" xmlns:php="http://php.net/xsl">
+
+<div id="main_content">
+
+ <h1>Kontroller</h1>
+
+ <div class="content-wrp">
+ <xsl:call-template name="datatable" />
+ </div>
+</div>
+</xsl:template>
Modified:
branches/Version-1_0-branch/controller/templates/base/control_group/control_group_tabs.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/control_group/control_group_tabs.xsl
2012-06-12 06:41:29 UTC (rev 9551)
+++
branches/Version-1_0-branch/controller/templates/base/control_group/control_group_tabs.xsl
2012-06-12 06:54:44 UTC (rev 9552)
@@ -16,8 +16,4 @@
</div>
</div>
</div>
- <!-- script type="text/javascript">
- var resource_id = <xsl:value-of select="resource/id"/>;
- var lang = <xsl:value-of select="php:function('js_lang',
'Name', 'Category', 'Actions', 'Edit', 'Delete', 'Account', 'Role')"/>;
- </script-->
</xsl:template>
Copied:
branches/Version-1_0-branch/controller/templates/base/control_group/control_groups_datatable.xsl
(from rev 9551,
trunk/controller/templates/base/control_group/control_groups_datatable.xsl)
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/control_group/control_groups_datatable.xsl
(rev 0)
+++
branches/Version-1_0-branch/controller/templates/base/control_group/control_groups_datatable.xsl
2012-06-12 06:54:44 UTC (rev 9552)
@@ -0,0 +1,13 @@
+<!-- $Id: view_locations_for_control.xsl 9485 2012-06-04 08:39:52Z vator $ -->
+
+<xsl:template match="data" xmlns:php="http://php.net/xsl">
+
+<div id="main_content">
+
+ <h1>Kontrollgrupper</h1>
+
+ <div id="control_items" class="content-wrp">
+ <xsl:call-template name="datatable" />
+ </div>
+</div>
+</xsl:template>
Copied:
branches/Version-1_0-branch/controller/templates/base/control_item/control_items_datatable.xsl
(from rev 9551,
trunk/controller/templates/base/control_item/control_items_datatable.xsl)
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/control_item/control_items_datatable.xsl
(rev 0)
+++
branches/Version-1_0-branch/controller/templates/base/control_item/control_items_datatable.xsl
2012-06-12 06:54:44 UTC (rev 9552)
@@ -0,0 +1,13 @@
+<!-- $Id: view_locations_for_control.xsl 9485 2012-06-04 08:39:52Z vator $ -->
+
+<xsl:template match="data" xmlns:php="http://php.net/xsl">
+
+<div id="main_content">
+
+ <h1>Kontrollpunkter</h1>
+
+ <div id="control_items" class="content-wrp">
+ <xsl:call-template name="datatable" />
+ </div>
+</div>
+</xsl:template>
Modified:
branches/Version-1_0-branch/controller/templates/base/control_location/control_location_tabs.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/control_location/control_location_tabs.xsl
2012-06-12 06:41:29 UTC (rev 9551)
+++
branches/Version-1_0-branch/controller/templates/base/control_location/control_location_tabs.xsl
2012-06-12 06:54:44 UTC (rev 9552)
@@ -3,6 +3,44 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
<div class="yui-navset yui-navset-top" id="control_location_tabview">
+
+<div id="choose_control" class="select-box">
+
+ <!-- When control area is chosen, an ajax
request is executed.
+ The operation fetches controls from db
and populates the control list.
+ The ajax operation is handled in
ajax.js
+ -->
+ <label>Velg kontrollen du vil vise bygg
for</label>
+ <select id="control_area_list"
name="control_area_list">
+ <option value="">Velg
kontrollområde</option>
+ <xsl:for-each
select="control_areas_array">
+ <option value="{id}">
+ <xsl:value-of
disable-output-escaping="yes" select="name"/>
+ </option>
+ </xsl:for-each>
+ </select>
+
+ <form id="loc_form" action="" method="GET">
+ <select id="control_id"
name="control_id">
+ <xsl:choose>
+ <xsl:when
test="control_array/child::node()">
+ <xsl:for-each
select="control_array">
+
<xsl:variable name="control_id"><xsl:value-of select="id"/></xsl:variable>
+ <option
value="{$control_id}">
+
<xsl:value-of select="title"/>
+
</option>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <option>
+ Ingen
kontroller
+ </option>
+ </xsl:otherwise>
+ </xsl:choose>
+ </select>
+ </form>
+ </div>
+
<xsl:choose>
<xsl:when test="view = 'view_locations_for_control'">
<div class="identifier-header">
Modified:
branches/Version-1_0-branch/controller/templates/base/control_location/register_control_to_location.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/control_location/register_control_to_location.xsl
2012-06-12 06:41:29 UTC (rev 9551)
+++
branches/Version-1_0-branch/controller/templates/base/control_location/register_control_to_location.xsl
2012-06-12 06:54:44 UTC (rev 9552)
@@ -32,45 +32,7 @@
</div>
</xsl:template>
-<xsl:template match="control_filters" name="control_filters"
xmlns:php="http://php.net/xsl">
-
- <div id="choose_control">
- <!--
- When control area is chosen, an ajax request is
executed.
- The operation fetches controls from db and populates
the control list.
- The ajax opearation is handled in ajax.js
- -->
- <div class="error_msg">Du må velge kontroll før du kan legge
til bygg</div>
- <select id="control_area_list" name="control_area_id">
- <option value="">Velg kontrollområde</option>
- <xsl:for-each select="control_areas_array">
- <option value="{id}">
- <xsl:value-of
disable-output-escaping="yes" select="name"/>
- </option>
- </xsl:for-each>
- </select>
-
- <form id="loc_form" action="" method="GET">
- <select id="control_id" name="control_id">
- <xsl:choose>
- <xsl:when
test="control_array/child::node()">
- <xsl:for-each
select="control_array">
- <xsl:variable
name="control_id"><xsl:value-of select="id"/></xsl:variable>
- <option
value="{$control_id}">
- <xsl:value-of
select="title"/>
- </option>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <option>
- Ingen kontroller
- </option>
- </xsl:otherwise>
- </xsl:choose>
- </select>
- </form>
- </div>
-</xsl:template>
+<xsl:template match="control_filters" name="control_filters"
xmlns:php="http://php.net/xsl"></xsl:template>
<xsl:template match="filter_form" xmlns:php="http://php.net/xsl">
Modified:
branches/Version-1_0-branch/controller/templates/base/control_location/view_locations_for_control.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/control_location/view_locations_for_control.xsl
2012-06-12 06:41:29 UTC (rev 9551)
+++
branches/Version-1_0-branch/controller/templates/base/control_location/view_locations_for_control.xsl
2012-06-12 06:54:44 UTC (rev 9552)
@@ -22,43 +22,8 @@
<xsl:call-template name="common"/>
<div class="yui-content">
- <div id="control_details">
- <div id="choose_control">
-
- <!-- When control area is chosen, an ajax
request is executed.
- The operation fetches controls from db
and populates the control list.
- The ajax operation is handled in
ajax.js
- -->
- <select id="control_area_list"
name="control_area_list">
- <option value="">Velg
kontrollområde</option>
- <xsl:for-each
select="control_areas_array">
- <option value="{id}">
- <xsl:value-of
disable-output-escaping="yes" select="name"/>
- </option>
- </xsl:for-each>
- </select>
-
- <form id="loc_form" action="" method="GET">
- <select id="control_id"
name="control_id">
- <xsl:choose>
- <xsl:when
test="control_array/child::node()">
- <xsl:for-each
select="control_array">
-
<xsl:variable name="control_id"><xsl:value-of select="id"/></xsl:variable>
- <option
value="{$control_id}">
-
<xsl:value-of select="title"/>
-
</option>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <option>
- Ingen
kontroller
- </option>
- </xsl:otherwise>
- </xsl:choose>
- </select>
- </form>
- </div>
-
+ <div id="control_location">
+
<div id="addedProperties">
<ul id="locations_for_control"
name="locations_for_control">
<xsl:for-each
select="locations_for_control">
Modified: branches/Version-1_0-branch/controller/templates/base/css/base.css
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/css/base.css
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/controller/templates/base/css/base.css
2012-06-12 06:54:44 UTC (rev 9552)
@@ -169,10 +169,8 @@
}
#toolbar {
- width: 100%;
- background-color: #eee;
- border: 1px solid #bbb;
- margin-bottom: 0em;
+ background-color: #DEEAF8;
+ border: 1px solid #C7D8EB;
padding: 10px 30px;
}
@@ -298,55 +296,58 @@
}
dl.controller-description {
- width: 70%;
+ width: 70%;
}
+
dl.controller-description dt, dl.controller-description-edit {
- width: 100%;
- float:left;
- font-weight:bold;
+ width: 100%;
+ float:left;
+ font-weight:bold;
}
+
dl.controller-description dd {
- width: 100%;
- border: 1px solid #ccc;
- float: left;
- background-color: white;
- height: 100px;
- overflow-y: scroll;
+ width: 100%;
+ border: 1px solid #ccc;
+ float: left;
+ background-color: white;
+ height: 100px;
+ overflow-y: scroll;
}
+
dl.controller-description-edit textarea {
- width: 100%;
- height: 100px;
- border: 1px solid #ccc;
- float: left;
+ width: 100%;
+ height: 100px;
+ border: 1px solid #ccc;
+ float: left;
}
input#place {
- width:60%;
+ width:60%;
}
input#address_1 {
- width: 60%;
- float:left;
+ width: 60%;
+ float:left;
}
input#house_number {
- width: 20%;
- float: left;
+ width: 20%;
+ float: left;
}
input.postcode {
- width: 50px;
- float: left;
+ width: 50px;
+ float: left;
}
.yui-navset {
- clear: both;
- margin-left: 2em;
- margin-right: 2em;
+ clear: both;
+ margin-left: 2em;
+ margin-right: 2em;
}
-h1 img, li img {
- vertical-align: middle;
+h1 img, li img {
+ vertical-align: middle;
}
/* Set up common form styles. TODO: needs refinement. */
@@ -357,85 +358,101 @@
/* ========================================== SELECTORS, IDS AND CLASSES
=========================================== */
input{
- margin: 0 13px 0 0;
- padding: 3px 6px;
+ margin: 0 13px 0 0;
+ padding: 3px 6px;
}
input[type="radio"] {
- margin: 0 5px 0 2px;
- padding: 3px 6px;
+ margin: 0 5px 0 2px;
+ padding: 3px 6px;
}
-input[type="submit"] {
- background: none repeat scroll 0 0 #4F9AEA;
- border: 1px solid #4685C8;
- border-radius: 4px 4px 4px 4px;
- color: #FFFFFF;
- cursor: pointer;
- margin-top: 20px;
- padding: 5px 20px;
+#innertoolbar-button, input[type="submit"] {
+ background: none repeat scroll 0 0 #4F9AEA;
+ border: 1px solid #4685C8;
+ border-radius: 4px 4px 4px 4px;
+ color: #FFFFFF;
+ cursor: pointer;
+ padding: 5px 20px;
}
+#innertoolbar-button {
+ font-size: 1em;
+ line-height: 1.2em;
+ min-height: 1.2em;
+ padding: 2px 15px;
+}
+
.row input[type="submit"] {
- padding: 2px 10px;
+ padding: 2px 10px;
}
select{
- padding: 3px 1px 3px 4px;
+ padding: 3px 1px 3px 4px;
}
fieldset {
- border-bottom:0px solid #ccc;
+ border-bottom:0px solid #ccc;
}
textarea{
- padding: 4px;
+ padding: 4px;
}
h1 em {
- font-style:italic;
+ font-style:italic;
}
a {
- color: #0066CC;
- text-decoration: none;
+ color: #0066CC;
+ text-decoration: none;
}
.info, .error, .warning {
- font-weight: normal;
- margin:20px;
- padding:5px;
- font-size:1.1em;
- text-align: left;
+ font-weight: normal;
+ margin:20px;
+ padding:5px;
+ font-size:1.1em;
+ text-align: left;
}
.message {
- margin: 5px;
+ margin: 5px;
}
.info {
- background-color:#CCFFCC;
- border:1px solid #00FF00;
- color:black;
+ background-color:#CCFFCC;
+ border:1px solid #00FF00;
+ color:black;
}
.warning {
- background-color: #FEEFB3;
- border:1px solid #9F6000;
- color:#9F6000;
+ background-color: #FEEFB3;
+ border:1px solid #9F6000;
+ color:#9F6000;
}
.yui-calendar td.calcell {
- border:0px !important;
+ border:0px !important;
}
.yui-skin-sam .yui-dt TABLE TH{
- border: none !important;
+ border: none !important;
}
-.yui-skin-sam .yui-dt TABLE TD{
- border: none !important;
+.yui-skin-sam .yui-dt TABLE TD{
+ border: none !important;
}
+.yui-skin-sam .yui-button .first-child {
+ border: 0;
+ margin:0;
+}
+.yui-skin-sam .yui-button {
+ background: none;
+ border:0;
+ margin: 0;
+}
+
.datatable_container {
margin-left: 1em;
margin-top: 1em;
@@ -497,7 +514,7 @@
padding: 10px;
}
-#control_item_details dl.proplist dt, dl.proplist-col dt {
+#control_item_details dl.proplist dt{
font-size: 1em;
font-weight: normal;
margin-bottom: 2em;
@@ -711,68 +728,64 @@
margin: 20px 0 0 20px;
}
-.yui-skin-sam .yui-button button, .yui-skin-sam .yui-button a, .yui-skin-sam
.yui-button a:visited {
- height: 24px;
-}
-
#toolbar {
padding: 10px;
}
#toolbar input[type="text"] {
- font-size: 100%;
- padding: 3px;
+ font-size: 100%;
+ padding: 3px;
}
#toolbar input[type="submit"] {
- padding:0 8px;
- margin-top:0;
+ padding:0 8px;
+ margin-top:0;
}
-#innertoolbar-button{
- color: #111111;
-}
-
.yui-button.yui-link-button.new_button{
- margin-left:30px;
+ margin-left:30px;
}
#view_check_lists {
- padding: 30px;
- width: 600px;
+ padding: 30px;
+ width: 600px;
}
ul.th {
- font-weight: bold;
- overflow:hidden;
+ font-weight: bold;
+ overflow:hidden;
}
ul.th li {
- float: left;
- margin-right: 20px;
- padding: 3px 6px;
- width: 100px;
+ float: left;
+ margin-right: 20px;
+ padding: 3px 6px;
+ width: 100px;
}
ul.row{
- overflow: hidden;
+ overflow: hidden;
}
ul.row li{
- float:left;
- margin-right: 20px;
- padding: 3px 6px;
- width: 100px;
+ float:left;
+ margin-right: 20px;
+ padding: 3px 6px;
+ width: 100px;
}
/* ======================================= GENERAL CLASSES
========================================= */
-.content_wrp {
- background: none repeat scroll 0 0 #EDF5FF;
- border: 1px solid #eee;
- margin-bottom: 20px;
- padding: 15px;
+.content-wrp {
+ background: none repeat scroll 0 0 #EDF5FF;
+ border: 1px solid #eee;
+ margin-bottom: 20px;
+ padding: 15px;
}
+.content-wrp .yui-skin-sam .yui-dt table {
+ border: 1px solid #CCCCCC;
+}
+
.box {
background: none repeat scroll 0 0 #EDF5FF;
border: 1px solid #eee;
@@ -855,6 +868,13 @@
margin-top:0;
}
+.content-wrp{
+ background: none repeat scroll 0 0 #EDF5FF;
+ border: 1px solid #DBE5EF;
+ margin-top: 1em;
+ padding: 1em;
+}
+
/* ======================================= CHECK LIST DETAILS
========================================= */
input.id {
@@ -1126,7 +1146,8 @@
}
#calendar {
- width: 100%
+ table-layout: fixed;
+ width: 100%;
}
#calendar th {
@@ -1498,13 +1519,6 @@
margin:10px 0;
}
-#create_message_dialog{
- display:none;
- position:absolute;
- width: 600px;
- z-index: 2;
- background:#aaa;
-}
#curtain {
background: none repeat scroll 0 0 #000000;
display: none;
@@ -1771,6 +1785,10 @@
width: 100px;
}
+#control_details .date {
+ margin-right:0;
+}
+
#control_details #select_all{
margin-left: 660px;
}
@@ -1783,9 +1801,13 @@
.help_text {
background: none repeat scroll 0 0 #CCDBED;
display: none;
+ margin-left: 5px;
padding: 6px 10px;
vertical-align: baseline;
}
+.help_text.ext {
+ margin-left: 0;
+}
#repeat_interval{
width: 20px;
@@ -1848,7 +1870,7 @@
width: 25%;
}
-#queryForm{
+#control_location #queryForm{
margin: 20px;
width: 65%;
}
Modified: branches/Version-1_0-branch/controller/templates/base/datatable.xsl
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/datatable.xsl
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/controller/templates/base/datatable.xsl
2012-06-12 06:54:44 UTC (rev 9552)
@@ -16,7 +16,7 @@
</func:result>
</func:function>
-<xsl:template match="data">
+<xsl:template name="datatable">
<iframe id="yui-history-iframe"
src="phpgwapi/js/yahoo/history/assets/blank.html"></iframe>
<input id="yui-history-field" type="hidden"/>
<xsl:call-template name="yui_booking_i18n"/>
Copied:
branches/Version-1_0-branch/controller/templates/base/procedure/procedures_datatable.xsl
(from rev 9551,
trunk/controller/templates/base/procedure/procedures_datatable.xsl)
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/procedure/procedures_datatable.xsl
(rev 0)
+++
branches/Version-1_0-branch/controller/templates/base/procedure/procedures_datatable.xsl
2012-06-12 06:54:44 UTC (rev 9552)
@@ -0,0 +1,13 @@
+<!-- $Id: view_locations_for_control.xsl 9485 2012-06-04 08:39:52Z vator $ -->
+
+<xsl:template match="data" xmlns:php="http://php.net/xsl">
+
+<div id="main_content">
+
+ <h1>Prosedyrer</h1>
+
+ <div id="control_items" class="content-wrp">
+ <xsl:call-template name="datatable" />
+ </div>
+</div>
+</xsl:template>
Modified: branches/Version-1_0-branch/frontend/inc/class.bofellesdata.inc.php
===================================================================
--- branches/Version-1_0-branch/frontend/inc/class.bofellesdata.inc.php
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/frontend/inc/class.bofellesdata.inc.php
2012-06-12 06:54:44 UTC (rev 9552)
@@ -60,16 +60,32 @@
$sql = "SELECT $columns FROM $table WHERE
V_ORG_ENHET.ORG_ENHET_ID IN ($unit_ids_string) AND V_ORG_ENHET.ORG_NIVAA = 4";
+ if($db->Type == 'postgres')
+ {
+ $sql = strtolower($sql);
+ }
$db->query($sql,__LINE__,__FILE__);
while ($db->next_record())
{
- $result_units[] = array(
- "ORG_UNIT_ID" =>
(int)$db->f('ORG_ENHET_ID'),
- "ORG_NAME" => $db->f('ORG_NAVN'),
- "UNIT_ID" => $db->f('RESULTATENHET'),
- "LEADER" => false
- );
+ if($db->Type == 'postgres')
+ {
+ $result_units[] = array(
+ "ORG_UNIT_ID" =>
(int)$db->f('org_enhet_id'),
+ "ORG_NAME" => $db->f('org_navn'),
+ "UNIT_ID" => $db->f('resultatenhet'),
+ "LEADER" => false
+ );
+ }
+ else
+ {
+ $result_units[] = array(
+ "ORG_UNIT_ID" =>
(int)$db->f('ORG_ENHET_ID'),
+ "ORG_NAME" => $db->f('ORG_NAVN'),
+ "UNIT_ID" => $db->f('RESULTATENHET'),
+ "LEADER" => false
+ );
+ }
}
return $result_units;
@@ -101,16 +117,32 @@
$db = $this->get_db();
$db1 = $this->get_db();
+ //var_dump($db->Type);
+ if($db->Type == "postgres")
+ {
+ $sql = strtolower($sql);
+ }
+ //var_dump($sql);
$db->query($sql,__LINE__,__FILE__);
while ($db->next_record())
{
- $identifier = (int)$db->f('ORG_ENHET_ID');
- $level = (int)$db->f('ORG_NIVAA','int');
- $name = $db->f('ORG_NAVN');
- $unit_id = $db->f('RESULTATENHET');
+ if($db->Type == "postgres")
+ {
+ $identifier = (int)$db->f('org_enhet_id');
+ $level = (int)$db->f('org_nivaa','int');
+ $name = $db->f('org_navn');
+ $unit_id = $db->f('resultatenhet');
+ }
+ else
+ {
+ $identifier = (int)$db->f('ORG_ENHET_ID');
+ $level = (int)$db->f('ORG_NIVAA','int');
+ $name = $db->f('ORG_NAVN');
+ $unit_id = $db->f('RESULTATENHET');
+ }
switch($level)
{
@@ -122,20 +154,41 @@
$joins = "LEFT JOIN
V_ORG_KNYTNING ON (V_ORG_KNYTNING.ORG_ENHET_ID = V_ORG_ENHET.ORG_ENHET_ID)";
$sql = "SELECT $columns FROM
$tables $joins WHERE V_ORG_ENHET.ORG_NIVAA = 4 AND
V_ORG_KNYTNING.ORG_ENHET_ID_KNYTNING = {$identifier}";
+ if($db1->Type == "postgres")
+ {
+ $sql = strtolower($sql);
+ }
$db1->query($sql,__LINE__,__FILE__);
while ($db1->next_record())
{
-
if(!isset($org_unit_ids[(int)$db1->f('ORG_ENHET_ID')]))
- {
- $result_units[]
= array(
-
"ORG_UNIT_ID" => (int)$db1->f('ORG_ENHET_ID'),
-
"ORG_NAME" => $db1->f('ORG_NAVN'),
-
"UNIT_ID" => $db1->f('RESULTATENHET'),
-
"LEADER" => true
- );
-
-
$org_unit_ids[(int)$db1->f('ORG_ENHET_ID')] = true;
- }
+ if($db1->Type == "postgres")
+ {
+
if(!isset($org_unit_ids[(int)$db1->f('org_enhet_id')]))
+ {
+ $result_units[]
= array(
+
"ORG_UNIT_ID" => (int)$db1->f('org_enhet_id'),
+
"ORG_NAME" => $db1->f('org_navn'),
+
"UNIT_ID" => $db1->f('resultatenhet'),
+
"LEADER" => true
+ );
+
+
$org_unit_ids[(int)$db1->f('org_enhet_id')] = true;
+ }
+ }
+ else
+ {
+
if(!isset($org_unit_ids[(int)$db1->f('ORG_ENHET_ID')]))
+ {
+ $result_units[]
= array(
+
"ORG_UNIT_ID" => (int)$db1->f('ORG_ENHET_ID'),
+
"ORG_NAME" => $db1->f('ORG_NAVN'),
+
"UNIT_ID" => $db1->f('RESULTATENHET'),
+
"LEADER" => true
+ );
+
+
$org_unit_ids[(int)$db1->f('ORG_ENHET_ID')] = true;
+ }
+ }
}
break;
case 3: break; // LEVEL: Seksjon (not
in use)
@@ -184,11 +237,22 @@
{
$sql = "SELECT V_ORG_ENHET.ORG_NAVN FROM V_ORG_ENHET
WHERE V_ORG_ENHET.RESULTATENHET = $number";
$db = $this->get_db();
+ if($db->Type == "postgres")
+ {
+ $sql = strtolower($sql);
+ }
$db->query($sql,__LINE__,__FILE__);
if($db->num_rows() > 0)
{
$db->next_record();
- return $db->f('ORG_NAVN', true);
+ if($db->Type == "postgres")
+ {
+ return $db->f('org_navn', true);
+ }
+ else
+ {
+ return $db->f('ORG_NAVN', true);
+ }
}
}
else
@@ -206,13 +270,26 @@
{
$sql = "SELECT V_ORG_ENHET.ORG_NAVN,
V_ORG_ENHET.RESULTATENHET FROM V_ORG_ENHET WHERE V_ORG_ENHET.ORG_ENHET_ID =
$number";
$db = $this->get_db();
+ if($db->Type == "postgres")
+ {
+ $sql = strtolower($sql);
+ }
$db->query($sql,__LINE__,__FILE__);
if($db->num_rows() > 0)
{
$db->next_record();
- return array( 'UNIT_NAME' =>
$db->f('ORG_NAVN', true),
- 'UNIT_NUMBER'
=> $db->f('RESULTATENHET', true)
- );
+ if($db->Type == "postgres")
+ {
+ return array( 'UNIT_NAME' =>
$db->f('org_navn', true),
+ 'UNIT_NUMBER'
=> $db->f('resultatenhet', true)
+ );
+ }
+ else
+ {
+ return array( 'UNIT_NAME' =>
$db->f('ORG_NAVN', true),
+ 'UNIT_NUMBER'
=> $db->f('RESULTATENHET', true)
+ );
+ }
}
}
else
@@ -233,16 +310,32 @@
$sql = "SELECT BRUKERNAVN, FORNAVN, ETTERNAVN, EPOST FROM
V_AD_BRUKERE WHERE BRUKERNAVN = '{$username}'";
$db = $this->get_db();
+ if($db->Type == "postgres")
+ {
+ $sql = strtolower($sql);
+ }
$db->query($sql,__LINE__,__FILE__);
if($db->num_rows() > 0)
{
$db->next_record();
- return array(
- 'username' => $db->f('BRUKERNAVN', true),
- 'firstname' => $db->f('FORNAVN', true),
- 'lastname' => $db->f('ETTERNAVN', true),
- 'email' => $db->f('EPOST', true)
- );
+ if($db->Type == "postgres")
+ {
+ return array(
+ 'username' => $db->f('brukernavn',
true),
+ 'firstname' => $db->f('fornavn',
true),
+ 'lastname' => $db->f('etternavn',
true),
+ 'email' => $db->f('epost', true)
+ );
+ }
+ else
+ {
+ return array(
+ 'username' => $db->f('BRUKERNAVN',
true),
+ 'firstname' => $db->f('FORNAVN',
true),
+ 'lastname' => $db->f('ETTERNAVN',
true),
+ 'email' => $db->f('EPOST', true)
+ );
+ }
}
else
{
Modified: branches/Version-1_0-branch/phpgwapi/inc/class.custom_fields.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.custom_fields.inc.php
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.custom_fields.inc.php
2012-06-12 06:54:44 UTC (rev 9552)
@@ -276,7 +276,8 @@
'get_list_function' =>
$attrib['get_list_function'],
'get_list_function_input' =>
$attrib['get_list_function_input'] ?
$this->_db->db_addslashes(serialize($attrib['get_list_function_input'])) : '',
'get_single_function' =>
$attrib['get_single_function'],
- 'get_single_function_input' =>
$attrib['get_single_function_input'] ?
$this->_db->db_addslashes(serialize($attrib['get_single_function_input'])) : ''
+ 'get_single_function_input' =>
$attrib['get_single_function_input'] ?
$this->_db->db_addslashes(serialize($attrib['get_single_function_input'])) : '',
+ 'short_description' =>
isset($attrib['short_description']) && $attrib['short_description'] ? (int)
$attrib['short_description'] : false
);
if ( isset($attrib['search']) )
@@ -730,7 +731,8 @@
'get_list_function' =>
$attrib['get_list_function'],
'get_list_function_input' =>
$attrib['get_list_function_input'] ?
$this->_db->db_addslashes(serialize($attrib['get_list_function_input'])) : '',
'get_single_function' =>
$attrib['get_single_function'],
- 'get_single_function_input' =>
$attrib['get_single_function_input'] ?
$this->_db->db_addslashes(serialize($attrib['get_single_function_input'])) : ''
+ 'get_single_function_input' =>
$attrib['get_single_function_input'] ?
$this->_db->db_addslashes(serialize($attrib['get_single_function_input'])) : '',
+ 'short_description'
=> isset($attrib['short_description']) && $attrib['short_description'] ? (int)
$attrib['short_description'] : false
);
if($OldGroup != $attrib['group_id'])
@@ -1045,6 +1047,7 @@
'get_list_function_input' =>
$this->_db->f('get_list_function_input') ?
unserialize($this->_db->f('get_list_function_input', true)) : '',
'get_single_function' =>
$this->_db->f('get_single_function'),
'get_single_function_input' =>
$this->_db->f('get_single_function_input') ?
unserialize($this->_db->f('get_single_function_input', true)) : '',
+ 'short_description'
=> $this->_db->f('short_description')
);
}
@@ -1229,16 +1232,16 @@
'get_list_function_input' =>
$this->_db->f('get_list_function_input') ?
unserialize($this->_db->f('get_list_function_input', true)) : '',
'get_single_function'
=>$this->_db->f('get_single_function',true),
'get_single_function_input' =>
$this->_db->f('get_single_function_input') ?
unserialize($this->_db->f('get_single_function_input', true)) : '',
-
- 'column_info' => array
-
(
-
'precision' => $this->_db->f('precision_'),
-
'scale' => $this->_db->f('scale'),
-
'default' => $this->_db->f('default_value', true),
-
// more duplicated values
-
'nullable' => $this->_db->f('nullable'),
-
'type' => $this->_db->f('datatype')
-
)
+ 'short_description' =>
$this->_db->f('short_description'),
+ 'column_info' => array
+
(
+
'precision' => $this->_db->f('precision_'),
+
'scale' => $this->_db->f('scale'),
+
'default' => $this->_db->f('default_value', true),
+
// more duplicated values
+
'nullable' => $this->_db->f('nullable'),
+
'type' => $this->_db->f('datatype')
+
)
);
if ( $inc_choices )
Modified: branches/Version-1_0-branch/phpgwapi/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/setup/setup.inc.php 2012-06-12
06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/phpgwapi/setup/setup.inc.php 2012-06-12
06:54:44 UTC (rev 9552)
@@ -12,7 +12,7 @@
// Basic information about this app
$setup_info['phpgwapi']['name'] = 'phpgwapi';
$setup_info['phpgwapi']['title'] = 'phpgwapi';
- $setup_info['phpgwapi']['version'] = '0.9.17.539';
+ $setup_info['phpgwapi']['version'] = '0.9.17.540';
$setup_info['phpgwapi']['versions']['current_header'] = '1.31';
$setup_info['phpgwapi']['versions']['system'] = '1.0';
$setup_info['phpgwapi']['enable'] = 3;
Modified: branches/Version-1_0-branch/phpgwapi/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/setup/tables_current.inc.php
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/phpgwapi/setup/tables_current.inc.php
2012-06-12 06:54:44 UTC (rev 9552)
@@ -582,7 +582,8 @@
'get_list_function' => array('type' =>
'varchar','precision' => 255,'nullable' => true),
'get_list_function_input' => array('type' =>
'varchar','precision' => 255,'nullable' => true),
'get_single_function' => array('type' =>
'varchar','precision' => 255,'nullable' => true),
- 'get_single_function_input' => array('type' =>
'varchar','precision' => 255,'nullable' => true)
+ 'get_single_function_input' => array('type' =>
'varchar','precision' => 255,'nullable' => true),
+ 'short_description' => array('type' =>
'int','precision' => 2,'nullable' => true)
),
'pk' => array('location_id', 'id'),
'fk' => array(),
Modified: branches/Version-1_0-branch/phpgwapi/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/setup/tables_update.inc.php
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/phpgwapi/setup/tables_update.inc.php
2012-06-12 06:54:44 UTC (rev 9552)
@@ -3071,3 +3071,27 @@
}
}
+ $test[] = '0.9.17.539';
+ /**
+ * Add custom attibute type that allows attribute used as part of short
description
+ *
+ * @return string the new version number
+ */
+ function phpgwapi_upgrade0_9_17_539()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_cust_attribute','short_description',
array(
+ 'type' => 'int',
+ 'precision' => 2,
+ 'nullable' => true
+ ));
+
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['phpgwapi']['currentver'] =
'0.9.17.540';
+ return $GLOBALS['setup_info']['phpgwapi']['currentver'];
+ }
+ }
+
+
Modified: branches/Version-1_0-branch/property/inc/class.uiadmin_entity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiadmin_entity.inc.php
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/property/inc/class.uiadmin_entity.inc.php
2012-06-12 06:54:44 UTC (rev 9552)
@@ -1847,6 +1847,8 @@
$uicols['descr'][7] = lang('Search');
$uicols['name'][8] = 'id';
$uicols['descr'][8] = lang('id');
+ $uicols['name'][9] = 'short_description';
+ $uicols['descr'][9] = lang('short description');
$j = 0;
$count_uicols_name = count($uicols['name']);
@@ -2417,7 +2419,8 @@
'value_get_list_function'
=> $values['get_list_function'],
'value_get_list_function_input' =>
print_r($values['get_list_function_input'],true),
'value_get_single_function'
=> $values['get_single_function'],
- 'value_get_single_function_input' =>
print_r($values['get_single_function_input'],true)
+ 'value_get_single_function_input' =>
print_r($values['get_single_function_input'],true),
+ 'value_short_description'
=> $values['short_description']
);
$appname = lang('entity');
Modified: branches/Version-1_0-branch/property/templates/base/admin_entity.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/admin_entity.xsl
2012-06-12 06:41:29 UTC (rev 9551)
+++ branches/Version-1_0-branch/property/templates/base/admin_entity.xsl
2012-06-12 06:54:44 UTC (rev 9552)
@@ -1584,8 +1584,22 @@
</input>
</td>
</tr>
+
<tr>
<td valign="top">
+ <xsl:value-of
select="php:function('lang', 'short description')"/>
+ </td>
+ <td>
+ <input type="text"
name="values[short_description]" value="{value_short_description}" size = "2"
maxlength= "2">
+ <xsl:attribute
name="title">
+
<xsl:value-of select="php:function('lang', 'optional order of field in a short
description')"/>
+ </xsl:attribute>
+ </input>
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top">
<xsl:value-of
select="php:function('lang', 'help message')"/>
</td>
<td>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9552] Merge 9540:9551 from trunk,
Sigurd Nes <=