[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7585] Merge 7579:7584 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7585] Merge 7579:7584 from trunk |
Date: |
Wed, 14 Sep 2011 08:53:10 +0000 |
Revision: 7585
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7585
Author: sigurdne
Date: 2011-09-14 08:53:10 +0000 (Wed, 14 Sep 2011)
Log Message:
-----------
Merge 7579:7584 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/phpgwapi/inc/class.translation.inc.php
branches/Version-1_0-branch/property/inc/class.bocommon.inc.php
branches/Version-1_0-branch/property/inc/class.borequest.inc.php
branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
branches/Version-1_0-branch/property/inc/class.uiwo_hour.inc.php
branches/Version-1_0-branch/property/inc/hook_settings.inc.php
branches/Version-1_0-branch/property/js/yahoo/request.index.js
branches/Version-1_0-branch/property/setup/phpgw_no.lang
branches/Version-1_0-branch/property/templates/base/request.xsl
branches/Version-1_0-branch/property/templates/base/wo_hour.xsl
branches/Version-1_0-branch/setup/lang.php
branches/Version-1_0-branch/setup/templates/base/lang_main.tpl
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
+
/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
Modified: branches/Version-1_0-branch/phpgwapi/inc/class.translation.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.translation.inc.php
2011-09-14 08:50:46 UTC (rev 7584)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.translation.inc.php
2011-09-14 08:53:10 UTC (rev 7585)
@@ -347,8 +347,7 @@
if ($upgrademethod == 'dumpold')
{
- // dont delete the custom main- &
loginscreen messages every time
- $GLOBALS['phpgw']->db->query("DELETE
FROM phpgw_lang where app_name != 'mainscreen' AND app_name !=
'loginscreen'",__LINE__,__FILE__);
+ $GLOBALS['phpgw']->db->query('DELETE
FROM phpgw_lang',__LINE__,__FILE__);
$GLOBALS['phpgw_info']['server']['lang_ctimes'] = array();
}
@@ -372,7 +371,7 @@
if
($GLOBALS['phpgw']->db->f('cnt') != 0)
{
- $error .= "Lang code
'{$lang}' already installed: skipping<br>\n";
+ echo "<div
class=\"error\">Lang code '{$lang}' already installed: skipping</div>\n";
continue;
}
}
Modified: branches/Version-1_0-branch/property/inc/class.bocommon.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.bocommon.inc.php
2011-09-14 08:50:46 UTC (rev 7584)
+++ branches/Version-1_0-branch/property/inc/class.bocommon.inc.php
2011-09-14 08:53:10 UTC (rev 7585)
@@ -1333,7 +1333,7 @@
$from = " FROM $paranthesis $entity_table ";
- $sql = "SELECT $cols $from $joinmethod";
+ $sql = "SELECT DISTINCT $cols $from $joinmethod";
return $sql;
Modified: branches/Version-1_0-branch/property/inc/class.borequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.borequest.inc.php
2011-09-14 08:50:46 UTC (rev 7584)
+++ branches/Version-1_0-branch/property/inc/class.borequest.inc.php
2011-09-14 08:53:10 UTC (rev 7585)
@@ -42,7 +42,7 @@
var $order;
var $cat_id;
public $sum_budget = 0;
- public $sum_residual_demand = 0;
+ public $sum_consume = 0;
var $public_functions = array
(
@@ -74,6 +74,7 @@
$sort = phpgw::get_var('sort');
$order = phpgw::get_var('order');
$filter = phpgw::get_var('filter',
'int');
+ $property_cat_id= phpgw::get_var('property_cat_id',
'int');
$district_id = phpgw::get_var('district_id', 'int');
$cat_id = phpgw::get_var('cat_id',
'int');
$status_id = phpgw::get_var('status_id');
@@ -107,6 +108,11 @@
{
$this->district_id = $district_id;
}
+
+ if(isset($_POST['property_cat_id']) ||
isset($_GET['property_cat_id']))
+ {
+ $this->property_cat_id = $property_cat_id;
+ }
if(isset($_POST['cat_id']) || isset($_GET['cat_id']))
{
$this->cat_id = $cat_id;
@@ -147,14 +153,15 @@
{
$data =
$GLOBALS['phpgw']->session->appsession('session_data','request');
- $this->start = $data['start'];
- $this->query = $data['query'];
- $this->filter = $data['filter'];
- $this->sort = $data['sort'];
- $this->order = $data['order'];
- $this->district_id = $data['district_id'];
- $this->cat_id = $data['cat_id'];
- $this->status_id = $data['status_id'];
+ $this->start = $data['start'];
+ $this->query = $data['query'];
+ $this->filter = $data['filter'];
+ $this->sort = $data['sort'];
+ $this->order = $data['order'];
+ $this->district_id = $data['district_id'];
+ $this->cat_id = $data['cat_id'];
+ $this->property_cat_id = $data['property_cat_id'];
+ $this->status_id = $data['status_id'];
$this->start_date =
isset($data['start_date']) ? $data['start_date']: '';
$this->end_date =
isset($data['end_date']) ? $data['end_date']: '';
@@ -396,10 +403,12 @@
$request = $this->so->read(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
'filter' => $this->filter,'district_id' =>
$this->district_id,'cat_id' => $this->cat_id,'status_id' => $this->status_id,
'project_id' =>
$data['project_id'],'allrows'=>$data['allrows'],'list_descr' =>
$data['list_descr'],
- 'dry_run'=>$data['dry_run'], 'p_num' =>
$this->p_num,'start_date'=>$this->start_date,'end_date'=>$this->end_date));
+ 'dry_run'=>$data['dry_run'], 'p_num' =>
$this->p_num,'start_date'=>$this->start_date,'end_date'=>$this->end_date,
+ 'property_cat_id' => $this->property_cat_id));
$this->total_records = $this->so->total_records;
$this->sum_budget = $this->so->sum_budget;
+ $this->sum_consume =
$this->so->sum_consume;
$this->uicols = $this->so->uicols;
$cols_extra =
$this->so->cols_extra;
Modified: branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
2011-09-14 08:50:46 UTC (rev 7584)
+++ branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
2011-09-14 08:53:10 UTC (rev 7585)
@@ -37,7 +37,7 @@
class property_sorequest
{
public $sum_budget = 0;
-
+ public $sum_consume = 0;
function __construct()
{
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
@@ -111,7 +111,7 @@
{
if($GLOBALS['phpgw_info']['server']['db_type']=='pgsql' ||
$GLOBALS['phpgw_info']['server']['db_type']=='postgres')
{
- $sql = "UPDATE fm_request SET score =
(SELECT sum(priority_key * ( degree * probability * ( consequence ))) FROM
fm_request_condition"
+ $sql = "UPDATE fm_request SET score =
(SELECT sum(CAST(priority_key as int4) * ( CAST(degree as int4) *
CAST(probability as int4) * ( CAST(consequence as int4) ))) FROM
fm_request_condition"
. " {$this->join}
fm_request_condition_type ON (fm_request_condition.condition_type =
fm_request_condition_type.id) WHERE request_id = {$id}) WHERE fm_request.id =
{$id}";
$this->db->query($sql,__LINE__,__FILE__);
@@ -128,6 +128,7 @@
$this->db->query("UPDATE fm_request SET
score = $score WHERE id = $id",__LINE__,__FILE__);
}
}
+ $this->db->query("UPDATE fm_request SET score = 0 WHERE
score IS NULL",__LINE__,__FILE__);
$this->db->query("UPDATE fm_request SET score = score +
{$authorities_demands} WHERE authorities_demands = 1",__LINE__,__FILE__);
}
@@ -200,6 +201,7 @@
$sort = isset($data['sort']) &&
$data['sort'] ? $data['sort'] : 'DESC';
$order =
isset($data['order'])?$data['order']:'';
$cat_id =
isset($data['cat_id'])?$data['cat_id']:0;
+ $property_cat_id=
isset($data['property_cat_id'])?$data['property_cat_id']:0;
$status_id = isset($data['status_id']) &&
$data['status_id'] ? $data['status_id']:0;
$district_id = isset($data['district_id']) &&
$data['district_id'] ? $data['district_id']:0;
$project_id =
isset($data['project_id'])?$data['project_id']:'';
@@ -216,10 +218,12 @@
$entity_table = 'fm_request';
- $cols .= $entity_table . '.location_code';
- $cols_return[] = 'location_code';
+ $cols .= "{$entity_table}.location_code";
+ $cols_return[] =
'location_code';
+ $cols_group[] =
"{$entity_table}.location_code";
- $cols .= ",$entity_table.id as request_id";
+
+ $cols .= ",{$entity_table}.id as request_id";
$cols_return[] = 'request_id';
$uicols['input_type'][] = 'text';
$uicols['name'][] = 'request_id';
@@ -235,6 +239,7 @@
$cols.= ",fm_request_status.descr as status";
$cols_return[] = 'status';
+ $cols_group[] = 'status';
$uicols['input_type'][] = 'text';
$uicols['name'][] = 'status';
$uicols['descr'][] =
lang('status');
@@ -247,11 +252,18 @@
$uicols['sortable'][] = false;
$cols.=
",$entity_table.start_date,$entity_table.entry_date,$entity_table.closed_date,$entity_table.in_progress_date,$entity_table.delivered_date";
- $cols_return[] = 'start_date';
- $cols_return[] = 'entry_date';
- $cols_return[] = 'closed_date';
- $cols_return[] =
'in_progress_date';
- $cols_return[] =
'delivered_date';
+ $cols_return[] = "start_date";
+ $cols_return[] = "entry_date";
+ $cols_return[] = "closed_date";
+ $cols_return[] =
"in_progress_date";
+ $cols_return[] =
"delivered_date";
+
+ $cols_group[] =
"{$entity_table}.start_date";
+ $cols_group[] =
"{$entity_table}.entry_date";
+ $cols_group[] =
"{$entity_table}.closed_date";
+ $cols_group[] =
"{$entity_table}.in_progress_date";
+ $cols_group[] =
"{$entity_table}.delivered_date";
+
$uicols['input_type'][] = 'text';
$uicols['name'][] = 'start_date';
$uicols['descr'][] = lang('start
date');
@@ -266,6 +278,7 @@
$cols.= ",$entity_table.title as title";
$cols_return[] = 'title';
+ $cols_group[] = "title";
$uicols['input_type'][] = 'text';
$uicols['name'][] = 'title';
$uicols['descr'][] = lang('title');
@@ -282,6 +295,7 @@
{
$cols.= ",$entity_table.descr as descr";
$cols_return[] =
'descr';
+ $cols_group[] =
"$entity_table.descr";
$uicols['input_type'][] = 'text';
$uicols['name'][] =
'descr';
$uicols['descr'][] =
lang('descr');
@@ -295,8 +309,23 @@
}
+ $cols.= ",$entity_table.building_part";
+ $cols_return[] =
'building_part';
+ $cols_group[] =
'building_part';
+ $uicols['input_type'][] = 'text';
+ $uicols['name'][] =
'building_part';
+ $uicols['descr'][] =
lang('building part');
+ $uicols['statustext'][] = lang('building part');
+ $uicols['exchange'][] = '';
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
+ $uicols['formatter'][] = '';
+ $uicols['classname'][] = '';
+ $uicols['sortable'][] = true;
+
$cols.= ",$entity_table.budget as budget";
$cols_return[] = 'budget';
+ $cols_group[] = 'budget';
$uicols['input_type'][] = 'text';
$uicols['name'][] = 'budget';
$uicols['descr'][] = lang('cost
estimate');
@@ -308,8 +337,24 @@
$uicols['classname'][] = '';
$uicols['sortable'][] = true;
+
+
+ $cols.= ",sum(amount) as consume";
+ $cols_return[] = 'consume';
+ $uicols['input_type'][] = 'text';
+ $uicols['name'][] = 'consume';
+ $uicols['descr'][] =
lang('consume');
+ $uicols['statustext'][] = lang('consume');
+ $uicols['exchange'][] = '';
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
+ $uicols['formatter'][] = 'FormatterRight';
+ $uicols['classname'][] = '';
+ $uicols['sortable'][] = true;
+
$cols.= ",$entity_table.coordinator";
$cols_return[] = 'coordinator';
+ $cols_group[] = 'coordinator';
$uicols['input_type'][] = 'text';
$uicols['name'][] = 'coordinator';
$uicols['descr'][] =
lang('Coordinator');
@@ -324,6 +369,7 @@
$cols.= ",$entity_table.score";
$cols_return[] = 'score';
+ $cols_group[] = 'score';
$uicols['input_type'][] = 'text';
$uicols['name'][] = 'score';
$uicols['descr'][] = lang('score');
@@ -341,27 +387,38 @@
{
$cols .= ",{$entity_table}." .
$this->db->f('column_name');
- $cols_return[] =
$this->db->f('column_name');
+ $cols_return[] =
$this->db->f('column_name');
+ $cols_group[] =
$this->db->f('column_name');
$uicols['input_type'][] = 'text';
- $uicols['name'][] =
$this->db->f('column_name');
- $uicols['descr'][] =
$this->db->f('input_text',true);
- $uicols['statustext'][] =
$this->db->f('statustext',true);
+ $uicols['name'][] =
$this->db->f('column_name');
+ $uicols['descr'][] =
$this->db->f('input_text',true);
+ $uicols['statustext'][] =
$this->db->f('statustext',true);
$uicols['exchange'][] = '';
$uicols['align'][] = '';
$uicols['datatype'][] =
$this->db->f('datatype');
$uicols['formatter'][] = '';
$uicols['classname'][] = '';
$uicols['sortable'][] = false;
-
}
$paranthesis = '(';
$joinmethod = "{$this->left_join} fm_request_status ON
{$entity_table}.status = fm_request_status.id)";
+
+ $paranthesis .= '(';
+ $joinmethod .= "{$this->left_join} fm_request_consume
ON {$entity_table}.id = fm_request_consume.request_id)";
+
+
$sql =
$this->bocommon->generate_sql(array('entity_table'=>$entity_table,'cols'=>$cols,'cols_return'=>$cols_return,
'uicols'=>$uicols,'joinmethod'=>$joinmethod,'paranthesis'=>$paranthesis,
'query'=>$query,'force_location'=>true));
+ $cols_group[] = "{$entity_table}.id";
+ $cols_group[] = 'fm_request_status.descr';
+ $cols_group[] = "{$entity_table}.address";
+
+ $groupmethod = 'GROUP BY ' . implode(',', $cols_group);
+
if ($order)
{
$ordermethod = " order by $order $sort";
@@ -382,6 +439,15 @@
$where= 'AND';
}
+
+
+
+ if ($property_cat_id > 0)
+ {
+ $filtermethod .= " $where
fm_location1.category='{$property_cat_id}' ";
+ $where = 'AND';
+ }
+
if ($cat_id > 0)
{
$filtermethod .= " $where
fm_request.category='{$cat_id}' ";
@@ -436,7 +502,7 @@
}
}
- $sql .= " $filtermethod $querymethod";
+ $sql .= " $filtermethod $querymethod $groupmethod";
//_debug_array($sql);
$this->uicols = $this->bocommon->uicols;
$cols_return = $this->bocommon->cols_return;
@@ -445,11 +511,15 @@
$this->db->fetchmode = 'ASSOC';
- $sql2 = 'SELECT count(*) as cnt, sum(budget) as
sum_budget ' . substr($sql,strripos($sql,'from'));
+ // $sql2 = 'SELECT count(*) as cnt, sum(budget) as
sum_budget ' . substr($sql,strripos($sql,'FROM'));
+
+ $sql2 = "SELECT count(*) as cnt, sum(budget) as
sum_budget, sum(consume) as sum_consume FROM ({$sql}) as t";
+//_debug_array($sql2);
$this->db->query($sql2,__LINE__,__FILE__);
$this->db->next_record();
$this->total_records = $this->db->f('cnt');
$this->sum_budget = $this->db->f('sum_budget');
+ $this->sum_consume = $this->db->f('sum_consume');
//address@hidden 23/10/08 avoid retrieve data in first
time, only render definition for headers (var myColumnDefs)
if($dry_run)
Modified: branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
2011-09-14 08:50:46 UTC (rev 7584)
+++ branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
2011-09-14 08:53:10 UTC (rev 7585)
@@ -84,6 +84,7 @@
$this->sort =
$this->bo->sort;
$this->order =
$this->bo->order;
$this->filter =
$this->bo->filter;
+ $this->property_cat_id =
$this->property_cat_id;
$this->cat_id =
$this->bo->cat_id;
$this->status_id =
$this->bo->status_id;
$this->district_id =
$this->bo->district_id;
@@ -109,6 +110,7 @@
'allrows' =>
$this->allrows,
'start_date' => $this->start_date,
'end_date' =>
$this->end_date,
+ 'property_cat_id' =>
$this->property_cat_id,
);
$this->bo->save_sessiondata($data);
}
@@ -235,27 +237,40 @@
."project_id:'{$project_id}',"
."filter:'{$this->filter}',"
."status_id:'{$this->status_id}',"
+
."property_cat_id:'{$this->property_cat_id}',"
."district_id: '{$this->district_id}',"
."start_date:'{$this->start_date}',"
."end_date: '{$this->end_date}',"
."cat_id:'{$this->cat_id}'";
- $values_combo_box[0] =
$this->bocommon->select_district_list('filter',$this->district_id);
- $default_value = array
('id'=>'','name'=>lang('no district'));
+ $values_combo_box[0] =
$this->bocommon->select_category_list(array
+ (
+ 'format'=>'filter',
+ // 'selected' => $this->cat_id,
+ 'type' =>'location',
+ 'type_id' =>1,
+ 'order'=>'descr'
+ )
+ );
+ $default_value = array
('id'=>'','name'=>lang('no type'));
array_unshift
($values_combo_box[0],$default_value);
- $values_combo_box[1] =
$this->cats->formatted_xslt_list(array('select_name' => 'cat_id','selected' =>
$this->cat_id,'globals' => True));
+ $values_combo_box[1] =
$this->bocommon->select_district_list('filter',$this->district_id);
+ $default_value = array
('id'=>'','name'=>lang('no district'));
+ array_unshift
($values_combo_box[1],$default_value);
+
+ $values_combo_box[2] =
$this->cats->formatted_xslt_list(array('select_name' => 'cat_id','selected' =>
$this->cat_id,'globals' => True));
$default_value = array ('cat_id'=>'','name'=>
lang('no category'));
- array_unshift
($values_combo_box[1]['cat_list'],$default_value);
+ array_unshift
($values_combo_box[2]['cat_list'],$default_value);
- $values_combo_box[2] =
$this->bo->select_status_list('filter',$this->status_id);
+ $values_combo_box[3] =
$this->bo->select_status_list('filter',$this->status_id);
$default_value = array ('id'=>'','name'=>
lang('no status'));
- array_unshift
($values_combo_box[2],$default_value);
+ array_unshift
($values_combo_box[3],$default_value);
- $values_combo_box[3] =
$this->bocommon->get_user_list('filter',$this->filter,$extra=false,$default=false,$start=-1,$sort='ASC',$order='account_lastname',$query='',$offset=-1);
- array_unshift
($values_combo_box[3],array('user_id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>$GLOBALS['phpgw_info']['user']['fullname']));
+ $values_combo_box[4] =
$this->bocommon->get_user_list('filter',$this->filter,$extra=false,$default=false,$start=-1,$sort='ASC',$order='account_lastname',$query='',$offset=-1);
+ array_unshift
($values_combo_box[4],array('user_id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>$GLOBALS['phpgw_info']['user']['fullname']));
$default_value = array
('user_id'=>'','name'=>lang('no user'));
- array_unshift
($values_combo_box[3],$default_value);
+ array_unshift
($values_combo_box[4],$default_value);
$datatable['actions']['form'] = array
(
@@ -266,6 +281,7 @@
(
'menuaction'
=> 'property.uirequest.index',
'lookup'
=> $lookup,
+
'property_cat_id' => $this->property_cat_id,
'cat_id'
=> $this->cat_id,
'filter'
=> $this->filter,
'status_id'
=> $this->status_id,
@@ -283,6 +299,15 @@
(
array
( //boton
DISTRICT
+ 'id' =>
'btn_property_cat',
+ 'name'
=> 'property_cat_id',
+ 'value'
=> lang('property type'),
+ 'type'
=> 'button',
+ 'style'
=> 'filter',
+
'tab_index' => 1
+ ),
+ array
+ ( //boton
DISTRICT
'id' =>
'btn_district_id',
'name'
=> 'district_id',
'value'
=> lang('district'),
@@ -321,17 +346,18 @@
array
(
'type'
=> 'button',
- 'id'
=> 'btn_export',
- 'value'
=> lang('download'),
+ 'id'
=> 'btn_update',
+ 'value'
=> lang('Update project'),
'tab_index' => 9
),
array
(
'type'
=> 'button',
- 'id'
=> 'btn_update',
- 'value'
=> lang('Update project'),
+ 'id'
=> 'btn_export',
+ 'value'
=> lang('download'),
'tab_index' => 8
),
+
array
(
'type'
=> 'button',
@@ -427,17 +453,22 @@
array
( //div
values combo_box_1
'id' => 'values_combo_box_1',
-
'value' => $this->bocommon->select2String($values_combo_box[1]['cat_list'],
'cat_id') //i.e. id,value/id,vale/
+
'value' => $this->bocommon->select2String($values_combo_box[1])
),
array
( //div
values combo_box_2
'id' => 'values_combo_box_2',
-
'value' => $this->bocommon->select2String($values_combo_box[2])
+
'value' => $this->bocommon->select2String($values_combo_box[2]['cat_list'],
'cat_id') //i.e. id,value/id,vale/
),
array
( //div
values combo_box_3
'id' => 'values_combo_box_3',
-
'value' => $this->bocommon->select2String($values_combo_box[3], 'user_id')
+
'value' => $this->bocommon->select2String($values_combo_box[3])
+ ),
+ array
+ ( //div
values combo_box_4
+
'id' => 'values_combo_box_4',
+
'value' => $this->bocommon->select2String($values_combo_box[4], 'user_id')
)
)
)
@@ -738,7 +769,7 @@
'currentPage' =>
$datatable['sorting']['currentPage'],
'records' =>
array(),
'sum_budget' =>
$this->bo->sum_budget,
- 'sum_residual_demand'=>
$this->bo->sum_residual_demand
+ 'sum_consume' =>
$this->bo->sum_consume
);
Modified: branches/Version-1_0-branch/property/inc/class.uiwo_hour.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiwo_hour.inc.php
2011-09-14 08:50:46 UTC (rev 7584)
+++ branches/Version-1_0-branch/property/inc/class.uiwo_hour.inc.php
2011-09-14 08:53:10 UTC (rev 7585)
@@ -1198,6 +1198,8 @@
$print = phpgw::get_var('print',
'bool');
$sent_ok = phpgw::get_var('print',
'bool');
$send_as_pdf = phpgw::get_var('send_as_pdf', 'bool');
+ $email_receipt = phpgw::get_var('email_receipt',
'bool');
+
if($update_email)
{
@@ -1544,7 +1546,7 @@
{
$GLOBALS['phpgw']->send =
CreateObject('phpgwapi.send');
}
- $rcpt =
$GLOBALS['phpgw']->send->msg('email', $to_email, $subject, $body, '', $cc,
$bcc, $from_email, $from_name, 'html', '', $attachments, true);
+ $rcpt =
$GLOBALS['phpgw']->send->msg('email', $to_email, $subject, $body, '', $cc,
$bcc, $from_email, $from_name, 'html', '', $attachments, $email_receipt);
}
else
{
@@ -1699,6 +1701,7 @@
'lang_to_email_address_statustext'
=> lang('The address to which this order will be sendt'),
'to_email'
=> $to_email,
'email_list'
=> $email_list,
+ 'requst_email_receipt'
=>
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['request_order_email_rcpt'])
&&
$GLOBALS['phpgw_info']['user']['preferences']['property']['request_order_email_rcpt']==1
? 1 : 0,
'lang_select_email'
=> lang('Select email'),
'send_order_action'
=> $GLOBALS['phpgw']->link('/index.php',array(
'menuaction' =>
'property.uiwo_hour.view',
Modified: branches/Version-1_0-branch/property/inc/hook_settings.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/hook_settings.inc.php
2011-09-14 08:50:46 UTC (rev 7584)
+++ branches/Version-1_0-branch/property/inc/hook_settings.inc.php
2011-09-14 08:53:10 UTC (rev 7585)
@@ -196,6 +196,7 @@
create_select_box('Send order receipt as email
','order_email_rcpt',$yes_and_no,'Send the order as BCC to the user');
create_select_box('Notify owner of project/order on
change','notify_project_owner',$yes_and_no,'By email');
+ create_select_box('request an email
receipt','request_order_email_rcpt',$yes_and_no,'request a confirmation email
when your email is opened by the recipient');
$default_start_page =array
(
Modified: branches/Version-1_0-branch/property/js/yahoo/request.index.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/request.index.js
2011-09-14 08:50:46 UTC (rev 7584)
+++ branches/Version-1_0-branch/property/js/yahoo/request.index.js
2011-09-14 08:53:10 UTC (rev 7585)
@@ -2,21 +2,22 @@
// Declaration of request.index vars
//--------------------------------------------------------
//define SelectButton
- var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3;
+ var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3,
oMenuButton_4;
var selectsButtons = [
- {order:0,
var_URL:'district_id',name:'btn_district_id',style:'districtbutton',dependiente:''},
- {order:1,
var_URL:'cat_id',name:'btn_cat_id',style:'categorybutton',dependiente:''},
- {order:2,
var_URL:'status_id',name:'btn_status_id',style:'districtbutton',dependiente:''},
- {order:3, var_URL:'filter',
name:'btn_user_id',style:'ownerIdbutton',dependiente:''}
+ {order:0, var_URL:'property_cat_id', name:'btn_property_cat',
style:'categorybutton', dependiente:[]},
+ {order:1,
var_URL:'district_id',name:'btn_district_id',style:'districtbutton',dependiente:''},
+ {order:2,
var_URL:'cat_id',name:'btn_cat_id',style:'categorybutton',dependiente:''},
+ {order:3,
var_URL:'status_id',name:'btn_status_id',style:'districtbutton',dependiente:''},
+ {order:4, var_URL:'filter',
name:'btn_user_id',style:'ownerIdbutton',dependiente:''}
]
// define buttons
var oNormalButton_0, oNormalButton_1, oNormalButton_2, oNormalButton_3;
var normalButtons = [
{order:0, name:'btn_search', funct:"onSearchClick"},
- {order:1, name:'btn_export', funct:"onDownloadClick"},
- {order:2, name:'btn_update', funct:"onUpdateProject"},
- {order:3, name:'btn_new', funct:"onNewClick"}
+ {order:1, name:'btn_update', funct:"onUpdateProject"},
+ {order:2, name:'btn_new', funct:"onNewClick"},
+ {order:3, name:'btn_export', funct:"onDownloadClick"}
]
// define Text buttons
@@ -26,7 +27,8 @@
var toolTips =
[
- {name:'btn_export', title:'Download', description:'Download
table to your browser',ColumnDescription:''}
+ {name:'btn_export', title:'Download', description:'Download
table to your browser',ColumnDescription:''},
+ {name:'btn_update', title:'Update Project', description:'Update
project with selected',ColumnDescription:''}
]
var linktoolTips =
@@ -56,30 +58,37 @@
tableYUI.setAttribute("id","tableYUI");
// console.log(path_values);
- //district
- index =
locate_in_array_options(0,"value",path_values.district_id);
+
+ index =
locate_in_array_options(0,"value",path_values.property_cat_id);
if(index)
{
oMenuButton_0.set("label", ("<em>" +
array_options[0][index][1] + "</em>"));
}
- //category
- index =
locate_in_array_options(1,"value",path_values.cat_id);
+
+ //district
+ index =
locate_in_array_options(1,"value",path_values.district_id);
if(index)
{
oMenuButton_1.set("label", ("<em>" +
array_options[1][index][1] + "</em>"));
}
- //status
- index =
locate_in_array_options(2,"value",path_values.status_id);
+ //category
+ index =
locate_in_array_options(2,"value",path_values.cat_id);
if(index)
{
oMenuButton_2.set("label", ("<em>" +
array_options[2][index][1] + "</em>"));
}
- //user
- index =
locate_in_array_options(3,"value",path_values.filter);
+ //status
+ index =
locate_in_array_options(3,"value",path_values.status_id);
if(index)
{
oMenuButton_3.set("label", ("<em>" +
array_options[3][index][1] + "</em>"));
}
+ //user
+ index =
locate_in_array_options(4,"value",path_values.filter);
+ if(index)
+ {
+ oMenuButton_4.set("label", ("<em>" +
array_options[4][index][1] + "</em>"));
+ }
oMenuButton_0.focus();
}
@@ -158,7 +167,7 @@
this.addFooterDatatable = function()
{
tmp_sum_budget = YAHOO.util.Number.format(values_ds.sum_budget,
{decimalPlaces:0, decimalSeparator:",", thousandsSeparator:" "});
-// tmp_sum_residual_demand =
YAHOO.util.Number.format(values_ds.sum_residual_demand, {decimalPlaces:0,
decimalSeparator:",", thousandsSeparator:" "});
+ tmp_sum_consume =
YAHOO.util.Number.format(values_ds.sum_consume, {decimalPlaces:0,
decimalSeparator:",", thousandsSeparator:" "});
count_empty = 0;
for(i=0;i<myColumnDefs.length;i++)
@@ -177,7 +186,7 @@
td_empty(count_empty);
td_sum(tmp_sum_budget);
- // td_sum(tmp_sum_residual_demand);
+ td_sum(tmp_sum_consume);
td_empty(count_empty_end);
//Add to Table
Modified: branches/Version-1_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/property/setup/phpgw_no.lang 2011-09-14
08:50:46 UTC (rev 7584)
+++ branches/Version-1_0-branch/property/setup/phpgw_no.lang 2011-09-14
08:53:10 UTC (rev 7585)
@@ -639,7 +639,7 @@
enter a description of the document property no gi en
beskrivelse av dokumentet
enter a description of the equipment property no gi en
beskrivelse av utstyret
enter a description of the project property no gi en
beskrivelse av prosjektet
-enter a description of the request property no Gi en
beskrivelse av tiltaket
+enter a description of the request property no Gi en
beskrivelse av tilstanden
enter a description of the standard property no gi en
beskrivelse av standarden
enter a description of the status property no Angi en
beskrivelse av statusen
enter a description the attribute property no gi en
beskrivelse av attributten
@@ -1306,6 +1306,8 @@
request property no Behov
project.request property no Behov
request attributes property no Behov::attributter
+request an email receipt property no Be om kvittering
+request a confirmation email when your email is opened by the recipient
property no Be om epost som kvittering når mottaker åpner eposten.
request %1 has been edited property no anmodning %1 er oppdater
request %1 has been saved property no anmodning %1 er lagret
request budget property no Budsjett for tiltak
Modified: branches/Version-1_0-branch/property/templates/base/request.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/request.xsl
2011-09-14 08:50:46 UTC (rev 7584)
+++ branches/Version-1_0-branch/property/templates/base/request.xsl
2011-09-14 08:53:10 UTC (rev 7585)
@@ -263,27 +263,23 @@
</tr>
</xsl:for-each>
+ <xsl:variable
name="lang_request_title"><xsl:value-of select="php:function('lang', 'enter
request title')" /></xsl:variable>
<tr>
- <td
valign="top">
+ <td
valign="top" title= "{$lang_request_title}">
<xsl:value-of select="php:function('lang', 'request title')" />
</td>
<td>
- <input
type="text" name="values[title]" value="{value_title}" size="60">
-
<xsl:attribute name="title">
-
<xsl:value-of select="php:function('lang', 'enter request title')" />
-
</xsl:attribute>
+ <input
type="text" name="values[title]" value="{value_title}" size="60" title=
"{$lang_request_title}">
</input>
</td>
</tr>
+ <xsl:variable
name="lang_request_description"><xsl:value-of select="php:function('lang',
'enter a description of the request')" /></xsl:variable>
<tr>
- <td
valign="top">
+ <td
valign="top" title= "{$lang_request_description}">
<xsl:value-of select="php:function('lang', 'request description')" />
</td>
<td>
-
<textarea cols="60" rows="6" name="values[descr]">
-
<xsl:attribute name="title">
-
<xsl:value-of select="php:function('lang', 'enter a description of the
request')" />
-
</xsl:attribute>
+
<textarea cols="60" rows="6" name="values[descr]" title=
"{$lang_request_description}">
<xsl:value-of select="value_descr"/>
</textarea>
</td>
Modified: branches/Version-1_0-branch/property/templates/base/wo_hour.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/wo_hour.xsl
2011-09-14 08:50:46 UTC (rev 7584)
+++ branches/Version-1_0-branch/property/templates/base/wo_hour.xsl
2011-09-14 08:53:10 UTC (rev 7585)
@@ -429,6 +429,21 @@
</tr>
<tr>
<td class="th_text" align="left">
+
<xsl:value-of select="php:function('lang', 'request an
email receipt')" />
+
</td>
+
<td align="left">
+
<input type="checkbox" name="email_receipt"
value="true">
+
<xsl:attribute name="title">
+
<xsl:value-of
select="php:function('lang', 'request a confirmation email when your email is
opened by the recipient')" />
+
</xsl:attribute>
+
<xsl:if test="requst_email_receipt != 0">
+
<xsl:attribute name="checked"
value="checked" />
+
</xsl:if>
+
</input>
+
</td>
+
</tr>
+
<tr>
+
<td class="th_text" align="left">
<xsl:value-of select="lang_update_email"/>
</td>
<td align="left">
Modified: branches/Version-1_0-branch/setup/lang.php
===================================================================
--- branches/Version-1_0-branch/setup/lang.php 2011-09-14 08:50:46 UTC (rev
7584)
+++ branches/Version-1_0-branch/setup/lang.php 2011-09-14 08:53:10 UTC (rev
7585)
@@ -153,12 +153,14 @@
. 'FROM phpgw_languages
'
. 'WHERE lang_id
IN('.implode(',', $avail_lang).') ORDER BY lang_name');
- $select_box_langs = '';
+ $checkbox_langs = '';
while ($GLOBALS['phpgw_setup']->db->next_record())
{
$id = $GLOBALS['phpgw_setup']->db->f('lang_id');
- $selected =
isset($GLOBALS['phpgw_info']['setup']['installed_langs'][$id]) ? ' selected' :
'';
- $select_box_langs .= "<option
value=\"$id\"{$selected}>" . $GLOBALS['phpgw_setup']->db->f('lang_name') .
"</option>\n";
+ $name =
$GLOBALS['phpgw_setup']->db->f('lang_name');
+ $checked =
isset($GLOBALS['phpgw_info']['setup']['installed_langs'][$id]) ? ' checked =
"checked"' : '';
+
+ $checkbox_langs .="<label><input
type=\"checkbox\" name=\"lang_selected[]\"
value=\"$id\"$checked>{$name}</label><br>";
}
$GLOBALS['phpgw_setup']->db->query("UPDATE
phpgw_languages SET available = 'Yes' WHERE lang_id IN('" . implode("','",
$avail_lang) . "'");
@@ -188,7 +190,7 @@
$setup_tpl->set_var('td_align',$td_align);
$setup_tpl->set_var('hidden_var1',$hidden_var1);
$setup_tpl->set_var('select_box_desc',$select_box_desc);
-
$setup_tpl->set_var('select_box_langs',$select_box_langs);
+ $setup_tpl->set_var('checkbox_langs',$checkbox_langs);
$setup_tpl->set_var('lang_install',lang('install'));
$setup_tpl->set_var('lang_cancel',lang('cancel'));
Modified: branches/Version-1_0-branch/setup/templates/base/lang_main.tpl
===================================================================
--- branches/Version-1_0-branch/setup/templates/base/lang_main.tpl
2011-09-14 08:50:46 UTC (rev 7584)
+++ branches/Version-1_0-branch/setup/templates/base/lang_main.tpl
2011-09-14 08:53:10 UTC (rev 7585)
@@ -15,9 +15,9 @@
{select_box_desc}
<form method="POST" action="lang.php">
{hidden_var1}
- <select name="lang_selected[]" multiple size="10">
- {select_box_langs}
- </select>
+ <p style="height: 150px; overflow: auto; border: 5px solid
#eee; background: #eee; color: #000; margin-bottom: 1.5em;">
+ {checkbox_langs}
+ </p>
</td>
<!-- BEGIN B_choose_method -->
<td valign="top">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7585] Merge 7579:7584 from trunk,
Sigurd Nes <=