Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/Http/Controllers/Admin/MonsterCrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ public function setupListOperation()
'element' => 'span',
'class' => function ($crud, $column, $entry, $related_key) {
if ($column['text'] == 'Yes') {
return 'badge rounded-pill bg-success';
return 'badge rounded-pill bg-success text-white';
}

return 'badge rounded-pill bg-danger';
return 'badge rounded-pill bg-danger text-white';
},
],
],
Expand Down
6 changes: 3 additions & 3 deletions app/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
function backpack_pro_badge(string $string = 'PRO')
{
return '<a href="https://backpackforlaravel.com/pricing" target="_blank" class="badge badge-pill bg-primary mx-2" tabindex="-1">'.$string.'</a>';
return '<a href="https://backpackforlaravel.com/pricing" target="_blank" class="badge badge-pill badge-sm bg-primary bg-primary-lt mx-2" tabindex="-1">'.$string.'</a>';
}
}

Expand All @@ -24,7 +24,7 @@ function backpack_pro_badge(string $string = 'PRO')
*/
function backpack_new_badge(string $string = 'NEW')
{
return '<span class="badge badge-pill bg-warning mx-2">'.$string.'</span>';
return '<span class="badge badge-pill badge-sm bg-warning bg-warning-lt mx-2">'.$string.'</span>';
}
}

Expand All @@ -38,6 +38,6 @@ function backpack_new_badge(string $string = 'NEW')
*/
function backpack_free_badge(string $string = 'FREE')
{
return '<span class="badge badge-pill bg-success mx-2">'.$string.'</span>';
return '<span class="badge badge-pill badge-sm bg-success bg-success-lt mx-2">'.$string.'</span>';
}
}
2 changes: 1 addition & 1 deletion resources/views/admin/new-in-v7.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'class' => 'col-md-12 mt-3',
],
'controller' => \App\Http\Controllers\Admin\PetShop\SkillCrudController::class,
'operation' => 'update',
'formOperation' => 'update',
'entry' => \App\Models\PetShop\Skill::find(1),
'content' => [
'header' => 'Edit Skill', // optional
Expand Down
67 changes: 61 additions & 6 deletions resources/views/admin/partials/dataform-examples.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ class="icon icon-1">
Quick Add Tag
</h3>
</div>
<div class="card-body bg-light">
<div class="card-body">

<x-backpack::dataform
id="quickAddTag"
formId="quickAddTag"
:controller="\Backpack\NewsCRUD\app\Http\Controllers\Admin\TagCrudController::class"
operation="create"
formOperation="create"
:setup="function($crud, $entry) {
$crud->field('custom_test_field')->type('text');
}"
Expand All @@ -68,12 +68,12 @@ class="icon icon-1">
Quick Edit Tag
</h3>
</div>
<div class="card-body bg-light">
<div class="card-body">

<x-backpack::dataform
id="quickEditTag"
formId="quickEditTag"
:controller="\Backpack\NewsCRUD\app\Http\Controllers\Admin\TagCrudController::class"
operation="update"
formOperation="update"
:entry="\Backpack\NewsCRUD\app\Models\Tag::find(1)"
/>

Expand All @@ -82,3 +82,58 @@ class="icon icon-1">
</div>

</div>

<div class="row">
<div class="col-md-6">
<div class="card mt-3">
<div class="card-header">
<h3 class="card-title">
Quick Add Invoice in a Modal
</h3>
</div>
<div class="card-body">

<button
type="button"
class="btn btn-primary"
data-bs-toggle="modal"
data-bs-target="#create_invoice"
bp-button="create"
data-style="zoom-in"
>
<i class="la la-plus"></i> <span>Create Invoice</span>
</button>
<x-bp-dataform-modal formId="create_invoice" :controller='\App\Http\Controllers\Admin\PetShop\InvoiceCrudController::class' />

</div>
</div>
</div>
<div class="col-md-6">
<div class="card mt-3">
<div class="card-header">
<h3 class="card-title">
Quick Edit Invoice in a Modal
</h3>
</div>
<div class="card-body">
<button
type="button"
class="btn btn-primary"
data-bs-toggle="modal"
data-bs-target="#edit_invoice"
bp-button="create"
data-style="zoom-in"
>
<i class="la la-plus"></i> <span>Edit Invoice</span>
</button>
<x-backpack::dataform-modal
formId="edit_invoice"
:controller="\App\Http\Controllers\Admin\PetShop\InvoiceCrudController::class"
formOperation="update"
:entry="\App\Models\PetShop\Invoice::find(1)"
/>

</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion resources/views/admin/partials/datagrid-examples.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<path d="M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path>
</svg>
</a>
<div class="dropdown-menu dropdown-menu-end" style="">
<div class="dropdown-menu dropdown-menu-end">
<a class="dropdown-item" href="#">See demo code</a> <!-- TODO: link to demo code -->
<a class="dropdown-item" href="#">See docs</a> <!-- TODO: link to final docs -->
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@

[
'type' => 'chart',
'wrapperClass' => 'col-md-4 mb-3',
'wrapperClass' => 'col-md-4 mt-3 mb-3',
// 'class' => 'col-md-6',
'controller' => \App\Http\Controllers\Admin\Charts\Pies\ChartjsPieController::class,
'content' => [
Expand All @@ -196,7 +196,7 @@
],
[
'type' => 'chart',
'wrapperClass' => 'col-md-4 mb-3',
'wrapperClass' => 'col-md-4 mt-3 mb-3',
// 'class' => 'col-md-6',
'controller' => \App\Http\Controllers\Admin\Charts\Pies\EchartsPieController::class,
'content' => [
Expand All @@ -206,7 +206,7 @@
],
[
'type' => 'chart',
'wrapperClass' => 'col-md-4 mb-3',
'wrapperClass' => 'col-md-4 mt-3 mb-3',
// 'class' => 'col-md-6',
'controller' => \App\Http\Controllers\Admin\Charts\Pies\HighchartsPieController::class,
'content' => [
Expand Down