sort modules by id
parent
cd0b4a5b57
commit
58b60f0b17
14
index.php
14
index.php
|
@ -193,7 +193,9 @@ if (empty($module) && $type != '') {
|
||||||
echo '<form id="theme-form" method="post" action="' . $core->adminurl->get('translater', ['type' => 'plugin']) . '">';
|
echo '<form id="theme-form" method="post" action="' . $core->adminurl->get('translater', ['type' => 'plugin']) . '">';
|
||||||
|
|
||||||
$res = '';
|
$res = '';
|
||||||
foreach ($translater->getModules($type) as $module) {
|
$modules = $translater->getModules($type);
|
||||||
|
ksort($modules);
|
||||||
|
foreach ($modules as $module) {
|
||||||
if ($translater->hide_default && in_array($module->id, $translater::$default_distrib_modules[$type])) {
|
if ($translater->hide_default && in_array($module->id, $translater::$default_distrib_modules[$type])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -202,12 +204,12 @@ if (empty($module) && $type != '') {
|
||||||
'<tr class="line"><td class="nowrap minimal"><a href="%s" title="%s">%s</a></td>',
|
'<tr class="line"><td class="nowrap minimal"><a href="%s" title="%s">%s</a></td>',
|
||||||
$core->adminurl->get('translater', ['type' => $module->type, 'module' => $module->id]),
|
$core->adminurl->get('translater', ['type' => $module->type, 'module' => $module->id]),
|
||||||
html::escapeHTML(sprintf(__('Translate module %s'), __($module->name))),
|
html::escapeHTML(sprintf(__('Translate module %s'), __($module->name))),
|
||||||
html::escapeHTML(__($module->name))
|
html::escapeHTML(__($module->id))
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$res .= sprintf(
|
$res .= sprintf(
|
||||||
'<tr class="line offline"><td class="nowrap">%s</td>',
|
'<tr class="line offline"><td class="nowrap">%s</td>',
|
||||||
html::escapeHTML(__($module->name))
|
html::escapeHTML(__($module->id))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$codes = $module->getLangs();
|
$codes = $module->getLangs();
|
||||||
|
@ -227,7 +229,7 @@ if (empty($module) && $type != '') {
|
||||||
$res .= sprintf(
|
$res .= sprintf(
|
||||||
'<td class="nowrap maximal">%s</td><td class="nowrap minimal">%s</td><td class="nowrap minimal count">%s</td></tr>',
|
'<td class="nowrap maximal">%s</td><td class="nowrap minimal">%s</td><td class="nowrap minimal count">%s</td></tr>',
|
||||||
implode(', ', $codes),
|
implode(', ', $codes),
|
||||||
html::escapeHTML($module->id),
|
html::escapeHTML($module->name),
|
||||||
$module->version
|
$module->version
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -237,9 +239,9 @@ if (empty($module) && $type != '') {
|
||||||
<table class="clear">
|
<table class="clear">
|
||||||
<caption>' . sprintf(__('Modules list of type "%s"'), $type) .'</caption>
|
<caption>' . sprintf(__('Modules list of type "%s"'), $type) .'</caption>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="nowrap">' . __('Module') . '</th>
|
|
||||||
<th class="nowrap">' . __('Languages') . '</th>
|
|
||||||
<th class="nowrap">' . __('Id') . '</th>
|
<th class="nowrap">' . __('Id') . '</th>
|
||||||
|
<th class="nowrap">' . __('Languages') . '</th>
|
||||||
|
<th class="nowrap">' . __('Name') . '</th>
|
||||||
<th class="nowrap">' . __('Version') . '</th>
|
<th class="nowrap">' . __('Version') . '</th>
|
||||||
</tr>' .
|
</tr>' .
|
||||||
$res .
|
$res .
|
||||||
|
|
Loading…
Reference in New Issue