]> _ Git - fluidbook-toolbox.git/commitdiff
wip #3753 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 11 Dec 2020 19:25:01 +0000 (20:25 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 11 Dec 2020 19:25:01 +0000 (20:25 +0100)
app/Models/FluidbookQuote.php
app/Models/Quiz.php
app/Models/Signature.php
config/backpack/crud.php
public/packages/fluidbook/toolbox/css/style.less
resources/views/vendor/backpack/crud/inc/datatables_logic.blade.php

index 0c52895983e49df966ad37e0d4a469fa4a999026..dfaa518d86319ea3f948bce86b9caf3504dc6615 100644 (file)
@@ -24,7 +24,7 @@ class FluidbookQuote extends CubistMagicAbstractModel
     protected $_operations = [ShowOperation::class, AssignOperation::class, CreateFromWebsite::class, ConfirmAssignmentOperation::class];
     protected $_enableClone = false;
     protected $_enableCreation = false;
-
+    protected $_enableBulk = false;
 
     public static function addOwnerClause(Builder $builder)
     {
@@ -97,6 +97,8 @@ class FluidbookQuote extends CubistMagicAbstractModel
             4 => __('Déjà client'),
         ], 'column' => true, 'filter' => true]);
 
+        $this->addField('notes', 'Textarea', __('Notes'));
+
         $this->addField('origin_column', FluidbookQuoteOrigin::class, __('Origine'), ['column' => true, 'filter' => true]);
         $this->addField('fluidbooks', 'ModelAttribute', __('Fluidbooks'), ['column' => true, 'column_label' => '<img width="20" src="/images/icons/icon-fluidbook.svg">', 'attribute' => 'user.e1_ws_count']);
     }
index 5afed8393ad828e49c35b04cc289126089cea9be..32ead26ebdf4641f7f289fa0801b25a240be4ee0 100644 (file)
@@ -21,6 +21,7 @@ class Quiz extends CubistMagicAbstractModel
         'singular' => 'quiz',
         'plural' => 'quizzes'];
 
+    protected $_enableBulk = false;
 
     protected static function _getColors()
     {
@@ -96,8 +97,9 @@ class Quiz extends CubistMagicAbstractModel
             'label' => __('Propriétaire'),
             'type' => User::class,
             'column' => true,
-            'can' => 'toolbox:quiz:edit_ownership',
-            'attribute' => 'companyWithNameOnTwoLines',
+            'can' => 'quiz:admin',
+            'column_attribute' => 'companyWithNameOnTwoLines',
+            'attribute' => 'companyWithName',
             'tab' => __('Projet')]);
 
         $this->addField(['name' => 'title',
index 985dea9a3d370f79049f1da176ffb96b400d8a56..25914ee3ff6ec8b834ec2a5fb60bdb4a439b2cf6 100644 (file)
@@ -9,6 +9,8 @@ use Cubist\Backpack\Magic\Models\CubistMagicAbstractModel;
 class Signature extends CubistMagicAbstractModel
 {
 
+    protected $_enableBulk = false;
+
     protected $table = 'signature';
 
     protected $_options = ['name' => 'signature',
index bedb94af80ba35eadfae2e5e45573eaa6910c0b8..d544593a674a36bb82adeeb07b9de320cc0b5ccf 100644 (file)
@@ -51,7 +51,7 @@ return [
             // - 1 - as important as bulk buttons
             // - 2-3 - more important than the rest of the columns
             // - 4 - less important than most columns
-            'actionsColumnPriority' => 1,
+            'actionsColumnPriority' => 0,
         ],
 
         /*
index cd4f73ca0ed8361c00357ef61cb2176c9a36191a..57fe0a2bcadaa0f1a62a0a3bfb41f1d89388096b 100644 (file)
@@ -282,17 +282,24 @@ a, a.btn-link {
         }
     }
 
+    &.dtr-inline.collapsed {
+        td.dtr-control, th.dtr-control {
+            padding-left: 30px !important;
+        }
+    }
+
     td {
-        padding: 0.4em 0.5em 0.4em 0.3em;
+        line-height: 1.1em;
+        padding: 0.4em 0.5em;
     }
 
     th {
-        padding-left: 0.3em;
+        padding-left: 0.5em;
 
     }
 
     th, td {
-        &:first-child, &:nth-child(2), &:nth-child(3), &:last-child {
+        &:first-child, &:last-child {
             width: 1px;
         }
     }
index 7906ebd5c315d512983ae02964ebe4071010b8e4..3d91ff8067e9de2a316fe859a0ad547fbe518697 100644 (file)
@@ -1,4 +1,6 @@
 <!-- DATA TABLES SCRIPT -->
+<script src="https://unpkg.com/@popperjs/core@2"></script>
+<script src="https://unpkg.com/tippy.js@6"></script>
 <script type="text/javascript" src="{{ asset('packages/datatables.net/js/jquery.dataTables.min.js') }}"></script>
 <script type="text/javascript"
         src="{{ asset('packages/datatables.net-bs4/js/dataTables.bootstrap4.min.js') }}"></script>
             if (crud.table.responsive.hasHidden()) {
                 $("#crudTable").addClass('has-hidden-columns');
                 crud.table.responsive.recalc();
+
+                $("#crudTable .btn-link").each(function () {
+                    tippy(this, {
+                        content: $(this).contents()
+                            .filter(function () {
+                                return this.nodeType === 3; //Node.TEXT_NODE
+                            }).text(),
+                    })
+                });
             }
         });
         @else