diff --git a/README.md b/README.md index 7e49a4c..b7418cd 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,8 @@ Further technical documentation: deleted pages can be recovered from the Dashboard. * Page Management: Search, duplicate, rename, and delete editable HTML pages, including pages in subdirectories. The New page section of the Pages dialogue is a three-step wizard (template, page name, navigation group); the new page stays a private draft until it is published. Any page can - be offered as a template with Create Template. + be offered as a template with Create Template. Administrators can Lock a page to stop editors publishing, saving a draft, or + scheduling changes to it; administrators are never restricted by a lock. * Media Library: Upload images, documents, video, and audio; they are sorted into Imagery, Documents, Video, and Audio by file extension. Reuse them from the editor's Media library button, maintain alternative text or link text, see usage counts, and remove files. Executables and files containing code are refused. @@ -137,7 +138,7 @@ There are two roles: | Role | Can do | | --- | --- | | `editor` | Edit content, save drafts, upload images, publish or schedule pages, and restore revisions or deleted pages. Cannot change the site structure or manage users. | -| `administrator` | Everything an editor can, plus creating new pages, duplicate, rename and delete pages, templates, navigation menus, shared content, site scan, deleting media, and managing users. | +| `administrator` | Everything an editor can, plus creating new pages, duplicate, rename, delete and lock pages, templates, navigation menus, shared content, site scan, deleting media, and managing users. | The former `publisher` role is now part of `editor`; existing `publisher` assignments are treated as `editor`. Users without an explicit valid role receive `editor`, the least powerful role. @@ -286,6 +287,13 @@ Templates are the files in `cms/templates/` plus any page you choose **Create Te is used live (later edits to it show in new pages), and the **Delete** action in the template list deletes a template file or stops using a page as a template (the page is kept). +### Locking Pages + +Administrators can **Lock** a page from the Pages list to stop editors publishing, saving a draft, or scheduling a change to +it; a **Locked** badge shows next to the page name for everyone. Administrators are never restricted by a lock, and locking +is independent of Create Template, Duplicate, Rename, and Delete, which were already administrator-only. A lock follows a +page when it is renamed, is cleared when the page is deleted, and is never copied onto a duplicate. + ### Subfolder Installs The site can live in a subfolder such as `http://localhost/neocms/`. The URL prefix (`basePath`) and the folder that contains diff --git a/cms/css/editor.css b/cms/css/editor.css index 415cee1..d251e0c 100644 --- a/cms/css/editor.css +++ b/cms/css/editor.css @@ -435,6 +435,7 @@ body { margin-left: 10px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #fff3d6; color: #8a5a00; border: 1px solid #f0d58a; } +.badge-locked { background: #fde2e1; color: #8a1f1f; border-color: #f3b4b2; } @media (max-width: 700px) { #fileList .page-title, #fileList th:nth-child(2), #fileList .page-date, #fileList th:nth-child(3) { display: none; } } /* Site scan progress bar and file count. */ diff --git a/cms/js/cms.js b/cms/js/cms.js index a89a23d..e8c9bfd 100644 --- a/cms/js/cms.js +++ b/cms/js/cms.js @@ -447,6 +447,7 @@ const name = $('').append(docIcon()); $('