projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bcb0795
)
Install/Activate Extensions: displays more sensible information for modules available...
author
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Thu, 26 Jan 2023 22:24:18 +0000
(23:24 +0100)
committer
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Thu, 26 Jan 2023 22:30:05 +0000
(23:30 +0100)
admin/inst_module.php
patch
|
blob
|
history
diff --git
a/admin/inst_module.php
b/admin/inst_module.php
index 6c974ddb4bda02234902550237a7e75365b122e1..966a4899e9e73f0ff70000c0876dc84a12314503 100644
(file)
--- a/
admin/inst_module.php
+++ b/
admin/inst_module.php
@@
-89,17
+89,6
@@
function handle_delete($id)
}
return true;
}
}
return true;
}
-//
-// Helper for formating menu tabs/entries to be displayed in extension table
-//
-function fmt_titles($defs)
-{
- if (!$defs) return '';
- foreach($defs as $def) {
- $str[] = access_string($def['title'], true);
- }
- return implode('<br>', array_values($str));
-}
//---------------------------------------------------------------------------------------------
//
// Display list of all extensions - installed and available from repository
//---------------------------------------------------------------------------------------------
//
// Display list of all extensions - installed and available from repository
@@
-111,8
+100,7
@@
function display_extensions($mods)
div_start('ext_tbl');
start_table(TABLESTYLE);
div_start('ext_tbl');
start_table(TABLESTYLE);
- $th = array(_("Extension"),_("Modules provided"), _("Options provided"),
- _("Installed"), _("Available"), "", "");
+ $th = array(_("Extension"), _("Installed"), _("Available"), "", "");
table_header($th);
$k = 0;
table_header($th);
$k = 0;
@@
-123,14
+111,9
@@
function display_extensions($mods)
$installed = @$ext['version'];
$id = @$ext['local_id'];
$installed = @$ext['version'];
$id = @$ext['local_id'];
- $entries = fmt_titles(@$ext['entries']);
- $tabs = fmt_titles(@$ext['tabs']);
-
alt_table_row_color($k);
label_cell($available ? get_package_view_str($pkg_name, $ext['name']) : $ext['name']);
alt_table_row_color($k);
label_cell($available ? get_package_view_str($pkg_name, $ext['name']) : $ext['name']);
- label_cell($tabs);
- label_cell($entries);
label_cell($id === null ? _("None") :
(($installed && ($installed != '-' || $installed != '')) ? $installed : _("Unknown")));
label_cell($id === null ? _("None") :
(($installed && ($installed != '-' || $installed != '')) ? $installed : _("Unknown")));
@@
-174,7
+157,7
@@
function company_extensions($id)
{
start_table(TABLESTYLE);
{
start_table(TABLESTYLE);
- $th = array(_("Extension"),
_("Modules provided"), _("Options provided
"), _("Active"));
+ $th = array(_("Extension"),
_("Version"), _("Path
"), _("Active"));
$mods = get_company_extensions();
$exts = get_company_extensions($id);
$mods = get_company_extensions();
$exts = get_company_extensions($id);
@@
-191,15
+174,14
@@
function company_extensions($id)
foreach($mods as $i => $mod)
{
if ($mod['type'] != 'extension') continue;
foreach($mods as $i => $mod)
{
if ($mod['type'] != 'extension') continue;
- alt_table_row_color($k);
+ alt_table_row_color($k);
label_cell($mod['name']);
label_cell($mod['name']);
- $entries = fmt_titles(@$mod['entries']);
- $tabs = fmt_titles(@$mod['tabs']);
- label_cell($tabs);
- label_cell($entries);
+ label_cell($mod['version']);
+ label_cell($mod['path']);
check_cells(null, 'Active'.$i, @$mod['active'] ? 1:0,
false, false, "align='center'");
check_cells(null, 'Active'.$i, @$mod['active'] ? 1:0,
false, false, "align='center'");
+
end_row();
}
end_row();
}