[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [12212] Merge 12110:12211 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [12212] Merge 12110:12211 from trunk |
Date: |
Tue, 21 Oct 2014 09:02:46 +0000 |
Revision: 12212
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12212
Author: sigurdne
Date: 2014-10-21 09:02:45 +0000 (Tue, 21 Oct 2014)
Log Message:
-----------
Merge 12110:12211 from trunk
Modified Paths:
--------------
branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php
branches/dev-syncromind/controller/inc/class.uicontrol.inc.php
branches/dev-syncromind/controller/inc/class.uiprocedure.inc.php
branches/dev-syncromind/controller/templates/base/check_list/print_check_list.xsl
branches/dev-syncromind/controller/templates/base/procedure/print_procedure.xsl
branches/dev-syncromind/property/inc/class.botts.inc.php
branches/dev-syncromind/property/inc/class.soproject.inc.php
branches/dev-syncromind/property/inc/class.sotts.inc.php
branches/dev-syncromind/property/inc/class.uitts.inc.php
branches/dev-syncromind/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
branches/dev-syncromind/property/setup/phpgw_no.lang
Property Changed:
----------------
branches/dev-syncromind/
Property changes on: branches/dev-syncromind
___________________________________________________________________
Added: svn:mergeinfo
+ /trunk:12111-12211
Modified: branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php
===================================================================
--- branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php
2014-10-21 07:58:25 UTC (rev 12211)
+++ branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php
2014-10-21 09:02:45 UTC (rev 12212)
@@ -679,6 +679,11 @@
$control =
$this->so_control->get_single($check_list->get_control_id());
$control_groups =
$this->so_control_group_list->get_control_groups_by_control($control->get_id());
+
+ $location_code = $check_list->get_location_code();
+ $location_array =
execMethod('property.bolocation.read_single', array('location_code' =>
$location_code));
+ $level =
$this->location_finder->get_location_level($location_code);
+ //var_dump($location_array);
$saved_groups_with_items_array = array();
@@ -695,7 +700,10 @@
$data = array
(
'saved_groups_with_items_array' =>
$saved_groups_with_items_array,
- 'check_list' => $check_list
+ 'check_list' => $check_list,
+ 'control' => $control->toArray(),
+ 'location_array' => $location_array,
+ 'location_level' => $level
);
self::render_template_xsl('check_list/print_check_list', $data);
Modified: branches/dev-syncromind/controller/inc/class.uicontrol.inc.php
===================================================================
--- branches/dev-syncromind/controller/inc/class.uicontrol.inc.php
2014-10-21 07:58:25 UTC (rev 12211)
+++ branches/dev-syncromind/controller/inc/class.uicontrol.inc.php
2014-10-21 09:02:45 UTC (rev 12212)
@@ -143,7 +143,7 @@
$cats->supress_info = true;
$control_areas =
$cats->formatted_xslt_list(array('format'=>'filter','selected' =>
$control_area_id,'globals' => true,'use_acl' => $this->_category_acl));
- array_unshift($control_areas['cat_list'],array
('cat_id'=>'','name'=> lang('select value')));
+ array_unshift($control_areas['cat_list'],array
('cat_id'=>'','name'=> lang('select value')));
$control_areas_array = array();
foreach($control_areas['cat_list'] as $cat_list)
{
Modified: branches/dev-syncromind/controller/inc/class.uiprocedure.inc.php
===================================================================
--- branches/dev-syncromind/controller/inc/class.uiprocedure.inc.php
2014-10-21 07:58:25 UTC (rev 12211)
+++ branches/dev-syncromind/controller/inc/class.uiprocedure.inc.php
2014-10-21 09:02:45 UTC (rev 12212)
@@ -615,6 +615,7 @@
'procedure' => $procedure->toArray(),
'dateformat' =>
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']
);
+ //var_dump($procedure->toArray());
if( !empty($control_group_id) )
{
Modified:
branches/dev-syncromind/controller/templates/base/check_list/print_check_list.xsl
===================================================================
---
branches/dev-syncromind/controller/templates/base/check_list/print_check_list.xsl
2014-10-21 07:58:25 UTC (rev 12211)
+++
branches/dev-syncromind/controller/templates/base/check_list/print_check_list.xsl
2014-10-21 09:02:45 UTC (rev 12212)
@@ -1,6 +1,16 @@
<!-- $Id: choose_control_items.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
<xsl:template match="data">
+
+ <h1><xsl:value-of select="control/title" /></h1>
+ <xsl:choose>
+ <xsl:when test="location_level = 1">
+ <h2>Eiendom: <xsl:value-of
select="location_array/loc1_name"/></h2>
+ </xsl:when>
+ <xsl:otherwise>
+ <h2>Bygg: <xsl:value-of
select="location_array/loc2_name"/></h2>
+ </xsl:otherwise>
+ </xsl:choose>
<ul class="groups">
<xsl:for-each select="saved_groups_with_items_array">
@@ -27,7 +37,7 @@
<li class="list_item">
<span
class="order_nr"><xsl:number/></span>. <xsl:value-of select="title"/><input
type="hidden" name="order_nr[]" value="{$order_tag}" />
<br/><i>Hva skal
utføres</i><br/><xsl:value-of select="what_to_do"
disable-output-escaping="yes"/>
-
<br/><i>Utførelsesbeskrivelse</i><br/><xsl:value-of select="how_to_do"
disable-output-escaping="yes"/><br/><br/>
+
<br/><br/><i>Utførelsesbeskrivelse</i><br/><xsl:value-of select="how_to_do"
disable-output-escaping="yes"/><br/>
</li>
</xsl:for-each>
</ul>
@@ -55,6 +65,10 @@
list-style: none outside none;
}
+li.list_item ol li{
+ list-style: decimal;
+}
+
ul.groups li {
padding: 3px 0;
}
Modified:
branches/dev-syncromind/controller/templates/base/procedure/print_procedure.xsl
===================================================================
---
branches/dev-syncromind/controller/templates/base/procedure/print_procedure.xsl
2014-10-21 07:58:25 UTC (rev 12211)
+++
branches/dev-syncromind/controller/templates/base/procedure/print_procedure.xsl
2014-10-21 09:02:45 UTC (rev 12212)
@@ -17,8 +17,10 @@
</div>
<div>
<label for="start_date"><xsl:value-of
select="php:function('lang','Procedure valid from date')" /></label>
- <xsl:variable name="startdate"><xsl:value-of
select="procedure/start_date" /></xsl:variable>
- <xsl:value-of select="php:function('date',
$date_format, $startdate)" />
+ <xsl:if test="procedure/start_date != 0">
+ <xsl:variable name="startdate"><xsl:value-of
select="procedure/start_date" /></xsl:variable>
+ <xsl:value-of select="php:function('date',
$date_format, $startdate)" />
+ </xsl:if>
</div>
<div>
<label for="revision_date"><xsl:value-of
select="php:function('lang','Procedure revision date')" /></label>
@@ -41,7 +43,7 @@
</div>
<div>
<label for="responsibility"><xsl:value-of
select="php:function('lang','Procedure responsibility')" /></label>
- <span style="display: inline-block;width:
600px;"><xsl:value-of select="procedure/responsibility" /></span>
+ <span style="display: inline-block;width:
600px;"><xsl:value-of select="procedure/responsibility"
disable-output-escaping="yes"/></span>
</div>
<div>
<label for="description"><xsl:value-of
select="php:function('lang','Procedure description')" /></label>
@@ -109,6 +111,10 @@
font-size: 18px;
margin: 0 0 5px;
}
+
+ #procedure ul li{
+ list-style: disc;
+ }
</style>
</xsl:template>
\ No newline at end of file
Modified: branches/dev-syncromind/property/inc/class.botts.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.botts.inc.php 2014-10-21
07:58:25 UTC (rev 12211)
+++ branches/dev-syncromind/property/inc/class.botts.inc.php 2014-10-21
09:02:45 UTC (rev 12212)
@@ -47,6 +47,7 @@
var $fields_updated = false;
var $status_id;
var $user_id;
+ var $reported_by;
var $part_of_town_id;
var $district_id;
public $total_records = 0;
@@ -119,6 +120,7 @@
$order =
phpgw::get_var('order');
$status_id =
phpgw::get_var('status_id', 'string');
$user_id =
phpgw::get_var('user_id', 'int');
+ $reported_by =
phpgw::get_var('reported_by', 'int');
$cat_id =
phpgw::get_var('cat_id', 'int');
$part_of_town_id =
phpgw::get_var('part_of_town_id', 'int');
$district_id =
phpgw::get_var('district_id', 'int');
@@ -140,7 +142,9 @@
$this->order =
isset($_REQUEST['order']) ? $order :
$this->order;
$this->cat_id =
isset($_REQUEST['cat_id']) ? $cat_id :
$this->cat_id;
$this->status_id =
isset($_REQUEST['status_id']) ? $status_id :
$this->status_id;
- $this->user_id =
isset($_REQUEST['user_id']) ? $user_id :
$this->user_id;;
+ $this->user_id =
isset($_REQUEST['user_id']) ? $user_id :
$this->user_id;
+ $this->reported_by =
isset($_REQUEST['user_id']) ? $reported_by :
$this->reported_by;
+
$this->part_of_town_id =
isset($_REQUEST['part_of_town_id'])? $part_of_town_id : $this->part_of_town_id;
$this->district_id =
isset($_REQUEST['district_id']) ? $district_id :
$this->district_id;
$this->allrows = isset($allrows) &&
$allrows ? $allrows : '';
@@ -172,6 +176,7 @@
$this->start =
isset($data['start'])?$data['start']:'';
$this->query =
isset($data['query'])?$data['query']:'';
$this->user_id =
isset($data['user_id'])?$data['user_id']:'';
+ $this->reported_by =
isset($data['reported_by'])?$data['reported_by']:'';
$this->sort =
isset($data['sort'])?$data['sort']:'';
$this->order =
isset($data['order'])?$data['order']:'';
$this->status_id =
isset($data['status_id'])?$data['status_id']:'';
@@ -499,7 +504,7 @@
$tickets = $this->so->read(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
'status_id' => $this->status_id,'cat_id' =>
$this->cat_id,'district_id' => $this->district_id,
'part_of_town_id' => $this->part_of_town_id,
'start_date'=>$start_date,'end_date'=>$end_date,
- 'allrows'=>$this->allrows,'user_id' =>
$this->user_id,'external'=>$external, 'dry_run' => $dry_run,
+ 'allrows'=>$this->allrows,'user_id' =>
$this->user_id,'reported_by' => $this->reported_by, 'external'=>$external,
'dry_run' => $dry_run,
'location_code' => $this->location_code,
'p_num' => $this->p_num, 'vendor_id' => $this->vendor_id,
'ecodimb' => $this->ecodimb, 'b_account' =>
$this->b_account, 'building_part' => $this->building_part,
'branch_id' => $this->branch_id ,'order_dim1'
=> $this->order_dim1));
@@ -1656,4 +1661,16 @@
}
return $payments;
}
+
+ public function get_reported_by($selected=0)
+ {
+ $values = $this->so->get_reported_by();
+
+ foreach($values as &$entry)
+ {
+ $entry['selected'] = $entry['id'] ==
$selected ? 1 : 0;
+ }
+ return $values;
+
+ }
}
Modified: branches/dev-syncromind/property/inc/class.soproject.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.soproject.inc.php
2014-10-21 07:58:25 UTC (rev 12211)
+++ branches/dev-syncromind/property/inc/class.soproject.inc.php
2014-10-21 09:02:45 UTC (rev 12212)
@@ -1620,7 +1620,7 @@
$workorder_closed_status =
isset($this->config->config_data['workorder_closed_status']) &&
$this->config->config_data['workorder_closed_status'] ?
$this->config->config_data['workorder_closed_status'] : 'closed';
- if($old_status != $project['status'])
+ if($old_status != $project['status'] &&
!$close_workorders)
{
$historylog->add('S', $project['id'],
$project['status'], $old_status);
$receipt['notice_owner'][] =
lang('Status changed') . ': ' . $project['status'];
Modified: branches/dev-syncromind/property/inc/class.sotts.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.sotts.inc.php 2014-10-21
07:58:25 UTC (rev 12211)
+++ branches/dev-syncromind/property/inc/class.sotts.inc.php 2014-10-21
09:02:45 UTC (rev 12212)
@@ -122,7 +122,7 @@
$start = isset($data['start']) &&
$data['start'] ? (int)$data['start']:0;
$status_id = isset($data['status_id']) &&
$data['status_id'] ? $data['status_id']:'O'; //O='Open'
$user_id = isset($data['user_id']) &&
$data['user_id'] ? (int)$data['user_id']: 0;
- $owner_id =
isset($data['owner_id'])?$data['owner_id']:'';
+ $reported_by = isset($data['reported_by']) &&
$data['reported_by'] ? (int)$data['reported_by']: 0;
$query =
isset($data['query'])?$data['query']:'';
$sort = isset($data['sort']) &&
$data['sort'] ? $data['sort']:'DESC';
$order =
isset($data['order'])?$data['order']:'';
@@ -372,9 +372,9 @@
$where = 'AND';
}
- if ($owner_id > 0)
+ if ($reported_by > 0)
{
- $filtermethod .= " $where
fm_tts_tickets.user_id=" . (int)$owner_id;
+ $filtermethod .= " $where
fm_tts_tickets.user_id=" . (int)$reported_by;
$where = 'AND';
}
@@ -1754,4 +1754,22 @@
return $values;
}
+ public function get_reported_by()
+ {
+ $values = array();
+ $sql = "SELECT DISTINCT user_id as id ,
account_lastname, account_firstname FROM fm_tts_tickets $this->join
phpgw_accounts ON fm_tts_tickets.user_id = phpgw_accounts.account_id ORDER BY
account_lastname ASC";
+
+ $this->db->query($sql, __LINE__,__FILE__);
+
+ while ($this->db->next_record())
+ {
+ $values[] = array
+ (
+ 'id' => $this->db->f('id'),
+ 'name' =>
$this->db->f('account_lastname', true) . ', ' .
$this->db->f('account_firstname', true)
+ );
+ }
+
+ return $values;
+ }
}
Modified: branches/dev-syncromind/property/inc/class.uitts.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uitts.inc.php 2014-10-21
07:58:25 UTC (rev 12211)
+++ branches/dev-syncromind/property/inc/class.uitts.inc.php 2014-10-21
09:02:45 UTC (rev 12212)
@@ -96,6 +96,7 @@
$this->order =
$this->bo->order;
$this->status_id =
$this->bo->status_id;
$this->user_id =
$this->bo->user_id;
+ $this->reported_by =
$this->bo->reported_by;
$this->cat_id =
$this->bo->cat_id;
$this->vendor_id =
$this->bo->vendor_id;
$this->district_id =
$this->bo->district_id;
@@ -121,6 +122,7 @@
'order' => $this->order,
'status_id' =>
$this->status_id,
'user_id' =>
$this->user_id,
+ 'reported_by' => $this->reported_by,
'cat_id' =>
$this->cat_id,
'vendor_id' =>
$this->vendor_id,
'district_id' => $this->district_id,
@@ -477,6 +479,7 @@
."cat_id:'{$this->cat_id}',"
."vendor_id:'{$this->vendor_id}',"
."status_id: '{$this->status_id}',"
+ ."reported_by: '{$this->reported_by}',"
."user_id: '{$this->user_id}',"
."query: '{$this->query}',"
."p_num: '{$this->p_num}',"
@@ -497,6 +500,7 @@
'vendor_id'
=> $this->vendor_id,
'status_id'
=> $this->status_id,
'user_id'
=> $this->user_id,
+ 'reported_by' =>
$this->reported_by,
'query'
=> $this->query,
'district_id' =>
$this->district_id,
'part_of_town_id' =>
$this->part_of_town_id,
@@ -537,6 +541,7 @@
array_unshift
($values_combo_box[4],array('id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>lang('my
assigned tickets')));
$_my_negative_self = (-1 *
$GLOBALS['phpgw_info']['user']['account_id']);
+/*
$default_value = array
(
'id' =>
$_my_negative_self,
@@ -545,10 +550,15 @@
);
unset($_my_negative_self);
array_unshift
($values_combo_box[4],$default_value);
-
- $default_value =
array('id'=>'','name'=>lang('no user'));
+*/
+ $default_value =
array('id'=>'','name'=>lang('assigned to'));
array_unshift
($values_combo_box[4],$default_value);
+ $values_combo_box[5] =
$this->bo->get_reported_by($this->reported_by);
+ array_unshift
($values_combo_box[5],array('id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>lang('my
submitted tickets')));
+ array_unshift
($values_combo_box[5],array('id'=>'','name'=>lang('reported by')));
+
+
$datatable['actions']['form'] = array
(
array
@@ -618,58 +628,70 @@
'tab_index' => 5
),
array
+ (
//boton USER
+
// 'id' => 'btn_user_id',
+
'id' => 'sel_reported_by', // testing traditional listbox for long list
+
'name' => 'reported_by',
+
'value' => lang('reported by'),
+
'type' => 'select',
+
'style' => 'filter',
+
'values' => $values_combo_box[5],
+
'onchange'=> 'onChangeSelect("reported_by");',
+
'tab_index' => 6
+ ),
+ array
(//for
link "columns", next to Export button
'type' => 'link',
'id' => 'btn_columns',
'url' => "Javascript:window.open('".$GLOBALS['phpgw']->link('/index.php',
-
array
-
(
-
'menuaction' => 'property.uitts.columns'
-
)
-
)."','','width=300,height=600,scrollbars=1')",
- 'value'
=> lang('columns'),
-
'tab_index' => 11
- ),
- array
- (
- 'type'
=> 'button',
- 'id'
=> 'btn_export',
- 'value'
=> lang('download'),
-
'tab_index' => 10
- ),
- array
- (
- 'type'
=> 'button',
- 'id'
=> 'btn_new',
- 'value'
=> lang('add'),
-
'tab_index' => 9
- ),
- array
- ( //hidden
start_date
- 'type'
=> 'hidden',
- 'id' =>
'start_date',
- 'value'
=> $start_date
- ),
- array
- ( //hidden
end_date
- 'type'
=> 'hidden',
- 'id' =>
'end_date',
- 'value'
=> $end_date
- ),
- array
- (//for link
"None",
-
'type'=> 'label_date'
- ),
- array
- (//for link
"Date search",
-
'type'=> 'link',
- 'id'
=> 'btn_data_search',
- 'url'
=> "Javascript:window.open('".$GLOBALS['phpgw']->link('/index.php',
+
array
+
(
+
'menuaction' => 'property.uitts.columns'
+
)
+
)."','','width=300,height=600,scrollbars=1')",
+
'value' => lang('columns'),
+
'tab_index' => 12
+ ),
array
(
+
'type' => 'button',
+
'id' => 'btn_export',
+
'value' => lang('download'),
+
'tab_index' => 11
+ ),
+ array
+ (
+
'type' => 'button',
+
'id' => 'btn_new',
+
'value' => lang('add'),
+
'tab_index' => 10
+ ),
+ array
+ (
//hidden start_date
+
'type' => 'hidden',
+
'id' => 'start_date',
+
'value' => $start_date
+ ),
+ array
+ (
//hidden end_date
+
'type' => 'hidden',
+
'id' => 'end_date',
+
'value' => $end_date
+ ),
+ array
+ (//for
link "None",
+
'type'=> 'label_date'
+ ),
+ array
+ (//for
link "Date search",
+
'type'=> 'link',
+
'id' => 'btn_data_search',
+
'url' => "Javascript:window.open('".$GLOBALS['phpgw']->link('/index.php',
+ array
+ (
'menuaction' =>
'property.uiproject.date_search'))."','','width=350,height=250')",
'value' => lang('Date search'),
-
'tab_index' => 8
+
'tab_index' => 9
),
array
(
//boton SEARCH
@@ -677,7 +699,7 @@
'name' => 'search',
'value' => lang('search'),
'type' => 'button',
-
'tab_index' => 7
+
'tab_index' => 8
),
array
( //
TEXT INPUT
@@ -687,7 +709,7 @@
'type' => 'text',
'onkeypress' => 'return pulsar(event)',
'size' => 28,
-
'tab_index' => 6
+
'tab_index' => 7
)
),
'hidden_value'
=> array
Modified:
branches/dev-syncromind/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
===================================================================
---
branches/dev-syncromind/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
2014-10-21 07:58:25 UTC (rev 12211)
+++
branches/dev-syncromind/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
2014-10-21 09:02:45 UTC (rev 12212)
@@ -199,22 +199,16 @@
$file_remote = $file_name;
$file_local =
"{$directory_local}/{$file_name}";
- $fp = fopen($file_local, "wb");
-
- if ($this->debug)
+ if(ftp_get($connection,
$file_local, $file_remote, FTP_ASCII))
{
- _debug_array('debug
fopen(): ' . $fp);
- }
-
-
if(ftp_fget($connection,$fp,$file_remote,FTP_ASCII))
- {
- if(
ftp_delete($connection, $file_remote))
+
if(ftp_rename($connection, $file_remote, "arkiv/{$file_remote}"))
{
+ echo "File
remote: {$file_remote} was moved to archive: arkiv/{$file_remote}<br/>";
echo "File
remote: {$file_remote} was copied to local: $file_local<br/>";
}
else
{
- echo "ERROR!
File remote: {$file_remote} failed to move from remote:
{$directory_remote}/{$file_name}<br/>";
+ echo "ERROR!
File remote: {$file_remote} failed to move from remote:
{$directory_remote}/arkiv/{$file_name}<br/>";
if(unlink($file_local))
{
echo
"Lokal file was deleted: {$file_local}<br/>";
@@ -225,7 +219,6 @@
{
echo "Feiler på
ftp_fget()<br/>";
}
- fclose($fp);
}
}
}
Modified: branches/dev-syncromind/property/setup/phpgw_no.lang
===================================================================
--- branches/dev-syncromind/property/setup/phpgw_no.lang 2014-10-21
07:58:25 UTC (rev 12211)
+++ branches/dev-syncromind/property/setup/phpgw_no.lang 2014-10-21
09:02:45 UTC (rev 12212)
@@ -193,6 +193,7 @@
assigned from property no Tildelt fra
assignedto property no Tildelt til
assigned to property no Tildelt til
+reported by property no Innmeldt av
assign to property no Til
async property no async
asynchronous timed services property no Planlagte oppgaver
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [12212] Merge 12110:12211 from trunk,
Sigurd Nes <=