<?php 

$this->breadcrumbs = array(
    'Fast Assign'
);

?>
<h1>Users, Roles and Tasks</h1>
<table border="1">
  <tr>
    <th>Users</th>
      <th>Roles</th>
      <th>Tasks</th>
  </tr>
  <tr>
    <td>
<?php
foreach (User::model()->findAll() as $user)
{
  $url = url("auth/fastassign/user",array('user'=>$user->id));
  echo("<ul>\n");
  echo("<li><a href=\"$url\">$user->fullName ($user->username)</a> ".($user->id == user()->id ? "&lt;-------" : "")."</li>\n");
  echo("</ul>\n");
}
?>
</td>
      <td>
<?php
foreach (AuthItem::getAll('name',2) as $role)
{
  $url = url("auth/fastassign/role",array('role'=>$role->name));
  echo("<ul>\n");
  echo("<li><a href=\"$url\">$role->description ($role->name)</a></li>\n");
  echo("</ul>\n");
}
?>
</td>
      <td>
<?php
foreach (AuthItem::getAll('name',1) as $task)
{
  $url = url("auth/fastassign/task",array('task'=>$task->name));
  echo("<ul>\n");
  echo("<li><a href=\"$url\">$task->description ($task->name)</a></li>\n");
  echo("</ul>\n");
}
?>
</td>
  </tr>
</table>
