ORIENT/modules/backend
Luke Towers 567e464550 Pass current model to record finder scope method
This improves the extensibility of the record finder form widget by passing the current model to the query scope that will be applied to the records being displayed. It allows the use of attributes of the current model in the query scope applied to the records being displayed as options to select.

In my use case, I have a main Survey model with related Field models. Field models can have parents and children for a tree structure, but I only want fields to have parents and children that are:
**a) Not the main record itself**
**and b) Members of / related to the same Survey model**

By passing the current model to my query scope, I can filter out ineligible records like so:
```
/**
 * Limit results to only records that are eligible to be parents of the provided model
 *
 * @param Query $query
 * @param Model $model The model to check for eligible parents agains
 * @return Query
 */
public function scopeEligibleParents($query, $model) {
    return $query->where('id', '!=', $model->id)
            ->where('parent_id', '!=', $model->id)
            ->where('survey_id', '=', $model->survey_id);
}
```
2016-10-11 17:15:40 -06:00
..
assets Fixes anchor button color in report widgets 2016-09-03 12:09:50 +10:00
behaviors Added extended useList options, including raw output 2016-10-06 18:44:26 +11:00
classes Add 'readOnly' spec to form field 2016-09-27 16:50:52 +10:00
controllers Roll back uncommon features 2016-07-30 12:04:21 +10:00
database Fixes tests - migrations are in global namespace 2016-06-06 07:35:30 +10:00
facades Introduce new Cms helper 2016-08-20 14:43:49 +10:00
formwidgets Pass current model to record finder scope method 2016-10-11 17:15:40 -06:00
helpers Introduce new Cms helper 2016-08-20 14:43:49 +10:00
lang Translate some strings (#2395) 2016-10-11 08:29:26 +11:00
layouts Add IE edge headers for policies stuck in compat mode 2016-08-13 15:29:58 +10:00
models Add doc blocks 2016-09-09 06:16:24 +10:00
reportwidgets Disable clock picker AM/PM time for now 2016-06-02 06:52:27 +10:00
skins Remove cms.tempDir - use temp_path() 2015-02-07 15:42:20 +11:00
traits Improves exception handling for invalid model resolver 2016-09-18 13:44:13 +10:00
views Nicer error message when no DB and backend access attempt 2016-06-05 07:16:11 +10:00
widgets Added extended useList options, including raw output 2016-10-06 18:44:26 +11:00
ServiceProvider.php Dashboard now supports reset and make default 2016-05-28 14:18:25 +10:00
composer.json Update composer versions 2016-07-06 17:15:41 +10:00
routes.php Add hooks to the cms/backend route definitions 2015-05-02 13:53:05 +10:00