mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Added get data to a form submission of SearchForm/search, so that ResultAssembly is passed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@63733 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f82dc14fb1
commit
cc4673ff7e
@ -497,7 +497,7 @@ class ModelAdmin_CollectionController extends Controller {
|
|||||||
*/
|
*/
|
||||||
function search($request, $form) {
|
function search($request, $form) {
|
||||||
// Get the results form to be rendered
|
// Get the results form to be rendered
|
||||||
$resultsForm = $this->ResultsForm($form->getData());
|
$resultsForm = $this->ResultsForm(array_merge($form->getData(), $request));
|
||||||
// Before rendering, let's get the total number of results returned
|
// Before rendering, let's get the total number of results returned
|
||||||
$tableField = $resultsForm->Fields()->fieldByName($this->modelClass);
|
$tableField = $resultsForm->Fields()->fieldByName($this->modelClass);
|
||||||
$numResults = $tableField->TotalCount();
|
$numResults = $tableField->TotalCount();
|
||||||
@ -554,6 +554,7 @@ class ModelAdmin_CollectionController extends Controller {
|
|||||||
$tf->setShowPagination(true);
|
$tf->setShowPagination(true);
|
||||||
// @todo Remove records that can't be viewed by the current user
|
// @todo Remove records that can't be viewed by the current user
|
||||||
$tf->setPermissions(array_merge(array('view','export'), TableListField::permissions_for_object($this->modelClass)));
|
$tf->setPermissions(array_merge(array('view','export'), TableListField::permissions_for_object($this->modelClass)));
|
||||||
|
|
||||||
$url = '<a href=\"' . $this->Link() . '/$ID/edit\">$value</a>';
|
$url = '<a href=\"' . $this->Link() . '/$ID/edit\">$value</a>';
|
||||||
$tf->setFieldFormatting(array_combine(array_keys($summaryFields), array_fill(0,count($summaryFields), $url)));
|
$tf->setFieldFormatting(array_combine(array_keys($summaryFields), array_fill(0,count($summaryFields), $url)));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user