{{-- resources/views/points/public_view.blade.php --}} @extends('layouts.base') @php use Illuminate\Support\Str; use Illuminate\Support\Facades\Storage; $pt = $p ?? $point ?? null; $point = $pt; $locale = app()->getLocale(); $readonly = (bool)($readonly ?? false); $canShare = auth()->check() && (int)auth()->id() === (int)$pt->user_id; // $locale = app()->getLocale(); $locale = 'fr'; // Forcer le français pour l'instant $iconBase = "assets/icons/{$locale}"; // 'url' => route('search', [$locale, $p->id]), // adapte la route $photos = $p->photos ?? collect(); // Icône actuelle (nom de fichier) $currentPin = $point?->pin_icon ?: 'green_pin.png'; // Contexte /wp/{token} (token public) ? $isTokenMode = request()->routeIs('points.public') || Str::contains(url()->current(), '/wp/'); // URL POST de sauvegarde d’icône (⚠️ routes doivent exister) $pinPostUrl = $isTokenMode ? route('points.pin.update.token', ['locale' => $locale, 'token' => $point->serial]) : route('points.pin.update.id', ['locale' => $locale, 'point' => $point->id]); // Liste des fichiers pin (fallback si le contrôleur n’a pas fourni) $pins = ($pins ?? $availablePins ?? null) ?: [ 'red_pin.png','green_pin.png','blue_pin.png','yellow_pin.png','purple_pin.png','orange_pin.png' ]; if (count($availablePins) < 2) $pt->pin_icon = 'green_pin.png'; @endphp {{-- Bottom Nav --}} {{-- 'bottomInfo' => [ 'label' => __('More informations'), 'target' => '#waypoint-details', // un id dans la page ], --}} @include('partials.bottom_nav', [ 'bottomTabs' => [ [ 'icon' => "to_picto.svg", 'label' => __('Join'), 'drawer' => 'maps', // ouvre le tiroir "maps" ], $canShare ? [ 'icon' => "sharing_picto.svg", 'label' => __('Sharing'), 'drawer' => 'share', ] : [ 'icon' => "sharing_picto.svg", 'label' => __('Sharing'), 'href' => lr('login'), ], [ 'icon' => "myV_picto.svg", 'label' => __('My waypoints'), 'href' => lr('search'), 'primary' => false, ], ], ]) @if(!$p->hide_address)
{{ $p->comment }}
@endif {{-- GRID 2 colonnes : gauche = adresse / codes, droite = avatar / téléphone / QR --}} @if(($p->hide_address) && ($p->hide_interphone) && ($p->hide_codes))