Commit Graph

145 Commits

Author SHA1 Message Date
Ben Thomson a59d3b83eb Code quality clean up (#4449)
Credit to @bennothommo
2019-07-18 08:50:37 -06:00
Luke Towers a1b1018083 Typo fix 2019-06-21 12:08:36 -06:00
Luke Towers 71241ee6d4 Fix error messages in RelationController
Fixes #4342
2019-06-12 00:26:55 -06:00
Alexander Guth 4e92686c1a Add support for filters in the RelationController configuration (#4241)
Credit to @alxy. Docs: https://github.com/octobercms/docs/pull/368
2019-05-04 09:08:12 +08:00
Luke Towers 9fa7cbf70e Hide backend controller behavior public methods from controller actions.
Fixes #3762, replaces #3764
2019-04-19 14:01:01 -06:00
Alexander Guth 132336dcb8 Add getters for relation widgets (#3164)
These are available for the FormController as well, so this is just consistent and useful in some cases. Credit to @alxy
2019-04-19 12:51:51 -06:00
Alexander Guth 13d710b161 Reuse the model instance from Form widget (#4193)
Credit to @alxy & @jimcottrell . Refs:
https://github.com/rainlab/translate-plugin/issues/209
https://github.com/rainlab/translate-plugin/issues/242
https://github.com/rainlab/translate-plugin/issues/330
https://github.com/rainlab/translate-plugin/issues/380
https://github.com/jan-vince/smallextensions/issues/11
https://github.com/OFFLINE-GmbH/oc-mall-plugin/issues/128
https://github.com/OFFLINE-GmbH/oc-gdpr-plugin/issues/21
https://github.com/OFFLINE-GmbH/oc-gdpr-plugin/pull/55
df9c8fd365
https://github.com/octobercms/october/pull/3984
2019-03-15 22:32:36 -06:00
Francesco Passanti 329bb6f202 Fix relation controller lists onClick handling for VARCHAR keys (#3544)
Credit to @FrancescoPassanti
2018-11-23 00:58:28 -06:00
Kanstantsin 69a26aa8f2 Commit deferred bindings on model created with RelationController (#3843)
Fixes #3829. Credit to @iotch. Tested by the fantastic Octodock provided by @petehalverson
2018-10-04 08:35:30 -06:00
Nathan van der Werf 0f0d108da0
Remove unused imports 2018-08-24 19:51:59 +02:00
Nathan van der Werf 8b6f11e6ac Extract child instructions 2018-08-15 19:25:42 +02:00
Nathan van der Werf fbca3bea92 Remove redundant variables 2018-08-15 19:23:12 +02:00
Nathan van der Werf 62c59a4903 Refactor ternary operators to null coalescing operators 2018-08-15 19:15:13 +02:00
Nathan van der Werf 123145fd54 Remove unnecessary parentheses 2018-08-15 18:49:52 +02:00
Nathan van der Werf 02bd38cfb1 Merge if constructs 2018-08-15 18:45:37 +02:00
Samuel Georges 2036823eee Removes non functional buttons in pivot mode
Refs https://github.com/daftspunk/oc-test-plugin/issues/28
2017-12-06 17:19:37 +11:00
Samuel Georges 605c8221a9 getPlainForeignKey -> getForeignKeyName 2017-05-20 20:03:48 +10:00
Quezler cc17b679f1 Code dusting (#2826)
Code cleaning according to PSR-2 w/ exemptions (mostly dust).
2017-04-24 21:38:19 +10:00
Samuel Georges 330a41f39c Improve form controller docs 2017-03-23 08:48:26 +11:00
Samuel Georges b841f9e066 {@inheritDoc} -> @inheritDoc 2017-03-16 06:26:14 +11:00
Samuel Georges 18c6bb63a2 API docs progress 2017-03-15 18:03:26 +11:00
Luke Towers 749835f73d Merge pull request #2642 from norotaro/patch-1
Update RelationController::onRelationManageUpdate
2017-02-01 15:07:46 -06:00
Samuel Georges bf17fa44e6 Merge pull request #2610 from lukaszbanas-extremecoding/issue_2609
Support deferred binding for single view modes in RelationController
2017-02-02 06:46:09 +11:00
norotaro 2ac4dad4e9 Update RelationController::onRelationManageUpdate
As in `onRelationManageCreate()`, `onRelationManageDelete()`, `onRelationManageAdd()`, etc, it needs to return `$this->relationRefresh()` for `relationExtendRefreshResults()` to be executed
2017-02-01 12:14:41 -03:00
Luke Towers a3b98944be Fix typo in RelationController (original #2460)
Fixes minor typo initially proposed in #2460, resubmitted here as original author vanished.
2017-01-28 15:47:25 -06:00
lbanas b6683c2329 issue 2609 2017-01-13 09:59:11 +01:00
Luke Towers 102831ecc2 Improve RelationController evalManageTitle()
Improves the evalManageTitle() method of the RelationController by making it possible to detect being the create manage form, which will enable us to utilize the results of the evalManageTitle in the manage_form partial.
2017-01-06 17:45:58 -06:00
Luke Towers 05ab8bdb01 Pass current model to RelationController view & manage scopes
This improves the extensibility of the relation controller by passing the parent relation model to the query scope that will be applied to both the view and manage options. It allows the use of attributes of the parent relation model in the query scope applied to the relation.

This is a mirror of october/octobercms#2419, except for the relation controller instead of the record finder widget. If necessary, I can create a case in the test plugin, but if this is simple enough with the added reference to the prior PR to not require a case in the test plugin, that would be simpler for me :) 

@daftspunk, let me know what you think.
2016-11-16 12:05:44 -06:00
Samuel Georges ced920e5d2 Exception handling
Addresses issue specified in https://github.com/daftspunk/oc-test-plugin/issues/21
2016-11-02 07:21:04 +11:00
Samuel Georges 88196fb660 Allow passing an explicit format to datepicker
Refs #1919
Recompile assets
2016-10-20 08:44:14 +11:00
Samuel Georges 535dc78db1 Pass model as 3rd arg in relation extend overrides
Refs #2308
2016-10-19 08:45:43 +11:00
Samuel Georges 259e0c0226 Add support for recordOnClick in relationRender 2016-10-15 10:11:54 +11:00
Samuel Georges 8eafcaa090 Encode extra config to isolate the logic
Fixes #2417
2016-10-15 10:10:11 +11:00
Samuel Georges b3fe8de7fb Prevent extra config from bleeding to other definitions 2016-09-28 13:26:28 +10:00
Samuel Georges baefa3e50d Allow passing arbitrary recordUrl to relationRender 2016-09-27 20:39:29 +10:00
Samuel Georges 0d336151d2 Improvements to data persistence, rework readOnly
Fixes #2308
2016-09-27 20:21:32 +10:00
Samuel Georges 1e3f5a22ef Provides an opportunity to manipulate the field configuration.
Refs #2245
2016-09-27 17:00:26 +10:00
Samuel Georges cd0cd260b5 Make manage[form] config optional
There are times when manage form mode just isn't needed. This will make the view[list] unclickable, which is OK
2016-09-27 16:53:46 +10:00
Jack Dark a6b0d3da7d Merge remote-tracking branch 'remotes/upstream/develop' into develop
# Conflicts:
#	modules/backend/behaviors/RelationController.php
2016-08-18 02:02:43 +03:00
Samuel Georges 5c53b10c20 Merge pull request #2295 from gabsource/fix-relation-manage-readonly
Propagate the RelationController readOnly option to the viewClickList AJAX action
2016-08-13 15:30:58 +10:00
Samuel Georges 618a035616 Apply defined constraints to view mode
In the same way it is currently applied to manage mode
Fixes #2292
2016-08-13 15:21:17 +10:00
Samuel Georges c2d2250a1c RelationController "Remove" now works with deferred bindings
This brings the logic in line with the "Add" logic, using session keys where applicable
Fixes #1150
2016-08-13 12:41:03 +10:00
Jérémy Gaulin 7f22ba62dc Propagate the readOnly option to the viewClickList AJAX action 2016-08-08 08:35:57 +02:00
Samuel Georges 61ac68fd5e Allows relationRender to specify readOnly mode
Fixes #2245
2016-08-06 13:15:08 +10:00
Jack Dark aaab9c2eaa Added support for Many To Many polymorphic relations.(morphToMany and morphedByMany) 2016-08-02 17:56:49 +03:00
Samuel Georges fdcfe801a7 Write tests for #2258
Prevent nulling when model fails validation
2016-07-30 10:59:25 +10:00
Samuel Georges dbdf8f780a Merge pull request #2128 from slipgrom/develop
morphMany Relation support
2016-07-16 14:08:35 +10:00
Samuel Georges 8e4142558b Merge pull request #1741 from ARH-Digital/develop
Add morphic relations to backend
2016-07-09 20:38:21 +10:00
Roman Gerasimov 587b8a449d morphMany Relation support 2016-06-17 10:55:03 +03:00
Samuel Georges 3bad70f041 Relation controller now applies the defined constraints by default
Relation controller now supports scope and conditions for the manage mode (list)
Logic has been modified across recordfinder and filter that only allows one constraint in this order (1. conditions, 2. scope, 3. defined constraints (where applicable))
Fixes #1203
2016-05-17 05:17:40 +10:00