ajaxgetcopyprojectexecutions.html.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * The ajaxGetCopyProjectExecutions view file of execution module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  5. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  6. * @author Shujie Tian<tianshujie@easycorp.ltd>
  7. * @package execution
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. jsVar('hasExecution', !empty($executions));
  12. $executionsBox = array();
  13. if(empty($executions))
  14. {
  15. $executionsBox[] = div
  16. (
  17. setClass('inline-flex items-center with-icon w-full bg-gray-100 py-4'),
  18. icon('exclamation-sign icon-2x pl-2 text-warning'),
  19. span
  20. (
  21. set::className('font-bold ml-2'),
  22. $lang->execution->copyNoExecution
  23. )
  24. );
  25. }
  26. else
  27. {
  28. foreach($executions as $id => $execution)
  29. {
  30. if(empty($execution->multiple)) continue;
  31. $executionsBox[] = btn(
  32. setClass('execution-block justify-start'),
  33. setClass($copyExecutionID == $id ? 'primary-outline' : ''),
  34. set('data-id', $id),
  35. icon
  36. (
  37. setClass('text-gray'),
  38. $lang->icons[$execution->type]
  39. ),
  40. span(setClass('text-left'), $execution->name)
  41. );
  42. }
  43. }
  44. /* ====== Render page ====== */
  45. render();