commit
23cfa82654
@ -1129,6 +1129,13 @@ $cfg['ShowDbStructureLastCheck'] = false;
|
||||
*/
|
||||
$cfg['HideStructureActions'] = true;
|
||||
|
||||
/**
|
||||
* Show column comments in table structure view (true|false)?
|
||||
*
|
||||
* @global boolean $cfg['ShowColumnComments']
|
||||
*/
|
||||
$cfg['ShowColumnComments'] = true;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* In browse mode...
|
||||
|
||||
@ -114,6 +114,9 @@ $strConfigEnableAutocompleteForTablesAndColumns_name = __(
|
||||
);
|
||||
$strConfigHideStructureActions_desc
|
||||
= __('Whether the table structure actions should be hidden.');
|
||||
$strConfigShowColumnComments_name = __('Show column comments');
|
||||
$strConfigShowColumnComments_desc
|
||||
= __('Whether column comments should be shown in table structure view');
|
||||
$strConfigHideStructureActions_name = __('Hide table structure actions');
|
||||
$strConfigDisplayServersList_desc
|
||||
= __('Show server listing as a list instead of a drop down.');
|
||||
|
||||
@ -215,7 +215,8 @@ $forms['Main_panel']['DbStructure'] = array(
|
||||
'ShowDbStructureLastUpdate',
|
||||
'ShowDbStructureLastCheck');
|
||||
$forms['Main_panel']['TableStructure'] = array(
|
||||
'HideStructureActions');
|
||||
'HideStructureActions',
|
||||
'ShowColumnComments');
|
||||
$forms['Main_panel']['Browse'] = array(
|
||||
'TableNavigationLinksMode',
|
||||
'ShowAll',
|
||||
|
||||
@ -119,7 +119,8 @@ $forms['Main_panel']['DbStructure'] = array(
|
||||
'ShowDbStructureLastUpdate',
|
||||
'ShowDbStructureLastCheck');
|
||||
$forms['Main_panel']['TableStructure'] = array(
|
||||
'HideStructureActions');
|
||||
'HideStructureActions',
|
||||
'ShowColumnComments');
|
||||
$forms['Main_panel']['Browse'] = array(
|
||||
'TableNavigationLinksMode',
|
||||
'ActionLinksMode',
|
||||
|
||||
@ -66,13 +66,14 @@ $rownum = 0; $odd_row = true; ?>
|
||||
|
||||
$field_name = htmlspecialchars($row['Field']);
|
||||
$displayed_field_name = $field_name;
|
||||
|
||||
$comments = ''; //For column comments
|
||||
// underline commented fields and display a hover-title (CSS only)
|
||||
|
||||
if (isset($comments_map[$row['Field']])) {
|
||||
$displayed_field_name = '<span class="commented_column" title="'
|
||||
. htmlspecialchars($comments_map[$row['Field']]) . '">'
|
||||
. $field_name . '</span>';
|
||||
$comments = htmlspecialchars($comments_map[$row['Field']]);
|
||||
}
|
||||
|
||||
if ($primary && $primary->hasColumn($field_name)) {
|
||||
@ -103,7 +104,8 @@ $rownum = 0; $odd_row = true; ?>
|
||||
'titles' => $titles,
|
||||
'table' => $table,
|
||||
'tbl_storage_engine' => $tbl_storage_engine,
|
||||
'field_charset' => $field_charset
|
||||
'field_charset' => $field_charset,
|
||||
'comments' => $comments
|
||||
)
|
||||
); ?>
|
||||
<?php if (! $tbl_is_view && ! $db_is_system_schema): ?>
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
<?php $odd_row = false; ?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Information'); ?></legend>
|
||||
<p> <strong> <?php echo __('Table comments: ') ?> </strong> <?php echo $showtable['TABLE_COMMENT']; ?></p>
|
||||
<a id="showusage"></a>
|
||||
|
||||
<?php if (! $tbl_is_view && ! $db_is_system_schema): ?>
|
||||
|
||||
@ -10,6 +10,9 @@
|
||||
<th><?php echo __('Attributes'); ?></th>
|
||||
<th><?php echo __('Null'); ?></th>
|
||||
<th><?php echo __('Default'); ?></th>
|
||||
<?php if ($GLOBALS['cfg']['ShowColumnComments']): ?>
|
||||
<th><?php echo __('Comments'); ?></th>
|
||||
<?php endif; ?>
|
||||
<th><?php echo __('Extra'); ?></th>
|
||||
<!-- see tbl_structure.js, function moreOptsMenuResize() -->
|
||||
<?php if (! $db_is_system_schema && ! $tbl_is_view): ?>
|
||||
|
||||
@ -33,6 +33,11 @@
|
||||
<i><?php echo _pgettext('None for default', 'None'); ?></i>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php if ($GLOBALS['cfg']['ShowColumnComments']): ?>
|
||||
<td>
|
||||
<?php echo $comments; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td class="nowrap"><?php echo /*overload*/mb_strtoupper($row['Extra']); ?></td>
|
||||
<?php if (! $tbl_is_view && ! $db_is_system_schema): ?>
|
||||
<td class="edit center print_ignore">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user