| Name |
Checkout |
| Priority |
medium |
| Complexity |
low |
| Author(s) |
James Mortimer |
| Description |
A macro that can be added to a page, an include, or a page layout, which allows the page visitor to single-click 'restrict' or 'unrestrict' a page |
Background
Many users want to check out a document temporarily when they work on them, but looking for the 'restrict page' is non-intuitive. For areas where we have high-traffic of new users, a simpler checkin/checkout button would greatly facilitate collaboration
Suggested Usage Example
{checkout-button}
Suggested Parameters
- icon = true/false (default true)
- restricttext = string (default Check-out)
- unrestricttext = string (default Check-in)
- restricttext = string (default "Current checked out by $username")
Other Requirements
- first show a simple button (and icon) at the location of the macro that indicates "check out" (green)
- clicking this will 'restrict' the current page to 'edit only by me'
- now, display name of person to whom the document is checked out, and a simple button and icon for "check in" (red)
- when the original author (or an admin if possible) clicked 'check in', the restriction is removed and we cycle back to the original button
- if the restriction is removed by an admin through the admin panel, the checkout cycles back to the fist state (i.e. it reads it's state from the current page restriction)
- if the restriction is added by someone manually in a page edit, the checkout cycles to the second state (i.e. it reads it's state fromt he current page restriction)