mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 09:15:33 +00:00
Mergess TraditionRules with TextRules. Added tabs for other Text. Some bugs persist see readme
This commit is contained in:
@@ -64,8 +64,8 @@ public class BriefeMetaViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
public (BriefeMetaViewModel, string)? Next { get; set; }
|
||||
public (BriefeMetaViewModel, string)? Prev { get; set; }
|
||||
public (BriefeMetaViewModel Model, string)? Next { get; set; }
|
||||
public (BriefeMetaViewModel Model, string)? Prev { get; set; }
|
||||
|
||||
|
||||
public BriefeMetaViewModel(Meta meta, bool hasMarginals) {
|
||||
|
||||
@@ -5,18 +5,26 @@ public class BriefeViewModel {
|
||||
public string Id { get; private set; }
|
||||
public string Index { get; private set; }
|
||||
public BriefeMetaViewModel MetaData { get; private set; }
|
||||
public string? DefaultCategory { get; set; }
|
||||
|
||||
private List<(string, string, string)>? _ParsedMarginals;
|
||||
private List<(string, string, string, string, string, string)>? _ParsedEdits;
|
||||
public List<(string, string, string, string, string)>? _ParsedHands;
|
||||
|
||||
public string? ParsedText { get; set; }
|
||||
public string? ParsedTradition { get; set; }
|
||||
public bool MinWidth { get; set; } = false;
|
||||
public bool MinWidthTrad { get; set; } = false;
|
||||
private List<(string, string, string, string, string)>? _ParsedHands;
|
||||
private List<(string Category, List<Text>)>? _Texts;
|
||||
|
||||
public List<(string Category, List<Text>)>? Texts {
|
||||
get => _Texts;
|
||||
set {
|
||||
if (value != null)
|
||||
_Texts = value.Select(x => (
|
||||
x.Item1,
|
||||
x.Item2
|
||||
)).ToList();
|
||||
else _Texts = null;
|
||||
}
|
||||
}
|
||||
|
||||
// From, Until, Reference, Edit, sartpage, startline
|
||||
public List<(string, string, string, string, string, string)>? ParsedEdits {
|
||||
public List<(string ParsedStart, string ParsedEnd, string Preview, string Text, string Page, string Line)>? ParsedEdits {
|
||||
get => _ParsedEdits;
|
||||
set {
|
||||
if (value != null)
|
||||
@@ -28,13 +36,12 @@ public class BriefeViewModel {
|
||||
HttpUtility.HtmlAttributeEncode(x.Item5),
|
||||
HttpUtility.HtmlAttributeEncode(x.Item6)
|
||||
)).ToList();
|
||||
else
|
||||
_ParsedEdits = null;
|
||||
else _ParsedEdits = null;
|
||||
}
|
||||
}
|
||||
|
||||
// From, Until, Person, startpage, startline
|
||||
public List<(string, string, string, string, string)>? ParsedHands {
|
||||
public List<(string ParsedStart, string ParsedEnd, string Person, string Page, string Line)>? ParsedHands {
|
||||
get => _ParsedHands;
|
||||
set {
|
||||
if (value != null)
|
||||
@@ -45,23 +52,7 @@ public class BriefeViewModel {
|
||||
HttpUtility.HtmlAttributeEncode(x.Item4),
|
||||
HttpUtility.HtmlAttributeEncode(x.Item5)
|
||||
)).ToList();
|
||||
else
|
||||
_ParsedHands = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Page, Line, Element
|
||||
public List<(string, string, string)>? ParsedMarginals {
|
||||
get => _ParsedMarginals;
|
||||
set {
|
||||
if (value != null)
|
||||
_ParsedMarginals = value.Select(x => (
|
||||
HttpUtility.HtmlEncode(x.Item1),
|
||||
HttpUtility.HtmlEncode(x.Item2),
|
||||
x.Item3
|
||||
)).ToList();
|
||||
else
|
||||
_ParsedMarginals = null;
|
||||
else _ParsedHands = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
43
HaWeb/Models/Text.cs
Normal file
43
HaWeb/Models/Text.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
namespace HaWeb.Models;
|
||||
using System.Web;
|
||||
|
||||
public class Text {
|
||||
public string Id { get; private set; }
|
||||
public string Number { get; private set; }
|
||||
public bool MinWidth { get; private set; }
|
||||
public string Category { get; private set; }
|
||||
public string? ParsedText { get; set; }
|
||||
|
||||
private string? _Title;
|
||||
private List<(string, string, string)>? _ParsedMarginals;
|
||||
|
||||
public List<(string Page, string Line, string Text)>? ParsedMarginals {
|
||||
get => _ParsedMarginals;
|
||||
set {
|
||||
if (value != null)
|
||||
_ParsedMarginals = value.Select(x => (
|
||||
HttpUtility.HtmlEncode(x.Item1),
|
||||
HttpUtility.HtmlEncode(x.Item2),
|
||||
x.Item3
|
||||
)).ToList();
|
||||
else
|
||||
_ParsedMarginals = null;
|
||||
}
|
||||
}
|
||||
|
||||
public string? Title {
|
||||
get => _Title;
|
||||
set {
|
||||
if (!String.IsNullOrWhiteSpace(value)) {
|
||||
_Title = value;
|
||||
} else _Title = null;
|
||||
}
|
||||
}
|
||||
|
||||
public Text(string id, string number, string category, bool minwidth) {
|
||||
Id = id;
|
||||
Number = number;
|
||||
Category = category;
|
||||
MinWidth = minwidth;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user