viewarchivedcolumn.html.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * The view archived column view file of kanban 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 Sun Guangming<wangyuting@easycorp.ltd>
  7. * @package kanban
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. $colItems = array();
  12. foreach($columns as $column)
  13. {
  14. $colItems[] = div
  15. (
  16. setClass('col-item flex mt-2'),
  17. div(setClass('col-item-title flex-1'), $column->parent > 0 ? html("<span class='label gray-pale rounded-xl'>{$lang->kanban->child}</span> $column->name") : $column->name),
  18. div
  19. (
  20. setClass('col-item-action flex-1 flex justify-end ml-2'),
  21. (commonModel::hasPriv('kanban', 'restoreColumn') && $column->archived == '1' && !(isset($this->config->CRKanban) and $this->config->CRKanban == '0' and $kanban->status == 'closed')) ?
  22. btn(set
  23. (
  24. array
  25. (
  26. 'class' => 'btn primary size-sm ajax-submit',
  27. 'url' => inlink('restoreColumn', "colID=$column->id")
  28. )
  29. ), $lang->kanban->restore) : null
  30. )
  31. );
  32. }
  33. panel
  34. (
  35. to::heading
  36. (
  37. div
  38. (
  39. set('class', 'panel-title'),
  40. $lang->kanban->archivedColumn
  41. )
  42. ),
  43. to::headingActions
  44. (
  45. btn
  46. (
  47. setClass('closeBtn ghost'),
  48. 'x'
  49. )
  50. ),
  51. div
  52. (
  53. setClass('panel-body'),
  54. $colItems
  55. )
  56. );