diff --git a/docs/curator-handbook.md b/docs/curator-handbook.md index ea47f03..e06eabc 100644 --- a/docs/curator-handbook.md +++ b/docs/curator-handbook.md @@ -100,6 +100,28 @@ on doing so, even if you take it back later. Contributions from before this was possible agreed to this website only. Their picture and text stay out of link previews and the feed, and that is not something you can change without asking them, and there is no button for it yet. +## Holding something back + +Publishing does not have to mean everything at once. Two choices on an item, both on the edit page (and for many items at +once, see below), keep part of it from visitors. They apply to published items; a draft is hidden anyway. + +- **What visitors get.** "Everything" is the usual case. "The record only, without pictures and recordings" shows the title, + description, date, tags and place, and no picture, no thumbnail, no recording, no PDF, no link-preview picture and no match + on the text inside a PDF. Use it for a record you want known about while the picture itself must stay with the family or the + archive. A recording's **description is its transcript**, so a record-only recording still shows the transcript; if the words + must not be public either, keep the item a draft. Contributors cannot ask for this when they send something in. +- **Public from.** A date, optional. Until the start of that day, in the archive's time zone, the item is as hidden as a draft: + not on the page, in search, in a collection's count, in the feed or in the sitemap, and its pictures give "not found". On that + day it appears by itself; nobody needs to be there. The date it is listed under follows the date it opens. Take the date away to + open it at once, and it is listed as of now. + +An item held back wears a badge in the list ("Record only", "Public from ..."), and the **Preview** says in its banner what visitors +will see. The list can be filtered under **Kept back from visitors**, and many items can be changed together: tick them, choose +**Set what visitors get** or **Set the public-from date** and confirm. Only curators can set either, and each change is in the item's history. + +Feeds and the sitemap are kept for ten minutes, so a change can take that long to reach everyone. Taking something back from +people who already saw it is not possible: whoever saved a picture keeps it. + ## Working through many items Open the item list and filter it: by collection, or by what is "still needed", such as a date. Open the first item and use diff --git a/docs/handbuch-kuratoren.md b/docs/handbuch-kuratoren.md index 9e49699..90caecc 100644 --- a/docs/handbuch-kuratoren.md +++ b/docs/handbuch-kuratoren.md @@ -108,6 +108,31 @@ freien Lizenz weiterverwendet hat, darf das weiter tun, auch wenn Sie die Lizenz Beiträge aus der Zeit davor haben nur dieser Website zugestimmt. Ihr Bild und ihr Text bleiben aus Linkvorschauen und dem Feed heraus. Das lässt sich nicht ändern, ohne die Person zu fragen, und dafür gibt es noch keine Schaltfläche. +## Etwas zurückhalten + +Veröffentlichen muss nicht heißen, alles auf einmal zu zeigen. Zwei Einstellungen bei einem Eintrag, beide auf der +Bearbeitungsseite (für viele Einträge zugleich siehe unten), halten einen Teil vor Besuchern zurück. Sie gelten für veröffentlichte +Einträge; ein Entwurf ist ohnehin verborgen. + +- **Was Besucher bekommen.** „Alles“ ist der Normalfall. „Nur der Eintrag, ohne Bilder und Aufnahmen“ zeigt Titel, Beschreibung, + Datum, Schlagwörter und Ort, aber kein Bild, keine Vorschau, keine Aufnahme, kein PDF, kein Bild in der Linkvorschau und keinen + Treffer im Text eines PDFs. Nutzen Sie das für einen Eintrag, von dem man wissen soll, während das Bild selbst bei der Familie + oder im Archiv bleiben muss. Die **Beschreibung einer Aufnahme ist ihre Abschrift**, also zeigt auch eine Aufnahme „nur als Eintrag“ + die Abschrift; sollen die Worte ebenfalls nicht öffentlich sein, lassen Sie den Eintrag ein Entwurf. Einsendende Personen können das + beim Einsenden nicht wünschen. +- **Öffentlich ab.** Ein Datum, freiwillig. Bis zum Beginn dieses Tages, in der Zeitzone des Archivs, ist der Eintrag so verborgen wie + ein Entwurf: nicht auf der Seite, nicht in der Suche, nicht in der Zahl einer Sammlung, nicht im Feed und nicht in der Sitemap, und seine + Bilder liefern „nicht gefunden“. An diesem Tag erscheint er von selbst; niemand muss dabei sein. Das Datum, unter dem er aufgeführt + wird, folgt dem Tag, an dem er sich öffnet. Nehmen Sie das Datum weg, öffnet er sofort und wird ab jetzt aufgeführt. + +Ein zurückgehaltener Eintrag trägt in der Liste eine Marke („Nur Eintrag“, „Öffentlich ab ...“), und die **Vorschau** sagt im Hinweis, was +Besucher sehen. Die Liste lässt sich unter **Vor Besuchern zurückgehalten** filtern, und viele Einträge lassen sich zusammen ändern: +ankreuzen, **Festlegen, was Besucher bekommen** oder **Öffentlich-ab-Datum festlegen** wählen und bestätigen. Nur Kuratoren können beides einstellen, +und jede Änderung steht im Verlauf des Eintrags. + +Feed und Sitemap werden zehn Minuten vorgehalten, eine Änderung kann also so lange brauchen, bis sie überall ankommt. Etwas denen +wieder wegnehmen, die es schon gesehen haben, geht nicht: Wer ein Bild gespeichert hat, behält es. + ## Viele Einträge bearbeiten Öffnen Sie die Liste der Einträge und filtern Sie sie: nach Sammlung oder danach, was noch fehlt, zum Beispiel ein Datum. diff --git a/tests/Commonage.Tests/VisibilityMatrixTests.cs b/tests/Commonage.Tests/VisibilityMatrixTests.cs index aeaf21b..509ce8e 100644 --- a/tests/Commonage.Tests/VisibilityMatrixTests.cs +++ b/tests/Commonage.Tests/VisibilityMatrixTests.cs @@ -139,6 +139,48 @@ public async Task A_record_only_item_shows_its_record_and_nothing_about_its_medi Assert.DoesNotContain($"Title {record.Word}", await TextAsync(visitor, $"/search?q=Pages+{record.Word}")); } + [Fact] + public async Task Hidden_items_beside_a_shown_one_do_not_appear_as_its_neighbours_or_under_a_shared_tag() + { + var word = TestData.UniqueWord("neighbours"); + var (shownId, collectionId, hiddenWords) = await app.WithDbAsync(async db => + { + var now = DateTime.UtcNow; + var collection = new Collection { Title = $"Shared {word}", CreatedAt = now }; + var tag = new Tag { Name = $"T {word}", NormalizedName = $"t {word}", Kind = TagKind.Topic }; + ArchiveItem Make(string kind, Action state) + { + var item = new ArchiveItem { Title = $"{kind} {word}", Collection = collection, CreatedAt = now, UpdatedAt = now }; + item.TrySetDate("1954"); + item.SetTags([tag]); + state(item); + return item; + } + var shown = Make("Shown", i => i.Publish(now)); + var hidden = new[] + { + Make("Draftneighbour", _ => { }), + Make("Embargoneighbour", i => { i.Publish(now); i.SetPublicFrom(DateOnly.FromDateTime(now).AddDays(3), now); }), + Make("Binneighbour", i => { i.Publish(now); i.MoveToBin(now); }), + }; + db.AddRange(collection, shown); + db.AddRange(hidden); + await db.SaveChangesAsync(); + return (shown.Id, collection.Id, hidden.Select(h => h.Title).ToArray()); + }); + using var visitor = app.CreateClient(); + + var text = string.Concat( + await TextAsync(visitor, $"/items/{shownId}"), + await TextAsync(visitor, $"/collections/{collectionId}"), + await TextAsync(visitor, $"/search?q={word}"), + await TextAsync(visitor, "/search?q=1954")); + + Assert.Contains($"Shown {word}", text); + foreach (var title in hiddenWords) + Assert.DoesNotContain(title, text); + } + private static async Task TextAsync(HttpClient client, string address) { var response = await client.GetAsync(address);