new parameter LeftDefaultTabTable and new default value for DefaultTabTable
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - ChangeLog
|
||||
$Id$
|
||||
$HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyAdmin/ChangeLog $
|
||||
|
||||
3.0.0.0 (not yet released)
|
||||
+ [navi] new parameter $cfg['LeftDefaultTabTable']
|
||||
|
||||
2.11.2.0 (not yet released)
|
||||
- patch #1791576 HTTP auth: support REDIRECT_REMOTE_USER, thanks to Allard
|
||||
+ [lang] Serbian update, thanks to Mihailo Stefanovic
|
||||
|
@@ -1267,6 +1267,14 @@ ALTER TABLE `pma_column_comments`
|
||||
<dd>Defines whether to display database choice in light navigation frame as links
|
||||
instead of in a drop-down. Defaults to 'auto' - on main page list is
|
||||
shown, when database is selected, only drop down is displayed.</dd>
|
||||
|
||||
<dt id="cfg_LeftDefaultTabTable">$cfg['LeftDefaultTabTable'] string</dt>
|
||||
<dd>Defines the tab displayed by default when clicking the small
|
||||
icon next to each table name in the navigation panel. Possible
|
||||
values: "tbl_structure.php",
|
||||
"tbl_sql.php", "tbl_select.php",
|
||||
"tbl_change.php" or "sql.php".</dd>
|
||||
|
||||
<dt id="cfg_ShowStats">$cfg['ShowStats'] boolean</dt>
|
||||
<dd>Defines whether or not to display space usage and statistics about databases
|
||||
and tables.<br />
|
||||
|
@@ -585,6 +585,20 @@ $cfg['DisplayServersList'] = false;
|
||||
*/
|
||||
$cfg['DisplayDatabasesList'] = 'auto';
|
||||
|
||||
/**
|
||||
* target of the navigation panel quick access icon
|
||||
*
|
||||
* Possible values:
|
||||
* 'tbl_structure.php' = fields list
|
||||
* 'tbl_sql.php' = SQL form
|
||||
* 'tbl_select.php' = search page
|
||||
* 'tbl_change.php' = insert row page
|
||||
* 'sql.php' = browse page
|
||||
*
|
||||
* @global string $cfg['LeftDefaultTabTable']
|
||||
*/
|
||||
$cfg['LeftDefaultTabTable'] = 'tbl_structure.php';
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* In the main frame, at startup...
|
||||
@@ -820,13 +834,13 @@ $cfg['DefaultTabDatabase'] = 'db_structure.php';
|
||||
* Possible values:
|
||||
* 'tbl_structure.php' = fields list
|
||||
* 'tbl_sql.php' = SQL form
|
||||
* 'tbl_select.php' = select page
|
||||
* 'tbl_select.php' = search page
|
||||
* 'tbl_change.php' = insert row page
|
||||
* 'sql.php' = browse page
|
||||
*
|
||||
* @global string $cfg['DefaultTabTable']
|
||||
*/
|
||||
$cfg['DefaultTabTable'] = 'tbl_structure.php';
|
||||
$cfg['DefaultTabTable'] = 'sql.php';
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
|
@@ -581,17 +581,17 @@ function PMA_displayTableList($tables, $visible = false,
|
||||
}
|
||||
echo '</li>' . "\n";
|
||||
} elseif (is_array($table)) {
|
||||
$href = $GLOBALS['cfg']['DefaultTabTable'] . '?'
|
||||
.$GLOBALS['common_url_query'] . '&table='
|
||||
.urlencode($table['Name']);
|
||||
// quick access icon next to each table name
|
||||
echo '<li>' . "\n";
|
||||
echo '<a title="' . $GLOBALS['strBrowse'] . ': '
|
||||
. htmlspecialchars($table['Comment'])
|
||||
echo '<a title="'
|
||||
. htmlspecialchars(PMA_getTitleForTarget($GLOBALS['cfg']['LeftDefaultTabTable']))
|
||||
. ': ' . htmlspecialchars($table['Comment'])
|
||||
.' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . $GLOBALS['strRows'] . ')"'
|
||||
.' id="browse_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"'
|
||||
.' href="sql.php?' . $GLOBALS['common_url_query']
|
||||
.' id="quick_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"'
|
||||
.' href="' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '?'
|
||||
. $GLOBALS['common_url_query']
|
||||
.'&table=' . urlencode($table['Name'])
|
||||
.'&goto=' . $GLOBALS['cfg']['DefaultTabTable']
|
||||
.'&goto=' . $GLOBALS['cfg']['LeftDefaultTabTable']
|
||||
. '" >'
|
||||
.'<img class="icon"';
|
||||
if ('VIEW' === strtoupper($table['Comment'])) {
|
||||
@@ -600,8 +600,14 @@ function PMA_displayTableList($tables, $visible = false,
|
||||
echo ' src="' . $GLOBALS['pmaThemeImage'] . 'b_sbrowse.png"';
|
||||
}
|
||||
echo ' id="icon_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"'
|
||||
.' width="10" height="10" alt="' . $GLOBALS['strBrowse'] . '" /></a>' . "\n"
|
||||
.'<a href="' . $href . '" title="' . htmlspecialchars($table['Comment']
|
||||
.' width="10" height="10" alt="' . $GLOBALS['strBrowse'] . '" /></a>' . "\n";
|
||||
|
||||
// link for the table name itself
|
||||
$href = $GLOBALS['cfg']['DefaultTabTable'] . '?'
|
||||
.$GLOBALS['common_url_query'] . '&table='
|
||||
.urlencode($table['Name']);
|
||||
echo '<a href="' . $href
|
||||
. '" title="' . htmlspecialchars(PMA_getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']) . ': ' . $table['Comment']
|
||||
.' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . $GLOBALS['strRows']) . ')"'
|
||||
.' id="' . htmlspecialchars($table_db . '.' . $table['Name']) . '">'
|
||||
// preserve spaces in table name
|
||||
@@ -612,6 +618,38 @@ function PMA_displayTableList($tables, $visible = false,
|
||||
echo '</ul>';
|
||||
}
|
||||
|
||||
/**
|
||||
* get the action word corresponding to a script name
|
||||
* in order to display it as a title in navigation panel
|
||||
*
|
||||
* @uses switch()
|
||||
* @uses $GLOBALS
|
||||
* @param string a valid value for $cfg['LeftDefaultTabTable']
|
||||
* or $cfg['DefaultTabTable']
|
||||
*/
|
||||
function PMA_getTitleForTarget($target) {
|
||||
switch ($target) {
|
||||
case 'tbl_structure.php':
|
||||
$message = 'strStructure';
|
||||
break;
|
||||
case 'tbl_sql.php':
|
||||
$message = 'strSQL';
|
||||
break;
|
||||
case 'tbl_select.php':
|
||||
$message = 'strSearch';
|
||||
break;
|
||||
case 'tbl_change.php':
|
||||
$message = 'strInsert';
|
||||
break;
|
||||
case 'sql.php':
|
||||
$message = 'strBrowse';
|
||||
break;
|
||||
default:
|
||||
$message = '';
|
||||
}
|
||||
return $GLOBALS[$message];
|
||||
}
|
||||
|
||||
echo '</div>' . "\n";
|
||||
|
||||
PMA_exitNavigationFrame();
|
||||
|
Reference in New Issue
Block a user