diff options
author | Maurício Meneghini Fauth <mauriciofauth@gmail.com> | 2017-05-12 07:26:49 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauriciofauth@gmail.com> | 2017-05-12 07:26:49 +0300 |
commit | 113c1200884050074b1eae36750043d73decdcb5 (patch) | |
tree | 3b3dbdd6ff69bddc556f765f0190a78af6527e06 /templates/server | |
parent | cb881daea21cfb1af79bbee67bac416c273fa124 (diff) |
Port some templates to Twig
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Diffstat (limited to 'templates/server')
-rw-r--r-- | templates/server/binlog/log_row.phtml | 8 | ||||
-rw-r--r-- | templates/server/binlog/log_row.twig | 10 | ||||
-rw-r--r-- | templates/server/collations/charsets.phtml | 24 | ||||
-rw-r--r-- | templates/server/collations/charsets.twig | 24 | ||||
-rw-r--r-- | templates/server/engines/engines.phtml | 22 | ||||
-rw-r--r-- | templates/server/engines/engines.twig | 22 | ||||
-rw-r--r-- | templates/server/variables/link_template.phtml | 11 | ||||
-rw-r--r-- | templates/server/variables/link_template.twig | 10 | ||||
-rw-r--r-- | templates/server/variables/session_variable_row.phtml | 5 | ||||
-rw-r--r-- | templates/server/variables/session_variable_row.twig | 5 | ||||
-rw-r--r-- | templates/server/variables/variable_table_head.phtml | 7 | ||||
-rw-r--r-- | templates/server/variables/variable_table_head.twig | 7 |
12 files changed, 78 insertions, 77 deletions
diff --git a/templates/server/binlog/log_row.phtml b/templates/server/binlog/log_row.phtml deleted file mode 100644 index 6f48ab0174..0000000000 --- a/templates/server/binlog/log_row.phtml +++ /dev/null @@ -1,8 +0,0 @@ -<tr class="noclick"> - <td><?= $value['Log_name']; ?></td> - <td class="right"><?= $value['Pos']; ?></td> - <td><?= $value['Event_type']; ?></td> - <td class="right"><?= $value['Server_id']; ?></td> - <td class="right"><?= (isset($value['Orig_log_pos']) ? $value['Orig_log_pos'] : $value['End_log_pos']); ?></td> - <td><?= \PMA\libraries\Util::formatSql($value['Info'], ! $dontlimitchars); ?></td> -</tr>
\ No newline at end of file diff --git a/templates/server/binlog/log_row.twig b/templates/server/binlog/log_row.twig new file mode 100644 index 0000000000..a5ffabd8e8 --- /dev/null +++ b/templates/server/binlog/log_row.twig @@ -0,0 +1,10 @@ +<tr class="noclick"> + <td>{{ value['Log_name'] }}</td> + <td class="right">{{ value['Pos'] }}</td> + <td>{{ value['Event_type'] }}</td> + <td class="right">{{ value['Server_id'] }}</td> + <td class="right"> + {{- value['Orig_log_pos'] is defined ? value['Orig_log_pos'] : value['End_log_pos'] -}} + </td> + <td>{{ Util_formatSql(value['Info'], not dontlimitchars) }}</td> +</tr> diff --git a/templates/server/collations/charsets.phtml b/templates/server/collations/charsets.phtml deleted file mode 100644 index 57ad186320..0000000000 --- a/templates/server/collations/charsets.phtml +++ /dev/null @@ -1,24 +0,0 @@ -<div id="div_mysql_charset_collations"> - <table class="data noclick"> - <tr> - <th id="collationHeader"><?= __('Collation'); ?></th> - <th><?= __('Description'); ?></th> - </tr> - <?php foreach ($mysqlCharsets as $current_charset): ?> - <tr> - <th colspan="2" class="right"> - <?= htmlspecialchars($current_charset); ?> - <?php if (! empty($mysqlCharsetsDesc[$current_charset])): ?> - (<i><?= htmlspecialchars($mysqlCharsetsDesc[$current_charset]); ?></i>) - <?php endif; ?> - </th> - </tr> - <?php foreach ($mysqlCollations[$current_charset] as $current_collation): ?> - <tr class="<?= ($mysqlDftCollations[$current_charset] == $current_collation ? ' marked' : ''); ?>"> - <td><?= htmlspecialchars($current_collation); ?></td> - <td><?= PMA\libraries\Charsets::getCollationDescr($current_collation); ?></td> - </tr> - <?php endforeach; ?> - <?php endforeach; ?> - </table> -</div> diff --git a/templates/server/collations/charsets.twig b/templates/server/collations/charsets.twig new file mode 100644 index 0000000000..ba5b06aa9d --- /dev/null +++ b/templates/server/collations/charsets.twig @@ -0,0 +1,24 @@ +<div id="div_mysql_charset_collations"> + <table class="data noclick"> + <tr> + <th id="collationHeader">{% trans 'Collation' %}</th> + <th>{% trans 'Description' %}</th> + </tr> + {% for current_charset in mysql_charsets %} + <tr> + <th colspan="2" class="right"> + {{ current_charset }} + {% if mysql_charsets_desc[current_charset] is not empty %} + (<em>{{ mysql_charsets_desc[current_charset] }}</em>) + {% endif %} + </th> + </tr> + {% for current_collation in mysql_collations[current_charset] %} + <tr class="{{ mysql_dft_collations[current_charset] == current_collation ? ' marked' }}"> + <td>{{ current_collation }}</td> + <td>{{ Charsets_getCollationDescr(current_collation) }}</td> + </tr> + {% endfor %} + {% endfor %} + </table> +</div> diff --git a/templates/server/engines/engines.phtml b/templates/server/engines/engines.phtml deleted file mode 100644 index 5b57979488..0000000000 --- a/templates/server/engines/engines.phtml +++ /dev/null @@ -1,22 +0,0 @@ -<table class="noclick"> - <thead> - <tr> - <th><?= __('Storage Engine'); ?></th> - <th><?= __('Description'); ?></th> - </tr> - </thead> - <tbody> - <?php foreach ($engines as $engine => $details): ?> - <tr class=" - <?= $details['Support'] == 'NO' || $details['Support'] == 'DISABLED' ? ' disabled' : ''; ?> - <?= $details['Support'] == 'DEFAULT' ? ' marked' : ''; ?>"> - <td> - <a rel="newpage" href="server_engines.php<?= \PMA\libraries\URL::getCommon(array('engine' => $engine)); ?>"> - <?= htmlspecialchars($details['Engine']); ?> - </a> - </td> - <td><?= htmlspecialchars($details['Comment']); ?></td> - </tr> - <?php endforeach; ?> - </tbody> -</table> diff --git a/templates/server/engines/engines.twig b/templates/server/engines/engines.twig new file mode 100644 index 0000000000..230bc05a20 --- /dev/null +++ b/templates/server/engines/engines.twig @@ -0,0 +1,22 @@ +<table class="noclick"> + <thead> + <tr> + <th>{% trans 'Storage Engine' %}</th> + <th>{% trans 'Description' %}</th> + </tr> + </thead> + <tbody> + {% for engine, details in engines %} + <tr class=" + {{- details['Support'] == 'NO' or details['Support'] == 'DISABLED' ? ' disabled' }} + {{ details['Support'] == 'DEFAULT' ? ' marked' }}"> + <td> + <a rel="newpage" href="server_engines.php{{ URL_getCommon({'engine': engine}) }}"> + {{ details['Engine'] }} + </a> + </td> + <td>{{ details['Comment'] }}</td> + </tr> + {% endfor %} + </tbody> +</table> diff --git a/templates/server/variables/link_template.phtml b/templates/server/variables/link_template.phtml deleted file mode 100644 index b2e68aabfd..0000000000 --- a/templates/server/variables/link_template.phtml +++ /dev/null @@ -1,11 +0,0 @@ -<a style="display: none;" href="<?= $url; ?>" class="ajax saveLink"> - <?= \PMA\libraries\Util::getIcon('b_save.png', __('Save')); ?> -</a> -<a style="display: none;" href="#" class="cancelLink"> - <?= \PMA\libraries\Util::getIcon('b_close.png', __('Cancel')); ?> -</a> -<?= \PMA\libraries\Util::getImage( - 'b_help.png', - __('Documentation'), - array('style' => 'display:none', 'id' => 'docImage') -) ?>
\ No newline at end of file diff --git a/templates/server/variables/link_template.twig b/templates/server/variables/link_template.twig new file mode 100644 index 0000000000..fc1e9a1c1a --- /dev/null +++ b/templates/server/variables/link_template.twig @@ -0,0 +1,10 @@ +<a href="{{ url|raw }}" class="ajax saveLink hide"> + {{ Util_getIcon('b_save.png', 'Save'|trans) }} +</a> +<a href="#" class="cancelLink hide"> + {{ Util_getIcon('b_close.png', 'Cancel'|trans) }} +</a> +{{ Util_getImage('b_help.png', 'Documentation'|trans, { + 'class': 'hide', + 'id': 'docImage' +}) }} diff --git a/templates/server/variables/session_variable_row.phtml b/templates/server/variables/session_variable_row.phtml deleted file mode 100644 index b98afa856a..0000000000 --- a/templates/server/variables/session_variable_row.phtml +++ /dev/null @@ -1,5 +0,0 @@ -<tr class="var-row <?= $rowClass; ?>"> - <td class="var-action"></td> - <td class="var-name session">(<?= __('Session value'); ?> )</td> - <td class="var-value value"> <?= htmlspecialchars($value); ?></td> -</tr>
\ No newline at end of file diff --git a/templates/server/variables/session_variable_row.twig b/templates/server/variables/session_variable_row.twig new file mode 100644 index 0000000000..eb21e6bf78 --- /dev/null +++ b/templates/server/variables/session_variable_row.twig @@ -0,0 +1,5 @@ +<tr class="var-row {{ row_class }}"> + <td class="var-action"></td> + <td class="var-name session">({% trans 'Session value' %})</td> + <td class="var-value value"> {{ value }}</td> +</tr> diff --git a/templates/server/variables/variable_table_head.phtml b/templates/server/variables/variable_table_head.phtml deleted file mode 100644 index a1ac15ba40..0000000000 --- a/templates/server/variables/variable_table_head.phtml +++ /dev/null @@ -1,7 +0,0 @@ -<thead> - <tr class="var-header var-row"> - <td class="var-action"><?= __('Action'); ?></td> - <td class="var-name"><?= __('Variable'); ?></td> - <td class="var-value"><?= __('Session value'); ?> / <?= __('Global value'); ?></td> - </tr> -</thead>
\ No newline at end of file diff --git a/templates/server/variables/variable_table_head.twig b/templates/server/variables/variable_table_head.twig new file mode 100644 index 0000000000..656717ea8a --- /dev/null +++ b/templates/server/variables/variable_table_head.twig @@ -0,0 +1,7 @@ +<thead> + <tr class="var-header var-row"> + <td class="var-action">{% trans 'Action' %}</td> + <td class="var-name">{% trans 'Variable' %}</td> + <td class="var-value">{% trans 'Session value' %} / {% trans 'Global value' %}</td> + </tr> +</thead> |