@extends('layouts.adminlte') @section('title', 'Documenti') @section('page_title', 'Gestione Documenti') @php $canWriteDocumenti = Auth::user()->canManage('documenti'); $canDeleteDocumenti = Auth::user()->canDelete('documenti'); @endphp @section('css') @endsection @section('content')
{{-- Sidebar cartelle --}}

Cartelle

@if($canWriteDocumenti)
@endif
Tutti i documenti @if($cartelle->count() > 0) @include('documenti._folder_tree', [ 'cartelle' => $cartelle, 'currentFolderId' => $currentFolder ? $currentFolder->id : null, 'level' => 0, 'canWrite' => $canWriteDocumenti, 'canDelete' => $canDeleteDocumenti, ]) @elseif(!$repositories->count())
Nessuna cartella
@endif @if($repositories->count() > 0)
Repository Remoti
@foreach($repositories as $repo) @php $isRepoActive = $currentRepo && $currentRepo->id === $repo->id; $repoIcon = $repo->tipo === 'webdav' ? 'fa-server' : 'fa-google-drive'; $repoColor = $repo->tipo === 'webdav' ? 'text-secondary' : 'text-danger'; @endphp {{ $repo->nome }} @endforeach @endif
{{-- Contenuto principale --}}
{{-- Breadcrumb --}}
@if($canWriteDocumenti) @endif
{{-- Toolbar azioni massive --}}
@csrf @if($canDeleteDocumenti)
Azioni: @if($canWriteDocumenti) @endif 0 selezionati
@endif
{{-- View: Griglia --}}
@if($sottoCartelle->count() > 0) @foreach($sottoCartelle as $cartella)
@if($canWriteDocumenti || $canDeleteDocumenti) @endif
@endforeach @endif @if($documenti->count() > 0) @foreach($documenti as $documento) @php $icon = match($documento->mime_type) { 'application/pdf' => 'fa-file-pdf text-danger', 'image/jpeg','image/png','image/gif','image/webp','image/svg+xml' => 'fa-file-image text-success', 'text/plain','text/csv','text/html' => 'fa-file-alt text-info', 'application/msword','application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'fa-file-word text-primary', 'application/vnd.ms-excel','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'fa-file-excel text-success', 'application/zip','application/x-rar-compressed' => 'fa-file-archive text-warning', default => 'fa-file text-secondary', }; @endphp
@if($canDeleteDocumenti)
@endif
{{ $documento->nome_file }}
{{ ucfirst($documento->tipologia) }} @if($documento->dimensione) {{ number_format($documento->dimensione / 1024, 1) }} KB @endif
@if($documento->user) {{ $documento->user->name }} @endif · {{ $documento->created_at->format('d/m/Y') }}
@endforeach @endif
@if($sottoCartelle->count() === 0 && $documenti->count() === 0)

Nessun elemento presente

@if($currentFolder)

Questa cartella è vuota

@elseif($currentRepo)

Il repository remoto {{ $currentRepo->nome }} è vuoto

@endif
@endif
{{-- View: Lista --}} {{-- Paginazione --}} @if($documenti->hasPages())
{{ $documenti->links() }}
@endif
{{-- /localContent --}}
{{-- /massForm --}} {{-- MODAL: Nuova Cartella --}} {{-- MODAL: Upload --}} {{-- MODAL: Associa --}} {{-- MODAL: Cambia tipo/contesto --}} {{-- MODAL: Preview --}} {{-- MODAL: Conferma eliminazione singola --}} {{-- MODAL: Conferma eliminazione multipla --}} {{-- MODAL: Sposta massivo --}} {{-- MODAL: Sposta documento --}} @endsection @section('scripts') @endsection