mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 17:25:32 +00:00
Added Search Page. Final Version for 1st internal relaese
This commit is contained in:
@@ -19,7 +19,8 @@ public class IndexViewModel {
|
||||
List<(string Key, string Name)>? availablePersons,
|
||||
List<(string Volume, List<string> Pages)>? availablePages,
|
||||
string? activeVolume,
|
||||
string? activePage
|
||||
string? activePage,
|
||||
string? activePerson
|
||||
) {
|
||||
Letters = letters;
|
||||
if (letters != null)
|
||||
@@ -32,5 +33,6 @@ public class IndexViewModel {
|
||||
AvailablePages = availablePages;
|
||||
ActiveVolume = activeVolume;
|
||||
ActivePage = activePage;
|
||||
ActivePerson = activePerson;
|
||||
}
|
||||
}
|
||||
@@ -7,11 +7,11 @@ using System.Collections.Generic;
|
||||
public class SearchResult {
|
||||
public string Search { get; private set; }
|
||||
public string Index { get; private set; }
|
||||
public string Identifier { get; set; }
|
||||
public string? Page { get; set; }
|
||||
public string? Line { get; set; }
|
||||
public string? Lemma { get; set; }
|
||||
public string? Link { get; set; }
|
||||
public string? Preview { get; set; }
|
||||
|
||||
// TODO:
|
||||
public string? ParsedPreview { get; set; }
|
||||
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
namespace HaWeb.Models;
|
||||
using HaDocument.Models;
|
||||
|
||||
public enum SearchType {
|
||||
Letter,
|
||||
Register,
|
||||
Marginals
|
||||
}
|
||||
|
||||
public enum SearchResultType {
|
||||
Success,
|
||||
OutOfBounds,
|
||||
@@ -16,22 +10,25 @@ public enum SearchResultType {
|
||||
|
||||
public class SucheViewModel {
|
||||
public List<(int Year, List<BriefeMetaViewModel> LetterList)>? Letters { get; private set; }
|
||||
public List<CommentModel>? Comments { get; private set; }
|
||||
|
||||
public int Count { get; private set; }
|
||||
public int ActivePage { get; private set; }
|
||||
public List<string>? AvailablePages { get; private set; }
|
||||
public string ActiveSearch { get; private set; }
|
||||
public Dictionary<string, List<SearchResult>>? SearchResults { get; private set; }
|
||||
public SearchResultType SearchResultType { get; private set; }
|
||||
public SearchType SearchType { get; private set; }
|
||||
public string SearchType { get; private set; }
|
||||
|
||||
public SucheViewModel(
|
||||
SearchType searchType,
|
||||
string searchType,
|
||||
SearchResultType searchResultType,
|
||||
int activePage,
|
||||
List<string>? availablePages,
|
||||
string activeSearch,
|
||||
Dictionary<string, List<SearchResult>>? searchResults,
|
||||
List<(int Year, List<BriefeMetaViewModel> LetterList)>? letters
|
||||
List<(int Year, List<BriefeMetaViewModel> LetterList)>? letters,
|
||||
List<CommentModel>? comments
|
||||
) {
|
||||
Letters = letters;
|
||||
if (letters != null)
|
||||
@@ -45,5 +42,6 @@ public class SucheViewModel {
|
||||
AvailablePages = availablePages;
|
||||
ActiveSearch = activeSearch;
|
||||
SearchResults = searchResults;
|
||||
Comments = comments;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user