mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 09:15:33 +00:00
Fixed ZHLookup
This commit is contained in:
@@ -38,7 +38,14 @@ public class SucheController : Controller {
|
|||||||
var lines = pages.ContainsKey(zhpage) ? pages[zhpage] : null;
|
var lines = pages.ContainsKey(zhpage) ? pages[zhpage] : null;
|
||||||
if (lines == null) return _error404();
|
if (lines == null) return _error404();
|
||||||
var letters = lines.Aggregate(new HashSet<string>(), (x, y) => { x.Add(y.Value); return x; });
|
var letters = lines.Aggregate(new HashSet<string>(), (x, y) => { x.Add(y.Value); return x; });
|
||||||
if (letters != null && letters.Any() && letters.Count == 1) return RedirectToAction("Index", "Briefe", new { id = letters.First() });
|
if (letters != null && letters.Any() && letters.Count == 1) {
|
||||||
|
string? autopsic = null;
|
||||||
|
if (lib.Metas.ContainsKey(letters.First())) {
|
||||||
|
autopsic = lib.Metas[letters.First()].Autopsic;
|
||||||
|
}
|
||||||
|
if (autopsic == null) return _error404();
|
||||||
|
return RedirectToAction("Index", "Briefe", new { id = autopsic });
|
||||||
|
}
|
||||||
if (letters != null && letters.Any()) {
|
if (letters != null && letters.Any()) {
|
||||||
var metas = lib.Metas.Where(x => letters.Contains(x.Key)).Select(x => x.Value);
|
var metas = lib.Metas.Where(x => letters.Contains(x.Key)).Select(x => x.Value);
|
||||||
if (metas == null) return _error404();
|
if (metas == null) return _error404();
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ha-letterhead .ha-metadata .ha-metadataupperrow .ha-pill {
|
.ha-letterhead .ha-metadata .ha-metadataupperrow .ha-pill {
|
||||||
@apply text-sm rounded px-1.5 ml-2 py-0.5 leading-none caps-allpetite tracking-wide whitespace-nowrap
|
@apply text-xs rounded px-1.5 ml-2 py-0.5 leading-none tracking-wide whitespace-nowrap
|
||||||
}
|
}
|
||||||
|
|
||||||
.ha-letterhead .ha-metadata .ha-metadataupperrow .ha-pill .ha-cross {
|
.ha-letterhead .ha-metadata .ha-metadataupperrow .ha-pill .ha-cross {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user