]> _ Git - pmi.git/commitdiff
done #3505 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 17 Mar 2020 16:59:29 +0000 (17:59 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 17 Mar 2020 16:59:29 +0000 (17:59 +0100)
resources/styles/components/products.styl
resources/views/pages/product-detail.blade.php
resources/views/partials/product-link.blade.php

index dd5d0d77270aaf3ea200fc14bd2a4e0a19285724..ae178768c9ceae4331cf67fecded688bd6b6b6b3 100644 (file)
       +below(960px)
         grid-template-columns: repeat(auto-fill, minmax(225px, 1fr))
 
+    .links
+      white-space nowrap;
+      font-size 14px
+      .link
+        width 50%
+        white-space nowrap
+        display inline-block
+
+        &.technical_sheet
+          text-align right
 
     .product-highlights
       height: 42px // 3 lines
index 48e8c37c320787f9994a9b8664fa4d3db42402b2..75be0b8726f57c5d185b2f60c003277d8562909f 100644 (file)
@@ -39,7 +39,7 @@
 
                 @if($technical_sheet)
                     <p class="mt-4">
-                        <a href="{{ $technical_sheet }}">
+                        <a target="_blank" href="{{ $technical_sheet }}">
                             {{ __('Télécharger la fiche produit') }}
                         </a>
                     </p>
index 060dd5dba7c50c6e80213b75e92efcf5a8cf13b8..9eb7eaa6f8587c3437697690de726f0d973562c1 100644 (file)
@@ -1,3 +1,6 @@
+@php
+    $technical_sheet = $product->getMediaUrl('technical_sheet', false)
+@endphp
 <div data-product-id="{{$id}}" class="product-grid-item bg-grey-200">
     {{-- Image holder --}}
     <a href="{{ $product->getEntity()->URL }}">
         <h3><a class="text-navy" href="{{ $product->getEntity()->URL }}">{{ $product->get('reference') }}</a>
         </h3>
         <div class="product-highlights text-sm">
-            {{ $product->get('name') }}
+            <cart-add :product-id="{{ $id }}" class="align-middle">
+                {{ __('Ajouter à ma sélection') }}
+                <template v-slot:success-message>
+                    @svg('tick', 'w-4 mr-3') {{ __('Produit ajouté') }}
+                </template>
+            </cart-add>
+        </div>
+        <div class="links mt-4">
+            <div class="link">
+                <a href="{{ $product->getEntity()->URL }}">
+                    {{ __('En savoir plus') }}
+                </a>
+            </div>
+
+            @if($technical_sheet)
+                <div class="link technical_sheet">
+                    <a target="_blank" href="{{ $technical_sheet }}">
+                        {{ __('Télécharger la fiche') }}
+                    </a>
+                </div>
+            @endif
         </div>
-        <p class="mt-4">
-            <a href="{{ $product->getEntity()->URL }}">
-                {{ __('Voir la fiche produit') }}
-            </a>
-        </p>
     </div>
 
     @include('partials.product-schema')