Port server/variables/variable_row to Twig
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
This commit is contained in:
parent
52a6bc0b06
commit
921e7852c8
@ -1,30 +0,0 @@
|
||||
<tr class="var-row <?= $rowClass; ?>">
|
||||
<td class="var-action">
|
||||
<?php if ($editable): ?>
|
||||
<a href="#" data-variable="<?= htmlspecialchars($name) ?>" class="editLink"><?= \PhpMyAdmin\Util::getIcon('b_edit.png', __('Edit')) ?></a>
|
||||
<?php else: ?>
|
||||
<span title="<?= __('This is a read-only variable and can not be edited') ?>" class="read_only_var">
|
||||
<?= \PhpMyAdmin\Util::getIcon('bd_edit.png', __('Edit')) ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="var-name">
|
||||
<?php if ($docLink != null): ?>
|
||||
<span title="<?= htmlspecialchars(str_replace('_', ' ', $name)); ?>">
|
||||
<?= \PhpMyAdmin\Util::showMySQLDocu($docLink[1], false, $docLink[2] . '_' . $docLink[0], true)
|
||||
, str_replace('_', ' ', htmlspecialchars($name))
|
||||
, '</a>'
|
||||
?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<?= htmlspecialchars(str_replace('_', ' ', $name)); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="var-value value <?= ($isSuperuser ? ' editable' : '') ?>">
|
||||
<?php if ($isHtmlFormatted == false): ?>
|
||||
<?= str_replace(',', ',​', htmlspecialchars($value)); ?>
|
||||
<?php else: ?>
|
||||
<?= $value; ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
29
templates/server/variables/variable_row.twig
Normal file
29
templates/server/variables/variable_row.twig
Normal file
@ -0,0 +1,29 @@
|
||||
<tr class="var-row {{ row_class }}">
|
||||
<td class="var-action">
|
||||
{% if editable %}
|
||||
<a href="#" data-variable="{{ name }}" class="editLink">{{ Util_getIcon('b_edit.png', 'Edit'|trans) }}</a>
|
||||
{% else %}
|
||||
<span title="{% trans 'This is a read-only variable and can not be edited' %}" class="read_only_var">
|
||||
{{ Util_getIcon('bd_edit.png', 'Edit'|trans) }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="var-name">
|
||||
{% if doc_link != null %}
|
||||
<span title="{{ name|replace({'_': ' '}) }}">
|
||||
{{ Util_showMySQLDocu(doc_link[1], false, doc_link[2] ~ '_' ~ doc_link[0], true) }}
|
||||
{{ name|e|replace({'_': ' '})|raw }}
|
||||
</a>
|
||||
</span>
|
||||
{% else %}
|
||||
{{ name|replace({'_': ' '}) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="var-value value{{ is_superuser ? ' editable' }}">
|
||||
{% if is_html_formatted == false %}
|
||||
{{ value|e|replace({',': ',​'})|raw }}
|
||||
{% else %}
|
||||
{{ value }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
Loading…
Reference in New Issue
Block a user