## Overview

Provides information on who is currently editing the schedule and offers the option to end schedule editing.

The widget displays whether a schedule is currently locked for editing. Schedule locking is a feature that prevents write access to schedules and their tasks for everyone except the lock owner. This widget provides visibility into lock status and allows authorized users to release locks when needed.

The widget operates in two states:
- **Locked**: Shows the lock owner (with link to profile), lock creation time, and lists all affected schedules. Displays a "Release Lock" button for authorized users.
- **Unlocked**: Shows an "Unlocked" indicator with no additional information.

## Use Cases

### Schedule Lock Visibility
Project managers can immediately see if a schedule is locked and by whom, without needing to attempt edits. The widget shows the lock owner, creation time, and all affected schedules.

### Lock Release Management
Schedule administrators can release locks that are no longer needed or were left active by unavailable users. The widget provides a release button that opens a confirmation dialog.

### Multi-Schedule Lock Tracking
When working with Gantt charts that load multiple schedules, users need to understand which schedules are locked together. The widget displays all schedules affected by a single lock.

### Lock Accountability
Teams can track who is making changes to critical schedules. The widget shows lock creator identity, timestamp, and affected schedules for transparency and coordination.

## Design Considerations

### When to Use This Widget
- On schedule detail pages to show current lock status
- On activity or milestone pages where users need awareness of schedule locking
- In layouts where teams need to coordinate access to shared schedules

### Embedding Restrictions
This widget can only be embedded on:
- Activities (`cf.cplace.projektplanung.aktivitaet`)
- Milestones (`cf.cplace.projektplanung.meilenstein`)
- Schedules (`cf.cplace.projektplanung.schedule`)

### Prerequisites
- Schedule locking must be enabled in the system
- User must be logged in to view widget content
- The "Release Lock" button only appears for users with permission to release the lock

### No Configuration Required
Unlike most widgets, this one requires no configuration. It automatically detects and displays the lock state of the schedule containing the page where it is embedded.

## Common Pitfalls

- **Feature Must Be Enabled**: The widget will not be embeddable unless schedule locking is activated system-wide
- **Permission-Based Actions**: Only authorized users (lock creator, schedule writers, space administrators) can see and use the release button
- **Read-Only for Lock Creation**: This widget only displays lock state and allows release; it does not handle lock creation (locks are created from Gantt views)

## Alternatives

- **No direct alternatives**: This is the only widget for displaying schedule lock state
- **Gantt chart integration**: Lock creation and some lock status visibility is available directly in Gantt chart views

## Related Patterns

- **Schedule locking workflow**: Create lock in Gantt view, view status with this widget, release when done
- **Coordination pattern**: Multiple users can check this widget to see who has edit access to a schedule
