[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14919] rental: fix search on locations
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14919] rental: fix search on locations |
Date: |
Wed, 13 Apr 2016 09:13:51 +0000 |
Revision: 14919
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14919
Author: sigurdne
Date: 2016-04-13 09:13:51 +0000 (Wed, 13 Apr 2016)
Log Message:
-----------
rental: fix search on locations
Modified Paths:
--------------
trunk/property/inc/class.uilocation.inc.php
trunk/rental/inc/class.socomposite.inc.php
trunk/rental/inc/class.socontract.inc.php
trunk/rental/inc/class.uicomposite.inc.php
trunk/rental/inc/class.uicontract.inc.php
trunk/rental/inc/class.uiparty.inc.php
Modified: trunk/property/inc/class.uilocation.inc.php
===================================================================
--- trunk/property/inc/class.uilocation.inc.php 2016-04-13 08:09:18 UTC (rev
14918)
+++ trunk/property/inc/class.uilocation.inc.php 2016-04-13 09:13:51 UTC (rev
14919)
@@ -1113,7 +1113,7 @@
'action' =>
$GLOBALS['phpgw']->link('/index.php', array
(
'menuaction' =>
'rental.uicontract.index',
- 'search_type' =>
'location_id',
+ 'search_type' =>
'location_code',
'contract_status' =>
'all',
'populate_form' => 'yes'
)),
@@ -1127,7 +1127,7 @@
'action' =>
$GLOBALS['phpgw']->link('/index.php', array
(
'menuaction' =>
'rental.uicomposite.index',
- 'search_type' =>
'location_id',
+ 'search_type' =>
'location_code',
'populate_form' => 'yes'
)),
'parameters' =>
json_encode($parameters3)
Modified: trunk/rental/inc/class.socomposite.inc.php
===================================================================
--- trunk/rental/inc/class.socomposite.inc.php 2016-04-13 08:09:18 UTC (rev
14918)
+++ trunk/rental/inc/class.socomposite.inc.php 2016-04-13 09:13:51 UTC (rev
14919)
@@ -44,7 +44,7 @@
$like_clauses[] =
"rental_composite.address_2 $this->like $like_pattern";
$like_clauses[] =
"rental_composite.house_number $this->like $like_pattern";
break;
- case "property_id":
+ case "location_code":
$like_clauses[] =
"rental_unit.location_code $this->like $like_pattern";
break;
case "all":
Modified: trunk/rental/inc/class.socontract.inc.php
===================================================================
--- trunk/rental/inc/class.socontract.inc.php 2016-04-13 08:09:18 UTC (rev
14918)
+++ trunk/rental/inc/class.socontract.inc.php 2016-04-13 09:13:51 UTC (rev
14919)
@@ -128,7 +128,7 @@
case "composite_address":
$composite_address = true;
break;
- case "location_id":
+ case "location_code":
$like_clauses[] =
"r_u.location_code like '{$search_for}%'";
break;
case "all":
Modified: trunk/rental/inc/class.uicomposite.inc.php
===================================================================
--- trunk/rental/inc/class.uicomposite.inc.php 2016-04-13 08:09:18 UTC (rev
14918)
+++ trunk/rental/inc/class.uicomposite.inc.php 2016-04-13 09:13:51 UTC (rev
14919)
@@ -44,8 +44,13 @@
array('id' => 'all', 'name' => lang('all')),
array('id' => 'name', 'name' => lang('name')),
array('id' => 'address', 'name' =>
lang('address')),
- array('id' => 'property_id', 'name' =>
lang('object_number'))
+ array('id' => 'location_code', 'name' =>
lang('object_number'))
);
+ $search_type = phpgw::get_var('search_type');
+ foreach ($search_option as &$entry)
+ {
+ $entry['selected'] = $entry['id'] ==
$search_type ? 1 : 0;
+ }
$filters[] = array
(
'type' => 'filter',
@@ -423,14 +428,6 @@
'name' =>
'availability_date_to',
'value' => '',
'text' =>
lang('to')
- ),
- array(
- 'type' =>
'link',
- 'value' =>
lang('new'),
- 'href' =>
self::link(array(
-
'menuaction' => 'rental.uicomposite.add'
- )),
- 'class' =>
'new_item'
)
)
)
@@ -448,6 +445,7 @@
'allrows' => true
)),
'allrows' => true,
+ 'new_item' =>
self::link(array('menuaction' => 'rental.uicomposite.add')),
'editor_action' => '',
'field' => array(),
'query' => phpgw::get_var('search_for')
@@ -861,7 +859,7 @@
'selected' => 0);
$contracts_search_options[] = array('id' =>
'composite_address', 'name' => lang('composite_address'),
'selected' => 0);
- $contracts_search_options[] = array('id' =>
'location_id', 'name' => lang('object_number'),
+ $contracts_search_options[] = array('id' =>
'location_code', 'name' => lang('object_number'),
'selected' => 0);
$status_options[] = array('id' => 'all', 'name'
=> lang('all'), 'selected' => 1);
Modified: trunk/rental/inc/class.uicontract.inc.php
===================================================================
--- trunk/rental/inc/class.uicontract.inc.php 2016-04-13 08:09:18 UTC (rev
14918)
+++ trunk/rental/inc/class.uicontract.inc.php 2016-04-13 09:13:51 UTC (rev
14919)
@@ -109,8 +109,13 @@
array('id' => 'party_name', 'name' =>
lang('party_name')),
array('id' => 'composite', 'name' =>
lang('composite_name')),
array('id' => 'composite_address', 'name' =>
lang('composite_address')),
- array('id' => 'location_id', 'name' =>
lang('object_number'))
+ array('id' => 'location_code', 'name' =>
lang('object_number'))
);
+ $search_type = phpgw::get_var('search_type');
+ foreach ($search_option as &$entry)
+ {
+ $entry['selected'] = $entry['id'] ==
$search_type ? 1 : 0;
+ }
$filters[] = array
(
'type' => 'filter',
@@ -2024,7 +2029,7 @@
array('id' => 'all', 'name' =>
lang('all'), 'selected' => 1),
array('id' => 'name', 'name' =>
lang('name'), 'selected' => 0),
array('id' => 'address', 'name' =>
lang('address'), 'selected' => 0),
- array('id' => 'property_id', 'name' =>
lang('object_number'), 'selected' => 0)
+ array('id' => 'location_code', 'name'
=> lang('object_number'), 'selected' => 0)
);
$furnish_types_options = array();
Modified: trunk/rental/inc/class.uiparty.inc.php
===================================================================
--- trunk/rental/inc/class.uiparty.inc.php 2016-04-13 08:09:18 UTC (rev
14918)
+++ trunk/rental/inc/class.uiparty.inc.php 2016-04-13 09:13:51 UTC (rev
14919)
@@ -433,14 +433,6 @@
'form' => array(
'toolbar' => array(
'item' => array(
- array(
- 'type' =>
'link',
- 'value' =>
lang('new'),
- 'href' =>
self::link(array(
-
'menuaction' => 'rental.uiparty.add'
- )),
- 'class' =>
'new_item'
- )
)
)
),
@@ -457,6 +449,7 @@
'allrows' => true
)),
'allrows' => true,
+ 'new_item' =>
self::link(array('menuaction' => 'rental.uiparty.add')),
'editor_action' => '',
'field' => array(
array(
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14919] rental: fix search on locations,
Sigurd Nes <=