52 lines
1.9 KiB
Markdown
52 lines
1.9 KiB
Markdown
### 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.js` in design mode —
|
||
intentionally **not** via `app_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
|
||
|
||
Set `"jey_design_mode": 1` in the site's `site_config.json` to enable the editor on
|
||
that site. Without it, the app is inert (production sites just enforce the shipped
|
||
snapshot via jey_theme).
|
||
|
||
### Installation
|
||
|
||
```bash
|
||
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
|