Initial commit
This commit is contained in:
48
#pma/templates/columns_definitions/column_virtuality.phtml
Normal file
48
#pma/templates/columns_definitions/column_virtuality.phtml
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
$options = array(
|
||||
'' => '',
|
||||
'VIRTUAL' => 'VIRTUAL',
|
||||
);
|
||||
$serverType = PMA\libraries\Util::getServerType();
|
||||
if ($serverType == 'MariaDB') {
|
||||
$options['PERSISTENT'] = 'PERSISTENT';
|
||||
} else {
|
||||
$options['STORED'] = 'STORED';
|
||||
}
|
||||
|
||||
$expression = '';
|
||||
if (isset($columnMeta['Expression'])) {
|
||||
$expression = $columnMeta['Expression'];
|
||||
}
|
||||
?>
|
||||
|
||||
<select name="field_virtuality[<?= $columnNumber; ?>]"
|
||||
id="field_<?= $columnNumber; ?>_<?=($ci - $ci_offset); ?>"
|
||||
class="virtuality">
|
||||
<?php foreach ($options as $key => $value): ?>
|
||||
<option value="<?= $key; ?>"
|
||||
<?php if (isset($columnMeta['Extra'])
|
||||
&& $key != ''
|
||||
&& strpos($columnMeta['Extra'], $key) === 0): ?>
|
||||
selected="selected"
|
||||
<?php endif; ?>>
|
||||
<?= $value; ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<br />
|
||||
<?php if ($GLOBALS['cfg']['CharEditing'] == 'textarea'): ?>
|
||||
<textarea name="field_expression[<?= $columnNumber; ?>]"
|
||||
cols="15"
|
||||
class="textfield
|
||||
expression">
|
||||
<?= htmlspecialchars($expression); ?>
|
||||
</textarea>
|
||||
<?php else: ?>
|
||||
<input type="text"
|
||||
name="field_expression[<?= $columnNumber; ?>]"
|
||||
size="12"
|
||||
value="<?= htmlspecialchars($expression); ?>"
|
||||
placeholder="<?= __('Expression'); ?>"
|
||||
class="textfield expression" />
|
||||
<?php endif; ?>
|
Reference in New Issue
Block a user