mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 17:25:32 +00:00
Setup Git Repository Parsing
This commit is contained in:
@@ -1,104 +0,0 @@
|
||||
@model UploadViewModel;
|
||||
@{
|
||||
ViewData["Title"] = "Upload & Veröffentlichen";
|
||||
ViewData["SEODescription"] = "Johann Georg Hamann: Kommentierte Briefausgabe, Hg. v. Leonard Keidel und Janina Reibold. Durchsuchbare Online-Ausgabe der Briefe von und an Johann Georg Hamann.";
|
||||
ViewData["showCredits"] = "false";
|
||||
}
|
||||
|
||||
<script defer src="/js/upload.js" asp-append-version="true"></script>
|
||||
|
||||
<div class="ha-adminuploadfields" id="ha-adminuploadfields">
|
||||
@foreach (var item in Model.AvailableRoots!.OrderBy(x => x.Type)) {
|
||||
<a class="ha-uploadfield" asp-controller="Upload" asp-action="Index" asp-route-id="@item.Prefix">
|
||||
<div class="ha-uploadfieldname">@item.Type</div>
|
||||
@if (Model.UsedFiles != null && Model.UsedFiles.ContainsKey(item.Prefix)) {
|
||||
<div class="ha-uploadusedfiles">
|
||||
@foreach(var file in Model.UsedFiles[item.Prefix]!) {
|
||||
@if (file == Model.UsedFiles[item.Prefix]!.Last())
|
||||
{
|
||||
<span class="ha-uploadusedfile">@file.FileName</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="ha-uploadusedfile">@file.FileName;</span>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else {
|
||||
<div class="ha-uploadusedfiles ha-uploadusedfilesnotfound">Keine Datei geladen!</div>
|
||||
}
|
||||
</a>
|
||||
}
|
||||
|
||||
<div class="ha-uploadpublishforms">
|
||||
@await Html.PartialAsync("/Views/Shared/_UploadForm.cshtml", Model)
|
||||
|
||||
<a class="ha-publishbutton" asp-controller="Upload" asp-action="Index" asp-route-id="@string.Empty">
|
||||
<div class="ha-publishtext">Veröffentlichen</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ha-uploadheader">
|
||||
<h1 class="ha-uploadtitle">@Model.ActiveTitle</h1>
|
||||
</div>
|
||||
|
||||
<div class="ha-uploadcontainer">
|
||||
@* File Category Page File List *@
|
||||
@if (Model.AvailableFiles != null && Model.AvailableFiles.Any()) {
|
||||
<div class="ha-filesheader">
|
||||
<div class="ha-availablefiles" id="ha-availablefiles">
|
||||
<div class="ha-availablefilestitle">Datei(en)</div>
|
||||
@if(Model.UsedFiles != null && Model.UsedFiles.ContainsKey(Model.Prefix)) {
|
||||
<div class="ha-usedfilelist">
|
||||
@foreach (var item in Model.UsedFiles[Model.Prefix]!)
|
||||
{
|
||||
if(item == Model.UsedFiles[Model.Prefix]!.Last()) {
|
||||
<span class="ha-usedfile">@item.FileName</span>
|
||||
}
|
||||
else {
|
||||
<span class="ha-usedfile">@item.FileName,</span>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="ha-availablefileslist hidden" id="ha-availablefileslist">
|
||||
@await Html.PartialAsync("/Views/Shared/_FileListForm.cshtml", (Model.AvailableFiles, "Verfügbare Dateien", "API", "SetUsed", Model.Prefix, "/Download/XML/" + Model.Prefix + "/", true))
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (Model.UsedFiles != null && Model.Prefix != null && Model.UsedFiles.ContainsKey(Model.Prefix)) {
|
||||
<textarea class="py-2 px-3 mx-8 mb-8 shadow-lg font-mono text-sm border rounded" id="errormessagebox" name="errormessagebox" rows="25" cols="90" readonly>
|
||||
@foreach (var f in Model.UsedFiles[Model.Prefix])
|
||||
{
|
||||
@f.Messages
|
||||
}
|
||||
</textarea>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@* Start Page File List *@
|
||||
else {
|
||||
<div class="ha-publishfilelist">
|
||||
@await Html.PartialAsync("/Views/Shared/_PublishForm.cshtml", Model)
|
||||
</div>
|
||||
|
||||
<div class="ha-hamannfilechooser">
|
||||
@await Html.PartialAsync("/Views/Shared/_FileListForm.cshtml", (Model.HamannFiles, "Verfügbare Hamann-Dateien", "API", "SetInProduction", string.Empty, "/Download/XML/", false))
|
||||
</div>
|
||||
|
||||
<form class="ha-setendyearform" id="ha-setendyearform" enctype="application/x-www-form-urlencoded" asp-controller="API" asp-action="SetEndYear" onsubmit="YEARSUBMIT(this);return false;">
|
||||
Verfügbare Jahre: bis
|
||||
<select name="EndYear" id="">
|
||||
@foreach (var y in Model.AvailableYears) {
|
||||
<option>@y</option>
|
||||
}
|
||||
</select>
|
||||
<button id="ha-setendyearbutton" class="ha-setendyearbutton" type="submit">Setzen</button>
|
||||
</form>
|
||||
}
|
||||
|
||||
</div>
|
||||
83
HaWeb/Views/Admin/Dynamic/XMLState.cshtml
Normal file
83
HaWeb/Views/Admin/Dynamic/XMLState.cshtml
Normal file
@@ -0,0 +1,83 @@
|
||||
@model XMLStateViewModel;
|
||||
@{
|
||||
ViewData["Title"] = "Syntax-Check & Dateien";
|
||||
ViewData["SEODescription"] = "Johann Georg Hamann: Kommentierte Briefausgabe, Hg. v. Leonard Keidel und Janina Reibold. Durchsuchbare Online-Ausgabe der Briefe von und an Johann Georg Hamann.";
|
||||
ViewData["showCredits"] = "false";
|
||||
}
|
||||
|
||||
<div class="ha-adminuploadfields" id="ha-adminuploadfields">
|
||||
<div class="ha-uploadcontainer">
|
||||
|
||||
@* File Category Page File List *@
|
||||
@*
|
||||
<textarea class="py-2 px-3 mx-8 mb-8 shadow-lg font-mono text-sm border rounded" id="errormessagebox" name="errormessagebox" rows="25" cols="90" readonly>
|
||||
@foreach (var f in Model.Files[Model.Prefix])
|
||||
{
|
||||
@f.Messages
|
||||
}
|
||||
</textarea> *@
|
||||
@if (Model.ManagedFiles != null && Model.ManagedFiles.Any()) {
|
||||
<div class="">
|
||||
<table>
|
||||
@foreach (var f in Model.ManagedFiles) {
|
||||
<tr>
|
||||
<td>@f.FileName</td>
|
||||
<td>@f.GetLastModified()</td>
|
||||
@if (f.IsValid) {
|
||||
<td>Valid! @f.GetLog()</td>
|
||||
} else {
|
||||
<td>@f.GetLog()</td>
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
} else {
|
||||
<div class="">
|
||||
Keine Dateien im Repository gefunden!
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
<script defer src="/js/filelistform.js" asp-append-version="true"></script>
|
||||
|
||||
<fieldset class="ha-filelistfieldset">
|
||||
<legend class="ha-filelistlegend">Verfügbare Dateien</legend>
|
||||
@if(Model.HamannFiles != null && Model.HamannFiles.Any()) {
|
||||
<form class="ha-selectfilesform" id="selecthamannfilesform" asp-controller="API" asp-action="SetInProduction" method="post" onsubmit="USESubmit(this);return false;" enctype="multipart/form-data">
|
||||
<div class="ha-filelistlist">
|
||||
@foreach (var file in Model.HamannFiles) {
|
||||
<div class="ha-filelistfile">
|
||||
@if (Model.ActiveFile != null) {
|
||||
<input type="radio" id="@file.Name" name="file" value="@file.Name" @(file.Name == @Model.ActiveFile!.Name ? "checked='checked'" : "")>
|
||||
} else {
|
||||
<input type="radio" id="@file.Name" name="file" value="@file.Name">
|
||||
}
|
||||
<div class="ha-filelistname">@file.Name</div>
|
||||
@if (Model.ActiveFile != null && file.Name == Model.ActiveFile!.Name) {
|
||||
<div class="ha-filelistusedproduction">
|
||||
<div class="ha-filelistproduction">in Verwendung</div>
|
||||
</div>
|
||||
}
|
||||
@* // TODO Metadata
|
||||
// TODO DELETE *@
|
||||
<div class="ha-filelistmodified">@file.LastModified.LocalDateTime</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (!Model.ValidState) {
|
||||
<div>
|
||||
Status nicht validiert! Daten können nicht auf der Webseite angezeigt werden!
|
||||
</div>
|
||||
}
|
||||
<output id ="ha-filelistoutput"></output>
|
||||
<button type="submit" class="ha-filelistbutton" id="ha-filelistbutton" >
|
||||
Laden
|
||||
<div class="ha-lds-ellipsis-load" id="ha-lds-ellipsis-load"></div>
|
||||
</button>
|
||||
</form>
|
||||
}
|
||||
else {
|
||||
<div>Keine Dateien gefunden! Es wird eine fallback-Datei verwendet!</div>
|
||||
}
|
||||
</fieldset>
|
||||
Reference in New Issue
Block a user