summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfirzen2014-03-30 02:54:13 +0000
committerRobert Treat2015-02-16 00:24:09 +0000
commit0c8c88f6a535f6117b4e2b2e771a172f748e55b4 (patch)
tree11da5cbe13837235b74e974de27304b9b4e92c6d
parent5cc012f28d6e8c2d094e8b4225895ac84a6f1b95 (diff)
improve data management navigation; adds browse/search options to tables/views, and insert to tables. Based on patch by firzen, with additional work by xzilla
-rw-r--r--classes/Misc.php44
-rw-r--r--display.php2
-rw-r--r--tables.php8
-rw-r--r--views.php2
4 files changed, 50 insertions, 6 deletions
diff --git a/classes/Misc.php b/classes/Misc.php
index 1b34b14e..5cca8458 100644
--- a/classes/Misc.php
+++ b/classes/Misc.php
@@ -1015,6 +1015,31 @@
'icon' => 'Columns',
'branch'=> true,
),
+ 'browse' => array(
+ 'title' => $lang['strbrowse'],
+ 'icon'=>'Columns',
+ 'url' => 'display.php',
+ 'urlvars' => array ('subject' => 'table','table' => field('table')),
+ 'return' => 'table',
+ 'branch'=> true,
+ ),
+ 'select' => array(
+ 'title' => $lang['strselect'],
+ 'icon' => 'Search',
+ 'url' => 'tables.php',
+ 'urlvars' => array('subject' => 'table', 'table' => field('table'),'action' => 'confselectrows',),
+ 'help' => 'pg.sql.select',
+ ),
+ 'insert'=>array(
+ 'title' => $lang['strinsert'],
+ 'url' => 'tables.php',
+ 'urlvars' => array (
+ 'action' => 'confinsertrow',
+ 'table' => field('table')
+ ),
+ 'help' => 'pg.sql.insert',
+ 'icon'=>'Operator'
+ ),
'indexes' => array (
'title' => $lang['strindexes'],
'url' => 'indexes.php',
@@ -1092,6 +1117,25 @@
'icon' => 'Columns',
'branch'=> true,
),
+ 'browse' => array(
+ 'title' => $lang['strbrowse'],
+ 'icon'=>'Columns',
+ 'url' => 'display.php',
+ 'urlvars' => array (
+ 'action' => 'confselectrows',
+ 'return' => 'schema',
+ 'subject' => 'view',
+ 'view' => field('view')
+ ),
+ 'branch'=> true,
+ ),
+ 'select' => array(
+ 'title' => $lang['strselect'],
+ 'icon' => 'Search',
+ 'url' => 'views.php',
+ 'urlvars' => array('action' => 'confselectrows', 'view' => field('view'),),
+ 'help' => 'pg.sql.select',
+ ),
'definition' => array (
'title' => $lang['strdefinition'],
'url' => 'viewproperties.php',
diff --git a/display.php b/display.php
index 87771db4..f87a2153 100644
--- a/display.php
+++ b/display.php
@@ -443,6 +443,7 @@
}
$misc->printTrail(isset($subject) ? $subject : 'database');
+ $misc->printTabs($subject,'browse');
/* This code is used when browsing FK in pure-xHTML (without js) */
if (isset($_REQUEST['fkey'])) {
@@ -461,7 +462,6 @@
$type = 'SELECT';
}
else {
- $misc->printTitle($lang['strbrowse']);
$type = 'TABLE';
}
} else {
diff --git a/tables.php b/tables.php
index ab727f1f..c92225cf 100644
--- a/tables.php
+++ b/tables.php
@@ -349,7 +349,7 @@
if ($confirm) {
$misc->printTrail('table');
- $misc->printTitle($lang['strselect'], 'pg.sql.select');
+ $misc->printTabs('table','select');
$misc->printMsg($msg);
$attrs = $data->getTableAttributes($_REQUEST['table']);
@@ -456,7 +456,8 @@
if ($confirm) {
$misc->printTrail('table');
- $misc->printTitle($lang['strinsertrow'], 'pg.sql.insert');
+ $misc->printTabs('table','insert');
+
$misc->printMsg($msg);
$attrs = $data->getTableAttributes($_REQUEST['table']);
@@ -776,7 +777,7 @@
'url' => 'display.php',
'urlvars' => array (
'subject' => 'table',
- 'return' => 'schema',
+ 'return' => 'table',
'table' => field('relname')
)
)
@@ -923,7 +924,6 @@
'content' => $lang['strcreatetablelike']
);
}
-
$misc->printNavLinks($navlinks, 'tables-tables', get_defined_vars());
}
diff --git a/views.php b/views.php
index 56e2217a..b60b0947 100644
--- a/views.php
+++ b/views.php
@@ -22,7 +22,7 @@
if ($confirm) {
$misc->printTrail('view');
- $misc->printTitle($lang['strselect'], 'pg.sql.select');
+ $misc->printTabs('view','select');
$misc->printMsg($msg);
$attrs = $data->getTableAttributes($_REQUEST['view']);