Последнии сообщения форума
Replace static op-based tabs in config() with runtime link-based tab navigation using the new links/is_runtime/tabs_id/tabs_sync_selector API in getTplAdminTabs. Simplify info() to a single setTplAdminInfoPage call. Remove inline tabs-panel wrapping from each config section (panel rendering handled by new/tabs-panel in form).
Core changes:
- config() (admin/modules/config.php):
- Build links array with href, rel, is_active, label, title per tab
- Pass is_runtime, tabs_id, tabs_index and tabs_sync_selector to getTplAdminTabs
- Remove individual tabs-panel wrappers around $taba..$tabg sections
- Tabs panel wrapping now provided by the form fragment tabs-panel contract
- info() (admin/modules/config.php):
Replace full inline implementation (tab nav, markdown render, HTMX form) with setTplAdminInfoPage using ops array matching the config tab URL pattern
Benefits: - Config tabs now driven by client-side runtime (data-sl-tabs-init); no page reload - tabs_sync_selector syncs active tab index into hidden input[name=tab] on switch - info() reduced from ~50 lines to a single helper call
Technical notes: - tabs_index initialised from $ctab (validated 0-6); persisted in sessionStorage by tabs.js - info-link tab carries data-sl-tab-info-link for URL sync on tab switch - Removes dependency on full inline info tab render in this module
Reflects the current state of tracked assets after this refactor wave.
Core changes:
- config/local.php:
- Update base_fingerprint to b1eb1cf42212ffc5135e26ff202dc4cf93f7b366
Technical notes: - Local-only config; not part of the distributed base config
Label constants must not contain trailing punctuation; colons are added by the rendering layer (label fragments or form rows).
Core changes:
- admin/lang/*.php (de, en, fr, pl, ru, uk):
- _OGRAPHT: remove trailing ':' from all 6 language files
- _SCHEMAT: remove trailing ':' from all 6 language files
Benefits: - Consistent with all other label constants in the project - Prevents double colon when rendered via label fragment
Technical notes: - Values-only change; keys and structure unchanged
Replace getTplAdminNavi with getTplAdminTabs, getTplAdminPlaceholder with box partial, and setAdminInfoPage with setTplAdminInfoPage across all three modules.
Core changes:
- blocks.php:
- blocks(): replace getTplAdminPlaceholder with box partial (box_id repajax_block)
- getTplAdminTabs already in place; no navi migration needed
- favorites.php:
favorites(): add global $tpl; replace getTplAdminNavi with getTplAdminTabs; replace getTplAdminPlaceholder with box partial (box_id repadminFavoriteList)
- config(): replace getTplAdminNavi with getTplAdminTabs
- info(): replace getTplAdminNavi + setAdminInfoPage with setTplAdminInfoPage
- privat.php:
privat(): add global $tpl; replace getTplAdminNavi with getTplAdminTabs; replace getTplAdminPlaceholder with box partial (box_id repadminPrivateList)
- config(): replace getTplAdminNavi with getTplAdminTabs
- info(): replace getTplAdminNavi + setAdminInfoPage with setTplAdminInfoPage
Benefits: - All three modules now use approved getTplAdminTabs contract - box_id attribute on partial enables HTMX partial replacement - setTplAdminInfoPage replaces two-call pattern (navi + setAdminInfoPage)
Technical notes: - No logic changes; purely rendering contract migration - getTplAdminNavi no longer called from these modules
Replace getTplAdminNavi and admin-uploads-tabs-content with new/tabs, new/tabs-link and new/tabs-panel fragments. Replace getTplAdminPlaceholder with box partial. Move HTMX lazy-load attributes from sattrs array to individual tab link_attr fields.
Core changes:
- uploads() (admin/modules/uploads.php):
- Replace getTplAdminNavi with getTplAdminTabs (main module nav; subtitle via getUploadsSearch)
- Remove sattrs / subtab / id params — HTMX attrs moved to per-tab link_attr in new/tabs-link
- Replace admin-uploads-tabs-content fragment with new/tabs + new/tabs-link + new/tabs-panel
- Replace getTplAdminPlaceholder('repf1') / ('repf2') with box partial using box_id
- tplconfig(), config(), tplsave() (admin/modules/uploads.php):
- Replace getTplAdminNavi with getTplAdminTabs with correct tab index
Benefits: - Removes admin-uploads-tabs-content module-specific fragment - HTMX lazy-load per sub-tab expressed as link_attr; cleaner than sattrs side-channel - Sub-tab panels defined as new/tabs-panel with explicit IDs
Technical notes: - Token appended to HTMX URLs at uploads() call site (token var initialized early) - getTplAdminTabsSetup removed; new tabs runtime driven by data-sl-tabs-init on new/tabs
Replace getTplAdminTable, getTplAdminTableHead, getTplAdminTableRow, getTplAdminTableCells, getTplAdminFlagBox and old alert fragment calls with new/* fragment API throughout. Replace getTplAdminNavi with getTplAdminTabs in all handler functions.
Core changes:
- getSqltable (admin/modules/database.php):
- Replace getTplAdminFlagBox with inline new/inline-badge fragment call
- Replace getTplAdminTableRow + getTplAdminTableCells with new/table-row + new/table-cells
- Replace getTplAdminTable + getTplAdminTableHead with new/table fragment (disable_sort)
- getSqlsum (admin/modules/database.php):
- Replace getTplAdminInfoLine lines and old alert fragment with new/alert using lines array
- Inline status as plain text (_OK / _ERROR) instead of inline-badge
- All handler functions (dump, dblock, etc.):
- Replace getTplAdminNavi with getTplAdminTabs
- Replace old alert type-string calls with new/alert is_warn bool
Benefits: - Removes dependency on all deprecated getTplAdmin* table helpers - Alert rendering consistent with rest of admin via new/alert
Technical notes: - disable_sort: true used on SQL log table (row order is query-defined) - new/alert lines array renders each element as a separate paragraph
Replace all legacy fragment and helper calls with new/* fragment API. Rebuild getEditbox as a new/form with HTMX attributes, box_id anchor, and inline token. Add CSRF check to save() with HTMX-aware response. Replace robots button fragment with new/button and inline onclick. Add global $tpl declaration to renderEditorPage.
Core changes:
- getEditbox (admin/modules/editor.php):
- Replace getTplAdminNavi with getTplAdminTabs
- Replace admin-editor-note-panel with box partial using box_id repeditornote
- Replace alert fragments with new/alert (is_warn flag instead of type string)
- Replace getTplAdminForm + row helpers with new/form (form_attr, rows, hidden, submit_label)
- Replace textarea_code direct call with getTplCodeEditor helper
- getRobotsButton (admin/modules/editor.php):
Replace admin-editor-robots-button fragment with new/button + button_attr containing data-robots-template and inline onclick for CodeMirror setValue/focus
- renderEditorPage (admin/modules/editor.php):
- Replace admin-editor-root-panel fragment with box partial using box_id repeditor
- Add missing global $tpl declaration
- save() (admin/modules/editor.php):
- Add checkSiteToken() guard with HTMX-aware early echo for new/alert is_warn
- info() (admin/modules/editor.php):
- Replace setAdminInfoPage with setTplAdminInfoPage
Benefits: - CSRF guard in save() closes missing token check for file write operations - HTMX partial replacement targets named box_id anchors (repeditor, repeditornote) - No module-specific fragments remain; all replaced by new/* contracts
Technical notes: - getTplCodeEditor called with mode, id, name, text — API unchanged - form_attr passed through new/form via form.html form_attr extension
Replace getTplAdminNavi with getTplAdminTabs throughout. Replace getTplAdminPlaceholder and legacy alert fragment calls with new/alert and box partial. Add CSRF token validation to fix() with early return on failure. Add module search widget as subtitle.
Core changes:
- categories(), add(), subadd(), addedit(), edit() (admin/modules/categories.php):
- Replace getTplAdminNavi with getTplAdminTabs (same op/tab arrays, no subtabs)
- Replace getTplAdminCatSearch + sub param with subtitle_html via getHtmlPart searchbox
- Replace getTplAdminPlaceholder with $tpl->getHtmlPart('box', ['box_id' => ...])
- Replace alert fragment calls with new/alert
- fix() (admin/modules/categories.php):
- Add checkSiteToken() guard with early return and getTplAdminTabs header output
- Prevents category reorder endpoint from being called without a valid CSRF token
- add() and related form functions:
- Replace admin-categories-add-rows fragment with getTplRadioGroup and new/* inputs
- Form rows passed as structured arrays to new/form fragment
Benefits: - CSRF protection in fix() closes a missing token check - Subtitle search widget aligned right in module head via new flex layout - All legacy admin- fragment calls replaced by new/ contracts
Technical notes: - getTplAdminNavi no longer called from this module - No behavioral changes to category CRUD logic
Replace all module-specific table/row fragment helpers in getAdminCategoryList, getAdminBlockList and getAdminFavoriteList with direct new/table, new/table-row, new/table-cells, new/title-tip and new/row-actions fragment calls.
Core changes:
- getAdminCategoryList (core/admin.php):
- Build tipItems array for new/title-tip (description, subcategory, language)
- Replace getTplAdminCategoryRow with new/table-row + new/table-cells inline
- Replace getTplAdminCategoryTable with new/table fragment (disable_sort, colspan for weight)
- Replace getTplAdminMoveControls with getTplMoveControls
- Inline delete action as row-actions item with onclick_attr
- getAdminBlockList (core/admin.php):
- Build tipItems array for new/title-tip (name, language, expiry)
- Replace getTplAdminBlockRow with new/table-row + new/table-cells inline
- Replace getTplAdminBlockTable with new/table fragment (disable_sort, colspan for weight)
- Inline status-change, edit and delete as row-actions items with onclick_attr
- getAdminFavoriteList (core/admin.php):
- Analogous migration to new/table-row + new/table-cells + new/table
Benefits: - Removes dependency on all deleted module-specific row/table fragments - Table header defined inline as data; no separate head fragment needed - Action menus built from structured arrays; no string concatenation
Technical notes: - disable_sort: true used for reorderable lists where JS sort would conflict - Colspan 2 on weight column accounts for the adjacent move-controls cell - All onclick_attr values use htmlspecialchars on title to prevent XSS
Move getTplMoveControls from helpers-old to helpers as a stable new-layer helper. Extend getTplAdminTabs to pass tabs_id, is_runtime, tabs_index and tabs_sync_selector to the module-head fragment, and forward link_attr and rel per tab link. Remove deprecated module-specific table/row helpers from helpers-old.
Core changes:
- core/helpers.php:
getTplAdminTabs: pass tabs_id, is_runtime, tabs_index (from tab or tabs_index key), tabs_sync_selector, link_attr and rel to the new/module-head fragment
getTplMoveControls: new stable helper replacing getTplAdminMoveControls in old layer; renders new/move-controls fragment with HTMX transport and token-safe URLs
- core/helpers-old.php:
- Remove getTplAdminMoveControls (superseded by getTplMoveControls in helpers.php)
- Remove getTplAdminCategoryTable, getTplAdminCategoryRow
- Remove getTplAdminBlockTable, getTplAdminBlockRow
- Remove getTplAdminFavoriteTable, getTplAdminFavoriteRow
- Remove getTplAdminPrivateTable, getTplAdminPrivateRow
- Remove getTplAdminFilesTable, getTplAdminFilesRow
- Update getTplAdminFlagBox to use new/inline-badge fragment
Benefits: - getTplMoveControls is now a first-class new-layer helper - getTplAdminTabs covers all new module-head contract attributes in one call - Removes ~110 lines of deprecated, module-specific rendering code
Technical notes: - All callers of removed helpers have been migrated to direct fragment rendering - getTplAdminFlagBox still exists in helpers-old for legacy callers not yet migrated





