[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8918] Merge 8912:8916 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [8918] Merge 8912:8916 from trunk |
Date: |
Fri, 17 Feb 2012 10:19:39 +0000 |
Revision: 8918
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8918
Author: sigurdne
Date: 2012-02-17 10:19:39 +0000 (Fri, 17 Feb 2012)
Log Message:
-----------
Merge 8912:8916 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php
branches/Version-1_0-branch/controller/inc/class.soprocedure.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/js/controller/ajax.js
branches/Version-1_0-branch/controller/templates/base/control/control.xsl
branches/Version-1_0-branch/controller/templates/base/control_group/control_group.xsl
branches/Version-1_0-branch/controller/templates/base/control_item/control_item.xsl
branches/Version-1_0-branch/controller/templates/base/css/base.css
branches/Version-1_0-branch/property/inc/class.soproject.inc.php
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
+
/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-8916
Modified:
branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php
2012-02-17 10:19:19 UTC (rev 8917)
+++ branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php
2012-02-17 10:19:39 UTC (rev 8918)
@@ -379,6 +379,27 @@
}
}
+ function get_control_areas_by_control_group($control_group_id)
+ {
+ $sql = "SELECT control_area_id FROM
controller_control_group WHERE control_group_id=$control_group_id";
+ $this->db->query($sql);
+
+ while($this->db->next_record()) {
+ $control_area =
$this->unmarshal($this->db->f('control_area_id'), 'int');
+ $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id', 'int')));
+
+ $control_area_array[] = array($control_area =>
$category[0]['name']);
+ }
+
+ if( count( $control_area_array ) > 0 ){
+ return $control_area_array;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
public function get_control_group_component($noOfObjects =
null, $bim_type = null)
{
$filters = array();
@@ -448,4 +469,16 @@
return $results;
}
+
+ function get_all_control_groups_array()
+ {
+ $results = array();
+ $this->db->query("SELECT id, group_name FROM
controller_control_group ORDER BY group_name ASC", __LINE__, __FILE__);
+ while ($this->db->next_record())
+ {
+ $results[] = array('id' =>
$this->db->f('id', false),
+
'group_name' => $this->db->f('group_name', false));
+ }
+ return $results;
+ }
}
Modified: branches/Version-1_0-branch/controller/inc/class.soprocedure.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.soprocedure.inc.php
2012-02-17 10:19:19 UTC (rev 8917)
+++ branches/Version-1_0-branch/controller/inc/class.soprocedure.inc.php
2012-02-17 10:19:39 UTC (rev 8918)
@@ -255,7 +255,7 @@
{
$results = array();
- $sql = "SELECT * FROM controller_procedure WHERE
control_area_id=$control_area_id";
+ $sql = "SELECT * FROM controller_procedure WHERE
control_area_id={$control_area_id} AND end_date IS NULL ORDER BY title ASC";
$this->db->query($sql);
while($this->db->next_record()) {
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-02-17 10:19:19 UTC (rev 8917)
+++ branches/Version-1_0-branch/controller/inc/class.uicontrol_group.inc.php
2012-02-17 10:19:39 UTC (rev 8918)
@@ -100,32 +100,6 @@
'form' => array(
'toolbar' => array(
'item' => array(
- array('type' =>
'filter',
- 'name' =>
'status',
- 'text' =>
lang('Status').':',
- 'list' => array(
- array(
-
'id' => 'none',
-
'name' => lang('Not selected')
- ),
- array(
-
'id' => 'NEW',
-
'name' => lang('NEW')
- ),
- array(
-
'id' => 'PENDING',
-
'name' => lang('PENDING')
- ),
- array(
-
'id' => 'REJECTED',
-
'name' => lang('REJECTED')
- ),
- array(
-
'id' => 'ACCEPTED',
-
'name' => lang('ACCEPTED')
- )
- )
- ),
array('type' =>
'filter',
'name' =>
'control_areas',
'text' =>
lang('Control_area'),
@@ -299,6 +273,7 @@
$cats->supress_info = true;
$control_areas =
$cats->formatted_xslt_list(array('format'=>'filter','globals' => true,'use_acl'
=> $this->_category_acl));
+ array_unshift($control_areas['cat_list'],array
('cat_id'=>'','name'=> lang('select value')));
$control_area_array = array();
foreach($control_areas['cat_list'] as $cat_list)
@@ -312,9 +287,8 @@
// END as categories
//$control_area_array =
$this->so_control_area->get_control_area_array();
- $procedure_array =
$this->so_procedure->get_procedures();
+ $procedure_array =
$this->so_procedure->get_procedures(null,null,'title','ASC',null,null,null);
-
if($this->flash_msgs)
{
$msgbox_data =
$GLOBALS['phpgw']->common->msgbox_data($this->flash_msgs);
@@ -362,6 +336,7 @@
);
}
}
+ array_unshift($procedure_options,array
('id'=>'','name'=> lang('select value')));
$building_part_options =
$this->so->get_building_part_select_array($control_group->get_building_part_id());
@@ -403,6 +378,9 @@
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('controller') . '::' . lang('Control_group');
self::add_javascript('controller', 'yahoo',
'control_tabs.js');
+ 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(array('control_group/control_group_tabs','control_group/control_group','control_group/control_group_items'),
$data);
}
else if(isset($_POST['save_control_group_items']))
@@ -432,6 +410,7 @@
$cats->supress_info = true;
$control_areas =
$cats->formatted_xslt_list(array('format'=>'filter','globals' => true,'use_acl'
=> $this->_category_acl));
+ array_unshift($control_areas['cat_list'],array
('cat_id'=>'','name'=> lang('select value')));
$control_area_array = array();
foreach($control_areas['cat_list'] as $cat_list)
@@ -445,9 +424,8 @@
// END as categories
//$control_area_array =
$this->so_control_area->get_control_area_array();
- $procedure_array =
$this->so_procedure->get_procedures();
+ $procedure_array =
$this->so_procedure->get_procedures(null,null,'title','ASC',null,null,null);
-
if($this->flash_msgs)
{
$msgbox_data =
$GLOBALS['phpgw']->common->msgbox_data($this->flash_msgs);
@@ -495,6 +473,7 @@
);
}
}
+ array_unshift($procedure_options,array
('id'=>'','name'=> lang('select value')));
$building_part_options =
$this->so->get_building_part_select_array($control_group->get_building_part_id());
@@ -544,6 +523,9 @@
// $GLOBALS['phpgw']->js->validate_file( 'yahoo',
'controller.item', 'controller' );
self::add_javascript('controller', 'yahoo',
'control_tabs.js');
+ 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(array('control_group/control_group_tabs','control_group/control_group','control_group/control_group_items'),
$data);
}
}
@@ -713,13 +695,46 @@
public function get_control_groups_by_control_area()
{
$control_area_id = phpgw::get_var('control_area_id');
+ if($control_area_id == "all")
+ {
+ //get all control groups
+ $control_groups_array =
$this->so->get_all_control_groups_array();
+ }
+ else
+ $control_groups_array =
$this->so->get_control_groups_by_control_area($control_area_id);
- $control_groups_array =
$this->so->get_control_groups_by_control_area($control_area_id);
-
if(count($control_groups_array)>0)
return json_encode( $control_groups_array );
else
return null;
}
+
+ public function get_control_area_by_control_group()
+ {
+ $control_group_id = phpgw::get_var('control_group_id');
+ if($control_group_id)
+ {
+ $control_areas =
$cats->formatted_xslt_list(array('format'=>'filter','globals' => true,'use_acl'
=> $this->_category_acl));
+
+ $control_area_array = array();
+ foreach($control_areas['cat_list'] as $cat_list)
+ {
+ $control_area_array[] = array
+ (
+ 'id' => $cat_list['cat_id'],
+ 'name' => $cat_list['name'],
+ );
+ }
+ }
+ else
+ {
+ $control_areas_array =
$this->so->get_control_areas_by_control_group($control_group_id);
+ }
+
+ if(count($control_areas_array)>0)
+ return json_encode( $control_areas_array );
+ else
+ return null;
+ }
}
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-02-17 10:19:19 UTC (rev 8917)
+++ branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php
2012-02-17 10:19:39 UTC (rev 8918)
@@ -94,32 +94,6 @@
'form' => array(
'toolbar' => array(
'item' => array(
- array('type' =>
'filter',
- 'name' =>
'status',
- 'text' =>
lang('Status').':',
- 'list' => array(
- array(
-
'id' => 'none',
-
'name' => lang('Not selected')
- ),
- array(
-
'id' => 'NEW',
-
'name' => lang('NEW')
- ),
- array(
-
'id' => 'PENDING',
-
'name' => lang('PENDING')
- ),
- array(
-
'id' => 'REJECTED',
-
'name' => lang('REJECTED')
- ),
- array(
-
'id' => 'ACCEPTED',
-
'name' => lang('ACCEPTED')
- )
- )
- ),
array('type' =>
'filter',
'name' =>
'control_groups',
'text' =>
lang('Control_group').':',
@@ -141,11 +115,6 @@
),
array(
'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 item'),
'href' =>
self::link(array('menuaction' => 'controller.uicontrol_item.add')),
'class' =>
'new_item'
@@ -319,6 +288,7 @@
$cats->supress_info = true;
$control_areas =
$cats->formatted_xslt_list(array('format'=>'filter','globals' => true,'use_acl'
=> $this->_category_acl));
+ array_unshift($control_areas['cat_list'],array
('cat_id'=>'','name'=> lang('select value')));
$control_area_array = array();
foreach($control_areas['cat_list'] as $cat_list)
@@ -374,9 +344,14 @@
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('controller') . '::' . lang('Control_item');
-
$GLOBALS['phpgw']->richtext->replace_element('what_to_do');
+
/*$GLOBALS['phpgw']->richtext->replace_element('what_to_do');
$GLOBALS['phpgw']->richtext->replace_element('how_to_do');
- $GLOBALS['phpgw']->richtext->generate_script();
+
$GLOBALS['phpgw']->richtext->generate_script();*/
+
$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');
self::render_template_xsl('control_item/control_item', $data);
}
Modified: branches/Version-1_0-branch/controller/js/controller/ajax.js
===================================================================
--- branches/Version-1_0-branch/controller/js/controller/ajax.js
2012-02-17 10:19:19 UTC (rev 8917)
+++ branches/Version-1_0-branch/controller/js/controller/ajax.js
2012-02-17 10:19:39 UTC (rev 8918)
@@ -157,8 +157,77 @@
});
});
+
+ // When control area is selected, controls are fetched from db and
control select list is populated
+ $("#control_area").change(function () {
+ var control_area_id = $(this).val();
+ if(control_area_id == '')
+ control_area_id = "all";
+
+ var oArgs =
{menuaction:'controller.uicontrol_group.get_control_groups_by_control_area',
phpgw_return_as:'json'};
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+ //var requestUrl =
"index.php?menuaction=controller.uicontrol_group.get_control_groups_by_control_area&phpgw_return_as=json"
+
+ var htmlString = "";
+
+ $.ajax({
+ type: 'POST',
+ dataType: 'json',
+ url: requestUrl + "&control_area_id=" +
control_area_id,
+ success: function(data) {
+ if( data != null){
+ htmlString = "<option>Velg
kontrollgruppe</option>"
+ var obj = jQuery.parseJSON(data);
+
+ $.each(obj, function(i) {
+ htmlString += "<option
value='" + obj[i].id + "'>" + obj[i].group_name + "</option>";
+ });
+
+ $("#control_group").html( htmlString
);
+ }else {
+ htmlString += "<option>Ingen
kontrollgrupper</option>"
+ $("#control_group").html( htmlString );
+ }
+ }
+ });
+
+ });
+ // When control area is selected, controls are fetched from db and
control select list is populated
+/* $("#control_group").change(function () {
+ var control_group_id = $(this).val();
+ var oArgs =
{menuaction:'controller.uicontrol_group.get_control_area_by_control_group',
phpgw_return_as:'json'};
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+
+ //var requestUrl =
"index.php?menuaction=controller.uicontrol_group.get_control_groups_by_control_area&phpgw_return_as=json"
+
+ var htmlString = "";
+
+ $.ajax({
+ type: 'POST',
+ dataType: 'json',
+ url: requestUrl + "&control_group_id=" +
control_group_id,
+ success: function(data) {
+ if( data != null){
+ htmlString = "<option>Ingen
kontrollområde</option>"
+ var obj = jQuery.parseJSON(data);
+
+ $.each(obj, function(i) {
+ htmlString += "<option
value='" + obj[i].id + "'>" + obj[i].group_name + "</option>";
+ });
+
+ $("#control_group_id").html(
htmlString );
+ }else {
+ htmlString += "<option>Ingen
kontrollområder</option>"
+ $("#control_group_id").html( htmlString
);
+ }
+ }
+ });
+
+ });
+*/
+
// file: add_component_to_control.xsl
// When component category is selected, corresponding component types
are fetched from db and component type select list is populated
$("#ifc").change(function () {
Modified:
branches/Version-1_0-branch/controller/templates/base/control/control.xsl
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/control/control.xsl
2012-02-17 10:19:19 UTC (rev 8917)
+++ branches/Version-1_0-branch/controller/templates/base/control/control.xsl
2012-02-17 10:19:39 UTC (rev 8918)
@@ -98,6 +98,7 @@
<xsl:choose>
<xsl:when test="editable">
<input class="required"
type="text" name="title" id="title" value="{control/title}" size="80"/>
+ <div
class="help_text">Legg til tittel på kontrollen</div>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="control/title" />
@@ -113,6 +114,7 @@
<xsl:attribute
name="value"><xsl:value-of select="php:function('date', $date_format,
number(control/start_date))"/></xsl:attribute>
</xsl:if>
</input>
+ <div class="help_text">Legg til startdato
for kontrollen</div>
</dd>
<dt>
<label for="end_date">Sluttdato</label>
@@ -123,6 +125,7 @@
<xsl:attribute
name="value"><xsl:value-of select="php:function('date', $date_format,
number(control/end_date))"/></xsl:attribute>
</xsl:if>
</input>
+ <div class="help_text">Legg til sluttdato
for kontrollen. Hvis kontrollen ikke har sluttdato, lar du feltet være
tomt</div>
</dd>
<dt>
<label>Frekvenstype</label>
@@ -145,6 +148,7 @@
</xsl:choose>
</xsl:for-each>
</select>
+ <div class="help_text">Angi hvilken
frekvenstype kontrollen skal ha</div>
</dd>
<dt>
<label>Frekvens</label>
@@ -153,6 +157,7 @@
<xsl:choose>
<xsl:when test="editable">
<input class="required"
style="width:20px;" size="2" type="text" name="repeat_interval"
value="{control/repeat_interval}" />
+ <div class="help_text">Angi
hvilket frekvensintervall kontrollen skal ha. Hvis du velger 2, betyr det at
kontrollen skal gjennomføres annenhver dag</div>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="control/repeat_interval" />
@@ -160,13 +165,12 @@
</xsl:choose>
</dd>
<dt>
- <label>Rolle</label>
+ <label>Tildelt rolle</label>
</dt>
<dd>
<xsl:choose>
<xsl:when test="editable">
<select class="required"
id="responsibility_id" name="responsibility_id">
- <option value="">Velg
rolle</option>
<xsl:for-each
select="role_array">
<xsl:choose>
<xsl:when test="id = $control_role">
@@ -182,6 +186,7 @@
</xsl:choose>
</xsl:for-each>
</select>
+ <div class="help_text">Angi
hvilken rolle som skal ha ansvar for å gjennomføre kontrollen på de ulike
byggene</div>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="control/role_name" />
Modified:
branches/Version-1_0-branch/controller/templates/base/control_group/control_group.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/control_group/control_group.xsl
2012-02-17 10:19:19 UTC (rev 8917)
+++
branches/Version-1_0-branch/controller/templates/base/control_group/control_group.xsl
2012-02-17 10:19:39 UTC (rev 8918)
@@ -22,7 +22,7 @@
<dd>
<xsl:choose>
<xsl:when test="editable">
- <input type="text"
name="group_name" id="group_name" value="{control_group/group_name}" />
+ <input type="text"
name="group_name" id="group_name" value="{control_group/group_name}" size="80"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="control_group/group_name"/>
@@ -35,7 +35,7 @@
<dd>
<xsl:choose>
<xsl:when test="editable">
- <select
id="control_area" name="control_area">
+ <select
id="control_area_id" name="control_area">
<xsl:apply-templates select="control_area/options"/>
</select>
</xsl:when>
@@ -50,7 +50,7 @@
<dd>
<xsl:choose>
<xsl:when test="editable">
- <select id="procedure"
name="procedure">
+ <select
id="procedure_id" name="procedure">
<xsl:apply-templates select="procedure/options"/>
</select>
</xsl:when>
Modified:
branches/Version-1_0-branch/controller/templates/base/control_item/control_item.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/control_item/control_item.xsl
2012-02-17 10:19:19 UTC (rev 8917)
+++
branches/Version-1_0-branch/controller/templates/base/control_item/control_item.xsl
2012-02-17 10:19:39 UTC (rev 8918)
@@ -30,7 +30,7 @@
<dd>
<xsl:choose>
<xsl:when test="editable">
- <input type="text"
name="title" id="title" value="{control_item/title}" />
+ <input type="text"
name="title" id="title" value="{control_item/title}" size="80"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="control_item/title"/>
@@ -120,33 +120,33 @@
</xsl:choose>
</dd>
<dt>
- <label
for="control_group">Kontrollgruppe</label>
+ <label
for="control_area">Kontrollområde</label>
</dt>
<dd>
<xsl:choose>
<xsl:when test="editable">
- <select
id="control_group" name="control_group">
- <option
value="0">Ingen valgt</option>
-
<xsl:apply-templates select="control_group/options"/>
+ <select
id="control_area" name="control_area">
+
<xsl:apply-templates select="control_area/options"/>
</select>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of
select="control_item/control_group_name" />
+ <xsl:value-of
select="control_item/control_area_name" />
</xsl:otherwise>
</xsl:choose>
</dd>
- <dt>
- <label
for="control_area">Kontrollområde</label>
+
<dt>
+ <label
for="control_group">Kontrollgruppe</label>
</dt>
<dd>
<xsl:choose>
<xsl:when test="editable">
- <select
id="control_area" name="control_area">
-
<xsl:apply-templates select="control_area/options"/>
+ <select
id="control_group" name="control_group">
+ <option
value="0">Ingen valgt</option>
+
<xsl:apply-templates select="control_group/options"/>
</select>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of
select="control_item/control_area_name" />
+ <xsl:value-of
select="control_item/control_group_name" />
</xsl:otherwise>
</xsl:choose>
</dd>
Modified: branches/Version-1_0-branch/controller/templates/base/css/base.css
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/css/base.css
2012-02-17 10:19:19 UTC (rev 8917)
+++ branches/Version-1_0-branch/controller/templates/base/css/base.css
2012-02-17 10:19:39 UTC (rev 8918)
@@ -1353,4 +1353,10 @@
#control_details #location_form{
margin-left: 20px;
margin-bottom: 20px;
+}
+
+.help_text {
+ background: none repeat scroll 0 0 #DDDDDD;
+ padding: 3px 6px;
+ display: none;
}
\ No newline at end of file
Modified: branches/Version-1_0-branch/property/inc/class.soproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soproject.inc.php
2012-02-17 10:19:19 UTC (rev 8917)
+++ branches/Version-1_0-branch/property/inc/class.soproject.inc.php
2012-02-17 10:19:39 UTC (rev 8918)
@@ -1346,7 +1346,7 @@
$config->read();
$tax = 1+(($config->config_data['fm_tax'])/100);
- $sql = "SELECT fm_workorder.id, EXTRACT(YEAR from
to_timestamp(start_date) ) as year, calculation, budget, contract_sum"
+ $sql = "SELECT fm_workorder.id, EXTRACT(YEAR from
to_timestamp(start_date) ) as year, sum(calculation) as calculation,
sum(budget) as budget, sum(contract_sum) as contract_sum"
. " FROM fm_workorder"
. " {$this->join} fm_workorder_status ON
fm_workorder.status = fm_workorder_status.id"
. " WHERE project_id = {$project_id} AND
(fm_workorder_status.closed IS NULL OR fm_workorder_status.closed != 1)"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8918] Merge 8912:8916 from trunk,
Sigurd Nes <=