[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15258] Backport 15253:15257 from Syncromind
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15258] Backport 15253:15257 from Syncromind |
Date: |
Sun, 5 Jun 2016 14:17:39 +0000 (UTC) |
Revision: 15258
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15258
Author: sigurdne
Date: 2016-06-05 14:17:38 +0000 (Sun, 05 Jun 2016)
Log Message:
-----------
Backport 15253:15257 from Syncromind
Modified Paths:
--------------
trunk/property/inc/class.sogeneric_document.inc.php
trunk/property/inc/class.uigeneric_document.inc.php
trunk/property/templates/base/generic_document.xsl
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/dev-syncromind:13653
/branches/dev-syncromind-2:14937-15027,15165-15215,15223-15228,15230-15243,15245-15250
/branches/stavangerkommune:12743-12875,12986
+ /branches/dev-syncromind:13653
/branches/dev-syncromind-2:14937-15027,15165-15215,15223-15228,15230-15243,15245-15250,15254-15257
/branches/stavangerkommune:12743-12875,12986
Modified: trunk/property/inc/class.sogeneric_document.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric_document.inc.php 2016-06-04 00:34:44 UTC
(rev 15257)
+++ trunk/property/inc/class.sogeneric_document.inc.php 2016-06-05 14:17:38 UTC
(rev 15258)
@@ -47,6 +47,7 @@
$start = isset($data['start']) && $data['start'] ?
$data['start'] : 0;
$sort = isset($data['sort']) && $data['sort'] ?
$data['sort'] : 'ASC';
$order = isset($data['order']) ? $data['order'] : '';
+ $query = isset($data['query']) ? $data['query'] : '';
$allrows = isset($data['allrows']) ? $data['allrows'] :
'';
$dry_run = isset($data['dry_run']) ? $data['dry_run'] :
'';
$user_id = isset($data['user_id']) && $data['user_id']
? (int)$data['user_id'] : 0;
@@ -116,8 +117,15 @@
$filtermethod .= " AND a.directory
{$this->like} '%{$location}%'";
}
- $sql = "SELECT DISTINCT a.file_id, a.* FROM phpgw_vfs a
" ." {$joinmethod} "." {$filtermethod} ";
-
+ $querymethod = '';
+ if ($query)
+ {
+ $query = $this->db->db_addslashes($query);
+ $querymethod = " AND a.name $this->like
'%$query%'";
+ }
+
+ $sql = "SELECT DISTINCT a.file_id, a.* FROM phpgw_vfs a
" ." {$joinmethod} "." {$filtermethod} "." {$querymethod} ";
+
$this->db->query($sql, __LINE__, __FILE__);
$this->total_records = $this->db->num_rows();
Modified: trunk/property/inc/class.uigeneric_document.inc.php
===================================================================
--- trunk/property/inc/class.uigeneric_document.inc.php 2016-06-04 00:34:44 UTC
(rev 15257)
+++ trunk/property/inc/class.uigeneric_document.inc.php 2016-06-05 14:17:38 UTC
(rev 15258)
@@ -259,14 +259,18 @@
{
return $values;
}
-
+
+ foreach($values as &$item)
+ {
+ $item['name'] = '<a
href="'.self::link(array('menuaction' =>
'property.uigeneric_document.view_file', 'file_id' =>
$item['id'])).'">'.$item['name'].'</a>';
+ $item['link'] = self::link(array('menuaction'
=> 'property.uigeneric_document.view', 'id' => $item['id']));
+ }
+
$result_data = array('results' => $values);
$result_data['total_records'] =
$this->bo->total_records;
$result_data['draw'] = $draw;
- array_walk($result_data['results'], array($this,
'_add_links'), array('menuaction' => 'property.uigeneric_document.view'));
-
return $this->jquery_results($result_data);
}
@@ -492,11 +496,16 @@
);
}
+ $vfs = CreateObject('phpgwapi.vfs');
+ $file_info = $vfs->get_info($id);
+
$data = array
(
'datatable_def' => $datatable_def,
'document' => $values,
'lang_coordinator' => lang('coordinator'),
+ 'link_file' => self::link(array('menuaction'
=> 'property.uigeneric_document.view_file', 'file_id' =>
$file_info['file_id'])),
+ 'file_name' => $file_info['name'],
'categories' => array('options' => $categories),
'status_list' => array('options' => array('id'
=> 1, 'name' => 'status_1')),
'editable' => $mode == 'edit',
Modified: trunk/property/templates/base/generic_document.xsl
===================================================================
--- trunk/property/templates/base/generic_document.xsl 2016-06-04 00:34:44 UTC
(rev 15257)
+++ trunk/property/templates/base/generic_document.xsl 2016-06-05 14:17:38 UTC
(rev 15258)
@@ -198,6 +198,12 @@
</xsl:otherwise>
</xsl:choose>
</div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'file')"/>
+ </label>
+ <a
href="{link_file}"><xsl:value-of select="file_name" /></a>
+ </div>
<xsl:choose>
<xsl:when
test="editable = 1">
<div
class="pure-control-group">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15258] Backport 15253:15257 from Syncromind,
sigurdne <=