Module Modern Template EN: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
No edit summary
mNo edit summary
Tag: 2017 source edit
 
Line 1: Line 1:
==='''ModernTemplate — Modernized Interface for Dolibarr'''===
[[Category:Complementary modules]]
'''Version:''' 2.0.1 · '''License:''' GPL v3 · '''Author:''' KSI 30
{{TemplateDocDev}}
{{TemplateDocUtil}}


DEMO/ https://dolibarr.serveur2ksi30.fr/
=Information=
{{TemplateModuleInfo
|modulename=Modern Template
|editor=KSIDol
|web=https://www.ksidol.io
|status=Active
|note=Modern interface for Dolibarr with navigation portal, tiles, submenus, quick search, personalization and integrated administration.
|webbuy=https://www.dolistore.com/index.php?controller=search&orderby=position&orderway=desc&website=marketplace&search_query=k.s.i&submit_search=
|Dèmo=
}}


NOTICE: https://dolibarr.serveur2ksi30.fr/public/moderntemplate/Notice_Moderntemplate_Wiki.html
<div style="font-family:Arial,Helvetica,sans-serif;line-height:1.58;color:#172033;background:#f6f8fb;border:1px solid #d9e2ef;border-radius:18px;overflow:hidden;margin:16px 0;">
----
  <div style="background:linear-gradient(135deg,#0f172a,#172554 58%,#111827);color:#ffffff;padding:34px 30px;">
    <div style="margin-bottom:14px;">
      <span style="display:inline-block;background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.25);border-radius:999px;padding:6px 11px;margin:3px;font-size:13px;font-weight:bold;">Dolibarr module</span>
      <span style="display:inline-block;background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.25);border-radius:999px;padding:6px 11px;margin:3px;font-size:13px;font-weight:bold;">User interface</span>
      <span style="display:inline-block;background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.25);border-radius:999px;padding:6px 11px;margin:3px;font-size:13px;font-weight:bold;">Modern navigation</span>
      <span style="display:inline-block;background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.25);border-radius:999px;padding:6px 11px;margin:3px;font-size:13px;font-weight:bold;">EN documentation</span>
    </div>
    <h1 style="margin:0;font-size:38px;line-height:1.08;color:#ffffff;">Modern Template</h1>
    <p style="margin:10px 0 0;color:#bfdbfe;font-size:18px;font-weight:bold;">Modern interface, user portal and fast navigation for Dolibarr</p>
    <p style="margin:15px 0 0;max-width:960px;color:#e5edff;font-size:16px;">Modern Template improves the daily Dolibarr experience by providing a centralized workspace with tiles, submenus, quick search, full-screen display, action shortcuts and integrated administration tools.</p>
  </div>


==='''Overview'''===
  <div style="padding:24px;">
ModernTemplate provides a full-screen shell for Dolibarr: compact toolbar, reorderable tile column, left sidebar with submenus, and smart search.
    <div style="display:flex;flex-wrap:wrap;gap:16px;margin-bottom:18px;">
      <div style="flex:2 1 520px;background:#ffffff;border:1px solid #d9e2ef;border-radius:16px;padding:20px;box-shadow:0 10px 28px rgba(15,23,42,.07);">
        <h2 style="margin:0 0 10px;color:#101828;">General overview</h2>
        <p style="margin:0 0 12px;">The module turns access to Dolibarr into a clear and modern portal. Users find their main business entries as tiles and can work in Dolibarr screens while keeping smoother navigation.</p>
        <ul style="margin:0;padding-left:20px;">
          <li>Quick access to business modules through configurable tiles.</li>
          <li>Display of contextual submenus linked to the active tile.</li>
          <li>Quick search across Dolibarr objects available to the user.</li>
          <li>Full-screen mode, back, home, print, help, support and logout actions.</li>
          <li>Administrator settings from a dedicated interface.</li>
          <li>Integration without modifying the Dolibarr core.</li>
        </ul>
      </div>


The module integrates via hooks (<code>menuTop</code>, <code>menuLeft</code>, <code>toprightmenu</code>, <code>login</code>, <code>global</code>) and a trigger (<code>USER_LOGIN</code>) for optional post-login redirection.
      <div style="flex:1 1 320px;background:#ffffff;border:1px solid #d9e2ef;border-radius:16px;padding:20px;box-shadow:0 10px 28px rgba(15,23,42,.07);">
