[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15692] property: document handling
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15692] property: document handling |
Date: |
Mon, 19 Sep 2016 09:29:21 +0000 (UTC) |
Revision: 15692
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15692
Author: sigurdne
Date: 2016-09-19 09:29:21 +0000 (Mon, 19 Sep 2016)
Log Message:
-----------
property: document handling
Modified Paths:
--------------
trunk/property/inc/class.sodocument.inc.php
trunk/property/inc/class.uilocation.inc.php
Modified: trunk/property/inc/class.sodocument.inc.php
===================================================================
--- trunk/property/inc/class.sodocument.inc.php 2016-09-17 01:18:46 UTC (rev
15691)
+++ trunk/property/inc/class.sodocument.inc.php 2016-09-19 09:29:21 UTC (rev
15692)
@@ -34,6 +34,8 @@
class property_sodocument
{
+ public $total_records = 0;
+
function __construct()
{
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
Modified: trunk/property/inc/class.uilocation.inc.php
===================================================================
--- trunk/property/inc/class.uilocation.inc.php 2016-09-17 01:18:46 UTC (rev
15691)
+++ trunk/property/inc/class.uilocation.inc.php 2016-09-19 09:29:21 UTC (rev
15692)
@@ -1690,9 +1690,10 @@
'location_code' => $location_code
);
+ $dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
$document = CreateObject('property.sodocument');
$documents = $document->read_at_location($params);
-
+ $total_records = $document->total_records;
foreach ($documents as $item)
{
$document_name = '<a
href="'.self::link(array('menuaction'=>'property.uidocument.view_file',
'id'=>$item['document_id'])).'" target="_blank">'.$item['document_name'].'</a>';
@@ -1700,7 +1701,8 @@
'id'=> $item['document_id'],
'type'=> 'location',
'document_name' => $document_name,
- 'title'=> $item['title']
+ 'title'=> $item['title'],
+ 'document_date' =>
$GLOBALS['phpgw']->common->show_date($item['document_date'],$dateformat)
);
}
unset($item);
@@ -1711,6 +1713,7 @@
$params['order'] = 'name';
$params['cat_id'] = $doc_type;
$documents2 = $generic_document->read($params);
+ $total_records += $generic_document->total_records;
foreach ($documents2 as $item)
{
$document_name = '<a
href="'.self::link(array('menuaction'=>'property.uigeneric_document.view_file',
'file_id'=>$item['id'])).'" target="_blank">'.$item['name'].'</a>';
@@ -1718,13 +1721,14 @@
'id'=> $item['id'],
'type'=> 'generic',
'document_name' => $document_name,
- 'title'=> $item['title']
+ 'title'=> $item['title'],
+ 'document_date' =>
$item['document_date'] // fixme
);
}
$result_data = array('results' => $values);
- $result_data['total_records'] = count($values);
+ $result_data['total_records'] = $total_records;
$result_data['draw'] = $draw;
return $this->jquery_results($result_data);
@@ -2146,8 +2150,9 @@
$documents_def = array(
array('key' => 'id', 'label' =>
lang('id'), 'sortable' => false, 'resizeable' => true),
- array('key' => 'document_name',
'label' => lang('name'), 'sortable' => false, 'resizeable' => true),
- array('key' => 'title', 'label'
=> lang('title'), 'sortable' => false, 'resizeable' => true)
+ array('key' => 'document_name',
'label' => lang('name'), 'sortable' => true, 'resizeable' => true),
+ array('key' => 'title', 'label'
=> lang('title'), 'sortable' => true, 'resizeable' => true),
+ array('key' => 'document_date',
'label' => lang('date'), 'sortable' => true, 'resizeable' => true),
);
$datatable_def[] = array
@@ -2158,7 +2163,7 @@
'tabletools' => ($mode ==
'edit') ? $documents_tabletools : array(),
'ColumnDefs' => $documents_def,
'config' => array(
- array('disableFilter'
=> true)
+ // array('disableFilter'
=> true)
)
);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15692] property: document handling,
sigurdne <=