fix doc
This commit is contained in:
@@ -16,6 +16,13 @@
|
||||
<label>Nome *</label>
|
||||
<input type="text" name="nome_file" class="form-control" value="{{ old('nome_file', $documento->nome_file) }}" required>
|
||||
</div>
|
||||
@if($documento->isLink())
|
||||
<div class="form-group">
|
||||
<label>URL esterno</label>
|
||||
<input type="url" name="url" class="form-control" value="{{ old('url', $documento->url) }}" placeholder="https://esempio.com/documento.pdf">
|
||||
<small class="text-muted">Modifica l'indirizzo web del documento</small>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<label>Tipologia *</label>
|
||||
<select name="tipologia" class="form-control" required>
|
||||
@@ -72,6 +79,12 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-sm table-borderless">
|
||||
@if($documento->isLink())
|
||||
<tr>
|
||||
<td style="width: 100px;"><strong>URL:</strong></td>
|
||||
<td><a href="{{ $documento->url }}" target="_blank" class="text-truncate d-inline-block" style="max-width: 200px;">{{ $documento->url }}</a></td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<td style="width: 100px;"><strong>File:</strong></td>
|
||||
<td>{{ $documento->file_path }}</td>
|
||||
@@ -84,6 +97,11 @@
|
||||
<td><strong>Dimensione:</strong></td>
|
||||
<td>{{ $documento->dimensione ? number_format($documento->dimensione / 1024, 1) . ' KB' : '-' }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td><strong>Tipo:</strong></td>
|
||||
<td>@if($documento->isLink()) <span class="badge badge-info">Link esterno</span> @else Upload @endif</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Creato:</strong></td>
|
||||
<td>{{ $documento->created_at->format('d/m/Y H:i') }}</td>
|
||||
@@ -95,7 +113,12 @@
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
@if($documento->file_path)
|
||||
@if($documento->isLink())
|
||||
<hr>
|
||||
<a href="{{ $documento->url }}" target="_blank" class="btn btn-info btn-block">
|
||||
<i class="fas fa-external-link-alt mr-1"></i> Apri link esterno
|
||||
</a>
|
||||
@elseif($documento->file_path)
|
||||
<hr>
|
||||
<a href="/documenti/{{ $documento->id }}/download" class="btn btn-primary btn-block">
|
||||
<i class="fas fa-download mr-1"></i> Scarica
|
||||
|
||||
Reference in New Issue
Block a user