TypeGroups Localization and refactor
This commit is contained in:
parent
3e90d8cbe1
commit
dc1a64b32d
@ -31,7 +31,3 @@
|
||||
## AircraftTypes
|
||||
|
||||
- Form Localization
|
||||
|
||||
## Aircraft Type Groups
|
||||
|
||||
- Form Localization
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
use Backend\Classes\Controller;
|
||||
use BackendMenu;
|
||||
|
||||
class AircraftTypeGroups extends Controller
|
||||
class AircraftTypeGroup extends Controller
|
||||
{
|
||||
public $implement = ['Backend\Behaviors\ListController', 'Backend\Behaviors\FormController'];
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
list: $/germanairlinesva/fleet/models/aircraft/columns.yaml
|
||||
modelClass: GermanAirlinesVa\Fleet\Models\Aircraft
|
||||
title: Aircraft
|
||||
title: Aircrafts
|
||||
noRecordsMessage: 'backend::lang.list.no_records'
|
||||
showSetup: true
|
||||
showCheckboxes: true
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div data-control="toolbar">
|
||||
<a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroups/create') ?>" class="btn btn-primary oc-icon-plus"
|
||||
<a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroup/create') ?>" class="btn btn-primary oc-icon-plus"
|
||||
><?= e(trans('backend::lang.form.create')) ?></a
|
||||
>
|
||||
<button
|
||||
10
controllers/aircrafttypegroup/config_form.yaml
Normal file
10
controllers/aircrafttypegroup/config_form.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
name: Aircraft Type Group
|
||||
form: $/germanairlinesva/fleet/models/aircrafttypegroup/fields.yaml
|
||||
modelClass: GermanAirlinesVa\Fleet\Models\AircraftTypeGroup
|
||||
defaultRedirect: germanairlinesva/fleet/aircrafttypegroup
|
||||
create:
|
||||
redirect: 'germanairlinesva/fleet/aircrafttypegroup/update/:id'
|
||||
redirectClose: germanairlinesva/fleet/aircrafttypegroup
|
||||
update:
|
||||
redirect: germanairlinesva/fleet/aircrafttypegroup
|
||||
redirectClose: germanairlinesva/fleet/aircrafttypegroup
|
||||
@ -1,6 +1,6 @@
|
||||
list: $/germanairlinesva/fleet/models/aircrafttypegroup/columns.yaml
|
||||
modelClass: GermanAirlinesVa\Fleet\Models\AircraftTypeGroup
|
||||
title: AircraftTypeGroups
|
||||
title: Aircraft Type Groups
|
||||
noRecordsMessage: 'backend::lang.list.no_records'
|
||||
showSetup: true
|
||||
showCheckboxes: true
|
||||
@ -9,4 +9,4 @@ toolbar:
|
||||
buttons: list_toolbar
|
||||
search:
|
||||
prompt: 'backend::lang.list.search_prompt'
|
||||
recordUrl: 'germanairlinesva/fleet/aircrafttypegroups/update/:id'
|
||||
recordUrl: 'germanairlinesva/fleet/aircrafttypegroup/update/:id'
|
||||
@ -1,6 +1,6 @@
|
||||
<?php Block::put('breadcrumb') ?>
|
||||
<ul>
|
||||
<li><a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroups') ?>">AircraftTypeGroups</a></li>
|
||||
<li><a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroup') ?>">Aircraft Type Groups</a></li>
|
||||
<li><?= e($this->pageTitle) ?></li>
|
||||
</ul>
|
||||
<?php Block::endPut() ?>
|
||||
@ -35,7 +35,7 @@
|
||||
</button>
|
||||
<span class="btn-text">
|
||||
<?= e(trans('backend::lang.form.or')) ?>
|
||||
<a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroups') ?>"
|
||||
<a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroup') ?>"
|
||||
><?= e(trans('backend::lang.form.cancel')) ?></a
|
||||
>
|
||||
</span>
|
||||
@ -47,7 +47,7 @@
|
||||
<?php else: ?>
|
||||
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
|
||||
<p>
|
||||
<a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroups') ?>" class="btn btn-default"
|
||||
<a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroup') ?>" class="btn btn-default"
|
||||
><?= e(trans('backend::lang.form.return_to_list')) ?></a
|
||||
>
|
||||
</p>
|
||||
@ -1,6 +1,6 @@
|
||||
<?php Block::put('breadcrumb') ?>
|
||||
<ul>
|
||||
<li><a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroups') ?>">AircraftTypeGroups</a></li>
|
||||
<li><a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroup') ?>">Aircraft Type Groups</a></li>
|
||||
<li><?= e($this->pageTitle) ?></li>
|
||||
</ul>
|
||||
<?php Block::endPut() ?>
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
<p>
|
||||
<a
|
||||
href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroups') ?>"
|
||||
href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroup') ?>"
|
||||
class="btn btn-default oc-icon-chevron-left"
|
||||
>
|
||||
<?= e(trans('backend::lang.form.return_to_list')) ?>
|
||||
@ -1,6 +1,6 @@
|
||||
<?php Block::put('breadcrumb') ?>
|
||||
<ul>
|
||||
<li><a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroups') ?>">AircraftTypeGroups</a></li>
|
||||
<li><a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroup') ?>">Aircraft Type Groups</a></li>
|
||||
<li><?= e($this->pageTitle) ?></li>
|
||||
</ul>
|
||||
<?php Block::endPut() ?>
|
||||
@ -44,7 +44,7 @@
|
||||
|
||||
<span class="btn-text">
|
||||
<?= e(trans('backend::lang.form.or')) ?>
|
||||
<a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroups') ?>"
|
||||
<a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroup') ?>"
|
||||
><?= e(trans('backend::lang.form.cancel')) ?></a
|
||||
>
|
||||
</span>
|
||||
@ -55,7 +55,7 @@
|
||||
<?php else: ?>
|
||||
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
|
||||
<p>
|
||||
<a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroups') ?>" class="btn btn-default"
|
||||
<a href="<?= Backend::url('germanairlinesva/fleet/aircrafttypegroup') ?>" class="btn btn-default"
|
||||
><?= e(trans('backend::lang.form.return_to_list')) ?></a
|
||||
>
|
||||
</p>
|
||||
@ -1,10 +0,0 @@
|
||||
name: AircraftTypeGroups
|
||||
form: $/germanairlinesva/fleet/models/aircrafttypegroup/fields.yaml
|
||||
modelClass: GermanAirlinesVa\Fleet\Models\AircraftTypeGroup
|
||||
defaultRedirect: germanairlinesva/fleet/aircrafttypegroups
|
||||
create:
|
||||
redirect: 'germanairlinesva/fleet/aircrafttypegroups/update/:id'
|
||||
redirectClose: germanairlinesva/fleet/aircrafttypegroups
|
||||
update:
|
||||
redirect: germanairlinesva/fleet/aircrafttypegroups
|
||||
redirectClose: germanairlinesva/fleet/aircrafttypegroups
|
||||
@ -14,6 +14,9 @@
|
||||
'name' => 'Aircraft Name',
|
||||
'home_base' => 'Aircraft Home Base',
|
||||
],
|
||||
'aircraft_type_groups' => [
|
||||
'comment' => 'Comment Identifying Aircraft Type Group',
|
||||
],
|
||||
'menu' => [
|
||||
'main' => 'GA Fleet',
|
||||
'manufacturers' => 'Aircraft Manufacturers',
|
||||
|
||||
@ -24,7 +24,9 @@ class AircraftTypeGroup extends Model
|
||||
/**
|
||||
* @var array Validation rules
|
||||
*/
|
||||
public $rules = [];
|
||||
public $rules = [
|
||||
'comment' => 'required',
|
||||
];
|
||||
|
||||
public $belongsToMany = [
|
||||
'aircraft_types' => 'GermanAirlinesVa\Fleet\Models\AircraftType',
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fields:
|
||||
comment:
|
||||
label: Comment
|
||||
label: 'germanairlinesva.fleet::lang.aircraft_type_groups.comment'
|
||||
span: auto
|
||||
type: text
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user