PageRenderTime 95ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/application/views/user/time.php

https://github.com/fb83/Project-Pier
PHP | 45 lines | 39 code | 6 blank | 0 comment | 4 complexity | b7744249213aed7acced3d8e986fc256 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, AGPL-3.0, LGPL-2.1, GPL-3.0
  1. <?php
  2. set_page_title(lang('time manager'));
  3. administration_tabbed_navigation('time');
  4. administration_crumbs(lang('time manager'));
  5. add_page_action(lang('unbilled time'), get_url('administration', 'time', array('status' => '0')));
  6. add_page_action(lang('billed time'), get_url('administration', 'time', array('status' => '1')));
  7. add_page_action(lang('view by user'), get_url('user', 'time'));
  8. add_page_action(lang('view by project'), get_url('project', 'time'));
  9. ?>
  10. <h2><?php echo lang('view time by user'); ?></h2>
  11. <?php if (isset($users) && is_array($users) && count($users)) { ?>
  12. <table id="projects">
  13. <tr>
  14. <th class="short"></th>
  15. <th><?php echo lang('name'); ?></th>
  16. <th><?php echo lang('unbilled'); ?></th>
  17. <th><?php echo lang('billed'); ?></th>
  18. </tr>
  19. <?php $counter = 0; ?>
  20. <?php foreach ($users as $user) { ?>
  21. <tr>
  22. <td class="middle">
  23. &nbsp;<?php echo ++$counter; ?>.&nbsp;
  24. </td>
  25. <td class="long middle">
  26. &nbsp;<a href="<?php echo get_url('time', 'byuser', array('id' => $user->getId())); ?>"><?php echo clean($user->getDisplayName()) ?></a>
  27. </td>
  28. <td class="middle">
  29. &nbsp;<?php echo ProjectTimes::getTimeByUserStatus($user, 0, 'hours');?>&nbsp;<?php echo lang('hrs'); ?>
  30. </td>
  31. <td class="middle">
  32. &nbsp;<?php echo ProjectTimes::getTimeByUserStatus($user, 1, 'hours');?>&nbsp;<?php echo lang('hrs'); ?>
  33. </td>
  34. </tr>
  35. <?php } // foreach ?>
  36. </table>
  37. <?php } else { ?>
  38. <?php echo lang('no users in company') ?>
  39. <?php } // if ?>