From 7d5306ea268033b92cac8496c2d5efdb16b9f6c6 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Fri, 28 Jun 2013 14:37:02 -0400
Subject: [PATCH] - Lists can now be created from more than one database table (including sorting and searching) // needs more testing!
---
interface/web/sites/list/aps_installedpackages.list.php | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/interface/web/sites/list/aps_installedpackages.list.php b/interface/web/sites/list/aps_installedpackages.list.php
index 2b2f32e..2340824 100644
--- a/interface/web/sites/list/aps_installedpackages.list.php
+++ b/interface/web/sites/list/aps_installedpackages.list.php
@@ -29,8 +29,15 @@
*/
$liste['name'] = 'aps_instances'; // Name of the list
-$liste['table'] = 'aps_instances,aps_packages'; // Database table
+$liste['table'] = 'aps_instances'; // Database table
$liste['table_idx'] = 'id'; // Table index
+
+// if multiple tables are involved, list the additional tables here (comma separated)
+$liste["additional_tables"] = "aps_packages";
+
+// if multiple tables are involved, specify sql to join these tables
+$liste["join_sql"] = " aps_instances.package_id = aps_packages.id";
+
$liste["search_prefix"] = 'search_'; // Search field prefix
$liste['records_per_page'] = 15; // Records per page
$liste['file'] = 'aps_installedpackages_list.php'; // Script file for this list
@@ -47,7 +54,8 @@
'prefix' => '%',
'suffix' => '%',
'width' => '',
- 'value' => '');
+ 'value' => '',
+ 'table' => 'aps_packages');
$liste["item"][] = array('field' => 'version',
'datatype' => 'VARCHAR',
@@ -56,7 +64,8 @@
'prefix' => '%',
'suffix' => '%',
'width' => '',
- 'value' => '');
+ 'value' => '',
+ 'table' => 'aps_packages');
/*
$liste["item"][] = array('field' => 'customer_id',
@@ -79,5 +88,6 @@
'value' => array(INSTANCE_INSTALL => $app->lng('Installation_task'),
INSTANCE_ERROR => $app->lng('Installation_error'),
INSTANCE_SUCCESS => $app->lng('Installation_success'),
- INSTANCE_REMOVE => $app->lng('Installation_remove')));
+ INSTANCE_REMOVE => $app->lng('Installation_remove')),
+ 'table' => 'aps_instances');
?>
\ No newline at end of file
--
Gitblit v1.9.1