@php
$fields = [
'Description' => $site->siteDescription->site_description,
'Integrity' => $site->siteDescription->integrity,
'Value' => $site->siteDescription->value,
'Priorities' => $site->siteDescription->priorities,
'History' => $site->siteDescription->history,
'Physical Integrity' => $site->siteDescription->physical_integrity,
'Physical Features' => $site->siteDescription->physical_features,
'Structural Integrity' => $site->siteDescription->structural_integrity,
'Historic Fabric' => $site->siteDescription->historic_fabric,
'Authentic Design' => $site->siteDescription->authentic_design,
'Authentic Setting' => $site->siteDescription->authentic_setting,
'Authentic Material' => $site->siteDescription->authentic_material,
'Demographic Growth' => $site->siteDescription->demographic_growth,
];
$validFields = array_filter($fields, function($content) {
return trim($content) !== '
';
});
@endphp
@if(count($validFields) > 0)
@foreach($validFields as $title => $content)
{{ $title }}:
{!! $content !!}
@endforeach
@else
No Data Found
@endif
@php
$fields1 = [
'Keep Watch' => $site->siteMaintenance->keep_watch,
'Budget' => $site->siteMaintenance->budget,
'Long Term Plan' => $site->siteMaintenance->long_plan,
'Medium Term Plan' => $site->siteMaintenance->medium_plan,
'Short Term Plan' => $site->siteMaintenance->short_plan,
'Financial Plan' => $site->siteMaintenance->financial_plan,
'Management Plan' => $site->siteMaintenance->management_plan,
'Maintenance Strategy' => $site->siteMaintenance->maintenance_strategy,
'Special Treatment & Care' => $site->siteMaintenance->special_care,
'Intervension' => $site->siteMaintenance->intervension,
'Interpretations of the Ruins' => $site->siteMaintenance->interpretation,
'Preventive Action' => $site->siteMaintenance->preventive_action,
'Lack of Maintenance' => $site->siteMaintenance->lack_maintenance,
'Disaster Hazard Plan' => $site->siteMaintenance->disaster_plan,
'Education & Research' => $site->siteMaintenance->edu_research,
'Tourism' => $site->siteMaintenance->tourism,
'Typology' => $site->siteMaintenance->typology,
'Condition' => $site->siteMaintenance->condition,
'Conservation Plan' => $site->siteMaintenance->conservation_plan,
'Degree of Intervention' => $site->siteMaintenance->degree_intervension,
'Social Impact of Tourism' => $site->siteMaintenance->social_impact,
'Over Utilization of Historic Center' => $site->siteMaintenance->over_utilization,
];
$validFields1 = array_filter($fields1, function($content) {
return trim($content) !== '
';
});
@endphp
@if(count($validFields1) > 0)
@foreach($validFields1 as $title => $content)
{{ $title }}:
{!! $content !!}
@endforeach
@else
No Data Found
@endif
Relevant Publication:
{!!$site->siteMaintenance->publication_text!!}
@if($site->siteMaintenance->publication)
@foreach(explode(',', $site->siteMaintenance->publication) as $file)
@php
$parts = explode('/', $file);
$originalName = $parts[0] ?? '';
$storedName = $parts[1] ?? '';
$extension = pathinfo($storedName, PATHINFO_EXTENSION);
// Get the filename without the unwanted suffix after extension
if (!empty($storedName) && !empty($extension)) {
// Match up to and including the extension
preg_match("/^.*?\." . preg_quote($extension) . "/i", $storedName, $matches);
$cleanedName = $matches[0] ?? $storedName;
} else {
$cleanedName = $storedName;
}
$previewable = in_array(strtolower($extension), ['jpg', 'jpeg', 'png']);
@endphp
@if(!empty($storedName))
@if($previewable)
@else
Preview not available for this file type ({{ strtoupper($extension) }})
@endif
{{ $storedName }}
Download File
@endif
@endforeach
@else
No relevant document available.
@endif
Archives Document:
{!!$site->siteMaintenance->archive_text!!}
@if($site->siteMaintenance->archives)
@foreach(explode(',', $site->siteMaintenance->archives) as $file)
@php
$parts = explode('/', $file);
$originalName = $parts[0] ?? '';
$storedName = $parts[1] ?? '';
$extension = pathinfo($storedName, PATHINFO_EXTENSION);
$previewable = in_array(strtolower($extension), ['jpg', 'jpeg', 'png']);
@endphp
@if(!empty($storedName))
@if($previewable)
@else
Preview not available for this file type ({{ strtoupper($extension) }})
@endif
{{ $storedName }}
Download File
@endif
@endforeach
@else
No relevant document available.
@endif
Documentory Research Work:
{!!$site->siteMaintenance->documentory_text!!}
@if($site->siteMaintenance->documentory)
@foreach(explode(',', $site->siteMaintenance->documentory) as $file)
@php
$parts = explode('/', $file);
$originalName = $parts[0] ?? '';
$storedName = $parts[1] ?? '';
$extension = pathinfo($storedName, PATHINFO_EXTENSION);
$previewable = in_array(strtolower($extension), ['jpg', 'jpeg', 'png']);
@endphp
@if(!empty($storedName))
@if($previewable)
@else
Preview not available for this file type ({{ strtoupper($extension) }})
@endif
{{ $storedName }}
Download File
@endif
@endforeach
@else
No relevant document available.
@endif