[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6750] property: download jrxml-file
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6750] property: download jrxml-file |
Date: |
Tue, 11 Jan 2011 22:28:48 +0000 |
Revision: 6750
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6750
Author: sigurdne
Date: 2011-01-11 22:28:48 +0000 (Tue, 11 Jan 2011)
Log Message:
-----------
property: download jrxml-file
Modified Paths:
--------------
trunk/property/inc/class.uijasper.inc.php
Modified: trunk/property/inc/class.uijasper.inc.php
===================================================================
--- trunk/property/inc/class.uijasper.inc.php 2011-01-11 20:08:52 UTC (rev
6749)
+++ trunk/property/inc/class.uijasper.inc.php 2011-01-11 22:28:48 UTC (rev
6750)
@@ -48,7 +48,8 @@
'edit' => true,
'delete' => true,
'download' => true,
- 'view' => true
+ 'view' => true,
+ 'get_file' => true
);
function __construct()
@@ -117,6 +118,21 @@
$this->bocommon->download($list,$uicols['name'],$uicols['descr'],$uicols['input_type']);
}
+ function get_file()
+ {
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uilocation.stop', 'perm'=>1, 'acl_location'=> $this->acl_location));
+ }
+
+ $jasper_id =
phpgw::get_var('jasper_id', 'int');
+ $values =
$this->bo->read_single($jasper_id);
+
+ $bofiles = CreateObject('property.bofiles');
+ $file =
"{$bofiles->fakebase}/jasper/{$jasper_id}/{$values['file_name']}";
+ $bofiles->view_file('', $file);
+ }
+
function index()
{
if(!$this->acl_read)
@@ -307,6 +323,17 @@
)),
'parameters'
=> $parameters_view
);
+ $datatable['rowactions']['action'][] = array
+ (
+ 'my_name' =>
'edit',
+ 'text' =>
lang('download JasperReport %1 definition', $report['title']),
+ 'action' =>
$GLOBALS['phpgw']->link('/index.php',array
+ (
+ 'menuaction' =>
'property.uijasper.get_file',
+ 'target'
=> '_blank'
+ )),
+ 'parameters'
=> $parameters_view
+ );
}
if($this->acl_delete)
@@ -753,6 +780,8 @@
}
if(!$user_input)
{
+ $GLOBALS['phpgw_info']['flags']['noheader'] =
true;
+ $GLOBALS['phpgw_info']['flags']['nofooter'] =
true;
$GLOBALS['phpgw_info']['flags']['xslt_app'] =
false;
$jasper_parameters = '';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6750] property: download jrxml-file,
Sigurd Nes <=