----
        <h2 style="margin:0 0 10px;color:#101828;">Publisher & support</h2>
        <table style="width:100%;border-collapse:collapse;background:#ffffff;">
          <tr><td style="border-bottom:1px solid #e5e7eb;padding:8px;font-weight:bold;">Publisher</td><td style="border-bottom:1px solid #e5e7eb;padding:8px;">KSIDol</td></tr>
          <tr><td style="border-bottom:1px solid #e5e7eb;padding:8px;font-weight:bold;">Specialty</td><td style="border-bottom:1px solid #e5e7eb;padding:8px;">Dolibarr integrator</td></tr>
          <tr><td style="border-bottom:1px solid #e5e7eb;padding:8px;font-weight:bold;">Services</td><td style="border-bottom:1px solid #e5e7eb;padding:8px;">Custom development</td></tr>
          <tr><td style="border-bottom:1px solid #e5e7eb;padding:8px;font-weight:bold;">Hosting</td><td style="border-bottom:1px solid #e5e7eb;padding:8px;">SaaS hosting</td></tr>
          <tr><td style="border-bottom:1px solid #e5e7eb;padding:8px;font-weight:bold;">Website</td><td style="border-bottom:1px solid #e5e7eb;padding:8px;">[https://www.ksidol.io ksidol.io]</td></tr>
          <tr><td style="padding:8px;font-weight:bold;">Support</td><td style="padding:8px;">[mailto:support@ksidol.io support@ksidol.io]</td></tr>
        </table>
        <p style="margin:14px 0 0;">KSIDol modules on Dolistore: [https://www.dolistore.com/index.php?controller=search&orderby=position&orderway=desc&website=marketplace&search_query=k.s.i&submit_search= My modules on Dolistore — K.S.I]</p>
      </div>
    </div>


==='''Highlights'''===
    <div style="display:flex;flex-wrap:wrap;gap:16px;margin-bottom:18px;">
      <div style="flex:1 1 260px;background:#ffffff;border:1px solid #d9e2ef;border-radius:16px;padding:18px;text-align:center;">
        <div style="font-size:30px;font-weight:bold;color:#0f172a;">0</div>
        <div style="color:#667085;">Dolibarr core modification</div>
      </div>
      <div style="flex:1 1 260px;background:#ffffff;border:1px solid #d9e2ef;border-radius:16px;padding:18px;text-align:center;">
        <div style="font-size:30px;font-weight:bold;color:#0f172a;">5</div>
        <div style="color:#667085;">commercial languages presented</div>
      </div>
      <div style="flex:1 1 260px;background:#ffffff;border:1px solid #d9e2ef;border-radius:16px;padding:18px;text-align:center;">
        <div style="font-size:30px;font-weight:bold;color:#0f172a;">1</div>
        <div style="color:#667085;">central user portal</div>
      </div>
    </div>
  </div>
</div>


*Centralized navigation using tiles + synchronized submenus
=Main features=
*Drag & Drop tiles, with global or per-user saving
*Multi-object search (exact refs + third parties/contacts + fallback to global search)
*Quick customization: colors, start page, help URL, tab visibility
*Built-in ModernTemplate pages


----
<div style="display:flex;flex-wrap:wrap;gap:14px;margin:14px 0;">
  <div style="flex:1 1 300px;border:1px solid #d9e2ef;border-radius:14px;background:#ffffff;padding:16px;">
    <h3 style="margin-top:0;">Navigation portal</h3>
    <p>Modern Template displays a workspace focused on actual use: business tiles, quick access links, submenus, navigation actions and an integrated display area.</p>
  </div>
  <div style="flex:1 1 300px;border:1px solid #d9e2ef;border-radius:14px;background:#ffffff;padding:16px;">
    <h3 style="margin-top:0;">Customizable tiles</h3>
    <p>Main entries can be adapted, reordered and enriched to provide a portal aligned with the company organization.</p>
  </div>
  <div style="flex:1 1 300px;border:1px solid #d9e2ef;border-radius:14px;background:#ffffff;padding:16px;">
    <h3 style="margin-top:0;">Contextual submenus</h3>
    <p>Each tile can display its secondary links: lists, creation pages, statistics, consultation pages or business actions.</p>
  </div>
  <div style="flex:1 1 300px;border:1px solid #d9e2ef;border-radius:14px;background:#ffffff;padding:16px;">
    <h3 style="margin-top:0;">Quick search</h3>
    <p>The search queries the main Dolibarr objects accessible to the connected user and redirects to the relevant card or list.</p>
  </div>
  <div style="flex:1 1 300px;border:1px solid #d9e2ef;border-radius:14px;background:#ffffff;padding:16px;">
    <h3 style="margin-top:0;">Visual personalization</h3>
    <p>The administrator can adapt colors and selected visual elements to bring the interface closer to the company brand identity.</p>
  </div>
  <div style="flex:1 1 300px;border:1px solid #d9e2ef;border-radius:14px;background:#ffffff;padding:16px;">
    <h3 style="margin-top:0;">Integrated administration</h3>
    <p>Settings are available from a tabbed configuration page, with repair, backup, restore and uninstall tools.</p>
  </div>
</div>


==='''Translations'''===
=User workflow=
Available in:


<code>ar_SA</code>, <code>de_DE</code>, <code>en_US</code>, <code>es_ES</code>, <code>fr_FR</code>, <code>it_IT</code>, <code>ja_JP</code>, <code>nl_NL</code>, <code>pl_PL</code>, <code>pt_BR</code>, <code>pt_PT</code>, <code>ru_RU</code>, <code>tr_TR</code>, <code>zh_CN</code>
# The user logs in to Dolibarr with the usual credentials.
----
# If the option is enabled for the profile, Modern Template automatically opens the portal after login.
# The user selects a business tile to open the corresponding main page.
# Associated submenus can be displayed to access secondary actions.
# Quick search can be used to find a card or list without browsing through menus.
# The user can temporarily switch back to the classic Dolibarr display when required.


==='''Requirements'''===
=Quick search=


*Dolibarr 22.x (recommended)
The internal search respects the permissions of the connected user. It can route the user to the main objects used daily in Dolibarr.
*PHP 7.4+
*Write access to database and <code>/custom/moderntemplate</code> directory


----
<div style="display:flex;flex-wrap:wrap;gap:8px;margin:12px 0;">
  <span style="display:inline-block;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:999px;padding:7px 11px;font-weight:bold;">Third parties</span>
  <span style="display:inline-block;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:999px;padding:7px 11px;font-weight:bold;">Contacts</span>
  <span style="display:inline-block;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:999px;padding:7px 11px;font-weight:bold;">Customer invoices</span>
  <span style="display:inline-block;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:999px;padding:7px 11px;font-weight:bold;">Supplier invoices</span>
  <span style="display:inline-block;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:999px;padding:7px 11px;font-weight:bold;">Proposals</span>
  <span style="display:inline-block;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:999px;padding:7px 11px;font-weight:bold;">Customer orders</span>
  <span style="display:inline-block;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:999px;padding:7px 11px;font-weight:bold;">Supplier orders</span>
  <span style="display:inline-block;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:999px;padding:7px 11px;font-weight:bold;">Products / services</span>
  <span style="display:inline-block;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:999px;padding:7px 11px;font-weight:bold;">Projects</span>
  <span style="display:inline-block;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:999px;padding:7px 11px;font-weight:bold;">Tickets</span>
  <span style="display:inline-block;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:999px;padding:7px 11px;font-weight:bold;">Agenda</span>
</div>


==='''Installation'''===
=Available languages=


#Copy the <code>moderntemplate/</code> folder to <code>htdocs/custom/</code>
{| class="wikitable" style="width:100%;"
#In Dolibarr: go to '''Setup → Modules/Applications''' and enable '''ModernTemplate'''
! Flag
#Visit <code>/custom/moderntemplate/admin/setup.php</code> and click '''Install/Repair''' if prompted
! Language
#Tip: a “ModernTemplate” menu will appear at the top and opens the shell at <code>/custom/moderntemplate/shell.php</code>
! Code
! Availability
|-
| ???????? || French || FR || Yes
|-
| ???????? || English || EN || Yes
|-
| ???????? || Italian || IT || Yes
|-
| ???????? || German || DE || Yes
|-
| ???????? || Spanish || ES || Yes
|}


----
=Installation=


==='''Configuration'''===
# Download the module from Dolistore or from the area provided by KSIDol.
# Install the module in the Dolibarr additional modules directory.
# Enable the module from the modules/applications configuration menu.
# Open the module configuration page.
# Use the installation or repair tool if Dolibarr offers it.
# Check that the Modern Template menu appears and that the portal opens correctly.


===='''Tools Tab'''====
<div style="border-left:5px solid #2563eb;background:#eff6ff;padding:12px 14px;margin:12px 0;border-radius:10px;">
<strong>Tip:</strong> make a backup before installation or upgrade, especially on a production instance.
</div>


*'''Start page''' (<code>MODERNTEMPLATE_START_PAGE</code>): default URL to open (e.g. <code>/custom/moderntemplate/home.php?fs=1</code>)
=Configuration=
*'''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>)
*'''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


===='''Colors Tab'''====
==Colors tab==
Used to adapt the portal appearance: banner, toolbar, main color, accent color, tile background and text. This tab is useful to align the interface with the company visual identity.


*'''Banner''': <code>MODERNTEMPLATE_COLOR_BANNER_BG</code>, <code>…FG</code>
==Tiles tab==
*'''Primary/accent UI''': <code>MODERNTEMPLATE_COLOR_UI_PRIMARY</code>, <code>…ACCENT</code>
Used to organize the main portal entries. Administrators can add, edit, move or remove tiles and associate secondary links with each section. Backup and restore functions are provided to secure changes.
*'''Tiles''': <code>MODERNTEMPLATE_COLOR_TILE_BG</code>, <code>…TEXT</code>


===='''Tiles Tab'''====
==Rights / ACL tab==
Used to manage the visibility of tiles and links by user. This feature helps simplify the interface, reduce navigation errors and reserve selected entries for specific profiles.


*Reorder via drag & drop, add sections/links, auto-suggestions from menus
==Languages tab==
*SQL backup/restore (<code>tiles-backup.sql</code>), import/export
Used to administer module labels, scan texts to translate and prepare a consistent interface for multilingual users.
*Per-user mode (<code>MODERNTEMPLATE_TILES_PERUSER</code>), ACLs for tiles and sections


===='''ACL Tab'''====
==Tools tab==
Used to adjust the overall portal behavior: home page, redirection after login, full-screen mode, help links, support, diagnosis and repair. Advanced options should be handled by an administrator.


*User-based matrix: tile and section visibility, saved in the database
==Dolibarr rights tab==
Used to check or display the main permission required to use the module. Dolibarr permissions remain the priority for access to business data.


===='''Languages Tab'''====
==Setup access tab==
Used to choose which configuration tabs are visible to administrators and, where required, to selected users. This avoids exposing advanced settings to profiles that do not need them.


*i18n keys scanned from menus; add/edit manually
==Uninstall tab==
*Force language option (<code>MODERNTEMPLATE_FORCE_LANG</code>)
Used to remove the elements installed by the module. Complete data deletion should be used only when the administrator really wants to erase the module configuration.


===='''Access Tab'''====
=Public technical notice=


*Control access to configuration tabs by profile (admins vs users)
This section describes the functional architecture of the module without displaying internal values, constant names, table names, file paths, endpoints or SQL queries.


----
{| class="wikitable" style="width:100%;"
! Analyzed element
! Functional role
! Recommended public wording
|-
| Login trigger
| Prepares portal opening after authentication according to the defined settings.
| The module can open Modern Template after login while respecting the user context.
|-
| Interface integration points
| Integrates with menu areas and the upper part of Dolibarr.
| The module uses standard Dolibarr mechanisms to display its portal and hide native menus when needed.
|-
| Configuration settings
| Store global preferences: display, redirection, colors, help, support and portal behavior.
| Settings are managed from the configuration interface, without direct manipulation of technical values.
|-
| Internal SQL storage
| Stores preferences and tile structure, with installation, repair, backup and restore.
| The module has dedicated internal storage for its configuration and portal personalization.
|-
| Dolibarr links
| Connects tiles, submenus and search results to accessible business pages.
| The module relies on standard Dolibarr menus, rights and objects to keep navigation consistent.
|-
| Maintenance functions
| Repair settings, synchronize installation elements and support migrations from older versions.
| Repair and maintenance tools are available in the module administration area.
|-
| Application security
| Controls rights, protects sensitive actions and cleans navigation targets.
| The module respects Dolibarr rights and secures configuration actions.
|}


==='''Usage'''===
=Administration & maintenance=


*Click the '''ModernTemplate''' menu to open the shell
* Use the module configuration tab for all common changes.
*Open a tile: content displays in the center; the '''Submenus''' button toggles the contextual left panel
* Back up the tile configuration before a major reorganization.
*Drag tiles to reorder them (changes are persistent)
* Test redirections after login with both an administrator account and a standard user account.
*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
* Check Dolibarr rights if a tile or search result is not displayed.
*Click '''Help''' to open the configured help URL
* Use repair functions after an update or migration from an older version.
*Click '''Exit Shell''' (<code>/custom/moderntemplate/shell/exit.php</code>) to restore the native Dolibarr menus
* Avoid direct database changes unless handled through supervised technical intervention.


----
=Security & rights=


==='''Administration & Maintenance'''===
* The module has a dedicated Dolibarr usage permission.
* Tiles and links can be restricted to selected users.
* Search results respect read permissions for the relevant Dolibarr modules.
* Configuration write actions use Dolibarr session protections.
* Start and configuration URLs are controlled to reduce the risk of incorrect redirection.
* The module does not require any Dolibarr core modification.


*'''Tables''': <code>llx_moderntemplate_pref</code>, <code>llx_moderntemplate_tiles</code> (automatic migration from <code>modernui_*</code>)
=Uninstallation=
*'''Endpoints''':
**<code>router/tiles_order.php</code> (tile order)
**<code>router/left_order.php</code>
**<code>router/search.php</code>
*'''Key files''':
**<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/modules/modModernTemplate.class.php</code>
*'''Backup''': via '''Tiles''' tab → export SQL; restore from <code>.sql</code> file


----
# Disable automatic redirection if it has been used.
# Disable the module in Dolibarr configuration.
# Use the uninstall tab only if complete deletion of module data is required.
# Remove module files after disabling it, following the usual additional-module procedure.
# Check that the user returns to the classic Dolibarr home page.


==='''Security & Permissions'''===
<div style="border-left:5px solid #f97316;background:#fff7ed;padding:12px 14px;margin:12px 0;border-radius:10px;">
<strong>Warning:</strong> complete deletion may remove tile personalization and module preferences. Keep a backup if these elements must be reused.
</div>


*'''Main permission''': Use ModernTemplate (<code>rights_class = moderntemplate</code>, permission <code>use</code>)
=FAQ=
*Fully respects Dolibarr rights for tile visibility and link access
*CSRF protection on all write routes


----
==After login, the user lands directly on Modern Template. Is this normal?==
Yes, if redirection after login is enabled in the module tools. It can be disabled or limited depending on the desired behavior.


==='''Uninstallation'''===
==I cannot see some tiles or links. Why?==
Visibility may depend on Dolibarr rights, tile restrictions, user settings or modules enabled on the instance.


#Disable the module in '''Setup → Modules/Applications'''
==Does the module replace Dolibarr?==
#(Optional) Use the '''Uninstall''' tab to purge ModernTemplate constants/data
No. Modern Template improves navigation and the user experience, but the pages and data remain Dolibarr pages and data.
#Delete the <code>/custom/moderntemplate</code> folder  ⚠️ If post-login redirection was enabled, make sure to disable it before removing the module


----
==Can I personalize access by department or by user?==
Yes. Administration allows tiles, submenus and restrictions to be adapted in order to create a simpler interface for each profile.


==='''FAQ'''===
==What should I do before an update?==
'''After login, I'm redirected to the shell — is this normal?'''
It is recommended to back up the Dolibarr instance and export the tile configuration if significant personalization has been made.


Yes, if <code>MODERNTEMPLATE_AUTO_REDIRECT</code> is enabled. Disable it in the '''Tools''' tab or adjust <code>MODERNTEMPLATE_REDIRECT_SCOPE</code>.
=Useful links=


'''I'm missing Dolibarr submenus'''
* KSIDol website: [https://www.ksidol.io https://www.ksidol.io]
 
* KSIDol support: [mailto:support@ksidol.io support@ksidol.io]
In the shell view, native menus are hidden by design. Use the left panel or click '''Exit Shell''' to return to standard navigation.
* KSIDol modules on Dolistore: [https://www.dolistore.com/index.php?controller=search&orderby=position&orderway=desc&website=marketplace&search_query=k.s.i&submit_search= My modules on Dolistore — K.S.I]
 
'''Are third-party modules supported?'''
 
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=]]
211

edits

Navigation menu