Internal relations are probably less commonly used than Foreign key constraints and the display column dialog
Signed-off-by: Marc Delisle <marc@infomarc.info>
This commit is contained in:
parent
06a4c57da1
commit
0187c60d61
@ -1,36 +1,5 @@
|
||||
<form method="post" action="tbl_relation.php">
|
||||
<?php echo PMA_URL_getHiddenInputs($db, $table); ?>
|
||||
<?php if ($cfgRelation['relwork']): ?>
|
||||
<?php $save_row = array_values($columns);
|
||||
$saved_row_cnt = count($save_row);?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Internal relations'); ?></legend>
|
||||
<table id="internal_relations" class="relationalTable">
|
||||
<tr>
|
||||
<th><?php echo __('Column'); ?></th>
|
||||
<th><?php echo __('Internal relation'); ?>
|
||||
<?php if (PMA\libraries\Util::isForeignKeySupported($tbl_storage_engine)): ?>
|
||||
<?php echo PMA\libraries\Util::showHint(__(
|
||||
'An internal relation is not necessary when a corresponding'
|
||||
. ' FOREIGN KEY relation exists.')); ?>
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
<?php $odd_row = true; ?>
|
||||
<?php for ($i = 0; $i < $saved_row_cnt; $i++): ?>
|
||||
<?php echo PMA\libraries\Template::get('table/relation/internal_relational_row')->render(
|
||||
array(
|
||||
'save_row' => $save_row,
|
||||
'i' => $i,
|
||||
'odd_row' => $odd_row,
|
||||
'existrel' => $existrel,
|
||||
'db' => $db
|
||||
)
|
||||
);
|
||||
$odd_row = ! $odd_row; ?>
|
||||
<?php endfor; ?>
|
||||
</table>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
<!-- InnoDB -->
|
||||
<?php if (PMA\libraries\Util::isForeignKeySupported($tbl_storage_engine)): ?>
|
||||
<fieldset>
|
||||
@ -104,6 +73,39 @@
|
||||
</select>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($cfgRelation['relwork']): ?>
|
||||
<?php $save_row = array_values($columns);
|
||||
$saved_row_cnt = count($save_row);?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Internal relations'); ?></legend>
|
||||
<table id="internal_relations" class="relationalTable">
|
||||
<tr>
|
||||
<th><?php echo __('Column'); ?></th>
|
||||
<th><?php echo __('Internal relation'); ?>
|
||||
<?php if (PMA\libraries\Util::isForeignKeySupported($tbl_storage_engine)): ?>
|
||||
<?php echo PMA\libraries\Util::showHint(__(
|
||||
'An internal relation is not necessary when a corresponding'
|
||||
. ' FOREIGN KEY relation exists.')); ?>
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
<?php $odd_row = true; ?>
|
||||
<?php for ($i = 0; $i < $saved_row_cnt; $i++): ?>
|
||||
<?php echo PMA\libraries\Template::get('table/relation/internal_relational_row')->render(
|
||||
array(
|
||||
'save_row' => $save_row,
|
||||
'i' => $i,
|
||||
'odd_row' => $odd_row,
|
||||
'existrel' => $existrel,
|
||||
'db' => $db
|
||||
)
|
||||
);
|
||||
$odd_row = ! $odd_row; ?>
|
||||
<?php endfor; ?>
|
||||
</table>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
|
||||
<fieldset class="tblFooters">
|
||||
<input type="button" class="preview_sql" value="<?php echo __('Preview SQL'); ?>" />
|
||||
<input type="submit" value="<?php echo __('Save'); ?>" />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user