patch #1249528, move table comments to header and enable configuration of header
This commit is contained in:
@@ -8,6 +8,11 @@ $Source$
|
||||
2005-08-11 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* queryframe.php: shorten the path of db subtree items,
|
||||
thanks to Edward Rudd - urkle
|
||||
* config.inc.php, header.inc.php, tbl_properties_links.php,
|
||||
themes/*/css/theme_right.css.php, tbl_properties_table_info.php,
|
||||
Documentation.html, libraries/config_import.lib.php: patch #1249528,
|
||||
move table comments to header and enable configuration of header for
|
||||
TRUE/FALSE/'both', thanks to Sebastian Mendel - cybot_tm
|
||||
|
||||
2005-08-09 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* read_dump.php: add unique numbers to $strFileCouldNotBeRead to
|
||||
|
@@ -1180,9 +1180,9 @@ Defaults to FALSE (drop-down). <br />
|
||||
<br /><br />
|
||||
</dd>
|
||||
|
||||
<dt><b>$cfg['NavigationBarIconic'] </b>boolean</dt>
|
||||
<dt><b>$cfg['NavigationBarIconic'] </b>string</dt>
|
||||
<dd>
|
||||
Defines whether navigation bar buttons contain text or symbols only.
|
||||
Defines whether navigation bar buttons and the right panel top menu contain text or symbols only. A value of TRUE displays icons, FALSE displays text and 'both' displays both icons and text.
|
||||
<br /><br />
|
||||
</dd>
|
||||
|
||||
@@ -1847,7 +1847,7 @@ Defaults to FALSE (drop-down). <br />
|
||||
|
||||
<dt><b>$cfg['MainPageIconic'] </b>boolean</dt>
|
||||
<dd>
|
||||
Uses icons on main page in lists, on right panel top menu and menu tabs.
|
||||
Uses icons on main page in lists and menu tabs.
|
||||
<br /><br />
|
||||
</dd>
|
||||
|
||||
|
@@ -256,7 +256,8 @@ $cfg['SuggestDBName'] = TRUE; // suggest a new DB name if possible (fa
|
||||
|
||||
// In browse mode...
|
||||
$cfg['ShowBlob'] = FALSE; // display blob field contents
|
||||
$cfg['NavigationBarIconic'] = TRUE; // do not display text inside navigation bar buttons
|
||||
$cfg['NavigationBarIconic'] = 'both'; // Use icons instead of text for the navigation bar buttons
|
||||
// and on right panel top menu (server db table) (TRUE|FALSE|'both')
|
||||
$cfg['ShowAll'] = FALSE; // allows to display all the rows
|
||||
$cfg['MaxRows'] = 30; // maximum number of rows to display
|
||||
$cfg['Order'] = 'ASC'; // default for 'ORDER BY' clause (valid
|
||||
@@ -566,7 +567,7 @@ $cfg['SetHttpHostTitle'] = ''; // if ShowHttpHostTitle=true, ple
|
||||
// If not set (or empty), the PMA will get your real Host-Adress.
|
||||
|
||||
$cfg['ErrorIconic'] = TRUE; // show some icons for warning, error and information messages (true|false)?
|
||||
$cfg['MainPageIconic'] = TRUE; // show icons in list on main page, on right panel top menu (server db table) and on menu tabs (true|false)?
|
||||
$cfg['MainPageIconic'] = TRUE; // show icons in list on main page and on menu tabs (true|false)?
|
||||
$cfg['ReplaceHelpImg'] = TRUE; // show help button instead of strDocumentation (true|false)?
|
||||
|
||||
// theme manager
|
||||
|
@@ -159,54 +159,68 @@ if (empty($GLOBALS['is_header_sent'])) {
|
||||
*/
|
||||
|
||||
if (PMA_DISPLAY_HEADING) {
|
||||
echo '<table border="0" cellpadding="0" cellspacing="0" id="serverinfo">' . "\n"
|
||||
. ' <tr>' . "\n";
|
||||
$header_url_qry = '?' . PMA_generate_common_url();
|
||||
$server_info = (!empty($cfg['Server']['verbose'])
|
||||
? $cfg['Server']['verbose']
|
||||
: $server_info = $cfg['Server']['host'] . (empty($cfg['Server']['port'])
|
||||
? ''
|
||||
: ':' . $cfg['Server']['port']
|
||||
)
|
||||
$server_info = (!empty($GLOBALS['cfg']['Server']['verbose'])
|
||||
? $GLOBALS['cfg']['Server']['verbose']
|
||||
: $GLOBALS['cfg']['Server']['host'] . (empty($GLOBALS['cfg']['Server']['port'])
|
||||
? ''
|
||||
: ':' . $GLOBALS['cfg']['Server']['port']
|
||||
)
|
||||
);
|
||||
echo ' '
|
||||
. '<td class="serverinfo">' . $GLOBALS['strServer'] . ': '
|
||||
. '<a href="' . $GLOBALS['cfg']['DefaultTabServer'] . '?' . PMA_generate_common_url() . '">';
|
||||
if ($GLOBALS['cfg']['MainPageIconic']) {
|
||||
echo '<img src="' . $GLOBALS['pmaThemeImage'] . 's_host.png" width="16" height="16" border="0" alt="' . htmlspecialchars($server_info) . '" />';
|
||||
$item = '<a href="%1$s?%2$s" class="item">';
|
||||
if ( $GLOBALS['cfg']['NavigationBarIconic'] ) {
|
||||
$separator = ' <span class="separator"><img src="' . $GLOBALS['pmaThemeImage'] . 'item_ltr.png" width="5" height="9" alt="-" /></span>' . "\n";
|
||||
$item .= ' <img src="' . $GLOBALS['pmaThemeImage'] . '%5$s" width="16" height="16" alt="" border="0" /> ' . "\n";
|
||||
} else {
|
||||
$separator = ' <span class="separator"> - </span>' . "\n";
|
||||
}
|
||||
echo htmlspecialchars($server_info) . '</a>' . "\n"
|
||||
. '</td>' . "\n\n";
|
||||
|
||||
if ( $GLOBALS['cfg']['NavigationBarIconic'] !== true ) {
|
||||
$item .= '%4$s: ';
|
||||
}
|
||||
$item .= '%3$s</a>' . "\n";
|
||||
|
||||
echo '<div id="serverinfo">' . "\n";
|
||||
printf( $item,
|
||||
$GLOBALS['cfg']['DefaultTabServer'],
|
||||
PMA_generate_common_url(),
|
||||
htmlspecialchars($server_info),
|
||||
$GLOBALS['strServer'],
|
||||
's_host.png' );
|
||||
|
||||
if (!empty($GLOBALS['db'])) {
|
||||
echo ' '
|
||||
. '<td class="serverinfo"><div></div></td>' . "\n" . ' '
|
||||
. '<td class="serverinfo">' . $GLOBALS['strDatabase'] . ': '
|
||||
. '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . PMA_generate_common_url($GLOBALS['db']) . '">';
|
||||
if ($GLOBALS['cfg']['MainPageIconic']) {
|
||||
echo '<img src="' . $GLOBALS['pmaThemeImage'] . 's_db.png" width="16" height="16" border="0" alt="' . htmlspecialchars($GLOBALS['db']) . '" />';
|
||||
}
|
||||
echo htmlspecialchars($GLOBALS['db']) . '</a>' . "\n"
|
||||
. '</td>' . "\n\n";
|
||||
|
||||
|
||||
echo $separator;
|
||||
printf( $item,
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'],
|
||||
PMA_generate_common_url($GLOBALS['db']),
|
||||
htmlspecialchars($GLOBALS['db']),
|
||||
$GLOBALS['strDatabase'],
|
||||
's_db.png' );
|
||||
|
||||
if (!empty($GLOBALS['table'])) {
|
||||
if (PMA_MYSQL_INT_VERSION >= 50000) {
|
||||
require_once('./tbl_properties_table_info.php');
|
||||
} else {
|
||||
$tbl_is_view = FALSE;
|
||||
}
|
||||
echo ' '
|
||||
. '<td class="serverinfo"><div></div></td>' . "\n" . ' '
|
||||
. '<td class="serverinfo">' . (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? $GLOBALS['strView'] : $GLOBALS['strTable']) . ': '
|
||||
. '<a href="' . $GLOBALS['cfg']['DefaultTabTable'] . '?' . PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']) . '">';
|
||||
if ($GLOBALS['cfg']['MainPageIconic']) {
|
||||
echo '<img src="' . $GLOBALS['pmaThemeImage'] . (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? 'b_views' : 's_tbl') . '.png" width="16" height="16" border="0" alt="' . htmlspecialchars($GLOBALS['table']) . '" />';
|
||||
}
|
||||
echo htmlspecialchars($GLOBALS['table']) . '</a>' . "\n"
|
||||
. '</td>' . "\n\n";
|
||||
require_once('./tbl_properties_table_info.php');
|
||||
|
||||
echo $separator;
|
||||
printf( $item,
|
||||
$GLOBALS['cfg']['DefaultTabTable'],
|
||||
PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']),
|
||||
htmlspecialchars($GLOBALS['table']),
|
||||
(isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? $GLOBALS['strView'] : $GLOBALS['strTable']),
|
||||
(isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? 'b_views' : 's_tbl') . '.png' );
|
||||
|
||||
/**
|
||||
* Displays table comment
|
||||
* @uses $show_comment from tbl_properties_table_info.php
|
||||
* @uses $GLOBALS['avoid_show_comment'] from tbl_relation.php
|
||||
*/
|
||||
if (!empty($show_comment) && !isset($GLOBALS['avoid_show_comment'])) {
|
||||
echo '<!-- Table comment -->' . "\n"
|
||||
. '<span class="table_comment" id="span_table_comment">"' . htmlspecialchars($show_comment) . '"</span>' . "\n";
|
||||
} // end if
|
||||
}
|
||||
}
|
||||
echo ' </tr>' . "\n" . '</table>';
|
||||
echo '</div>';
|
||||
|
||||
}
|
||||
/**
|
||||
* Sets a variable to remember headers have been sent
|
||||
|
@@ -423,7 +423,7 @@ if (!isset($cfg['NavigationBarIconic'])) {
|
||||
$cfg['NavigationBarIconic'] = $cfgNavigationBarIconic;
|
||||
unset($cfgNavigationBarIconic);
|
||||
} else {
|
||||
$cfg['NavigationBarIconic'] = TRUE;
|
||||
$cfg['NavigationBarIconic'] = 'both';
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -104,20 +104,6 @@ if (!$cfg['LightTabs']) {
|
||||
echo '<br />';
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays table comment
|
||||
*/
|
||||
if (!empty($show_comment) && !isset($avoid_show_comment)) {
|
||||
?>
|
||||
<!-- Table comment -->
|
||||
<p><i>
|
||||
<?php echo htmlspecialchars($show_comment) . "\n"; ?>
|
||||
</i></p>
|
||||
<?php
|
||||
} // end if
|
||||
|
||||
echo "\n\n";
|
||||
|
||||
/**
|
||||
* Displays a message
|
||||
*/
|
||||
|
@@ -5,10 +5,9 @@
|
||||
// this should be recoded as functions, to avoid messing with global
|
||||
// variables
|
||||
|
||||
// Check parameters
|
||||
|
||||
require_once('./libraries/common.lib.php');
|
||||
|
||||
// Check parameters
|
||||
PMA_checkParameters(array('db', 'table'));
|
||||
|
||||
/**
|
||||
@@ -45,7 +44,13 @@ if ($table_info_result && PMA_DBI_num_rows($table_info_result) > 0) {
|
||||
} else {
|
||||
$tbl_is_view = FALSE;
|
||||
$tbl_type = isset($showtable['Type']) ? strtoupper($showtable['Type']) : '';
|
||||
$show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : '');
|
||||
// a new comment could be coming from tbl_properties_operations.php
|
||||
// and we want to show it in the header
|
||||
if (isset($submitcomment) && isset($comment)) {
|
||||
$show_comment = $comment;
|
||||
} else {
|
||||
$show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : '');
|
||||
}
|
||||
}
|
||||
$tbl_collation = empty($showtable['Collation']) ? '' : $showtable['Collation'];
|
||||
$table_info_num_rows = (isset($showtable['Rows']) ? $showtable['Rows'] : 0);
|
||||
|
@@ -387,34 +387,25 @@ div.warnhead {
|
||||
|
||||
/* Heading for server links*/
|
||||
|
||||
.serverinfo {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
padding: 0px 0px 10px 0px;
|
||||
margin: 0px;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
}
|
||||
<?php if (isset($js_isDOM) && $js_isDOM != '0') { ?>
|
||||
.serverinfo a:link, .serverinfo a:active, .serverinfo a:visited {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: bolder;
|
||||
}
|
||||
.serverinfo a img{
|
||||
vertical-align: middle;
|
||||
margin: 0px 1px 0px 1px;
|
||||
#serverinfo {
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.serverinfo div{
|
||||
background-image: url(../themes/darkblue_orange/img/item_ltr.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50% 50%;
|
||||
width: 20px;
|
||||
height: 16px;
|
||||
#serverinfo .item {
|
||||
white-space: nowrap;
|
||||
}
|
||||
<?php } ?>
|
||||
|
||||
#span_table_comment {
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#serverinfo img {
|
||||
margin: 0 0.1em 0 0.1em;
|
||||
}
|
||||
|
||||
hr{
|
||||
color: #666699; background-color: #6666cc; border: 0; height: 1px;
|
||||
}
|
||||
|
@@ -245,37 +245,30 @@ div.tblWarn {
|
||||
|
||||
/* Heading */
|
||||
|
||||
.serverinfo {
|
||||
font-family: <?php echo $right_font_family; ?>;
|
||||
font-size: <?php echo $font_size; ?>;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
padding: 0px 0px 10px 0px;
|
||||
}
|
||||
|
||||
img, input, select, button {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
<?php if (isset($js_isDOM) && $js_isDOM != '0') { ?>
|
||||
.serverinfo a:link, .serverinfo a:active, .serverinfo a:visited {
|
||||
font-family: <?php echo $right_font_family; ?>;
|
||||
font-size: <?php echo $font_size; ?>;
|
||||
font-weight: bolder;
|
||||
}
|
||||
.serverinfo a img{
|
||||
vertical-align: middle;
|
||||
margin: 0px 1px 0px 2px;
|
||||
}
|
||||
.serverinfo div{
|
||||
background-image: url(../themes/original/img/item_ltr.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50% 50%;
|
||||
width: 20px;
|
||||
height: 16px;
|
||||
#serverinfo {
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
#serverinfo .item {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#span_table_comment {
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#serverinfo img {
|
||||
margin: 0 0.1em 0 0.2em;
|
||||
}
|
||||
|
||||
<?php if (isset($js_isDOM) && $js_isDOM != '0') { ?>
|
||||
/* disabled text */
|
||||
.disabled, .disabled a:link, disabled a:active, .disabled a:visited {
|
||||
font-family: <?php echo $right_font_family; ?>;
|
||||
|
Reference in New Issue
Block a user