ajaxgetdropmenu.html.php 978 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * The ajaxgetdropmenu view file of caselib 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 Mengyi Liu <liumengyi@easycorp.ltd>
  7. * @package caselib
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. $data = array();
  12. foreach($libraries as $currentLib => $libName)
  13. {
  14. $item = array();
  15. $item['id'] = $currentLib;
  16. $item['name'] = $libName;
  17. $item['text'] = $libName;
  18. $item['title'] = $libName;
  19. $item['active'] = $libID == $currentLib;
  20. $item['keys'] = zget($librariesPinyin, $libName, '');
  21. $item['url'] = sprintf($link, $currentLib);
  22. $item['type'] = 'item';
  23. $data[] = $item;
  24. }
  25. $json = array();
  26. $json['data'] = $data;
  27. $json['searchHint'] = $lang->searchAB;
  28. renderJson($json);