mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 17:25:32 +00:00
Somehow did the first page
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ha-metadata">
|
||||
<div class="ha-metadatarows">
|
||||
<div class="ha-metadataupperrow">
|
||||
<div class="ha-metadatadate">
|
||||
@Model.Letter.Meta.Date
|
||||
@@ -93,24 +92,22 @@
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="ha-metadatapersons">
|
||||
@if (!String.IsNullOrWhiteSpace(Model.Letter.ParsedReceivers)) {
|
||||
@if (Model.Letter.Meta.isDraft == HaDocument.Models.OptionalBool.True) {
|
||||
<span>@Html.Raw(Model.Letter.ParsedSenders)</span>
|
||||
<div class="ha-tooltip">
|
||||
↛
|
||||
<div class="ha-tooltiptext" style="bottom: 100%;">
|
||||
Entwurf
|
||||
</div>
|
||||
<div class="ha-metadatapersons">
|
||||
@if (!String.IsNullOrWhiteSpace(Model.Letter.ParsedReceivers)) {
|
||||
@if (Model.Letter.Meta.isDraft == HaDocument.Models.OptionalBool.True) {
|
||||
<span>@Html.Raw(Model.Letter.ParsedSenders)</span>
|
||||
<div class="ha-tooltip">
|
||||
↛
|
||||
<div class="ha-tooltiptext" style="bottom: 100%;">
|
||||
Entwurf
|
||||
</div>
|
||||
<span>@Html.Raw(Model.Letter.ParsedReceivers)</span>
|
||||
}
|
||||
else {
|
||||
<span>@Html.Raw(Model.Letter.ParsedSenders) → @Html.Raw(Model.Letter.ParsedReceivers)</span>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<span>@Html.Raw(Model.Letter.ParsedReceivers)</span>
|
||||
}
|
||||
else {
|
||||
<span>@Html.Raw(Model.Letter.ParsedSenders) → @Html.Raw(Model.Letter.ParsedReceivers)</span>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -7,9 +7,11 @@
|
||||
|
||||
<div class="ha-search">
|
||||
@if (Model.Letters != null) {
|
||||
<div class="ha-letterlisthead">
|
||||
|
||||
|
||||
<div class="ha-searchhead">
|
||||
<h1>Briefauswahl</h1>
|
||||
<div class="ha-letterlistnav">
|
||||
<div class="ha-searchnav">
|
||||
@if (Model.AvailableYears != null && Model.AvailableYears.Any()) {
|
||||
@for(var i = 0; i < Model.AvailableYears.Count; i++) {
|
||||
<a class="@(Model.ActiveYear == i ? "active" : "")" asp-route-person="@Model.ActivePerson" asp-controller="Suche" asp-action="Index" asp-route-page="@i">
|
||||
@@ -28,23 +30,177 @@
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ha-personlist">
|
||||
@if(Model.AvailablePersons != null) {
|
||||
@foreach (var person in Model.AvailablePersons) {
|
||||
<a class="@(Model.ActivePerson == person.Key ? "active" : "")" asp-controller="Suche" asp-action="Index" asp-route-person="@person.Key" asp-route-page="@null">
|
||||
@person.Name
|
||||
|
||||
|
||||
<div class="ha-searchbody">
|
||||
<div class="ha-letterlist">
|
||||
|
||||
@* Letter Loop *@
|
||||
@foreach (var year in Model.Letters) {
|
||||
foreach (var letter in year.LetterList) {
|
||||
<a class="ha-letterlistentry" asp-controller="Briefe" asp-action="Index" asp-route-id="@letter.Meta.Autopsic">
|
||||
@await Html.PartialAsync("/Views/Shared/_LetterHead.cshtml", (letter, true))
|
||||
</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="ha-letterlist">
|
||||
@foreach (var year in Model.Letters) {
|
||||
foreach (var letter in year.LetterList) {
|
||||
<a asp-controller="Briefe" asp-action="Index" asp-route-id="@letter.Meta.Autopsic">
|
||||
@await Html.PartialAsync("/Views/Shared/_LetterHead.cshtml", (letter, true))
|
||||
</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="ha-filterlist">
|
||||
@* Go To Letter *@
|
||||
<div class="ha-gotofilter">
|
||||
<div class="ha-filtertitle">H K B</div>
|
||||
<form class="ha-gotoform" id="ha-gotoform">
|
||||
<div class="ha-gototext">
|
||||
Briefnummer
|
||||
</div>
|
||||
<input type="text" id="ha-gotoletternumber" class="ha-gotoletternumber" />
|
||||
<button type="submit" id="ha-gotoformsubmit">Nachschlagen</button>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
const ACTIVATEGOTOFILTER = function(filter, button) {
|
||||
let f = filter.value;
|
||||
if (f === "") {
|
||||
button.disabled = true;
|
||||
return;
|
||||
}
|
||||
button.disabled = false;
|
||||
}
|
||||
|
||||
const SUBMITGOTO = function(filter) {
|
||||
let f = filter.value;
|
||||
window.location.href = "/Suche/" + f;
|
||||
}
|
||||
|
||||
window.addEventListener("load", () => {
|
||||
let gotofilter = document.getElementById("ha-gotoletternumber");
|
||||
let gotosubmitbtn = document.getElementById("ha-gotoformsubmit");
|
||||
let gotoform = document.getElementById("ha-gotoform");
|
||||
ACTIVATEGOTOFILTER(gotofilter, gotosubmitbtn);
|
||||
gotofilter.addEventListener("input", () => ACTIVATEGOTOFILTER(gotofilter, gotosubmitbtn));
|
||||
gotoform.addEventListener("submit", (ev) => {
|
||||
ev.preventDefault();
|
||||
SUBMITGOTO(gotofilter);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@* ZH Loopkup *@
|
||||
@if (Model.AvailablePages != null) {
|
||||
<div class="ha-zhsearchfilter">
|
||||
<div class="ha-filtertitle">
|
||||
Suche in Z H
|
||||
@if (Model.ActivePage != null) {
|
||||
<a class="ha-reversefilter" asp-controller="Suche" asp-action="index">← Auswahl aufheben</a>
|
||||
}
|
||||
</div>
|
||||
<form class="ha-zhform" id="ha-zhform">
|
||||
<span>Z H Band</span>
|
||||
<select id="ha-zhformvolume">
|
||||
@foreach (var volume in Model.AvailablePages) {
|
||||
<option>@volume.Volume</option>
|
||||
}
|
||||
</select>
|
||||
<span>, Seite</span>
|
||||
<input id="ha-zhformpage" type="text" value="@Model.ActivePage"/>
|
||||
<button id="ha-zhformsubmit" type="submit">Nachschlagen</button>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
const ACTIVATEZHSEARCH = function(volume, page, button) {
|
||||
let vol = volume.options[volume.selectedIndex].value;
|
||||
let pg = page.value;
|
||||
if (pg === "") {
|
||||
button.disabled = true;
|
||||
return;
|
||||
}
|
||||
button.disabled = false;
|
||||
}
|
||||
|
||||
const SUBMITZHSEARCH = function(volume, page) {
|
||||
let vol = volume.options[volume.selectedIndex].value;
|
||||
let pg = page.value;
|
||||
window.location.href = "/Suche/" + vol + "/" + pg;
|
||||
}
|
||||
|
||||
window.addEventListener("load", () => {
|
||||
let vol = document.getElementById("ha-zhformvolume");
|
||||
let pg = document.getElementById("ha-zhformpage");
|
||||
let zhsubmitbtn = document.getElementById("ha-zhformsubmit");
|
||||
let zhsearchform = document.getElementById("ha-zhform");
|
||||
ACTIVATEZHSEARCH(vol, pg, zhsubmitbtn);
|
||||
vol.addEventListener("change", () => ACTIVATEZHSEARCH(vol, pg, zhsubmitbtn));
|
||||
pg.addEventListener("input", () => ACTIVATEZHSEARCH(vol, pg, zhsubmitbtn));
|
||||
zhsearchform.addEventListener("submit", (ev) => {
|
||||
ev.preventDefault();
|
||||
SUBMITZHSEARCH(vol, pg);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@* Full-Text-Search *@
|
||||
<div class="ha-searchfilter">
|
||||
<div class="ha-filtertitle">
|
||||
Volltextsuche
|
||||
@if (Model.ActiveSearch != null) {
|
||||
<a class="ha-reversefilter" asp-controller="Suche" asp-action="index">← Auswahl aufheben</a>
|
||||
}
|
||||
</div>
|
||||
<form class="ha-searchform" id="ha-searchform">
|
||||
<input id="ha-searchformtext" type="text" placeholder="Suchbegriff"/>
|
||||
<button id="ha-searchformsubmit" type="submit">Suchen</button>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
const ACTIVATESEARCHFILTER = function(filter, button) {
|
||||
let f = filter.value;
|
||||
if (f === "") {
|
||||
button.disabled = true;
|
||||
return;
|
||||
}
|
||||
button.disabled = false;
|
||||
}
|
||||
|
||||
const SUBMITSEARCH = function(filter) {
|
||||
let f = filter.value;
|
||||
window.location.href = "/Suche/" + f;
|
||||
}
|
||||
|
||||
window.addEventListener("load", () => {
|
||||
let searchfilter = document.getElementById("ha-searchformtext");
|
||||
let searchsubmitbtn = document.getElementById("ha-searchformsubmit");
|
||||
let searchform = document.getElementById("ha-searchform");
|
||||
ACTIVATESEARCHFILTER(searchfilter, searchsubmitbtn);
|
||||
searchfilter.addEventListener("input", () => ACTIVATESEARCHFILTER(searchfilter, searchsubmitbtn));
|
||||
searchform.addEventListener("submit", (ev) => {
|
||||
ev.preventDefault();
|
||||
SUBMITSEARCH(searchfilter);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@* Person Filter *@
|
||||
@if(Model.AvailablePersons != null) {
|
||||
<div class="ha-personfilter">
|
||||
<div class="ha-filtertitle">
|
||||
Korrespondenzpartner:innen
|
||||
@if (Model.ActivePerson != null) {
|
||||
<a class="ha-reversefilter" asp-controller="Suche" asp-action="index">← Auswahl aufheben</a>
|
||||
}
|
||||
</div>
|
||||
<div class="ha-personlist">
|
||||
<a class="ha-personlistperson @(Model.ActivePerson == null ? "active" : "")" asp-controller="Suche" asp-action="Index">Alle</a>
|
||||
@foreach (var person in Model.AvailablePersons) {
|
||||
<a class="ha-personlistperson @(Model.ActivePerson == person.Key ? "active" : "")" asp-controller="Suche" asp-action="Index" asp-route-person="@person.Key" asp-route-page="@null">
|
||||
@person.Name
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
Reference in New Issue
Block a user