188 lines
5.1 KiB
PHP
188 lines
5.1 KiB
PHP
<?php
|
|
header('Content-Type: text/html; charset=utf-8');
|
|
|
|
// Arrays dekodieren
|
|
$bibliographicArray = json_decode($_POST['bibliographicArray'] ?? '[]', true);
|
|
$identificatorArray = json_decode($_POST['identificatorArray'] ?? '[]', true);
|
|
$typeArray = json_decode($_POST['typeArray'] ?? '[]', true);
|
|
$subjectArray = json_decode($_POST['subjectArray'] ?? '[]', true);
|
|
$contractArray = json_decode($_POST['contractArray'] ?? '[]', true);
|
|
$uploadArray = json_decode($_POST['uploadArray'] ?? '[]', true);
|
|
|
|
|
|
|
|
// Arrays zusammenfassen
|
|
$dataArrays = [
|
|
'Bibliografische Grunddaten' => $bibliographicArray,
|
|
'Identifikatoren' => $identificatorArray,
|
|
'Dokumenttyp und weitere Daten' => $typeArray,
|
|
'Freie Schlagworte' => $subjectArray,
|
|
'Vertragssektion' => $contractArray,
|
|
'Dateiupload' => $uploadArray
|
|
];
|
|
|
|
// Feldlabel-Funktion
|
|
function getFieldLabel($fieldId) {
|
|
|
|
include "include/summaryLabels.php" ;
|
|
|
|
return $labels[$fieldId] ?? $fieldId;
|
|
|
|
}
|
|
?>
|
|
|
|
<!-- CSS-Styles einbetten -->
|
|
<style>
|
|
|
|
/* Modal-Body Breite anpassen */
|
|
.modal-body {
|
|
width: 100% !important;
|
|
max-width: none !important;
|
|
min-width: 650px !important;
|
|
padding: 20px !important;
|
|
overflow-x: visible !important;
|
|
box-sizing: border-box !important;
|
|
}
|
|
|
|
/* Modal-Dialog entsprechend anpassen */
|
|
.modal-dialog {
|
|
max-width: 800px !important;
|
|
width: 90% !important;
|
|
margin: 1.75rem auto !important;
|
|
}
|
|
|
|
/* Modal-Content sicherstellen */
|
|
.modal-content {
|
|
width: 100% !important;
|
|
min-width: 650px !important;
|
|
box-sizing: border-box !important;
|
|
}
|
|
|
|
|
|
.field-container {
|
|
display: grid;
|
|
grid-template-columns: 150px 550px;
|
|
gap: 15px;
|
|
align-items: center;
|
|
padding: 15px;
|
|
margin-bottom: 15px;
|
|
background-color: #f8f9fa;
|
|
border-radius: 5px;
|
|
border-left: 4px solid #14416b;
|
|
width: 100%; /* Volle Breite des Containers nutzen */
|
|
/*max-width: 580px; */ /* Maximale Breite begrenzen */
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.field-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.field-id {
|
|
font-weight: bold;
|
|
color: #495057;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.field-value {
|
|
text-align: left; /* linksbündig */
|
|
justify-self: start; /* bei Grid zusätzlich für horizontale Ausrichtung */
|
|
background-color: white;
|
|
padding: 10px;
|
|
border-radius: 4px;
|
|
border: 1px solid #dee2e6;
|
|
font-size: 16px;
|
|
min-height: 20px;
|
|
}
|
|
|
|
.status-selected {
|
|
background-color: #d4edda;
|
|
color: #155724;
|
|
padding: 2px 8px;
|
|
border-radius: 12px;
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.status-unselected {
|
|
background-color: #f8d7da;
|
|
color: #721c24;
|
|
padding: 2px 8px;
|
|
border-radius: 12px;
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.modal-buttons {
|
|
text-align: center;
|
|
margin-top: 30px;
|
|
padding-top: 20px;
|
|
border-top: 1px solid #dee2e6;
|
|
}
|
|
|
|
.btn-correct {
|
|
background-color: #44910d;
|
|
color: white;
|
|
padding: 8px 15px;
|
|
border: none;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
margin: 0;
|
|
font-weight: bold;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.btn-publish {
|
|
background-color: #44910d;
|
|
color: white;
|
|
padding: 8px 15px;
|
|
border: none;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
margin: 0;
|
|
font-weight: bold;
|
|
font-size: 14px;
|
|
}
|
|
.btn-publish,.btn-correct :hover{
|
|
border-color:#014701
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
<!-- Formatierungslogik in PHP -->
|
|
<h4 style="text-align: center;">Zusammenfassung</h4>
|
|
|
|
<?php foreach ($dataArrays as $sectionName => $sectionData): ?>
|
|
<?php if (!empty($sectionData)): ?>
|
|
<h5 style="margin-top: 10px; margin-bottom: 10px; border-bottom: 2px solid #14416b; padding-bottom: 5px;">
|
|
<?= htmlspecialchars($sectionName) ?>
|
|
</h5>
|
|
|
|
<?php foreach ($sectionData as $field): ?>
|
|
<?php if(strncmp("uploadHiddenItem", $field['fieldId'], strlen("uploadHiddenItem")) != 0): ?>
|
|
<div class="field-container">
|
|
<div class="field-header">
|
|
<div class="field-id"><?= htmlspecialchars(getFieldLabel($field['fieldId'])) ?></div>
|
|
<!--
|
|
<div class="<?//= $field['isSelected'] ? 'status-selected' : 'status-unselected' ?>">
|
|
<?// = $field['isSelected'] ? 'Ausgewählt' : 'Nicht ausgewählt' ?>
|
|
</div>
|
|
-->
|
|
</div>
|
|
<div class="field-value"><?= htmlspecialchars($field['fieldValue'] ?: '(Leer)') ?></div>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
<?php endforeach; ?>
|
|
|
|
|
|
<div class="button-container">
|
|
<button class="btn-publish secondary" id="closeModalButton" onclick="closeModal()">Eingaben korrigieren</button>
|
|
<button class="btn-publish" id="sendFinalMailsButton" onclick="finishPublication(); sendFinalMails();">Publikation abschließen</button>
|
|
</div>
|