Permalink
Browse files

Refactor server_plugins templates

Signed-off-by: Leonardo Strozzi <laps15@inf.ufpr.br>
  • Loading branch information...
laps15 committed Jun 29, 2018
1 parent 217a0db commit 28d890f7f74260f62c72c2f69ac1e9b7469dc1d6
@@ -105,20 +105,9 @@ private function _getPluginsHtml()
mb_strtolower($plugin_type)
);
}
$html = '<div id="plugins_plugins">';
$html .= $this->template->render('server/plugins/section_links', [
return $this->template->render('server/plugins/main', [
'plugins' => $this->plugins,
'plugins_type_clean' => $plugins_type_clean,
]);
foreach ($this->plugins as $plugin_type => $plugin_list) {
$html .= $this->template->render('server/plugins/section', [
'plugin_type' => $plugin_type,
'plugin_type_clean' => $plugins_type_clean[$plugin_type],
'plugin_list' => $plugin_list,
]);
}
$html .= '</div>';
return $html;
}
}
@@ -0,0 +1,46 @@
<div id="plugins_plugins">
<div id="sectionlinks">
{% for plugin_type in plugins|keys %}
<a href="#plugins-{{- plugins_type_clean[plugin_type] }}">
{{ plugin_type }}
</a>
{% endfor %}
</div>
{% for plugin_type, plugin_list in plugins %}
<div class="responsivetable">
<table class="data_full_width" id="plugins-
{{- plugins_type_clean[plugin_type] }}">
<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>
{% endfor %}
</div>

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

0 comments on commit 28d890f

Please sign in to comment.