mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 03:53:13 +00:00
PHRAS-3669 A story can refer record-id's from another dbox (#4014)
* fix creation story * update version js * fix * fix delete story * add alert if multiple databox * fix create story * block create story from different databox * disable checkbox on multiple databox
This commit is contained in:
@@ -25,9 +25,19 @@ class StoryController extends Controller
|
||||
use DispatcherAware;
|
||||
use EntityManagerAware;
|
||||
|
||||
public function displayCreateFormAction()
|
||||
public function displayCreateFormAction(Request $request)
|
||||
{
|
||||
return $this->render('prod/Story/Create.html.twig', []);
|
||||
$records = RecordsRequest::fromRequest($this->app, $request, true);
|
||||
|
||||
$databoxes = $records->databoxes();
|
||||
$collections = $records->collections();
|
||||
|
||||
return $this->render('prod/Story/Create.html.twig', [
|
||||
'isMultipleDataboxes' => count($databoxes) > 1 ? 1 : 0,
|
||||
'isMultipleCollections' => count($collections) > 1 ? 1 : 0,
|
||||
'databoxId' => count($databoxes) == 1 ? current($databoxes)->get_sbas_id() : 0,
|
||||
'collectionId' => count($collections) == 1 ? current($collections)->get_base_id() : 0
|
||||
]);
|
||||
}
|
||||
|
||||
public function postCreateFormAction(Request $request)
|
||||
|
Reference in New Issue
Block a user