211
edits
(Created page with "=== '''ModernTemplate — Modernized Interface for Dolibarr''' === '''Version:''' 1.9.2 · '''License:''' GPL v3 · '''Author:''' KSI 30 ---- === '''Overview''' === ModernTem...") Tag: 2017 source edit |
No edit summary |
||
| Line 1: | Line 1: | ||
=== '''ModernTemplate — Modernized Interface for Dolibarr''' === | ==='''ModernTemplate — Modernized Interface for Dolibarr'''=== | ||
'''Version:''' 1.9.2 · '''License:''' GPL v3 · '''Author:''' KSI 30 | '''Version:''' 1.9.2 · '''License:''' GPL v3 · '''Author:''' KSI 30 | ||
---- | ---- | ||
=== '''Overview''' === | ==='''Overview'''=== | ||
ModernTemplate provides a full-screen shell for Dolibarr: compact toolbar, reorderable tile column, left sidebar with submenus, and smart search. | ModernTemplate provides a full-screen shell for Dolibarr: compact toolbar, reorderable tile column, left sidebar with submenus, and smart search. | ||
| Line 9: | Line 9: | ||
---- | ---- | ||
=== '''Highlights''' === | ==='''Highlights'''=== | ||
* Centralized navigation using tiles + synchronized submenus | *Centralized navigation using tiles + synchronized submenus | ||
* Drag & Drop tiles, with global or per-user saving | *Drag & Drop tiles, with global or per-user saving | ||
* Multi-object search (exact refs + third parties/contacts + fallback to global search) | *Multi-object search (exact refs + third parties/contacts + fallback to global search) | ||
* Quick customization: colors, start page, help URL, tab visibility | *Quick customization: colors, start page, help URL, tab visibility | ||
* Built-in ModernTemplate pages | *Built-in ModernTemplate pages | ||
---- | ---- | ||
=== '''Translations''' === | ==='''Translations'''=== | ||
Available in: | Available in: | ||
| Line 25: | Line 25: | ||
---- | ---- | ||
=== '''Requirements''' === | ==='''Requirements'''=== | ||
* Dolibarr 22.x (recommended) | *Dolibarr 22.x (recommended) | ||
* PHP 7.4+ | *PHP 7.4+ | ||
* Write access to database and <code>/custom/moderntemplate</code> directory | *Write access to database and <code>/custom/moderntemplate</code> directory | ||
---- | ---- | ||
=== '''Installation''' === | ==='''Installation'''=== | ||
# Copy the <code>moderntemplate/</code> folder to <code>htdocs/custom/</code> | #Copy the <code>moderntemplate/</code> folder to <code>htdocs/custom/</code> | ||
# In Dolibarr: go to '''Setup → Modules/Applications''' and enable '''ModernTemplate''' | #In Dolibarr: go to '''Setup → Modules/Applications''' and enable '''ModernTemplate''' | ||
# Visit <code>/custom/moderntemplate/admin/setup.php</code> and click '''Install/Repair''' if prompted | #Visit <code>/custom/moderntemplate/admin/setup.php</code> and click '''Install/Repair''' if prompted | ||
# Tip: a “ModernTemplate” menu will appear at the top and opens the shell at <code>/custom/moderntemplate/shell.php</code> | #Tip: a “ModernTemplate” menu will appear at the top and opens the shell at <code>/custom/moderntemplate/shell.php</code> | ||
---- | ---- | ||
=== '''Configuration''' === | ==='''Configuration'''=== | ||
==== '''Tools Tab''' ==== | ===='''Tools Tab'''==== | ||
* '''Start page''' (<code>MODERNTEMPLATE_START_PAGE</code>): default URL to open (e.g. <code>/custom/moderntemplate/home.php?fs=1</code>) | *'''Start page''' (<code>MODERNTEMPLATE_START_PAGE</code>): default URL to open (e.g. <code>/custom/moderntemplate/home.php?fs=1</code>) | ||
* '''Post-login redirection''' (<code>MODERNTEMPLATE_AUTO_REDIRECT</code>, <code>MODERNTEMPLATE_REDIRECT_SCOPE</code>): always or only when no <code>urlfrom</code> is set | *'''Post-login redirection''' (<code>MODERNTEMPLATE_AUTO_REDIRECT</code>, <code>MODERNTEMPLATE_REDIRECT_SCOPE</code>): always or only when no <code>urlfrom</code> is set | ||
* '''Auto full screen''' (<code>MODERNTEMPLATE_AUTO_FULLSCREEN</code>) and permission mask (<code>MODERNTEMPLATE_HIDE_FS_OVERLAY</code>) | *'''Auto full screen''' (<code>MODERNTEMPLATE_AUTO_FULLSCREEN</code>) and permission mask (<code>MODERNTEMPLATE_HIDE_FS_OVERLAY</code>) | ||
* '''Help and bugreport URLs''' (<code>MODERNTEMPLATE_HELP_URL</code>, <code>MODERNTEMPLATE_BUGREPORT_URL</code>) | *'''Help and bugreport URLs''' (<code>MODERNTEMPLATE_HELP_URL</code>, <code>MODERNTEMPLATE_BUGREPORT_URL</code>) | ||
* '''External tiles''' (<code>MODERNTEMPLATE_INCLUDE_EXT_TILES</code>): include non-Dolibarr links | *'''External tiles''' (<code>MODERNTEMPLATE_INCLUDE_EXT_TILES</code>): include non-Dolibarr links | ||
==== '''Colors Tab''' ==== | ===='''Colors Tab'''==== | ||
* '''Banner''': <code>MODERNTEMPLATE_COLOR_BANNER_BG</code>, <code>…FG</code> | *'''Banner''': <code>MODERNTEMPLATE_COLOR_BANNER_BG</code>, <code>…FG</code> | ||
* '''Primary/accent UI''': <code>MODERNTEMPLATE_COLOR_UI_PRIMARY</code>, <code>…ACCENT</code> | *'''Primary/accent UI''': <code>MODERNTEMPLATE_COLOR_UI_PRIMARY</code>, <code>…ACCENT</code> | ||
* '''Tiles''': <code>MODERNTEMPLATE_COLOR_TILE_BG</code>, <code>…TEXT</code> | *'''Tiles''': <code>MODERNTEMPLATE_COLOR_TILE_BG</code>, <code>…TEXT</code> | ||
==== '''Tiles Tab''' ==== | ===='''Tiles Tab'''==== | ||
* Reorder via drag & drop, add sections/links, auto-suggestions from menus | *Reorder via drag & drop, add sections/links, auto-suggestions from menus | ||
* SQL backup/restore (<code>tiles-backup.sql</code>), import/export | *SQL backup/restore (<code>tiles-backup.sql</code>), import/export | ||
* Per-user mode (<code>MODERNTEMPLATE_TILES_PERUSER</code>), ACLs for tiles and sections | *Per-user mode (<code>MODERNTEMPLATE_TILES_PERUSER</code>), ACLs for tiles and sections | ||
==== '''ACL Tab''' ==== | ===='''ACL Tab'''==== | ||
* User-based matrix: tile and section visibility, saved in the database | *User-based matrix: tile and section visibility, saved in the database | ||
==== '''Languages Tab''' ==== | ===='''Languages Tab'''==== | ||
* i18n keys scanned from menus; add/edit manually | *i18n keys scanned from menus; add/edit manually | ||
* Force language option (<code>MODERNTEMPLATE_FORCE_LANG</code>) | *Force language option (<code>MODERNTEMPLATE_FORCE_LANG</code>) | ||
==== '''Access Tab''' ==== | ===='''Access Tab'''==== | ||
* Control access to configuration tabs by profile (admins vs users) | *Control access to configuration tabs by profile (admins vs users) | ||
---- | ---- | ||
=== '''Usage''' === | ==='''Usage'''=== | ||
* Click the '''ModernTemplate''' menu to open the shell | *Click the '''ModernTemplate''' menu to open the shell | ||
* Open a tile: content displays in the center; the '''Submenus''' button toggles the contextual left panel | *Open a tile: content displays in the center; the '''Submenus''' button toggles the contextual left panel | ||
* Drag tiles to reorder them (changes are persistent) | *Drag tiles to reorder them (changes are persistent) | ||
* Use the search (magnifying glass icon): type an exact reference (<code>fac-xxx</code>, <code>cmd-xxx</code>, <code>prop-xxx</code>, <code>prod-xxx</code>, etc.) or a third party/contact name or number | *Use the search (magnifying glass icon): type an exact reference (<code>fac-xxx</code>, <code>cmd-xxx</code>, <code>prop-xxx</code>, <code>prod-xxx</code>, etc.) or a third party/contact name or number | ||
* Click '''Help''' to open the configured help URL | *Click '''Help''' to open the configured help URL | ||
* Click '''Exit Shell''' (<code>/custom/moderntemplate/shell/exit.php</code>) to restore the native Dolibarr menus | *Click '''Exit Shell''' (<code>/custom/moderntemplate/shell/exit.php</code>) to restore the native Dolibarr menus | ||
---- | ---- | ||
=== '''Administration & Maintenance''' === | ==='''Administration & Maintenance'''=== | ||
* '''Tables''': <code>llx_moderntemplate_pref</code>, <code>llx_moderntemplate_tiles</code> (automatic migration from <code>modernui_*</code>) | *'''Tables''': <code>llx_moderntemplate_pref</code>, <code>llx_moderntemplate_tiles</code> (automatic migration from <code>modernui_*</code>) | ||
* '''Endpoints''': | *'''Endpoints''': | ||
** <code>router/tiles_order.php</code> (tile order) | **<code>router/tiles_order.php</code> (tile order) | ||
** <code>router/left_order.php</code> | **<code>router/left_order.php</code> | ||
** <code>router/search.php</code> | **<code>router/search.php</code> | ||
* '''Key files''': | *'''Key files''': | ||
** <code>shell.php</code>, <code>shell/layout.php</code>, <code>js/shell.js</code> | **<code>shell.php</code>, <code>shell/layout.php</code>, <code>js/shell.js</code> | ||
** <code>core/triggers/interface_99_moderntemplate_redirect.class.php</code> | **<code>core/triggers/interface_99_moderntemplate_redirect.class.php</code> | ||
** <code>core/modules/modModernTemplate.class.php</code> | **<code>core/modules/modModernTemplate.class.php</code> | ||
* '''Backup''': via '''Tiles''' tab → export SQL; restore from <code>.sql</code> file | *'''Backup''': via '''Tiles''' tab → export SQL; restore from <code>.sql</code> file | ||
---- | ---- | ||
=== '''Security & Permissions''' === | ==='''Security & Permissions'''=== | ||
* '''Main permission''': Use ModernTemplate (<code>rights_class = moderntemplate</code>, permission <code>use</code>) | *'''Main permission''': Use ModernTemplate (<code>rights_class = moderntemplate</code>, permission <code>use</code>) | ||
* Fully respects Dolibarr rights for tile visibility and link access | *Fully respects Dolibarr rights for tile visibility and link access | ||
* CSRF protection on all write routes | *CSRF protection on all write routes | ||
---- | ---- | ||
=== '''Uninstallation''' === | ==='''Uninstallation'''=== | ||
# Disable the module in '''Setup → Modules/Applications''' | #Disable the module in '''Setup → Modules/Applications''' | ||
# (Optional) Use the '''Uninstall''' tab to purge ModernTemplate constants/data | #(Optional) Use the '''Uninstall''' tab to purge ModernTemplate constants/data | ||
# Delete the <code>/custom/moderntemplate</code> folder ⚠️ If post-login redirection was enabled, make sure to disable it before removing the module | #Delete the <code>/custom/moderntemplate</code> folder ⚠️ If post-login redirection was enabled, make sure to disable it before removing the module | ||
---- | ---- | ||
=== '''FAQ''' === | ==='''FAQ'''=== | ||
'''After login, I'm redirected to the shell — is this normal?''' | '''After login, I'm redirected to the shell — is this normal?''' | ||
| Line 132: | Line 132: | ||
'''Are third-party modules supported?''' | '''Are third-party modules supported?''' | ||
Tiles/links are based on active module menus and URLs. For custom URLs, add manual tiles. | Tiles/links are based on active module menus and URLs. For custom URLs, add manual tiles.[[File:Dolistore ksi banner.png|center|thumb|[https://www.dolistore.com/index.php?controller=search&orderby=position&orderway=desc&website=marketplace&search_query=k.s.i&submit_search=]|link=https://wiki.dolibarr.org/index.php/File:Dolistore_ksi_banner.png]] | ||
edits