[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16843] list document path on generic documents
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16843] list document path on generic documents |
Date: |
Tue, 6 Jun 2017 12:46:54 -0400 (EDT) |
Revision: 16843
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16843
Author: sigurdne
Date: 2017-06-06 12:46:54 -0400 (Tue, 06 Jun 2017)
Log Message:
-----------
list document path on generic documents
Modified Paths:
--------------
trunk/property/inc/class.sogeneric_document.inc.php
trunk/property/inc/class.uilocation.inc.php
Modified: trunk/property/inc/class.sogeneric_document.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric_document.inc.php 2017-06-06 15:42:13 UTC
(rev 16842)
+++ trunk/property/inc/class.sogeneric_document.inc.php 2017-06-06 16:46:54 UTC
(rev 16843)
@@ -131,7 +131,7 @@
$querymethod .= " OR metadata->>'path' ilike
'%{$query}%')";
}
- $sql = "SELECT DISTINCT a.file_id, a.* FROM phpgw_vfs a
" ." {$joinmethod} "." {$filtermethod} "." {$querymethod} ";
+ $sql = "SELECT DISTINCT a.file_id, a.*,
metadata->>'path' as path FROM phpgw_vfs a " ." {$joinmethod} "."
{$filtermethod} "." {$querymethod} ";
$this->db->query($sql, __LINE__, __FILE__);
$this->total_records = $this->db->num_rows();
@@ -166,7 +166,8 @@
'name' => $this->db->f('name'),
'link_directory' =>
$this->db->f('link_directory', true),
'link_name' =>
$this->db->f('link_name', true),
- 'version' =>
$this->db->f('version')
+ 'version' =>
$this->db->f('version'),
+ 'path' =>
$this->db->f('path'),
);
}
}
Modified: trunk/property/inc/class.uilocation.inc.php
===================================================================
--- trunk/property/inc/class.uilocation.inc.php 2017-06-06 15:42:13 UTC (rev
16842)
+++ trunk/property/inc/class.uilocation.inc.php 2017-06-06 16:46:54 UTC (rev
16843)
@@ -1721,13 +1721,20 @@
$total_records += $generic_document->total_records;
foreach ($documents2 as $item)
{
+ $title = '';
+ if($item['path'])
+ {
+ $temp = json_decode($item['path']);
+ $title = implode('<br/>', $temp);
+ }
+
$document_name = '<a
href="'.self::link(array('menuaction'=>'property.uigeneric_document.view_file',
'file_id'=>$item['id'])).'" target="_blank">'.$item['name'].'</a>';
$values[] = array(
'id'=> $item['id'],
'type'=> 'generic',
'document_name' => $document_name,
- 'title'=> $item['title'],
- 'document_date' =>
$item['document_date'] // fixme
+ 'title'=> $title,
+ 'document_date' => $item['created']
);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16843] list document path on generic documents,
sigurdne <=