The permission-hook refactor in jey_theme dropped the _jey_layout_raw cache slot and added _jey_blocked_doctypes/_workspaces/_slugs. _bust_caches now clears those so a save / block toggle is reflected within the same request. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| jey_layout | ||
| .editorconfig | ||
| .eslintrc | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| README.md | ||
| license.txt | ||
| pyproject.toml | ||
README.md
Jey Layout
Inline desk visibility editor for Frappe/ERPNext, companion to jey_theme.
Lets a System Manager configure, directly on /desk, how each workspace's cards
and links behave — without ever modifying the Workspace records in the database
(non-destructive, applied server-side at request time, survives migrations).
What it does
In edit mode a floating ✎ Layout button turns on inline controls:
- 👁 / 🚫 / 🔒 next to every link — visible / hidden (removed from the desk) / blocked (also unreachable via URL/API/permissions, for everyone incl. Admin).
- 👁 / 🚫 on each card title, 👁 / 🚫 / 🔒 on the workspace title.
- + to add a DocType / Report / Page link into a card.
- ⠿ drag handle to reorder links within a card; ✕ to remove an added link.
The normal desk is the applied result (what users see); "Done editing" shows it.
Export copies the layout into jey_theme's shipped snapshot for production.
How it works
This app is the editor only. The runtime engine lives in jey_theme
(desk_layout.py, desk_overrides.py, access_control.py), which reads a JSON
config and filters/injects desk data server-side. This app provides:
- the inline editor JS/CSS (loaded dynamically by
jey_theme.jsin design mode — intentionally not viaapp_include, see jey_theme/CLAUDE.md for why); - the whitelisted API (
jey_layout/api.py) that reads the live desk structure and saves the working config.
Requires jey_theme (declared in required_apps).
Design machine
The editor is enabled automatically wherever this app is installed (design mode
defaults to ON when jey_layout is present). Production sites that only have
jey_theme stay in "always enforce the shipped snapshot" mode.
To override on a specific site, set "jey_design_mode" in site_config.json
(0 to force off, 1 to force on).
Installation
cd $PATH_TO_YOUR_BENCH
bench get-app https://git.host.jeyerp.az/ali/jey_layout --branch version-16
bench install-app jey_layout
License
mit