From: Vincent Vanwaelscappel Date: Tue, 12 Mar 2019 17:10:06 +0000 (+0100) Subject: wip #2628 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6dc441fca58ca4e6ee1113ce469d59c87aa0a275;p=cubist_cms-back.git wip #2628 @0.5 --- diff --git a/src/app/Http/Controllers/TemplateCrudController.php b/src/app/Http/Controllers/TemplateCrudController.php index ce97aac..fd3cd88 100644 --- a/src/app/Http/Controllers/TemplateCrudController.php +++ b/src/app/Http/Controllers/TemplateCrudController.php @@ -13,32 +13,25 @@ class TemplateCrudController extends CrudController { parent::setup(); - $this->crud->setModel("Cubist\Backpack\app\Models\Setting"); - $this->crud->setEntityNameStrings(trans('backpack::settings.setting_singular'), trans('backpack::settings.setting_plural')); - $this->crud->setRoute(backpack_url('setting')); + $this->crud->setModel("Cubist\Backpack\app\Models\Template"); + $this->crud->setEntityNameStrings(trans('cubist_back::templates.template_singular'), trans('cubist_back::templates.template_plural')); + $this->crud->setRoute(backpack_url('template')); $this->crud->addClause('where', 'active', 1); $this->crud->denyAccess(['create', 'delete']); $this->crud->setColumns([ [ 'name' => 'name', - 'label' => trans('backpack::settings.name'), - ], - [ - 'name' => 'value', - 'label' => trans('backpack::settings.value'), + 'label' => trans('cubist_back::templates.name'), ], [ 'name' => 'description', - 'label' => trans('backpack::settings.description'), + 'label' => trans('cubist_back::templates.description'), ], ]); $this->crud->addField([ 'name' => 'name', - 'label' => trans('backpack::settings.name'), + 'label' => trans('cubist_back::templates.name'), 'type' => 'text', - 'attributes' => [ - 'disabled' => 'disabled', - ], ]); } diff --git a/src/app/Models/Template.php b/src/app/Models/Template.php index fc5a7a0..f392bda 100644 --- a/src/app/Models/Template.php +++ b/src/app/Models/Template.php @@ -1,6 +1,6 @@ where('key', $key)->firstOrFail();