]> _ Git - pmi.git/commitdiff
WIP #2731 @8
authorStephen Cameron <s@hybridvision.net>
Wed, 3 Jul 2019 20:53:27 +0000 (22:53 +0200)
committerStephen Cameron <s@hybridvision.net>
Wed, 3 Jul 2019 20:53:27 +0000 (22:53 +0200)
app/Http/Middleware/GenerateMenus.php
app/SubForms/Person.php [new file with mode: 0644]
app/SubForms/Value.php [new file with mode: 0644]
app/Templates/Aboutus.php
resources/js/components/NumberInput.vue
resources/views/pages/solution.blade.php

index 2446c3e3c9752ab97aa3f69177304a777418aff0..3052ae1680b244ebd6cb0eb59bf08feec82f0af5 100644 (file)
@@ -51,6 +51,9 @@ class GenerateMenus
 
         $nav_items = [];
         foreach ($main['children'] as $name => $item) {
+
+            if ($item['element']->status !== 1) continue; // Skip offline pages
+
             $submenus = null;
             if ($name == 'products') {
                 $submenus = $productsSubMenus;
diff --git a/app/SubForms/Person.php b/app/SubForms/Person.php
new file mode 100644 (file)
index 0000000..22f5ad5
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+
+namespace App\SubForms;
+
+use Cubist\Backpack\app\Magic\SubForm;
+
+class Person extends SubForm
+{
+    public function init()
+    {
+        parent::init();
+        $this->addField(['name' => 'name',
+            'label' => __('Nom'),
+            'type' => 'Text']);
+
+        $this->addField(['name' => 'role',
+            'label' => __('Role'),
+            'type' => 'Text']);
+
+        $this->addField(['name' => 'photo',
+            'label' => __('Photo'),
+            'type' => 'Images',
+            'maxFiles' => 1]);
+    }
+}
diff --git a/app/SubForms/Value.php b/app/SubForms/Value.php
new file mode 100644 (file)
index 0000000..4508bb7
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+
+namespace App\SubForms;
+
+use Cubist\Backpack\app\Magic\SubForm;
+
+class Value extends SubForm
+{
+    public function init()
+    {
+        parent::init();
+        $this->addField(['name' => 'title',
+            'label' => __('Titre de valeur'),
+            'type' => 'Text']);
+
+        $this->addField(['name' => 'text',
+            'label' => __('Texte de valeur'),
+            'type' => 'Textarea']);
+
+        $this->addField(['name' => 'image',
+            'label' => __('Image de valeur'),
+            'type' => 'Images',
+            'maxFiles' => 1]);
+    }
+}
index cea00304b52184d87cc30b56e22b28cd5f16b549..f8a6fe35f95660e2468ac86f9954cd5c591b25f5 100644 (file)
@@ -24,12 +24,70 @@ class Aboutus extends Base
     public function init()
     {
         parent::init();
+
+//        $this->addField([
+//            'name' => 'content',
+//            'label' => trans('backpack::pagemanager.content'),
+//            'type' => 'Markdown',
+//            'placeholder' => trans('backpack::pagemanager.content_placeholder'),
+//        ]);
+
+        //=== Our values
+        $this->addField([
+            'name' => 'values_title',
+            'label' => __('Titre'),
+            'type' => 'Text',
+            'tab' => __('Nos Valeurs'),
+        ]);
+
         $this->addField([
-            'name' => 'content',
-            'label' => trans('backpack::pagemanager.content'),
+            'name' => 'values_text',
+            'label' => __('Texte'),
             'type' => 'Markdown',
-            'placeholder' => trans('backpack::pagemanager.content_placeholder'),
+            'tab' => __('Nos Valeurs'),
+        ]);
+
+        $this->addField([
+            'name' => 'values',
+            'type' => 'BunchOfFieldsMultiple',
+            'bunch' => 'App\SubForms\Value',
+            'label' => __('Values'),
+            'tab' => __('Nos Valeurs'),
+        ]);
+
+
+        //=== Team
+        $this->addField([
+            'name' => 'team_title',
+            'label' => __('Titre'),
+            'type' => 'Text',
+            'tab' => __("L'équipe"),
+        ]);
+
+        $this->addField([
+            'name' => 'team',
+            'type' => 'BunchOfFieldsMultiple',
+            'bunch' => 'App\SubForms\Person',
+            'label' => __("L'équipe"),
+            'tab' => __("L'équipe"),
         ]);
+
+        //=== Partners
+        $this->addField([
+            'name' => 'partners_title',
+            'label' => __('Titre'),
+            'type' => 'Text',
+            'tab' => __('Nos Partenaires'),
+        ]);
+
+        $this->addField([
+            'name' => 'partners',
+            'type' => 'BunchOfFieldsMultiple',
+            'bunch' => 'App\SubForms\Logo',
+            'label' => __('Nos Partenaires'),
+            'tab' => __('Nos Partenaires'),
+        ]);
+
     }
 
 
index a34a614e34b8ddad5d279ed770e7d4936a9d5a27..7f334da26f54769bb0d2c71c922687248846a0a2 100644 (file)
             width: 100%
 
             // Hide browser number spinners
+            -moz-appearance: textfield
             &::-webkit-outer-spin-button,
             &::-webkit-inner-spin-button
                 -webkit-appearance: none
index 7cceaac2c76ed800affd876dedf48d4d59b2edfc..2873b05100275c424de44364ef8e483dda731b1f 100644 (file)
@@ -2,10 +2,6 @@
 
 @section('content')
 
-    @php
-        $name = ucfirst($page->title);
-    @endphp
-
     <full-width padding="pb-4v">
         <content>
             <columns>
@@ -14,7 +10,7 @@
                 </column>
 
                 <column>
-                    <text-block class="pt-2v" title_class="h1 overlap-left" :title="isset($name) ? ucfirst($name) : 'Lorem ipsum'">
+                    <text-block class="pt-2v" title_class="h1 overlap-left capitalize" :title="$page->title ?? 'Lorem ipsum'">
 
                         <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus aperiam aspernatur corporis dicta dolore, earum est et eum eveniet, harum minima non, pariatur perspiciatis possimus ratione repudiandae veniam voluptas. Aspernatur eius esse laudantium nostrum nulla?</p>