mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 09:15:33 +00:00
Formatted everything; completed upload capabilities
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
namespace HaWeb.Models;
|
||||
using HaDocument.Models;
|
||||
using System.Web;
|
||||
public class BriefeMetaViewModel
|
||||
{
|
||||
public class BriefeMetaViewModel {
|
||||
public Meta Meta { get; private set; }
|
||||
public bool HasMarginals { get; private set; }
|
||||
public bool ShowZHData { get; private set; }
|
||||
@@ -12,11 +11,9 @@ public class BriefeMetaViewModel
|
||||
private string? _ParsedReceivers;
|
||||
private string? _ParsedZHString;
|
||||
|
||||
public string? ParsedSenders
|
||||
{
|
||||
public string? ParsedSenders {
|
||||
get => _ParsedSenders;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (value != null)
|
||||
_ParsedSenders = HttpUtility.HtmlEncode(value);
|
||||
else
|
||||
@@ -24,11 +21,9 @@ public class BriefeMetaViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public string? ParsedReceivers
|
||||
{
|
||||
public string? ParsedReceivers {
|
||||
get => _ParsedReceivers;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (value != null)
|
||||
_ParsedReceivers = HttpUtility.HtmlEncode(value);
|
||||
else
|
||||
@@ -37,11 +32,9 @@ public class BriefeMetaViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public string? ParsedZHString
|
||||
{
|
||||
public string? ParsedZHString {
|
||||
get => _ParsedZHString;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (value != null)
|
||||
_ParsedZHString = HttpUtility.HtmlEncode(value);
|
||||
else
|
||||
@@ -54,8 +47,7 @@ public class BriefeMetaViewModel
|
||||
public (BriefeMetaViewModel, string)? Prev { get; set; }
|
||||
|
||||
|
||||
public BriefeMetaViewModel(Meta meta, bool hasMarginals, bool showZHData)
|
||||
{
|
||||
public BriefeMetaViewModel(Meta meta, bool hasMarginals, bool showZHData) {
|
||||
Meta = meta;
|
||||
HasMarginals = hasMarginals;
|
||||
ShowZHData = showZHData;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
namespace HaWeb.Models;
|
||||
using System.Web;
|
||||
|
||||
public class BriefeViewModel
|
||||
{
|
||||
public class BriefeViewModel {
|
||||
public string Id { get; private set; }
|
||||
public string Index { get; private set; }
|
||||
public BriefeMetaViewModel MetaData { get; private set; }
|
||||
@@ -17,11 +16,9 @@ public class BriefeViewModel
|
||||
public bool MinWidthTrad { get; set; } = false;
|
||||
|
||||
// From, Until, Reference, Edit, sartpage, startline
|
||||
public List<(string, string, string, string, string, string)>? ParsedEdits
|
||||
{
|
||||
public List<(string, string, string, string, string, string)>? ParsedEdits {
|
||||
get => _ParsedEdits;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (value != null)
|
||||
_ParsedEdits = value.Select(x => (
|
||||
HttpUtility.HtmlEncode(x.Item1),
|
||||
@@ -37,11 +34,9 @@ public class BriefeViewModel
|
||||
}
|
||||
|
||||
// From, Until, Person, startpage, startline
|
||||
public List<(string, string, string, string, string)>? ParsedHands
|
||||
{
|
||||
public List<(string, string, string, string, string)>? ParsedHands {
|
||||
get => _ParsedHands;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (value != null)
|
||||
_ParsedHands = value.Select(x => (
|
||||
HttpUtility.HtmlEncode(x.Item1),
|
||||
@@ -56,11 +51,9 @@ public class BriefeViewModel
|
||||
}
|
||||
|
||||
// Page, Line, Element
|
||||
public List<(string, string, string)>? ParsedMarginals
|
||||
{
|
||||
public List<(string, string, string)>? ParsedMarginals {
|
||||
get => _ParsedMarginals;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (value != null)
|
||||
_ParsedMarginals = value.Select(x => (
|
||||
HttpUtility.HtmlEncode(x.Item1),
|
||||
@@ -72,8 +65,7 @@ public class BriefeViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public BriefeViewModel(string id, string index, BriefeMetaViewModel meta)
|
||||
{
|
||||
public BriefeViewModel(string id, string index, BriefeMetaViewModel meta) {
|
||||
Id = id;
|
||||
Index = index;
|
||||
MetaData = meta;
|
||||
|
||||
@@ -5,13 +5,11 @@ using System.Text;
|
||||
using HaXMLReader.Interfaces;
|
||||
using HaXMLReader.EvArgs;
|
||||
|
||||
public class CommentModel
|
||||
{
|
||||
public class CommentModel {
|
||||
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) {
|
||||
this.ParsedComment = parsedComment;
|
||||
this.ParsedSubComments = parsedSubComments;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
namespace HaWeb.Models;
|
||||
|
||||
public class ErrorViewModel
|
||||
{
|
||||
public class ErrorViewModel {
|
||||
public string? RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
namespace HaWeb.Models;
|
||||
using System.Web;
|
||||
|
||||
public class RegisterViewModel
|
||||
{
|
||||
public class RegisterViewModel {
|
||||
public string Category { get; private set; }
|
||||
public string Id { get; private set; }
|
||||
public string Title { get; private set; }
|
||||
@@ -15,14 +14,12 @@ public class RegisterViewModel
|
||||
public List<CommentModel> ParsedComments { get; private set; }
|
||||
|
||||
// Title, URL
|
||||
public List<(string, string)>? AvailableCategories
|
||||
{
|
||||
public List<(string, string)>? AvailableCategories {
|
||||
get => _AvailableCategories;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (value != null)
|
||||
_AvailableCategories = value.Select(x => (
|
||||
HttpUtility.HtmlEncode(x.Item1),
|
||||
HttpUtility.HtmlEncode(x.Item1),
|
||||
HttpUtility.HtmlAttributeEncode(x.Item2))
|
||||
).ToList();
|
||||
else
|
||||
@@ -31,14 +28,12 @@ public class RegisterViewModel
|
||||
}
|
||||
|
||||
// Title, URL
|
||||
public List<(string, string)>? AvailableSideCategories
|
||||
{
|
||||
public List<(string, string)>? AvailableSideCategories {
|
||||
get => _AvailableSideCategories;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (value != null)
|
||||
_AvailableSideCategories = value.Select(x => (
|
||||
HttpUtility.HtmlEncode(x.Item1),
|
||||
HttpUtility.HtmlEncode(x.Item1),
|
||||
HttpUtility.HtmlAttributeEncode(x.Item2))
|
||||
).ToList();
|
||||
else
|
||||
@@ -46,8 +41,7 @@ public class RegisterViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public RegisterViewModel(string category, string id, List<CommentModel> parsedComments, string title)
|
||||
{
|
||||
public RegisterViewModel(string category, string id, List<CommentModel> parsedComments, string title) {
|
||||
this.Category = HttpUtility.HtmlAttributeEncode(category);
|
||||
this.Id = HttpUtility.HtmlAttributeEncode(id);
|
||||
this.ParsedComments = parsedComments;
|
||||
|
||||
@@ -26,10 +26,8 @@ public class DocumentResult {
|
||||
}
|
||||
}
|
||||
|
||||
public class LetterComparer : IComparer<DocumentSearchResult>
|
||||
{
|
||||
public int Compare(DocumentSearchResult first, DocumentSearchResult second)
|
||||
{
|
||||
public class LetterComparer : IComparer<DocumentSearchResult> {
|
||||
public int Compare(DocumentSearchResult first, DocumentSearchResult second) {
|
||||
var cmp = new DefaultComparer();
|
||||
return cmp.Compare(first.MetaData, second.MetaData);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace HaWeb.Models;
|
||||
using HaWeb.XMLParser;
|
||||
|
||||
public class UploadViewModel {
|
||||
public List<(string, string)>? AvailableRoots { get; set; }
|
||||
public List<IXMLRoot>? AvailableRoots { get; set; }
|
||||
public List<XMLRootDocument>? AvailableFiles { get; set; }
|
||||
public Dictionary<string, List<XMLRootDocument>>? UsedFiles { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user