zeroasterisk / CakePHP-Eip

Edit in Place Plugin (Helper/Component) for CakePHP (requires jquery)
14 stars 5 forks source link

Edit In place 2 models at same time #5

Open loto88 opened 9 years ago

loto88 commented 9 years ago

Hello Friends!

I have various models in the same view ( Professionals, Salaries, Departments..) And i wanna edit in place at the same time, but i cant do it because on my controller i only can define 1 source of data.

public function eip() { $this->loadModel('Salary'); $this->Eip->auto('Salary'); $this->autoRender = false; }

If i want use edit in place with professionals i have to change to :

public function eip() { $this->Eip->auto('Professional'); $this->autoRender = false; }

Anyone can help me? :(

zeroasterisk commented 9 years ago

You should be able to set options with the URL you want to use. https://github.com/zeroasterisk/CakePHP-Eip/blob/master/View/Helper/EipHelper.php#L100

Which you can pass into the input() method: https://github.com/zeroasterisk/CakePHP-Eip/blob/master/View/Helper/EipHelper.php#L213

You can just point the other ones to different controllers, or different actions on this controller.