PDF + Bereit für Upload

This commit is contained in:
Simon Martens
2023-02-21 19:14:52 +01:00
parent 99693b0c1d
commit 5093951f7a
259 changed files with 145 additions and 84 deletions

View File

@@ -112,6 +112,14 @@ public class Briefecontroller : Controller {
model.Texts = texts;
if (System.IO.File.Exists("./wwwroot/pdf/HKB_" + id + ".pdf")) {
model.PDFFilePath = "/pdf/HKB_" + id + ".pdf";
}
if (System.IO.File.Exists("./wwwroot/pdf/HKB_" + model.MetaData.Meta.Sort.Year + ".pdf")) {
model.YearPDFFilePath = "/pdf/HKB_" + model.MetaData.Meta.Sort.Year + ".pdf";
}
// Return
return View("~/Views/HKB/Dynamic/Briefe.cshtml", model);
}

View File

@@ -7,6 +7,10 @@ public class BriefeViewModel {
public BriefeMetaViewModel MetaData { get; private set; }
public string? DefaultCategory { get; set; }
public string? PDFFilePath { get; set; }
public string? YearPDFFilePath { get; set; }
private List<(string, string, string, string, string, string)>? _ParsedEdits;
private List<(string, string, string, string, string)>? _ParsedHands;
private List<(string Category, List<Text>)>? _Texts;

View File

@@ -15,10 +15,15 @@
<div class="ha-letterheadernav">
<div class="md:hidden grow">
<select id="ha-switchlettercategory">
@foreach (var app in Model.Texts) {
@if (app.Category != Model.DefaultCategory) { <option class="ha-tabbtn" autocomplete="off">@app.Category</option> }
@foreach (var app in Model.Texts)
{
@if (app.Category != Model.DefaultCategory)
{
<option class="ha-tabbtn" autocomplete="off">@app.Category</option>
}
@if (Model.Texts != null && Model.Texts.Where(x => x.Category == Model.DefaultCategory).Any()) {
}
@if (Model.Texts != null && Model.Texts.Where(x => x.Category == Model.DefaultCategory).Any())
{
<option class="ha-tabbtn" autocomplete="off">@Model.DefaultCategory</option>
}
</select>
@@ -26,14 +31,42 @@
<div class="ha-lettertabs !hidden md:!block">
@foreach (var app in Model.Texts)
{
@if (app.Category != Model.DefaultCategory) { <a class="ha-tabbtn hidden md:inline-block">@app.Category</a> }
@if (app.Category != Model.DefaultCategory)
{
<a class="ha-tabbtn hidden md:inline-block">@app.Category</a>
}
@if (Model.Texts != null && Model.Texts.Where(x => x.Category == Model.DefaultCategory).Any()) {
}
@if (Model.Texts != null && Model.Texts.Where(x => x.Category == Model.DefaultCategory).Any())
{
<a class="ha-tabbtn hidden md:inline-block">@Model.DefaultCategory</a>
}
<a >PDF</a>
</div>
@if (Model.PDFFilePath != null || Model.YearPDFFilePath != null)
{
<div class="self-end mr-4 hidden md:block mb-1 text-base">
<span class="caps-petite">PDF:</span>
@if (Model.PDFFilePath != null)
{
<a class="ml-1" href="@Model.PDFFilePath">
<div class="inline-block bg-slate-100 hover:bg-slate-200 border px-1.5 rounded">Brief @Model.MetaData.Meta.Autopsic</div>
</a>
}
@if (Model.YearPDFFilePath != null)
{
<a class="ml-1 mr-2" href="@Model.YearPDFFilePath">
<div class="inline-block bg-slate-100 hover:bg-slate-200 border px-1.5 rounded">Jahr @Model.MetaData.Meta.Sort.Year</div>
</a>
}
</div>
}
@if (Model.MetaData.Next != null || Model.MetaData.Prev != null)
{
<div class="ha-lettermetalinks">
@@ -62,32 +95,42 @@
<div class="ha-letterbody" id="ha-letterbody">
@foreach (var app in Model.Texts)
{
@if (app.Category != Model.DefaultCategory) {
@if (app.Category != Model.DefaultCategory)
{
<div class="ha-tab">
@foreach (var text in app.Item2)
{
var mw = (text.MinWidth) ? "ha-minwidth" : "";
<div class="ha-appcontainer ha-appcontainer-@text.Number @mw">
@if (app.Item2.Count > 1 && !String.IsNullOrWhiteSpace(text.ParsedText) && !String.IsNullOrWhiteSpace(text.Title) ) {
@if (app.Item2.Count > 1 && !String.IsNullOrWhiteSpace(text.ParsedText) && !String.IsNullOrWhiteSpace(text.Title))
{
<h3>@text.Title</h3>
}
@if (!String.IsNullOrWhiteSpace(text.ParsedText)) { @Html.Raw(text.ParsedText) }
@if (!String.IsNullOrWhiteSpace(text.ParsedText))
{
@Html.Raw(text.ParsedText)
}
</div>
}
</div>
}
}
@if (Model.Texts != null && Model.Texts.Where(x => x.Category == Model.DefaultCategory).Any()) {
@if (Model.Texts != null && Model.Texts.Where(x => x.Category == Model.DefaultCategory).Any())
{
<div class="ha-tab ha-defaulttab">
@foreach (var text in Model.Texts.Where(x => x.Category == Model.DefaultCategory).First().Item2)
{
var mw = (text.MinWidth) ? "ha-minwidth" : "";
<div class="ha-appcontainer ha-appcontainer-@text.Number @mw">
@if (!String.IsNullOrWhiteSpace(text.ParsedText) && !String.IsNullOrWhiteSpace(text.Title) ) {
@if (!String.IsNullOrWhiteSpace(text.ParsedText) && !String.IsNullOrWhiteSpace(text.Title))
{
<h3>@text.Title</h3>
}
@if (!String.IsNullOrWhiteSpace(text.ParsedText)) { @Html.Raw(text.ParsedText) }
@if (!String.IsNullOrWhiteSpace(text.ParsedText))
{
@Html.Raw(text.ParsedText)
}
</div>
}
@@ -102,7 +145,10 @@
{
<tr class="ha-handentry">
<td>
<div class="ha-handfrom">@hand.ParsedStart</div>@if(!String.IsNullOrEmpty(hand.ParsedEnd)){<div class="ha-handto">@hand.ParsedEnd</div>}
<div class="ha-handfrom">@hand.ParsedStart</div>@if (!String.IsNullOrEmpty(hand.ParsedEnd))
{
<div class="ha-handto">@hand.ParsedEnd</div>
}
</td>
<td class="ha-handperson">@Html.Raw(@hand.Person)</td>
</tr>
@@ -129,7 +175,10 @@
{
<tr>
<td class="ha-editfromto">
<div class="ha-editfrom">@edit.ParsedStart</div>@if(!String.IsNullOrEmpty(edit.ParsedEnd)){<div class="ha-editto">@edit.ParsedEnd</div>}
<div class="ha-editfrom">@edit.ParsedStart</div>@if (!String.IsNullOrEmpty(edit.ParsedEnd))
{
<div class="ha-editto">@edit.ParsedEnd</div>
}
</td>
<td class="ha-editreference">
@if (!String.IsNullOrWhiteSpace(edit.Text) && !String.IsNullOrWhiteSpace(edit.Preview))

View File

@@ -16,7 +16,7 @@
Hirschgasse 2 <br>
69120 Heidelberg <br>
Telefon: 06221 7259277 <br>
E-Mail: <a class="Emailhref" href="mailto:post@hamann-ausgabe">post@hamann-ausgabe</a>
E-Mail: <a class="Emailhref" href="mailto:post@hamann-ausgabe.de">post@hamann-ausgabe.de</a>
</div>
<div class="grow shrink-0">
Germanistisches Seminar der Universität Heidelberg <br>

File diff suppressed because one or more lines are too long

BIN
HaWeb/wwwroot/pdf/HKB_1.pdf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More