first commit
This commit is contained in:
44
config/backpack/operations/create.php
Normal file
44
config/backpack/operations/create.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Configurations for Backpack's CreateOperation.
|
||||
*
|
||||
* @see https://backpackforlaravel.com/docs/crud-operation-create
|
||||
*/
|
||||
|
||||
return [
|
||||
// Define the size/looks of the content div for all CRUDs
|
||||
// To override per view use $this->crud->setCreateContentClass('class-string')
|
||||
'contentClass' => 'col-md-12 bold-labels',
|
||||
|
||||
// When using tabbed forms (create & update), what kind of tabs would you like?
|
||||
'tabsType' => 'horizontal', //options: horizontal, vertical
|
||||
|
||||
// How would you like the validation errors to be shown?
|
||||
'groupedErrors' => true,
|
||||
'inlineErrors' => true,
|
||||
|
||||
// when the page loads, put the cursor on the first input?
|
||||
'autoFocusOnFirstField' => true,
|
||||
|
||||
// Where do you want to redirect the user by default, save?
|
||||
// options: save_and_back, save_and_edit, save_and_new
|
||||
'defaultSaveAction' => 'save_and_back',
|
||||
|
||||
// When the user chooses "save and back" or "save and new", show a bubble
|
||||
// for the fact that the default save action has been changed?
|
||||
'showSaveActionChange' => true, //options: true, false
|
||||
|
||||
// Should we show a cancel button to the user?
|
||||
'showCancelButton' => true,
|
||||
|
||||
// Should we warn the user before leaving the page with unsaved changes?
|
||||
// NOTE: this works by removing all fields from the form data serialization where field name starts with "_" (underscore). Usualy backpack internal attributes.
|
||||
// if you have fields that start with an underscore, you need to change the field name, or this functionality wont detect changes in that field.
|
||||
'warnBeforeLeaving' => false,
|
||||
|
||||
// Before saving the entry, how would you like the request to be stripped?
|
||||
// - false - use Backpack's default (ONLY save inputs that have fields)
|
||||
// - invokable class - custom stripping (the return should be an array with input names)
|
||||
// 'strippedRequest' => App\Http\Requests\StripBackpackRequest::class,
|
||||
];
|
39
config/backpack/operations/form.php
Normal file
39
config/backpack/operations/form.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Default configurations for custom form operations.
|
||||
*/
|
||||
|
||||
return [
|
||||
// Define the size/looks of the content div for all CRUDs
|
||||
// To override per view use $this->crud->setCreateContentClass('class-string')
|
||||
'contentClass' => 'col-md-12 bold-labels',
|
||||
|
||||
// When using tabbed forms (create & update), what kind of tabs would you like?
|
||||
'tabsType' => 'horizontal', //options: horizontal, vertical
|
||||
|
||||
// How would you like the validation errors to be shown?
|
||||
'groupedErrors' => true,
|
||||
'inlineErrors' => true,
|
||||
|
||||
// when the page loads, put the cursor on the first input?
|
||||
'autoFocusOnFirstField' => true,
|
||||
|
||||
// Where do you want to redirect the user by default, save?
|
||||
'defaultSaveAction' => 'save_and_back',
|
||||
|
||||
// When the user chooses "save and back" or "save and new", show a bubble
|
||||
// for the fact that the default save action has been changed?
|
||||
'showSaveActionChange' => false, //options: true, false
|
||||
|
||||
// Should we show a cancel button to the user?
|
||||
'showCancelButton' => true,
|
||||
|
||||
// Should we warn a user before leaving the page with unsaved changes?
|
||||
'warnBeforeLeaving' => false,
|
||||
|
||||
// Before saving the entry, how would you like the request to be stripped?
|
||||
// - false - use Backpack's default (ONLY save inputs that have fields)
|
||||
// - invokable class - custom stripping (the return should be an array with input names)
|
||||
// 'strippedRequest' => App\Http\Requests\StripBackpackRequest::class,
|
||||
];
|
84
config/backpack/operations/list.php
Normal file
84
config/backpack/operations/list.php
Normal file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Configurations for Backpack's ListOperation.
|
||||
*
|
||||
* @see https://backpackforlaravel.com/docs/crud-operation-list-entries
|
||||
*/
|
||||
|
||||
return [
|
||||
// Define the size/looks of the content div for all CRUDs
|
||||
// To override per view use $this->crud->setListContentClass('class-string')
|
||||
'contentClass' => 'col-md-12',
|
||||
|
||||
// enable the datatables-responsive plugin, which hides columns if they don't fit?
|
||||
// if not, a horizontal scrollbar will be shown instead
|
||||
'responsiveTable' => true,
|
||||
|
||||
// stores pagination and filters in localStorage for two hours
|
||||
// whenever the user tries to see that page, backpack loads the previous pagination and filtration
|
||||
'persistentTable' => true,
|
||||
|
||||
// show search bar in the top-right corner?
|
||||
'searchableTable' => true,
|
||||
|
||||
// how much time should the system wait before triggering the search function after the user stops typing?
|
||||
'searchDelay' => 400,
|
||||
|
||||
// the time the table will be persisted in minutes
|
||||
// after this the table info is cleared from localStorage.
|
||||
// use false to never force localStorage clear. (default)
|
||||
// keep in mind: User can clear their localStorage whenever they want.
|
||||
|
||||
'persistentTableDuration' => false,
|
||||
|
||||
// How many items should be shown by default by the Datatable?
|
||||
// This value can be overwritten on a specific CRUD by calling
|
||||
// $this->crud->setDefaultPageLength(50);
|
||||
'defaultPageLength' => 10,
|
||||
|
||||
// A 1D array of options which will be used for both the displayed option and the value, or
|
||||
// A 2D array in which the first array is used to define the value options and the second array the displayed options
|
||||
// If a 2D array is used, strings in the right hand array will be automatically run through trans()
|
||||
'pageLengthMenu' => [[10, 25, 50, 100, -1], [10, 25, 50, 100, 'backpack::crud.all']],
|
||||
|
||||
// How important is it for the action buttons to be visible?
|
||||
// - 0 - most important
|
||||
// - 1 - as important as bulk buttons
|
||||
// - 2-3 - more important than the rest of the columns
|
||||
// - 4 - less important than most columns
|
||||
'actionsColumnPriority' => 1,
|
||||
|
||||
// Nest action buttons within a dropdown in actions column
|
||||
'lineButtonsAsDropdown' => false,
|
||||
|
||||
// What is the minimum actions for the dropdown to be created
|
||||
// Example: when minimum to drop is «2», any row with less than «2» action buttons
|
||||
// will not create a dropdown, but will show the buttons inline
|
||||
'lineButtonsAsDropdownMinimum' => 1,
|
||||
|
||||
// Force «X» actions to be shown inline before the dropdown is created
|
||||
// Example: when setting this to «2», the first «2» actions will be shown inline
|
||||
// and the rest will be moved to the dropdown
|
||||
'lineButtonsAsDropdownShowBefore' => 0,
|
||||
|
||||
// Show a "Reset" button next to the List operation subheading
|
||||
// (Showing 1 to 25 of 9999 entries. Reset)
|
||||
// that allows the user to erase local storage for that datatable,
|
||||
// thus clearing any searching, filtering or pagination that has been
|
||||
// remembered and persisted using persistentTable
|
||||
'resetButton' => true,
|
||||
|
||||
// The query operator that is used to search on the table.
|
||||
// If you are using PostgreSQL you might want to change
|
||||
// to `ilike` for case-insensitive search
|
||||
'searchOperator' => 'like',
|
||||
|
||||
// Display the `Showing X of XX entries (filtered from X entries)`?
|
||||
// Setting this to false will improve performance on big datasets.
|
||||
'showEntryCount' => true,
|
||||
|
||||
// when list operation load the information from database, should Backpack eager load the relations ?
|
||||
// this setting is enabled by default as it reduces the amount of queries required to load the page
|
||||
'eagerLoadRelationships' => true,
|
||||
];
|
16
config/backpack/operations/reorder.php
Normal file
16
config/backpack/operations/reorder.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Configurations for Backpack ReorderOperation.
|
||||
*
|
||||
* @see https://backpackforlaravel.com/docs/crud-operation-reorder
|
||||
*/
|
||||
|
||||
return [
|
||||
// Define the size/looks of the content div for all CRUDs
|
||||
// To override per Controller use $this->crud->setReorderContentClass('class-string')
|
||||
'contentClass' => 'col-md-12 col-md-offset-2',
|
||||
|
||||
// should the content of the reorder label be escaped?
|
||||
'escaped' => false,
|
||||
];
|
29
config/backpack/operations/show.php
Normal file
29
config/backpack/operations/show.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Configurations for Backpack's ShowOperation.
|
||||
*
|
||||
* @see https://backpackforlaravel.com/docs/crud-operation-show
|
||||
*/
|
||||
|
||||
return [
|
||||
// Define the size/looks of the content div for all CRUDs
|
||||
// To override per Controller use $this->crud->setShowContentClass('class-string')
|
||||
'contentClass' => 'col-md-12',
|
||||
|
||||
// Automatically add all columns from the db table?
|
||||
'setFromDb' => true,
|
||||
|
||||
// Automatically add created_at and updated_at columns, if model has timestamps?
|
||||
'timestamps' => true,
|
||||
|
||||
// If model has SoftDeletes, allow the admin to access the Show page for
|
||||
// soft deleted items & add a deleted_at column to ShowOperation?
|
||||
'softDeletes' => false,
|
||||
|
||||
// Enable to group columns in tabs
|
||||
'tabsEnabled' => false,
|
||||
|
||||
// When using tabbed forms (create & update), what kind of tabs would you like?
|
||||
'tabsType' => 'horizontal', //options: horizontal, vertical
|
||||
];
|
53
config/backpack/operations/update.php
Normal file
53
config/backpack/operations/update.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Configurations for Backpack's UpdateOperation.
|
||||
*
|
||||
* @see https://backpackforlaravel.com/docs/crud-operation-update
|
||||
*/
|
||||
|
||||
return [
|
||||
// Define the size/looks of the content div for all CRUDs
|
||||
// To override per view use $this->crud->setEditContentClass('class-string')
|
||||
'contentClass' => 'col-md-12 bold-labels',
|
||||
|
||||
// When using tabbed forms (create & update), what kind of tabs would you like?
|
||||
'tabsType' => 'horizontal', //options: horizontal, vertical
|
||||
|
||||
// How would you like the validation errors to be shown?
|
||||
'groupedErrors' => true,
|
||||
'inlineErrors' => true,
|
||||
|
||||
// when the page loads, put the cursor on the first input?
|
||||
'autoFocusOnFirstField' => true,
|
||||
|
||||
// Where do you want to redirect the user by default, save?
|
||||
// options: save_and_back, save_and_edit, save_and_new
|
||||
'defaultSaveAction' => 'save_and_back',
|
||||
|
||||
// When the user chooses "save and back" or "save and new", show a bubble
|
||||
// for the fact that the default save action has been changed?
|
||||
'showSaveActionChange' => true, //options: true, false
|
||||
|
||||
// Should we show a cancel button to the user?
|
||||
'showCancelButton' => true,
|
||||
|
||||
// Should we show the delete button on the edit form?
|
||||
'showDeleteButton' => false,
|
||||
|
||||
// Should we warn a user before leaving the page with unsaved changes?
|
||||
'warnBeforeLeaving' => false,
|
||||
|
||||
// when viewing the update form of an entry in a language that's not translated should Backpack show a notice
|
||||
// that allows the user to fill the form from another language?
|
||||
'showTranslationNotice' => true,
|
||||
|
||||
// when loading an update form, should Backpack eager load the relationship information from database?
|
||||
// this is generally a good thing to enable, as it helps to reduce the number of queries.
|
||||
'eagerLoadRelationships' => false,
|
||||
|
||||
// Before saving the entry, how would you like the request to be stripped?
|
||||
// - false - use Backpack's default (ONLY save inputs that have fields)
|
||||
// - invokable class - custom stripping (the return should be an array with input names)
|
||||
// 'strippedRequest' => App\Http\Requests\StripBackpackRequest::class,
|
||||
];
|
Reference in New Issue
Block a user