m.browse.html.php 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php include $app->getModuleRoot() . 'common/view/m.header.html.php';?>
  2. <section id='page' class='section list-with-actions list-with-pager'>
  3. <?php foreach($lang->deploy->dateList as $dateKey => $dateName):?>
  4. <table class="table bordered">
  5. <thead>
  6. <tr>
  7. <th><?php echo $dateName?></th>
  8. <th class="text-center w-70px"><?php echo $lang->deploy->owner?></th>
  9. <th class="text-center w-120px hidden"><?php echo $lang->actions?></th>
  10. <th class="text-center w-120px"><?php echo $lang->deploy->result?></th>
  11. </tr>
  12. </thead>
  13. <tbody>
  14. <?php foreach($plans[$dateKey] as $plan):?>
  15. <tr class="text-center" data-id="4" data-url="<?php echo $this->createLink('deploy', 'steps', "id=$plan->id");?>">
  16. <td class="text-left">
  17. <?php
  18. $begin = ($dateKey == 'today' or $dateKey == 'tomorrow') ? substr($plan->begin, 11, 5) : substr($plan->begin, 5, 11);
  19. $end = ($dateKey == 'today' or $dateKey == 'tomorrow') ? substr($plan->end, 11, 5) : substr($plan->end, 5, 11);
  20. $time = ($dateKey == 'today' or $dateKey == 'tomorrow') ? "$begin ~ $end" : $begin;
  21. echo html::a($this->createLink('deploy', 'steps', "id=$plan->id"), $time . ' ' . $plan->name, '', 'title="' . $plan->name . '"');
  22. ?>
  23. </td>
  24. <td><?php echo zget($users, $plan->owner);?></td>
  25. <td class="hidden">
  26. <?php if(common::hasPriv('deploy', 'finish', $plan) and deployModel::isClickable($plan, 'finish')):?>
  27. <a data-display='modal' data-placement='bottom' data-remote='<?php echo $this->createLink('deploy', 'finish', "deployID=$plan->id", '', 'true');?>'><?php echo $lang->deploy->finish;?></a>
  28. <?php endif;?>
  29. <?php if(common::hasPriv('deploy', 'activate', $plan) and deployModel::isClickable($plan, 'activate')):?>
  30. <a data-display='modal' data-placement='bottom' data-remote='<?php echo $this->createLink('deploy', 'activate', "deployID=$plan->id", '', 'true');?>'><?php echo $lang->deploy->activate;?></a>
  31. <?php endif;?>
  32. <?php if(common::hasPriv('deploy', 'edit', $plan)):?>
  33. <a data-display='modal' data-placement='bottom' data-remote='<?php echo $this->createLink('deploy', 'edit', "deployID=$plan->id", '', 'true');?>'><?php echo $lang->deploy->edit;?></a>
  34. <?php endif;?>
  35. <?php if(common::hasPriv('deploy', 'delete', $plan)):?>
  36. <a href='<?php echo $this->createLink('deploy', 'delete', "deployID=$plan->id", '', 'true');?>' target="hiddenwin"><?php echo $lang->deploy->delete;?></a>
  37. <?php endif;?>
  38. </td>
  39. <td><?php echo zget($lang->deploy->resultList, $plan->result);?></td>
  40. </tr>
  41. <?php endforeach;?>
  42. </tbody>
  43. </table>
  44. <?php endforeach; ?>
  45. </section>
  46. <?php include $app->getModuleRoot() . 'common/view/m.footer.html.php';?>