<?=$this->flashMessage->output(); ?>
<div id="content" class="clearfix">
    <div class="clear"></div>
    <div class="tmp"></div>
    <div id="alert" class="">
</div>



<div id="page-content-outer">
    <div id="page-content" class="wrapper content admin">
        <div class="info-bar">
            <h1 class="title">Users</h1>
              <ul class="sub-tabs">
                <li class="object-action modal"><a href="/users/signup"><span>New User</span></a></li>
              </ul>
        </div>

        <ul class="tab_menu wrapper">
            <li class="selected">
                <a href="index.php?a=clients/get/all"><span>Users</span></a>
            </li>
            <li class="">
                <a href="index.php?a=projects/get/all"><span>Projects</span></a>
            </li>
            <li class="">
                <a href="index.php?a=invoices/get/all"><span>Invoices</span></a>
            </li>
            <li class="">
                <a href="index.php?a=payments/get/all"><span>Payments</span></a>
            </li>
            <li>
              <a href=""><span>Settings</span></a>
            </li>

            <li class=" messages">
                <a href="index.php?a=messages/get/all"><span>&nbsp;</span></a>
            </li>


        </ul>
        <div class="inner">
            <table class="list ">
                <tr class="table-header">
                    <th align = center class="">Active</th>
                    <th class="">Username</th>      
                    <th class="">Real Name</th>
                    <th class="">Email</th>
                    <th class="">Join Date</th>
                    <th class="">Access Level</th>

                
                    <!-- For the buttons -->
                    <th class="action"></th>
                    <th class="action"></th>
                </tr>

<?php foreach($users as $user): ?>
<tr>
  <td class="">
      <input type="checkbox" <?=$user->active ? "checked" : ""; ?> >
  </td>
  <td class ="">
    <a class="cell-link" href=""><?=$user->username ?></a>
  </td>
  <td class ="">
    <a class="cell-link" href="">Some Filler</a>
  </td>
   <td class ="">
    <a class="cell-link" href=""><?=$user->email ?></a>
  </td>
  <td class ="">
    <a class="cell-link" href=""><?=date('m/d/y', $user->joinedOn->sec) ?></a>
  </td>
   <td class ="">
    <a class="cell-link" href=""><?= (isset($user->level)) ? $user->level : "Not Set"; ?> </a>
  </td>
 

  <!-- Buttons -->
   <td class="action">
    <a class="small-button  modal" href="/admin/editUser/<?=$user->username?>"><span>Edit</span></a>
  </td>
     <td class="action">
        <a class="small-button danger" href="/admin/removeUser/<?=$user->username?>"><span>Delete</span></a>
     </td>
<tr>
<?php endforeach; ?>
            
                
         </table>

        </div>
        <div class="footer">
            <?php /* Note that the paginator method is hacked it ish specifically for use in this theme */ ?>
            <?=$this->Paginator->paginate(array('separator' => '')); ?>
        </div>
    </div>
</div></div> <!-- end content-->