added file uploads
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-history" data-toggle="tab" aria-expanded="false">History</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-emails" data-toggle="tab" aria-expanded="false">E-Mails</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-documents" data-toggle="tab" aria-expanded="false">Dokumente</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1162,6 +1163,125 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="preorder-detail-<?=$preorder->id?>-documents"
|
||||
class="tab-pane preorder-documents-tab"
|
||||
data-preorder-id="<?=$preorder->id?>"
|
||||
data-file-objects="<?=htmlentities($preorder->files ?? '[]')?>"
|
||||
data-loaded="false">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-8">
|
||||
<div class="card-header bg-info text-white pl-2 pr-2 pt-1 pb-1">Hochgeladene Dokumente</div>
|
||||
<div class="document-list-wrapper">
|
||||
<div class="document-list-loader text-center p-5" style="display: none;">
|
||||
<div class="doc-spinner"></div>
|
||||
<p class="mt-3 text-muted">Lade Dokumente...</p>
|
||||
</div>
|
||||
|
||||
<div class="document-empty-state text-center p-5" style="display: none;">
|
||||
<i class="fas fa-file-excel fa-3x text-muted mb-3"></i>
|
||||
<h5>Keine Dokumente gefunden</h5>
|
||||
<p class="text-muted">Für diese Bestellung wurden noch keine Dokumente hochgeladen.</p>
|
||||
</div>
|
||||
|
||||
<div class="document-list-container table-responsive" style="display: none;">
|
||||
<table class="table table-sm table-striped table-hover">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th style="width: 5%;">Typ</th>
|
||||
<th>Dateiname</th>
|
||||
<th>Beschreibung</th>
|
||||
<th style="width: 15%;" class="text-right">Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="doc-list-tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 mt-3 mt-lg-0">
|
||||
<div class="card-header bg-secondary text-white pl-2 pr-2 pt-1 pb-1">Neuer Upload</div>
|
||||
<div class="document-upload-wrapper p-3">
|
||||
<div class="doc-dropzone document-dropzone">
|
||||
<div class="document-dropzone-internal">
|
||||
<i class="fas fa-cloud-upload-alt fa-2x text-muted mb-2"></i>
|
||||
<p class="mb-2">Dateien hier ablegen oder</p>
|
||||
<button type="button" class="btn btn-primary btn-sm doc-browse-btn">Datei auswählen</button>
|
||||
<input type="file" class="doc-file-input" multiple style="display: none;" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="doc-staging-area document-staging-area mt-3" style="display: none;">
|
||||
</div>
|
||||
|
||||
<button class="btn btn-success btn-block mt-2 doc-upload-btn" style="display: none;">
|
||||
<i class="fas fa-fw fa-upload"></i> <span class="doc-upload-btn-text">Hochladen</span>
|
||||
<i class="fas fa-spinner fa-spin ml-1 doc-upload-spinner" style="display: none;"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template class="doc-staging-item-template">
|
||||
<div class="document-staging-item">
|
||||
<div class="doc-staging-icon">
|
||||
<i class="fas fa-file-alt text-muted"></i>
|
||||
</div>
|
||||
<div class="doc-staging-details">
|
||||
<div class="doc-staging-filename">filename.jpg</div>
|
||||
<div class="doc-staging-filesize text-muted small">1.2 MB</div>
|
||||
<input type="text" class="form-control form-control-sm mt-1 doc-staging-description" placeholder="Beschreibung (erforderlich)" required />
|
||||
<div class="invalid-feedback">Beschreibung fehlt.</div>
|
||||
</div>
|
||||
<div class="doc-staging-actions">
|
||||
<button type="button" class="btn btn-sm btn-outline-danger doc-staging-remove" title="Entfernen">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template class="doc-list-row-template">
|
||||
<tr class="document-list-row">
|
||||
<td class="doc-row-icon text-center align-middle">
|
||||
</td>
|
||||
<td class="doc-row-filename align-middle">filename.pdf</td>
|
||||
<td class="doc-row-description align-middle small">Beschreibung...</td>
|
||||
<td class="doc-row-actions text-right align-middle">
|
||||
<button type="button" class="btn btn-sm btn-outline-info doc-preview-btn" title="Vorschau">
|
||||
<i class="fas fa-eye"></i>
|
||||
</button>
|
||||
<a href="#" class="btn btn-sm btn-outline-secondary doc-download-btn" title="Download" download>
|
||||
<i class="fas fa-download"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<div class="modal fade doc-preview-modal" id="doc-preview-modal-<?=$preorder->id?>" tabindex="-1" role="dialog" aria-labelledby="doc-preview-modal-title-<?=$preorder->id?>" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title doc-preview-modal-title" id="doc-preview-modal-title-<?=$preorder->id?>">Vorschau</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body doc-preview-modal-body" id="doc-preview-modal-body-<?=$preorder->id?>" style="min-height: 70vh; display: flex; justify-content: center; align-items: center;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user