@extends('layouts.app') @section('mobile-title', 'Share Links') @section('mobile-subtitle', $document->title) @section('mobile-back', route('documents.show', $document)) @section('content') @php $shared = $shares->whereNull('revoked_at')->isNotEmpty(); $canCreateShare = auth()->user()->can('share', $document); $humanSize = $document->size >= 1048576 ? number_format($document->size / 1048576, 1).' MB' : number_format(max($document->size, 1) / 1024, 1).' KB'; $fileIcon = str_contains($document->mime_type ?? '', 'pdf') ? 'picture_as_pdf' : 'description'; @endphp
Document Centre chevron_right {{ $folder->name }} chevron_right Sharing
{{ $fileIcon }}

{{ $document->original_name }}

{{ $shared ? 'Shared Internally & Externally' : 'Internal Access Only' }} Last updated {{ $document->updated_at->diffForHumans() }} by {{ $document->uploader->name }}

@if ($document->canPreview()) Preview @endif add_link Generate New Link

Internal Access

person_add Add People
{{ collect(explode(' ', $document->owner?->name ?? $document->uploader->name))->filter()->map(fn ($part) => substr($part, 0, 1))->take(2)->implode('') }}
{{ $document->owner?->name ?? $document->uploader->name }} (Owner)
{{ $document->owner?->email ?? $document->uploader->email }}
Owner
@foreach ($folder->users->take(4) as $user)
{{ collect(explode(' ', $user->name))->filter()->map(fn ($part) => substr($part, 0, 1))->take(2)->implode('') }}
{{ $user->name }}
{{ $user->email }}
{{ ucfirst($user->pivot->permission) }}
@endforeach

Recent Activity

@forelse ($shareAuditLogs->take(6) as $log)
{{ $log->description }}
{{ $log->created_at->format('M j, g:i A') }}
@empty
Share activity will appear after a link is viewed or downloaded.
@endforelse

Active Shared Links

@forelse ($shares as $share) @empty @endforelse
Link Info Settings Views Actions
{{ $share->recipient_email ?: 'Manual link' }}
{{ route('document-shares.show', $share) }} @if ($share->expires_at && $share->expires_at->isFuture() && $share->expires_at->lte(now()->addDay()))
Expires Tomorrow
@elseif ($share->expires_at)
Expires {{ $share->expires_at->format('M j, Y') }}
@endif
{{ $share->allow_downloads ? 'Downloads ON' : 'Downloads OFF' }}
{{ $share->requiresPin() ? 'Password ON' : 'No Password' }}
{{ $share->download_count }} @if (! $share->revoked_at)
@csrf @method('DELETE')
@else Revoked @endif
No shared links yet.
@endsection