私はIpModel
2番目のモデルを持っていIpSenderScore
ます.ip_idはIp_historyモデルの外部キーです。
senderscore
これで、次のような Ip admin ビューでカスタム ボタンを作成しました。
'senderscore' => array(
'label'=>'View SenderScore of This IP',
'imageUrl'=>Yii::app()->request->baseUrl.'/images/loginhistory.PNG',array("style"=>"width:16px;height:16px;"),
'click'=>"function(){ $.fn.yiiGridView.update('user-grid', {
type:'POST',
url:$(this).attr('href'),
success:function(data) {
$('#AjFlash').html(data).fadeIn().animate({opacity: 1.0}, 3000).fadeOut('slow');
$.fn.yiiGridView.update('user-grid');
}
})
return false;
}
",
'url'=>'Yii::app()->createUrl("ipSenderScore/admin",array("ip_id"=>$data->id))',
),
このボタンをクリックすると、この ip_id で ipSenderScore モデルに保存されているすべての IP 履歴を含むモーダル ウィンドウが表示されます。
それはどのように可能ですか?