mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 09:15:33 +00:00
Integrated Person View
This commit is contained in:
@@ -177,7 +177,7 @@ public class IndexController : Controller {
|
||||
parsedSubComments.Add(HTMLHelpers.CommentHelpers.CreateHTML(lib, _readerService, subcomm.Value, "neuzeit", Settings.ParsingState.CommentType.Subcomment, true));
|
||||
}
|
||||
}
|
||||
return new CommentModel(parsedComment, parsedSubComments);
|
||||
return new CommentModel(parsedComment, parsedSubComments, comment);
|
||||
}
|
||||
|
||||
private IActionResult _error404() {
|
||||
|
||||
@@ -159,7 +159,7 @@ public class RegisterController : Controller {
|
||||
parsedSubComments.Add(HTMLHelpers.CommentHelpers.CreateHTML(lib, _readerService, subcomm.Value, category, Settings.ParsingState.CommentType.Subcomment, generateBacklinks));
|
||||
}
|
||||
}
|
||||
res.Add(new CommentModel(parsedComment, parsedSubComments));
|
||||
res.Add(new CommentModel(parsedComment, parsedSubComments, comm.Index));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -177,7 +177,7 @@ public class RegisterController : Controller {
|
||||
parsedSubComments.Add(HTMLHelpers.CommentHelpers.CreateHTML(lib, _readerService, subcomm.Value, category, Settings.ParsingState.CommentType.Subcomment));
|
||||
}
|
||||
}
|
||||
res.Add(new CommentModel(parsedComment, parsedSubComments));
|
||||
res.Add(new CommentModel(parsedComment, parsedSubComments, comm.Index));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ public class SucheController : Controller {
|
||||
letters = metasbyyear
|
||||
.Where(x => x.Key >= pages[page].StartYear && x.Key <= pages[page].EndYear)
|
||||
.Select(x => (x.Key, x
|
||||
.Select(y => Briefecontroller.GenerateMetaViewModel(lib, y, true))
|
||||
.Select(y => Briefecontroller.GenerateMetaViewModel(lib, y, false))
|
||||
.OrderBy(x => x.Meta.Sort)
|
||||
.ThenBy(x => x.Meta.Order)
|
||||
.ToList()))
|
||||
@@ -237,7 +237,7 @@ public class SucheController : Controller {
|
||||
parsedSubComments.Add(HTMLHelpers.CommentHelpers.CreateHTML(lib, _readerService, subcommobj, category, Settings.ParsingState.CommentType.Subcomment));
|
||||
}
|
||||
}
|
||||
res.Add(new CommentModel(parsedComment, parsedSubComments));
|
||||
res.Add(new CommentModel(parsedComment, parsedSubComments, comm.Item1));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -6,10 +6,12 @@ using HaXMLReader.Interfaces;
|
||||
using HaXMLReader.EvArgs;
|
||||
|
||||
public class CommentModel {
|
||||
public string ID { get; private set; }
|
||||
public string ParsedComment { get; private set; }
|
||||
public List<string>? ParsedSubComments { get; private set; }
|
||||
|
||||
public CommentModel(string parsedComment, List<string>? parsedSubComments) {
|
||||
public CommentModel(string parsedComment, List<string>? parsedSubComments, string id) {
|
||||
this.ID = id;
|
||||
this.ParsedComment = parsedComment;
|
||||
this.ParsedSubComments = parsedSubComments;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,11 @@
|
||||
<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>
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
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))
|
||||
@Html.Partial("/Views/Shared/_LetterHead.cshtml", (letter, true, false))
|
||||
</a>
|
||||
|
||||
@if (Model.SearchResults != null && Model.SearchResults.ContainsKey(letter.Meta.Index)) {
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
<div class="ha-letterhead">
|
||||
@if (!Model.Compact) {
|
||||
<div class="ha-letternumber">
|
||||
<div class="ha-letternumberinline">
|
||||
@Model.Letter.Meta.Autopsic
|
||||
<div class="ha-letternumber">
|
||||
<div class="ha-letternumberinline">
|
||||
@Model.Letter.Meta.Autopsic
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (Model.Letter.HasText) {
|
||||
<div class="ha-metadata">
|
||||
<div class="ha-metadata">
|
||||
<div class="ha-metadataupperrow">
|
||||
<div class="ha-metadatadate">
|
||||
@Model.Letter.Meta.Date
|
||||
@@ -39,23 +39,23 @@
|
||||
}
|
||||
else {
|
||||
<div class="ha-metadatastrike">
|
||||
<span>[Fälschlich in ZH aufgenommen]</span>
|
||||
@if (!Model.Compact && Model.ShowZHData) {
|
||||
@if (Model.Letter.ParsedZHString != null && Model.ShowZHData) {
|
||||
<div class="ha-tooltip">
|
||||
<div class="ha-pill">
|
||||
<span>@Html.Raw(Model.Letter.ParsedZHString)</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else if (Model.Letter.ParsedZHString == null) {
|
||||
<div class="ha-tooltip">
|
||||
<div class="ha-pill ha-newpill">
|
||||
<span>Neu</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
<span>[Fälschlich in ZH aufgenommen]</span>
|
||||
@if (!Model.Compact && Model.ShowZHData) {
|
||||
@if (Model.Letter.ParsedZHString != null && Model.ShowZHData) {
|
||||
<div class="ha-tooltip">
|
||||
<div class="ha-pill">
|
||||
<span>@Html.Raw(Model.Letter.ParsedZHString)</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else if (Model.Letter.ParsedZHString == null) {
|
||||
<div class="ha-tooltip">
|
||||
<div class="ha-pill ha-newpill">
|
||||
<span>Neu</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -19,6 +19,6 @@
|
||||
"StoredPDFPathLinux": "",
|
||||
"FileSizeLimit": 52428800,
|
||||
"AvailableStartYear": 1700,
|
||||
"AvailableEndYear": 1784,
|
||||
"AvailableEndYear": 1800,
|
||||
"LettersOnPage": 80
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
@apply w-full h-0 absolute right-0 top-1/2
|
||||
}
|
||||
|
||||
.ha-letterhead .ha-metadata .ha-metadatarows .hametadatapersons {
|
||||
@apply flex leading-snug
|
||||
.ha-letterhead .ha-metadata .ha-metadatapersons a {
|
||||
@apply hover:decoration-solid rounded decoration-dotted underline decoration-slate-400 hover:decoration-gray-600
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user