diff --git a/README.md b/README.md index 0638e0b..f456c64 100644 --- a/README.md +++ b/README.md @@ -1 +1,23 @@ -# cms-niceties \ No newline at end of file +# cms-niceties +Some useful CMS objects and extensions + +## Usefull UNIX console utilities + +### Code search (find . -name "*.*" | xargs grep "some text" replacement) + +ag "some text" ./ +https://github.com/ggreer/the_silver_searcher + +### File content with code hightlighting (cat replacement) + +bat ./app/src/Pages/Page.php +https://github.com/sharkdp/bat + +### File listing (ls replacement) + +exa -aTL3 ./app +https://github.com/ogham/exa + +### git diff tool with bat code hightlighting (git show) + +https://github.com/dandavison/delta \ No newline at end of file diff --git a/src/Forms/GridField/GridFieldConfig_Inline.php b/src/Forms/GridField/GridFieldConfig_Inline.php new file mode 100644 index 0000000..f217715 --- /dev/null +++ b/src/Forms/GridField/GridFieldConfig_Inline.php @@ -0,0 +1,59 @@ +addComponent(new GridFieldTitleHeader()) + ->addComponent(new GridFieldEditableColumns()); + + if($showDetails) { + $this + ->addComponent(new GridFieldDetailForm(null, true, $showAdd)) + ->addComponent(new GridFieldEditButton()); + } + + $this + ->addComponent($pagination = new GridFieldPaginator($itemsPerPage)) + ->addComponent($filter = new GridFieldFilterHeader()) + ->addComponent(new GridFieldPageCount('toolbar-header-right')) + ->addComponent(new GridFieldButtonRow('before')) + ->addComponent(new GridFieldToolbarHeader()) + ->addComponent(new GridFieldDeleteAction()); + + if($showAdd) { + $this->addComponent(new GridFieldAddNewInlineButton()); + } + + $pagination->setThrowExceptionOnBadDataType(false); + $filter->setThrowExceptionOnBadDataType(false); + + $this->extend('updateConfig'); + } +} \ No newline at end of file