Display column comment while editing data (RFE #860912).

This commit is contained in:
Michal Čihař
2005-06-24 14:08:44 +00:00
parent 96ce15ce60
commit 0b7a3b4239
2 changed files with 22 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ $Source$
code for browsing directory with themes (RFE #1184251).
* tbl_change.php: Use select instead of input, this saves some place and
looks better (RFE #1169931).
* tbl_change.php: Display column comment while editing data (RFE #860912).
2005-06-24 Marc Delisle <lem9@users.sourceforge.net>
* db_operations.php: problem renaming a db

View File

@@ -72,6 +72,21 @@ $url_query = PMA_generate_common_url($db, $table)
require('./tbl_properties_table_info.php');
/* Get comments */
$comments_map = array();
if ($GLOBALS['cfg']['ShowPropertyComments']) {
require_once('./libraries/relation.lib.php');
require_once('./libraries/transformations.lib.php');
$cfgRelation = PMA_getRelationsParam();
if ($cfgRelation['commwork']) {
$comments_map = PMA_getComments($db, $table);
}
}
/**
* Displays top menu links
*/
@@ -329,10 +344,15 @@ foreach ($loop_array AS $vrowcount => $vrow) {
: PMA_DBI_field_len($vresult, $i);
$first_timestamp = 0;
$field_name = htmlspecialchars($field);
if (isset($comments_map[$field])) {
$field_name = '<span style="border-bottom: 1px dashed black;" title="' . htmlspecialchars($comments_map[$field]) . '">' . $field_name . '</span>';
}
$bgcolor = ($i % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
?>
<tr>
<td <?php echo ($cfg['LongtextDoubleTextarea'] && strstr($row_table_def['True_Type'], 'longtext') ? 'rowspan="2"' : ''); ?> align="center" bgcolor="<?php echo $bgcolor; ?>"><?php echo htmlspecialchars($field); ?></td>
<td <?php echo ($cfg['LongtextDoubleTextarea'] && strstr($row_table_def['True_Type'], 'longtext') ? 'rowspan="2"' : ''); ?> align="center" bgcolor="<?php echo $bgcolor; ?>"><?php echo $field_name; ?></td>
<?php
echo "\n";