* Add backups: create, download, delete and restore from them
- New Backups section in the admin settings for the stored backups of
gramps-web-api#1065: create (rate limited, background task), list,
download and delete, for users with the ManageBackups permission
- Restore from a stored backup or an uploaded archive (.tar): choose the
parts to restore (data, tree settings, users), preview the changes in
a dry run, then confirm. Lists added users, who have to reset their
password, and media objects whose files are missing
- Restoring from Gramps XML moves from the Danger Zone into the same
upload, which accepts .tar and .gramps (only .gramps on backends
without backup support, detected via server.backups in the metadata)
- Fix the Celery task name of the Gramps XML restore (restore_backup),
so a running restore reconnects after a reload
* Make table responsive, use relative dates
* Refresh users after a restore, fix the data-only note
- The user management view reloads its list on db:changed, which a
restore now also fires when it added users
- Show the note that a restore covers object data only when nothing but
the data is restored
- Show a translated message when a dispatch is rejected with a
task_locked 409, and load the blocking task so its progress shows
- Use the task status field, when the backend reports it, to decide
which tasks are running; fall back to the Celery state otherwise
- Mark finished tasks in the notification log as completed or failed,
and show a failed task's error message in its detail dialog
The Wikidata building box on the map gets a "Save as place" button that
opens the new place form prefilled with the building's name, type
(Building or Farm), coordinates and a Wikidata link. A building with a
tree place at its coordinates shows "Open saved place" instead, which
switches the panel to that place.
The place box on the map shows the place type in its subtitle.
* Fix editing place type and show object save errors
The place type edit form kept the 'type' key used to prefill the
selector, which the API rejects for Place objects. Object updates
also ignored API errors, so failed saves were silent.
* Strip stray type key when updating places
Older API versions stored the 'type' key sent by the place type edit
form, which the API now rejects, making those places uneditable.
* Show KML and GeoJSON files of the selected place on the map
When a place is selected on the map, the KML and GeoJSON media objects
attached to it are drawn as shapes, lines and points, using the styles
in the file where it has them. A place without coordinates stays
selected and the map fits its files.
The files are listed in the layer switcher while the place is selected
and can be switched off; the setting is saved like that of image
overlays. A hidden file is not downloaded.
* Move place map file loading into a controller
PlaceVectorsController owns the KML and GeoJSON files of the selected
place. Each load aborts the previous one and its downloads, so an older
refresh can no longer overwrite newer files, and a refresh keeps files
whose checksum is unchanged.
Only a 404 closes the selection; other errors keep it. Switching on a
file of a place without coordinates fits the map to the files shown.
A file without description is listed by its Gramps ID.
The OpenFreeMap styles label places in English, or in Latin and local
script. Labels reading a name now show the name in the Gramps language,
falling back to the local name, in both the light and the dark style.
Regional Gramps language codes are mapped to the languages in the
tiles.
Fixes#1460
Map regional Gramps language codes such as pt_BR and zh_TW to the name
fields used in OpenHistoricalMap tiles. When a Gramps language is set,
places without a name in that language show their local name, without
falling back to the browser languages.
* Use the same section headings in all create forms
Section headings in the create views and dialogs were a mix of h3,
h3.label and h4.label. Use h3.label everywhere, which renders as a
section heading on pages and as a compact label in dialogs. The inline
person form in New Family styles it as a label, as it sits under the
view's own section headings.
* Address comment
Add a Media section with a selector for existing media objects to the
create forms of objects that have a gallery: person, family, event,
place, source and citation, both as views and as dialogs. The selected
media are saved as media references with the new object.
Part of #1183.
Enable inline creation on the place selector of the New Event dialog
and view, the place selector of the event details and place reference
dialogs, and the source selector of the citation details dialog.
The Enclosed By selector of the New Place view allows it too, but not
when the New Place form is itself the create dialog of an object
selector, so that inline creation stays one dialog deep.
Part of #1183.
* Allow creating a new source when adding a citation
Move the new source form into GrampsjsNewSourceMixin, shared by the
New Source view and a new GrampsjsFormNewSource dialog form, and let
the object selector create sources inline. Enable it on the source
selector of the New Citation dialog and view.
Part of #1183.
* Address comment
A map element dropped from the page, such as the map of a place view
when another place is opened, kept its MapLibre map and WebGL context.
Browsers drop the oldest context when too many are active, which
blanked the main map. Fixes#1487.
* Don't delete a place that encloses other places
Like Gramps desktop, refuse to delete a place that other places are
enclosed by: Gramps 6.0 would leave those places pointing to a place
that no longer exists. The delete button shows Gramps' own "Cannot
delete place." message instead of the confirmation.
Refs #381
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Check whether deletion is blocked only in the active view
Every retained object view hears edit-mode:delete, so an inactive place
view that encloses others reported a false error whenever another
object was deleted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Check enclosed places when Delete is clicked, also in the places list
- The app bar asks the view being edited when Delete is clicked, instead
of a value captured when edit mode began, so the two can't disagree.
- The check fetches the place's backlinks then, as the view's own data
may be stale.
- A place enclosed by itself, and enclosed places deleted along with
it, don't block the deletion.
- The places list applies the same check before a bulk delete.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Link image regions to any object and rework region editing
Image regions can be linked to people, families, events, places,
sources and citations, and an object can have several regions in the
same image. Regions can be moved and resized, drawing works on touch
screens, and Escape cancels a drag or clears the selection.
* Fix label
* Style tweaks
* Address comments