[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7056] Merge 7046:7055 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7056] Merge 7046:7055 from trunk |
Date: |
Fri, 25 Feb 2011 07:49:09 +0000 |
Revision: 7056
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7056
Author: sigurdne
Date: 2011-02-25 07:49:04 +0000 (Fri, 25 Feb 2011)
Log Message:
-----------
Merge 7046:7055 from trunk
Modified Paths:
--------------
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/setup/phpgw_no.lang
branches/Version-1_0-branch/property/setup/setup.inc.php
branches/Version-1_0-branch/property/setup/tables_current.inc.php
branches/Version-1_0-branch/property/setup/tables_update.inc.php
branches/Version-1_0-branch/property/templates/base/request.xsl
branches/Version-1_0-branch/rental/inc/class.uimakepdf.inc.php
branches/Version-1_0-branch/rental/templates/base/config.tpl
Removed Paths:
-------------
branches/Version-1_0-branch/rental/templates/base/pdf/
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
+
/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
Modified: branches/Version-1_0-branch/property/inc/class.borequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.borequest.inc.php
2011-02-25 06:36:46 UTC (rev 7055)
+++ branches/Version-1_0-branch/property/inc/class.borequest.inc.php
2011-02-25 07:49:04 UTC (rev 7056)
@@ -142,6 +142,51 @@
$this->status_id = $data['status_id'];
}
+
+ function column_list($selected = array())
+ {
+ if(!$selected)
+ {
+ $selected =
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['request_columns'])
? $GLOBALS['phpgw_info']['user']['preferences']['property']['request_columns']
: '';
+ }
+
+ $columns = $this->get_column_list();
+ return
$this->bocommon->select_multi_list($selected,$columns);
+ }
+
+ function get_column_list()
+ {
+ $columns = array();
+ $columns['entry_date'] = array
+ (
+ 'id' => 'entry_date',
+ 'name'=> lang('entry date'),
+ 'sortable' => true
+ );
+
+ $columns['in_progress_date'] = array
+ (
+ 'id' => 'in_progress_date',
+ 'name' => lang('in progress
date'),
+ 'sortable' => true
+ );
+ $columns['delivered_date'] = array
+ (
+ 'id' => 'delivered_date',
+ 'name' => lang('delivered
date'),
+ 'sortable' => true
+ );
+ $columns['closed_date'] = array
+ (
+ 'id' => 'closed_date',
+ 'name' => lang('closed date'),
+ 'sortable' => true
+ );
+
+ return $columns;
+ }
+
+
function
select_degree_list($degree_value='',$degreedefault_type='')
{
if ($degree_value)
@@ -286,6 +331,11 @@
{
$request[$i]['coordinator'] =
$GLOBALS['phpgw']->accounts->id2name($request[$i]['coordinator']);
$request[$i]['start_date'] =
$GLOBALS['phpgw']->common->show_date($request[$i]['start_date'],$dateformat);
+ $request[$i]['entry_date'] =
$GLOBALS['phpgw']->common->show_date($request[$i]['entry_date'],$dateformat);
+ $request[$i]['closed_date'] =
$GLOBALS['phpgw']->common->show_date($request[$i]['closed_date'],$dateformat);
+ $request[$i]['in_progress_date'] =
$GLOBALS['phpgw']->common->show_date($request[$i]['in_progress_date'],$dateformat);
+ $request[$i]['delivered_date'] =
$GLOBALS['phpgw']->common->show_date($request[$i]['delivered_date'],$dateformat);
+
if($cols_extra)
{
$location_data=$this->solocation->read_single($request[$i]['location_code']);
@@ -296,6 +346,21 @@
}
}
+ $column_list = $this->get_column_list();
+ $custom_cols =
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['request_columns'])
&&
$GLOBALS['phpgw_info']['user']['preferences']['property']['request_columns'] ?
$GLOBALS['phpgw_info']['user']['preferences']['property']['request_columns'] :
array();
+ foreach ($custom_cols as $col_id)
+ {
+ $this->uicols['input_type'][] = 'text';
+ $this->uicols['name'][] =
$col_id;
+ $this->uicols['descr'][] =
$column_list[$col_id]['name'];
+ $this->uicols['statustext'][] =
$column_list[$col_id]['name'];
+ $this->uicols['exchange'][] = false;
+ $this->uicols['align'][] = '';
+ $this->uicols['datatype'][] = '';
+ $this->uicols['sortable'][] =
$column_list[$col_id]['sortable'];
+ $this->uicols['formatter'][] = '';
+ $this->uicols['classname'][] = '';
+ }
return $request;
}
@@ -318,6 +383,10 @@
$dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
$values['start_date'] =
$GLOBALS['phpgw']->common->show_date($values['start_date'],$dateformat);
$values['end_date'] =
$GLOBALS['phpgw']->common->show_date($values['end_date'],$dateformat);
+ $values['entry_date'] =
$GLOBALS['phpgw']->common->show_date($values['entry_date'],$dateformat);
+ $values['closed_date'] =
$GLOBALS['phpgw']->common->show_date($values['closed_date'],$dateformat);
+ $values['in_progress_date'] =
$GLOBALS['phpgw']->common->show_date($values['in_progress_date'],$dateformat);
+ $values['delivered_date'] =
$GLOBALS['phpgw']->common->show_date($values['delivered_date'],$dateformat);
if($values['location_code'])
{
Modified: branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
2011-02-25 06:36:46 UTC (rev 7055)
+++ branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
2011-02-25 07:49:04 UTC (rev 7056)
@@ -216,8 +216,12 @@
$uicols['classname'][] = '';
$uicols['sortable'][] = false;
- $cols.= ",$entity_table.start_date";
+ $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';
$uicols['input_type'][] = 'text';
$uicols['name'][] = 'start_date';
$uicols['descr'][] = lang('start
date');
@@ -461,6 +465,10 @@
'p_cat_id'
=> $this->db->f('p_cat_id'),
'contact_phone'
=> $this->db->f('contact_phone', true),
'building_part'
=> $this->db->f('building_part'),
+ 'entry_date'
=> $this->db->f('entry_date'),
+ 'closed_date'
=> $this->db->f('closed_date'),
+ 'in_progress_date'
=> $this->db->f('in_progress_date'),
+ 'delivered_date'
=> $this->db->f('delivered_date')
);
if ( isset($values['attributes']) &&
is_array($values['attributes']) )
@@ -574,7 +582,9 @@
$value_set['branch_id'] =
$request['branch_id'];
$value_set['coordinator'] =
$request['coordinator'];
$value_set['authorities_demands'] =
$request['authorities_demands'];
- $value_set['building_part'] =
$request['building_part'];
+ $value_set['building_part'] =
$request['building_part'];
+ $value_set['start_date'] =
$request['start_date'];
+ $value_set['end_date'] =
$request['end_date'];
$cols = implode(',', array_keys($value_set));
$values =
$this->bocommon->validate_db_insert(array_values($value_set));
@@ -620,7 +630,31 @@
$this->interlink->add($interlink_data,$this->db);
}
+
+ $sql = "SELECT * FROM fm_request_status WHERE
id='{$request['status']}'";
+ $this->db->query($sql,__LINE__,__FILE__);
+ $this->db->next_record();
+ $value_set = array();
+ if($this->db->f('in_progress'))
+ {
+ $value_set['in_progress_date'] = time();
+ }
+ if($this->db->f('closed'))
+ {
+ $value_set['closed_date'] =
time();
+ }
+ if($this->db->f('delivered'))
+ {
+ $value_set['delivered_date'] = time();
+ }
+
+ if($value_set)
+ {
+ $value_set =
$this->db->validate_update($value_set);
+ $this->db->query("UPDATE fm_request SET
$value_set WHERE id= '{$id}'",__LINE__,__FILE__);
+ }
+
if($this->db->transaction_commit())
{
$this->increment_request_id();
@@ -653,7 +687,6 @@
$address =
$this->db->db_addslashes($request['location_name']);
}
-
$value_set = array
(
'title'
=> $this->db->db_addslashes($request['title']),
@@ -687,7 +720,6 @@
$value_set = array_merge($value_set,
$data_attribute['value_set']);
}
- $value_set =
$this->db->validate_update($value_set);
$this->db->transaction_begin();
@@ -697,10 +729,31 @@
$old_status = $this->db->f('status');
$old_category = $this->db->f('category');
$old_coordinator = $this->db->f('coordinator');
+ if($old_status != $request['status'])
+ {
+ $sql = "SELECT * FROM fm_request_status WHERE
id='{$request['status']}'";
+ $this->db->query($sql,__LINE__,__FILE__);
+ $this->db->next_record();
+
+ if($this->db->f('in_progress'))
+ {
+ $value_set['in_progress_date'] =
time();
+ }
+ if($this->db->f('closed'))
+ {
+ $value_set['closed_date']
= time();
+ }
+ if($this->db->f('delivered'))
+ {
+ $value_set['delivered_date'] =
time();
+ }
+ }
- $this->db->query("UPDATE fm_request set $value_set
WHERE id= '" . $request['id'] ."'",__LINE__,__FILE__);
+ $value_set =
$this->db->validate_update($value_set);
- $this->db->query("DELETE FROM fm_request_condition
WHERE request_id='" . $request['id'] . "'",__LINE__,__FILE__);
+ $this->db->query("UPDATE fm_request SET $value_set
WHERE id= '{$request['id']}'",__LINE__,__FILE__);
+
+ $this->db->query("DELETE FROM fm_request_condition
WHERE request_id='{$request['id']}'",__LINE__,__FILE__);
while (is_array($request['condition']) &&
list($condition_type,$value_type) = each($request['condition']))
{
$this->db->query("INSERT INTO
fm_request_condition
(request_id,condition_type,degree,probability,consequence,user_id,entry_date) "
@@ -718,7 +771,7 @@
if($request['extra']['contact_phone'] &&
$request['extra']['tenant_id'])
{
- $this->db->query("update fm_tenant set
contact_phone='". $request['extra']['contact_phone']. "' where id='".
$request['extra']['tenant_id']. "'",__LINE__,__FILE__);
+ $this->db->query("UPDATE fm_tenant SET
contact_phone='{$request['extra']['contact_phone']}' WHERE
id='{$request['extra']['tenant_id']}'",__LINE__,__FILE__);
}
if ($request['power_meter'] )
Modified: branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
2011-02-25 06:36:46 UTC (rev 7055)
+++ branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
2011-02-25 07:49:04 UTC (rev 7056)
@@ -55,7 +55,8 @@
'delete' => true,
'priority_key' => true,
'view_file' => true,
- 'download' => true
+ 'download' => true,
+ 'columns' => true
);
function property_uirequest()
@@ -108,6 +109,51 @@
$this->bo->save_sessiondata($data);
}
+ function columns()
+ {
+ $receipt = array();
+ $GLOBALS['phpgw']->xslttpl->add_file(array('columns'));
+
+ $GLOBALS['phpgw_info']['flags']['noframework'] = true;
+ $GLOBALS['phpgw_info']['flags']['nofooter'] = true;
+
+ $values = phpgw::get_var('values');
+
+
$GLOBALS['phpgw']->preferences->set_account_id($this->account, true);
+
+ if (isset($values['save']) && $values['save'])
+ {
+
$GLOBALS['phpgw']->preferences->add('property','request_columns',
$values['columns'],'user');
+
$GLOBALS['phpgw']->preferences->save_repository();
+ $receipt['message'][] = array('msg' =>
lang('columns is updated'));
+ }
+
+ $function_msg = lang('Select Column');
+
+ $link_data = array
+ (
+ 'menuaction' => 'property.uirequest.columns',
+ );
+
+ $selected = isset($values['columns']) &&
$values['columns'] ? $values['columns'] : array();
+ $msgbox_data =
$GLOBALS['phpgw']->common->msgbox_data($receipt);
+
+ $data = array
+ (
+ 'msgbox_data' =>
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
+ 'column_list' =>
$this->bo->column_list($selected , $this->type_id, $allrows=true),
+ 'function_msg' =>
$function_msg,
+ 'form_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
+ 'lang_columns' =>
lang('columns'),
+ 'lang_none' =>
lang('None'),
+ 'lang_save' =>
lang('save'),
+ );
+
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
$function_msg;
+
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('columns' => $data));
+ }
+
+
function view_file()
{
if(!$this->acl_read)
@@ -315,8 +361,19 @@
'menuaction' =>
'property.uirequest.priority_key'))."','','left=50,top=100,width=350,height=250')",
'value' => lang('Priority key'),
'tab_index' => 4
- )
),
+ array
+ (
+ 'type'
=> 'link',
+ 'id' =>
'btn_columns',
+ 'url'
=> "Javascript:window.open('".$GLOBALS['phpgw']->link('/index.php',
+ array
+ (
+
'menuaction' =>
'property.uirequest.columns'))."','','width=300,height=600,scrollbars=1')",
+
'value' => lang('columns'),
+
'tab_index' => 10
+ ),
+ ),
'hidden_value'
=> array
(
array
@@ -1275,6 +1332,11 @@
'img_cal'
=> $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
'lang_datetitle'
=> lang('Select date'),
+ 'value_entry_date'
=> $values['entry_date'],
+ 'value_closed_date'
=> $values['closed_date'],
+ 'value_in_progress_date'
=> $values['in_progress_date'],
+ 'value_delivered_date'
=> $values['delivered_date'],
+
'lang_start_date_statustext'
=> lang('Select the estimated end date for the request'),
'lang_start_date'
=> lang('request start date'),
'value_start_date'
=> $values['start_date'],
Modified: branches/Version-1_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/property/setup/phpgw_no.lang 2011-02-25
06:36:46 UTC (rev 7055)
+++ branches/Version-1_0-branch/property/setup/phpgw_no.lang 2011-02-25
07:49:04 UTC (rev 7056)
@@ -726,8 +726,8 @@
entrance has been edited property no inngang er rettet
entrance has been saved property no inngang er lagret
entrance id property no inngang ID
-entry date property no Dato
-entry_date property no Dato
+entry date property no Registrert dato
+entry_date property no Registrert dato
equipment property no Utstyr
equipment %1 has been edited property no utstyr %1 er rettet
equipment %1 has been saved property no utstyr %1 er lagret
@@ -1847,3 +1847,6 @@
usertype common no Brukertype
tenant common no Leietaker
internal common no Intern
+in progress date property no Påbegynt dato
+delivered date property no Utført dato
+closed date property no Avsluttet dato
Modified: branches/Version-1_0-branch/property/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/setup.inc.php 2011-02-25
06:36:46 UTC (rev 7055)
+++ branches/Version-1_0-branch/property/setup/setup.inc.php 2011-02-25
07:49:04 UTC (rev 7056)
@@ -12,7 +12,7 @@
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.609';
+ $setup_info['property']['version'] = '0.9.17.610';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
Modified: branches/Version-1_0-branch/property/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_current.inc.php
2011-02-25 06:36:46 UTC (rev 7055)
+++ branches/Version-1_0-branch/property/setup/tables_current.inc.php
2011-02-25 07:49:04 UTC (rev 7056)
@@ -794,6 +794,9 @@
'start_date' => array('type' =>
'int','precision' => '4','default' => '0','nullable' => True),
'end_date' => array('type' => 'int','precision'
=> '4','default' => '0','nullable' => True),
'building_part'=> array('type' =>
'varchar','precision' => 4,'nullable' => True),
+ 'closed_date' => array('type' =>
'int','precision' => '4','nullable' => True),
+ 'in_progress_date' => array('type' =>
'int','precision' => '4','nullable' => True),
+ 'delivered_date' => array('type' =>
'int','precision' => '4','nullable' => True),
),
'pk' => array('id'),
'fk' => array(),
Modified: branches/Version-1_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_update.inc.php
2011-02-25 06:36:46 UTC (rev 7055)
+++ branches/Version-1_0-branch/property/setup/tables_update.inc.php
2011-02-25 07:49:04 UTC (rev 7056)
@@ -5045,7 +5045,29 @@
}
}
+ /**
+ * Update property version from 0.9.17.609 to 0.9.17.610
+ * Add location_link_level
+ *
+ */
+ $test[] = '0.9.17.609';
+ function property_upgrade0_9_17_609()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_request','closed_date',array('type'
=> 'int','precision' => 4,'nullable' => True));
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_request','in_progress_date',array('type'
=> 'int','precision' => 4,'nullable' => True));
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_request','delivered_date',array('type'
=> 'int','precision' => 4,'nullable' => True));
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.610';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
+
+
/**
* Update property version from 0.9.17.607 to 0.9.17.608
* Add more room for address at tickets
Modified: branches/Version-1_0-branch/property/templates/base/request.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/request.xsl
2011-02-25 06:36:46 UTC (rev 7055)
+++ branches/Version-1_0-branch/property/templates/base/request.xsl
2011-02-25 07:49:04 UTC (rev 7056)
@@ -149,6 +149,39 @@
<xsl:value-of select="value_request_id"/>
</td>
</tr>
+ <tr>
+
<td>
+
<xsl:value-of select="php:function('lang', 'entry date')" />
+
</td>
+
<td>
+
<xsl:value-of select="value_entry_date"/>
+
</td>
+ </tr>
+ <tr>
+
<td>
+
<xsl:value-of select="php:function('lang', 'in progress date')" />
+
</td>
+
<td>
+
<xsl:value-of select="value_in_progress_date"/>
+
</td>
+ </tr>
+ <tr>
+
<td>
+
<xsl:value-of select="php:function('lang', 'delivered date')" />
+
</td>
+
<td>
+
<xsl:value-of select="value_delivered_date"/>
+
</td>
+ </tr>
+ <tr>
+
<td>
+
<xsl:value-of select="php:function('lang', 'closed date')" />
+
</td>
+
<td>
+
<xsl:value-of select="value_closed_date"/>
+
</td>
+ </tr>
+
<xsl:for-each select="value_origin" >
<tr>
<td class="th_text" valign ="top">
@@ -156,14 +189,11 @@
</td>
<td>
<table>
-
<xsl:for-each select="data">
<tr>
-
<td class="th_text" align="left" >
-
<a href="{link}"
title="{statustext}" style ="cursor:help"><xsl:value-of select="id"/></a>
+
<a href="{link}"
title="{statustext}" ><xsl:value-of select="id"/></a>
<xsl:text> </xsl:text>
-
<xsl:choose>
<xsl:when
test="location ='.project.request'">
<input
type="checkbox" name="values[delete_request][]" value="{id}" >
@@ -192,7 +222,7 @@
<xsl:for-each select="data">
<tr>
<td class="th_text" align="left" >
-
<a href="{link}"
title="{statustext}" style ="cursor:help"><xsl:value-of select="id"/></a>
+
<a href="{link}"
title="{statustext}"><xsl:value-of select="id"/></a>
<xsl:text> </xsl:text>
</td>
</tr>
@@ -210,7 +240,7 @@
</td>
<td
class="th_text" align="left" >
<xsl:for-each select="data">
-
<a href="{link}" title="{//lang_target_statustext}"><xsl:value-of
select="id"/></a>
+
<a href="{link}" title="{statustext}"><xsl:value-of select="id"/></a>
<xsl:text> </xsl:text>
</xsl:for-each>
</td>
Modified: branches/Version-1_0-branch/rental/inc/class.uimakepdf.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.uimakepdf.inc.php
2011-02-25 06:36:46 UTC (rev 7055)
+++ branches/Version-1_0-branch/rental/inc/class.uimakepdf.inc.php
2011-02-25 07:49:04 UTC (rev 7056)
@@ -415,8 +415,10 @@
*/
public function makePDF()
{
-
- $myFile =
"/tmp/temp_contract_".strtotime(date('Y-m-d')).".html";
+ $config = CreateObject('phpgwapi.config','rental');
+ $config->read();
+ $tmp_dir = $GLOBALS['phpgw_info']['server']['temp_dir'];
+ $myFile = $tmp_dir .
"/temp_contract_".strtotime(date('Y-m-d')).".html";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML
4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
fwrite($fh, $stringData);
@@ -430,15 +432,17 @@
//echo $_SESSION['contract_html'];
$_SESSION['contract_html'] = "";
- $pdf_file_name =
"/tmp/temp_contract_".strtotime(date('Y-m-d')).".pdf";
- $snappy = new SnappyPdf;
-
$snappy->setExecutable('/opt/portico/pe/rental/wkhtmltopdf-i386'); // or
whatever else
+ $pdf_file_name = $tmp_dir .
"/temp_contract_".strtotime(date('Y-m-d')).".pdf";
+ //var_dump($config->config_data['path_to_wkhtmltopdf']);
+ //var_dump($GLOBALS['phpgw_info']);
+ $wkhtmltopdf_executable =
$config->config_data['path_to_wkhtmltopdf'];
+ $snappy = new SnappyPdf();
+
//$snappy->setExecutable('/opt/portico/pe/rental/wkhtmltopdf-i386'); // or
whatever else
+ $snappy->setExecutable($wkhtmltopdf_executable); // or
whatever else
$snappy->save($myFile, $pdf_file_name);
$contract_id = phpgw::get_var('id');
- //var_dump("contr: " . phpgw::get_var('id'));
- //$pdf_file = fopen($pdf_file_name, 'r') or die("cannot
open file $pdf_file_name");
$this->savePDFToContract($pdf_file_name, $contract_id,
'Kontrakt');
}
Modified: branches/Version-1_0-branch/rental/templates/base/config.tpl
===================================================================
--- branches/Version-1_0-branch/rental/templates/base/config.tpl
2011-02-25 06:36:46 UTC (rev 7055)
+++ branches/Version-1_0-branch/rental/templates/base/config.tpl
2011-02-25 07:49:04 UTC (rev 7056)
@@ -103,6 +103,11 @@
<td>{lang_login_external_db_password}:</td>
<td><input type ="password"
name="newsettings[external_db_password]"
value="{value_external_db_password}"></td>
</tr>
+
+ <tr class="row_on">
+ <td>{lang_path_to_wkhtmltopdf}:</td>
+ <td><input name="newsettings[path_to_wkhtmltopdf]"
value="{value_path_to_wkhtmltopdf}"></td>
+ </tr>
<!-- END body -->
<!-- BEGIN footer -->
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7056] Merge 7046:7055 from trunk,
Sigurd Nes <=