mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-07-25 22:27:05 -04:00
- Add BasePlugin::registerModule() to register permission-system modules, auto-grant to admin (person_id=1), idempotent via INSERT IGNORE - Replace inject:css/js placeholders in header.php with explicit versioned asset links for reliable loading outside build pipeline - Update home.php module icons to use pluginContent() hook with SVG fallback, enabling plugins to override module icons Signed-off-by: Travis Garrison <travis@chiraqbookstore.com>
31 lines
1.0 KiB
PHP
31 lines
1.0 KiB
PHP
<?php
|
|
/**
|
|
* @var array $allowed_modules
|
|
*/
|
|
?>
|
|
|
|
<?= view('partial/header') ?>
|
|
|
|
<script type="text/javascript">
|
|
dialog_support.init("a.modal-dlg");
|
|
</script>
|
|
|
|
<h3 class="text-center"><?= lang('Common.welcome_message') ?></h3>
|
|
|
|
<div id="office_module_list">
|
|
<?php foreach ($allowed_modules as $module) { ?>
|
|
<div class="module_item" title="<?= lang("Module.$module->module_id" . '_desc') ?>">
|
|
<a href="<?= base_url($module->module_id) ?>">
|
|
<?php if (pluginContentExists("module_icon_$module->module_id")): ?>
|
|
<?= pluginContent("module_icon_$module->module_id") ?>
|
|
<?php else: ?>
|
|
<img src="<?= base_url("images/menubar/$module->module_id.svg") ?>" style="border-width: 0; height: 64px; max-width: 64px;" alt="Menubar Image">
|
|
<?php endif; ?>
|
|
</a>
|
|
<a href="<?= base_url($module->module_id) ?>"><?= lang("Module.$module->module_id") ?></a>
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
|
|
<?= view('partial/footer') ?>
|