$message->sender(config('mail.from.address'), config('mail.from.name'));
$message->bcc('test+pmi@cubedesigners.com');
if (null === $page->form_destination) {
- $message->to('web@pm-instrumentation.com');
+ $message->to('contact@pm-instrumentation.com');
} else {
foreach ($page->form_destination as $item) {
$message->to($item);
$message->replyTo($validatedData['email'], $sender);
$message->subject($subject . $validatedData['subject']);
});
-
}
}
--- /dev/null
+<?php
+
+
+namespace App\SubForms;
+
+
+use Cubist\Backpack\app\Magic\SubForm;
+
+class HomeProductHighlight extends SubForm
+{
+ public function init()
+ {
+ parent::init();
+
+ $this->addField(['name' => 'title',
+ 'label' => 'Titre',
+ 'type' => 'Text']);
+
+ $this->addField(['name' => 'image',
+ 'label' => 'Image',
+ 'type' => 'Images']);
+
+ $this->addField(['name' => 'link',
+ 'type' => 'SelectFromModel',
+ 'label' => 'Cagégorie',
+ 'optionsmodel' => 'App\Models\Producttype']);
+ }
+}
];
}
} else {
- $cart_items = new stdClass();
+ $cart_items = [];
}
@endphp
@include('partials.header')
@section('breadcrumbs')
- @if(CubistMenu::get('breadcrumbs')->active())
- <full-width padding="pt-1v pb-1v">
- <content>
- {!! CubistMenu::get('breadcrumbs')->crumbMenu()->asDiv(['class' => 'breadcrumbs'], [], ['class' => 'breadcrumbs-item']) !!}
- </content>
- </full-width>
- @endif
+ <full-width padding="pt-1v pb-1v">
+ <content>
+ {!! CubistMenu::get('breadcrumbs')->crumbMenu()->asDiv(['class' => 'breadcrumbs'], [], ['class' => 'breadcrumbs-item']) !!}
+ </content>
+ </full-width>
@show
<main class="flex-grow">
<columns>
<column>
- <h3 class="h2 simple pl-1v md:text-2xl sm:pl-0">Capteurs</h3>
+ <h3 class="h2 simple pl-1v md:text-2xl sm:pl-0">{{__('Capteurs')}}</h3>
{{-- ToDo: refactor these blocks + handle different image sizes and title lengths --}}
<grid cols="2" gap="md" class="xs:grid-cols-1 pr-1v border-r border-grey-300 sm:pr-0 sm:border-0">
- @foreach ($page->get('products_capteurs') as $typeID)
+ @foreach ($page->get('products_capteurs') as $highlight)
<div class="bg-white px-1v py-6 flex">
<a class="animated-underline partial-underline flex flex-col justify-between w-full"
- href="{{ $nav->getHrefById('product_type_'.$typeID) }}">
+ href="{{ $nav->getHrefById('product_type_'.$highlight['link']) }}">
<div class="flex items-center justify-center flex-grow">
<img class="mb-4" src="{{ asset("storage/products/1.png") }}">
</div>
- <p class="text-lg text-navy font-display font-medium">{{ $productTypes[$typeID]->name }}</p>
+ <p class="text-lg text-navy font-display font-medium">{{ $highlight['title'] }}</p>
</a>
</div>
@endforeach
<column>
- <h3 class="h2 simple pl-2v md:text-2xl sm:pl-0">Systèmes de mesure</h3>
+ <h3 class="h2 simple pl-2v md:text-2xl sm:pl-0">{{__('Systèmes de mesure')}}</h3>
<grid cols="2" gap="md" class="xs:grid-cols-1 pl-1v sm:pl-0">
- @foreach ($page->get('products_systems') as $typeID)
+ @foreach ($page->get('products_systems') as $highlight)
<div class="bg-white px-1v py-6 flex">
<a class="animated-underline partial-underline flex flex-col justify-between w-full"
- href="{{ $nav->getHrefById('product_type_'.$typeID) }}">
+ href="{{ $nav->getHrefById('product_type_'.$highlight['link']) }}">
<div class="flex items-center justify-center flex-grow">
- <img class="mb-4" src="{{ asset("storage/products/1.png") }}">
+ <img class="mb-4" src="{{ $page->getImageURL($highlight['image']) }}">
</div>
- <p class="text-lg text-navy font-display font-medium">{{ $productTypes[$typeID]->name }}</p>
+ <p class="text-lg text-navy font-display font-medium">{{ $highlight['title'] }}</p>
</a>
</div>
@endforeach