Files
hamann-ausgabe-core/HaWeb/Views/HKB/Dynamic/Index.cshtml
Simon Martens c9f56d2ac6 Bugfixes
2022-11-28 14:41:16 +01:00

130 lines
6.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@model IndexViewModel;
@{
ViewData["Title"] = "HKB Briefauswahl & Suche";
ViewData["SEODescription"] = "Johann Georg Hamann: Kommentierte Briefausgabe, Hg. v. Leonard Keidel und Janina Reibold. Durchsuchbare Online-Ausgabe der Briefe von und an Johann Georg Hamann. Briefauswahl und -Suche.";
ViewData["showCredits"] = "true";
}
<script defer src="/js/index.js" asp-append-version="true"></script>
<div class="ha-index">
@if (Model.Letters != null) {
<div class="ha-indexhead">
<h1>Briefauswahl</h1>
<div class="ha-indexnav">
@if (Model.AvailableYears != null && Model.AvailableYears.Any() && Model.AvailableYears.Count > 1) {
@for(var i = 0; i < Model.AvailableYears.Count; i++) {
<a class="@(Model.ActiveYear == i ? "active" : "")" asp-route-person="@Model.ActivePerson" asp-controller="Index" asp-route-page="@i">
@if (Model.AvailableYears[i].StartYear != Model.AvailableYears[i].EndYear) {
<span>
@Model.AvailableYears[i].StartYear@Model.AvailableYears[i].EndYear
</span>
}
else {
<span>
@Model.AvailableYears[i].StartYear
</span>
}
</a>
}
}
</div>
</div>
<div class="ha-indexbody">
<div class="ha-letterlist">
@* Letter Loop *@
@foreach (var year in Model.Letters) {
foreach (var letter in year.LetterList) {
<div class="ha-letterlistentry">
<a asp-controller="Briefe" asp-action="Index" asp-route-id="@letter.Meta.Autopsic">
@await Html.PartialAsync("/Views/Shared/_LetterHead.cshtml", (letter, true, false))
</a>
</div>
}
}
</div>
<div class="ha-filterlist">
@* Go To Letter *@
<div class="ha-gotofilter">
<div class="ha-filtertitle">H&hairsp;K&hairsp;B</div>
<form class="ha-gotoform" id="ha-gotoform" asp-controller="Briefe" asp-action="Index" method="get">
<div class="ha-gototext">
Briefnummer
</div>
<input name="id" type="text" id="ha-gotoletternumber" class="ha-gotoletternumber" />
<button type="submit" id="ha-gotoformsubmit">Nachschlagen</button>
</form>
</div>
@* ZH Loopkup *@
@if (Model.AvailablePages != null) {
<div class="ha-zhsearchfilter">
<div class="ha-filtertitle">
Suche in Z&hairsp;H
@if (Model.ActivePage != null) {
<div class="ha-activefilterinfo">
Briefe auf ZH <span class="caps-allpeteite">@Model.ActiveVolume / @Model.ActivePage</span>&emsp;
<a class="ha-reversefilter" asp-controller="Index" asp-action="Index">← Auswahl aufheben</a>
</div>
}
</div>
<form class="ha-zhform" id="ha-zhform">
<span>Z&hairsp;H Band</span>
<select name="zhvolume" id="ha-zhformvolume">
@foreach (var volume in Model.AvailablePages) {
<option>@volume.Volume</option>
}
</select>
<span>/ </span>
<input name="zhpage" id="ha-zhformpage" type="text" value="@Model.ActivePage" placeholder="Seite"/>
<button id="ha-zhformsubmit" type="submit">Nachschlagen</button>
</form>
</div>
}
@* Full-Text-Search *@
<div class="ha-searchfilter">
<div class="ha-filtertitle">
Volltextsuche
</div>
<form class="ha-searchform" id="ha-searchform" asp-controller="Suche" asp-action="Briefe" asp-route-comments="true" method="get">
<input id="ha-searchformtext" name="search" type="text" placeholder="Suchbegriff"/>
<input type="hidden" name="comments" value="true"/>
<button id="ha-searchformsubmit" type="submit">Suchen</button>
</form>
</div>
@* Person Filter *@
@if(Model.AvailablePersons != null) {
<div class="ha-personfilter">
<div class="ha-filtertitle">
<div>
Korrespondenzpartner:innen
</div>
@if (Model.ActivePerson != null && Model.AvailablePersons.Where(x => x.Key == Model.ActivePerson).Any()) {
<div class="ha-activefilterinfo">
Briefe von und an @Model.AvailablePersons.Where(x => x.Key == Model.ActivePerson).First().Name.&emsp;
<a class="ha-reversefilter" asp-controller="Index" asp-action="Index">←&nbsp;Auswahl&nbsp;aufheben</a>
</div>
}
</div>
<div class="ha-personlist">
<a class="ha-personlistperson @(Model.ActivePerson == null ? "active" : "")" asp-controller="Index" asp-action="Index">Alle</a>
@foreach (var person in Model.AvailablePersons) {
<a class="ha-personlistperson @(Model.ActivePerson == person.Key ? "active" : "")" asp-controller="Index" asp-action="Person" asp-route-person="@person.Key" asp-route-page="@null">
@person.Name
</a>
}
</div>
</div>
}
</div>
</div>
}
</div>