Port server/plugins/section template to Twig

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
This commit is contained in:
Maurício Meneghini Fauth 2017-10-07 22:51:10 -03:00
parent 8225cb36e0
commit ab365820ff
2 changed files with 35 additions and 33 deletions

View File

@ -1,33 +0,0 @@
<div class="responsivetable">
<table class="data_full_width"
id="plugins-<?= preg_replace('/[^a-z]/', '', mb_strtolower($plugin_type)); ?>">
<caption class="tblHeaders">
<?= htmlspecialchars($plugin_type); ?>
</caption>
<thead>
<tr>
<th><?= __('Plugin'); ?></th>
<th><?= __('Description'); ?></th>
<th><?= __('Version'); ?></th>
<th><?= __('Author'); ?></th>
<th><?= __('License'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($plugin_list as $plugin): ?>
<tr class="noclick">
<th>
<?= htmlspecialchars($plugin['plugin_name']); ?>
<?php if (! $plugin['is_active']): ?>
<small class="attention"><?= __('disabled'); ?></small>
<?php endif; ?>
</th>
<td><?= htmlspecialchars($plugin['plugin_description']); ?></td>
<td><?= htmlspecialchars($plugin['plugin_type_version']); ?></td>
<td><?= htmlspecialchars($plugin['plugin_author']); ?></td>
<td><?= htmlspecialchars($plugin['plugin_license']); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>

View File

@ -0,0 +1,35 @@
<div class="responsivetable">
<table class="data_full_width" id="plugins-
{{- preg_replace('/[^a-z]/', '', plugin_type|lower) }}">
<caption class="tblHeaders">
{{ plugin_type }}
</caption>
<thead>
<tr>
<th>{% trans 'Plugin' %}</th>
<th>{% trans 'Description' %}</th>
<th>{% trans 'Version' %}</th>
<th>{% trans 'Author' %}</th>
<th>{% trans 'License' %}</th>
</tr>
</thead>
<tbody>
{% for plugin in plugin_list %}
<tr class="noclick">
<th>
{{ plugin['plugin_name'] }}
{% if not plugin['is_active'] %}
<small class="attention">
{% trans 'disabled' %}
</small>
{% endif %}
</th>
<td>{{ plugin['plugin_description'] }}</td>
<td>{{ plugin['plugin_type_version'] }}</td>
<td>{{ plugin['plugin_author'] }}</td>
<td>{{ plugin['plugin_license'] }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>