caselib.html.php 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /**
  3. * The caselib of assetlib module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2021 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Liyuchun <liyuchun@easycorp.ltd>
  8. * @package assetlib
  9. * @version $Id: caselib.html.php 4903 2021-06-24 08:54:59Z $
  10. * @link https://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . "common/view/header.html.php"?>
  14. <?php if($canSort) include $app->getModuleRoot() . "common/view/sortable.html.php"?>
  15. <div id="mainMenu" class="clearfix">
  16. <div class="btn-toobar pull-left">
  17. <?php common::sortFeatureMenu();?>
  18. <?php foreach($lang->assetlib->featureBar['caselib'] as $featureType => $label):?>
  19. <?php $active = $type == $featureType ? 'btn-active-text' : '';?>
  20. <?php $label = "<span class='text'>$label</span>";?>
  21. <?php echo html::a(inlink('caselib', "type=$featureType"), $label, '', "class='btn btn-link $active'");?>
  22. <?php endforeach;?>
  23. </div>
  24. </div>
  25. <div id="mainContent" class="main-table">
  26. <?php if(empty($libs)):?>
  27. <div class="table-empty-tip">
  28. <p><span class="text-muted"><?php echo $lang->noData;?></span></p>
  29. </div>
  30. <?php else:?>
  31. <table class="table has-sort-head" id='libList'>
  32. <?php $vars = "type=$type&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
  33. <thead>
  34. <tr>
  35. <th class='text-left c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->assetlib->id);?></th>
  36. <th class='c-order' data-flex='false' title='<?php echo $this->lang->assetlib->sort?>'><?php echo $this->lang->assetlib->sort?></th>
  37. <th><?php common::printOrderLink('name', $orderBy, $vars, $lang->assetlib->name);?></th>
  38. <th class='c-desc'><?php echo $lang->assetlib->desc;?></th>
  39. <th class='c-addedBy'><?php common::printOrderLink('addedBy', $orderBy, $vars, $lang->assetlib->createdBy);?></th>
  40. </tr>
  41. </thead>
  42. <tbody class='sortable'>
  43. <?php $this->loadModel('file');?>
  44. <?php foreach($libs as $lib):?>
  45. <?php $lib = $this->file->replaceImgURL($lib, 'desc');?>
  46. <tr data-id='<?php echo $lib->id;?>'>
  47. <td><?php echo sprintf('%03d',$lib->id);?></td>
  48. <td class='sort-handler c-sort' title='' style=''><i class='icon-move'></td>
  49. <td class='c-name' title="<?php echo $lib->name;?>"><?php echo html::a($this->createLink('caselib', 'browse', "libID=$lib->id"), $lib->name);?></td>
  50. <td class='text-left content'>
  51. <?php $desc = trim(strip_tags(str_replace(array('</p>', '<br />', '<br>', '<br/>'), "\n", str_replace(array("\n ", "\r"), '', $lib->desc)), '<img>'));?>
  52. <div title='<?php echo $desc;?>'><?php echo nl2br($desc);?></div>
  53. </td>
  54. <td class='nobr c-openedBy' title='<?php echo zget($users, $lib->addedBy);?>'><?php echo zget($users, $lib->addedBy);?></td>
  55. </tr>
  56. <?php endforeach;?>
  57. </tbody>
  58. </table>
  59. <div class='table-footer'>
  60. <?php $pager->show('right', 'pagerjs');?>
  61. </div>
  62. <?php endif;?>
  63. </div>
  64. <?php include $app->getModuleRoot() . "common/view/footer.html.php"?>