Exemplo n.º 1
0
 public static function listUser()
 {
     $allUser = Admin_User::all();
     $datagrid = new Datagrid();
     $datagrid->setFields(array('userprofile/fullname' => 'Fullname'));
     $datagrid->setFields(array('userprofile/emel' => 'Email'));
     $datagrid->setFields(array('userprofile/icno' => 'IC Number'));
     $datagrid->setFields(array('status' => 'Status'));
     $datagrid->setAction('view', 'deleteRole', true, array('userid'));
     $datagrid->setAction('reset', 'deleteRole', true, array('userid'));
     $datagrid->setTable('users', 'table table-bordered table-hover table-striped table-condensed');
     $datagrid->build($allUser, 'userid');
     return $datagrid->render();
 }
 public static function listRole()
 {
     Bundle::start('datagrid');
     $rolelist = Admin_UserRole::where('roleid', '<>', 1)->get();
     $datagrid = new Datagrid();
     $datagrid->setFields(array('roleid' => 'Role Id', 'role' => 'User Role Description'));
     $datagrid->setAction('edit', 'editRoleModal', true, array('roleid'));
     //false,array('id'=>'roleid','data-toggle'=>'modal'));
     $datagrid->setAction('delete', 'deleteRole', true, array('roleid'));
     $datagrid->setContainer('list01', 'span12');
     $datagrid->setTable('users', 'table table-bordered table-hover table-striped table-condensed');
     $datagrid->build($rolelist, 'roleid');
     return $datagrid->render();
 }
Exemplo n.º 3
0
 public static function listDetailsHistory($claimsId)
 {
     $allClaims = Claims_App::find($claimsId)->detail()->paginate(10);
     $datagrid = new Datagrid();
     $datagrid->setFields(array('detaildate' => 'Date'));
     $datagrid->setFields(array('detaildesc' => 'Description'));
     $datagrid->setFields(array('detailfrom' => 'Distance From'));
     $datagrid->setFields(array('detailto' => 'Distance To'));
     $datagrid->setFields(array('detailmile' => 'Milage'));
     $datagrid->setFields(array('detailtoll' => 'Toll'));
     $datagrid->setFields(array('detailpark' => 'Parking'));
     $datagrid->setAction('receipt', 'uploadResit', true, array('claimdetailid'));
     $datagrid->setTable('claimsDetails', 'table table-bordered table-hover table-striped table-condensed');
     $datagrid->build($allClaims, 'claimdetailid');
     return $datagrid->render();
 }