mirror of
				https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
				synced 2025-10-31 18:25:33 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			159 lines
		
	
	
		
			8.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			159 lines
		
	
	
		
			8.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| @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";
 | ||
| }
 | ||
| 
 | ||
| 
 | ||
| <div class="ha-index">
 | ||
|     @if (Model.Letters != null) {
 | ||
| 
 | ||
|         <div class="ha-indexhead">
 | ||
|             @if (Model.PersonComment == null) {
 | ||
|                 <h1>Briefauswahl</h1>
 | ||
|             }
 | ||
|             @if(Model.PersonComment != null) {
 | ||
|                 <div class="ha-comment">
 | ||
|                     <div class="ha-headcomment">
 | ||
|                         <div class="ha-commentmetatext">
 | ||
|                             Briefwechsel mit  
 | ||
|                             <a class="ha-reversefilter" asp-controller="Index" asp-action="Index">← Alle Briefe</a>
 | ||
|                         </div>
 | ||
|                         @Html.Raw(Model.PersonComment.ParsedComment)
 | ||
|                         @if (Model.PersonComment.ParsedSubComments != null && Model.PersonComment.ParsedSubComments.Any()) {
 | ||
|                             <div class="">
 | ||
|                                 <a asp-controller="Register" asp-action="Allgemein" asp-route-id="@Model.PersonComment.ID[0]" asp-fragment="@Model.PersonComment.ID">Werke & Referenzstellen im Registereintrag →</a>
 | ||
|                             </div>
 | ||
|                         }
 | ||
|                     </div>
 | ||
|                 </div>
 | ||
|             }
 | ||
|             @if (Model.AvailableYears != null && Model.AvailableYears.Any() && Model.AvailableYears.Count > 1) {
 | ||
|                 <div class="ha-indexnav">
 | ||
|                 @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.ID">
 | ||
|                             @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 K 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 class="mr-2 leading-snug text-base px-1 text-red-700 bg-red-50 text-left h-5 whitespace-nowrap overflow-hidden opacity-0" id="ha-gotoinfo"></div>
 | ||
|                 </div>
 | ||
| 
 | ||
|                 @* ZH Loopkup *@
 | ||
|                 @if (Model.AvailablePages != null) {
 | ||
|                 <div class="ha-zhsearchfilter">
 | ||
|                     <div class="ha-filtertitle">
 | ||
|                         Suche in Z H
 | ||
|                         @if (Model.ActivePage != null) {
 | ||
|                              <div class="ha-activefilterinfo">
 | ||
|                                 Briefe auf ZH <span class="caps-allpeteite">@Model.ActiveVolume / @Model.ActivePage</span> 
 | ||
|                                 <a class="ha-reversefilter" asp-controller="Index" asp-action="Index">← Auswahl aufheben</a>
 | ||
|                              </div>
 | ||
|                         }
 | ||
|                     </div>
 | ||
|                      <div class="mr-2 leading-snug text-base px-1 bg-slate-200">
 | ||
|                         Derzeit kritisch geprüft, ediert und hochgeladen sind Briefe bis einschließlich @Model.EndYear (= @Model.EndPageString).
 | ||
|                     </div>
 | ||
|                      <form class="ha-zhform" id="ha-zhform">
 | ||
|                         <span>Z H Band</span>
 | ||
|                         <select name="zhvolume" id="ha-zhformvolume">
 | ||
|                             @foreach (var volume in Model.AvailablePages.OrderBy(x => x.Key)) {
 | ||
|                                 <option>@volume.Key</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 class="mr-2 leading-snug text-base px-1 text-red-700 bg-red-50 text-left h-5 whitespace-nowrap overflow-hidden opacity-0" id="ha-zhsearchinfo"></div>
 | ||
|                 </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">
 | ||
|                                 Briefwechsel mit @Model.AvailablePersons.Where(x => x.Key == Model.ActivePerson).First().Name. 
 | ||
|                                 <a class="ha-reversefilter" asp-controller="Index" asp-action="Index">← Auswahl 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>
 | ||
| 
 | ||
| <script>
 | ||
|     var AvailableLetters = new Set(@Html.Raw(Json.Serialize(Model.AvailableLetters)))
 | ||
|     var AvailablePages = @Html.Raw(Json.Serialize(Model.AvailablePages))
 | ||
| </script>
 | ||
| <script defer src="/js/index.js" asp-append-version="true"></script> | 
