[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13866] add download button
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [13866] add download button |
Date: |
Wed, 09 Sep 2015 08:54:57 +0000 |
Revision: 13866
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13866
Author: sigurdne
Date: 2015-09-09 08:54:56 +0000 (Wed, 09 Sep 2015)
Log Message:
-----------
add download button
Modified Paths:
--------------
trunk/property/inc/class.uilocation.inc.php
trunk/property/js/yahoo/location.responsiblility_role.js
Modified: trunk/property/inc/class.uilocation.inc.php
===================================================================
--- trunk/property/inc/class.uilocation.inc.php 2015-09-09 00:11:13 UTC (rev
13865)
+++ trunk/property/inc/class.uilocation.inc.php 2015-09-09 08:54:56 UTC (rev
13866)
@@ -120,17 +120,52 @@
$lookup = phpgw::get_var('lookup',
'bool');
//$lookup_name = phpgw::get_var('lookup_name');
$lookup_tenant = phpgw::get_var('lookup_tenant',
'bool');
+ $download_type = phpgw::get_var('download_type');
- if(!$summary)
+ if (!$this->acl_read)
{
+ $this->bocommon->no_access();
+ return;
+ }
+
+ if($download_type == 'responsiblility_role')
+ {
+ $user_id =
phpgw::get_var('user_id', 'int');
+ $role_id =
phpgw::get_var('role_id', 'int');
+
+ $list =
$this->bo->get_responsible(array('user_id' => $user_id, 'role_id' =>$role_id,
'type_id'=>$type_id,'lookup_tenant'=>$lookup_tenant,'lookup'=>$lookup,'allrows'=>$this->allrows));
+
+ foreach($list as &$entry)
+ {
+ $entry['role_id'] = $role_id;
+ }
+
+ $uicols = $this->bo->uicols;
+
+ $uicols['name'][] = 'role_id';
+ $uicols['descr'][] = 'role_id';
+ $uicols['input_type'][] = '';
+
+ $uicols['name'][] =
'responsible_contact';
+ $uicols['descr'][] =
lang('responsible');
+ $uicols['input_type'][] = '';
+
+ $uicols['name'][] = 'contact_id';
+ $uicols['descr'][] = 'contact_id';
+ $uicols['input_type'][] = '';
+
+ }
+ else if(!$summary)
+ {
$list =
$this->bo->read(array('type_id'=>$type_id,'lookup_tenant'=>$lookup_tenant,'lookup'=>$lookup,'allrows'=>true));
+ $uicols = $this->bo->uicols;
}
else
{
$list= $this->bo->read_summary();
+ $uicols = $this->bo->uicols;
}
- $uicols = $this->bo->uicols;
$this->bocommon->download($list,$uicols['name'],$uicols['descr'],$uicols['input_type']);
}
@@ -1174,7 +1209,8 @@
'cat_id'
=> $this->cat_id,
'status'
=> $this->status,
'location_code'
=> $this->location_code,
- 'menu_selection'
=> $_menu_selection
+ 'menu_selection'
=> $_menu_selection,
+ 'download_type' =>
'responsiblility_role'
));
$datatable['config']['allow_allrows'] = true;
@@ -1192,9 +1228,9 @@
."status:'{$this->status}',"
."location_code:'{$this->location_code}',"
."block_query:'{$block_query}',"
- ."menu_selection:'{$_menu_selection}'";
+ ."menu_selection:'{$_menu_selection}',"
+ .
"download_type:'responsiblility_role'";
-
$values_combo_box[0] =
execMethod('property.soadmin_location.read',array());
//$values_combo_box[0] =
array(array('id'=>'1','name'=> 'Eiendom'));
@@ -1294,7 +1330,8 @@
'filter'
=> $this->filter,
'sort'
=> $this->sort,
'order'
=> $this->order,
-
'menu_selection' => $_menu_selection
+
'menu_selection' => $_menu_selection,
+ 'download_type'
=> 'responsiblility_role'
)
),
'fields' => array
@@ -1374,6 +1411,13 @@
'tab_index' => 8
),
array
+ (
+ 'id'
=> 'btn_export',
+ 'type'
=> 'button',
+ 'value'
=> lang('download'),
+
'tab_index' => 9
+ ),
+ array
( // TEXT IMPUT
'name'
=> 'query',
'id'
=> 'txt_query',
Modified: trunk/property/js/yahoo/location.responsiblility_role.js
===================================================================
--- trunk/property/js/yahoo/location.responsiblility_role.js 2015-09-09
00:11:13 UTC (rev 13865)
+++ trunk/property/js/yahoo/location.responsiblility_role.js 2015-09-09
08:54:56 UTC (rev 13866)
@@ -13,10 +13,11 @@
];
// define buttons
- var oNormalButton_0, oNormalButton_1;//, oNormalButton_2;
+ var oNormalButton_0, oNormalButton_1, oNormalButton_2;
var normalButtons = [
{order:0, name:'btn_search', funct:"onSearchClick"},
- {order:1, name:'btn_save', funct:"onSave"}
+ {order:1, name:'btn_save', funct:"onSave"},
+ {order:2, name:'btn_export', funct:"onDownloadClick"}
];
// define Text buttons
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13866] add download button,
Sigurd Nes <=