Пример #1
0
 public function OnAddRoleRow(\Zippy\Html\DataList\DataRow $datarow)
 {
     $item = $datarow->getDataItem();
     $datarow->add(new \Zippy\Html\Label("description", $item->description));
     $users = $datarow->add(new \Zippy\Html\Link\LinkList("users", ', '));
     $userlist = User::find('user_id  in (select user_id from system_user_role where role_id  = ' . $item->role_id . ')');
     foreach ($userlist as $user) {
         $users->AddRedirectLink('\\ZippyERP\\System\\Pages\\UserInfo', array($user->user_id), $user->userlogin);
     }
 }
Пример #2
0
 public function OnAddRoleRow(\Zippy\Html\DataList\DataRow $datarow)
 {
     $item = $datarow->getDataItem();
     $datarow->add(new \Zippy\Html\Label("description", $item->description));
     $role = $datarow->add(new \Zippy\Html\Form\CheckBox("role", new \Zippy\Binding\PropertyBinding($item, 'tag')))->setChecked($this->user->hasRole($item->rolename));
 }