editchapter.html.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. /**
  3. * The edit chapter view file of traincourse module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2022 禅道软件(青岛)有限公司(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 Mengyi Liu <liumengyi@easycorp.ltd>
  8. * @package traincourse
  9. * @version $Id: editchapter.html.php 4029 2022-02-10 10:50:41Z $
  10. * @link https://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
  15. <?php $browseLink = $this->createLink('traincourse', 'manageCourse', "courseID={$chapter->course}")?>
  16. <style>
  17. .edui-default{max-width:100%;}
  18. </style>
  19. <?php js::set('initType', $chapter->type);?>
  20. <div id="mainMenu" class="clearfix">
  21. <div class="btn-toolbar pull-left">
  22. <?php echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary'");?>
  23. <div class="divider"></div>
  24. </div>
  25. </div>
  26. <div class="main-row split-row" id="mainRow">
  27. <?php include './side.html.php';?>
  28. <div class="main-col" data-min-width="400">
  29. <div class="panel block-files block-sm no-margin">
  30. <div class="panel-heading">
  31. <div class="panel-title font-normal">
  32. <i class="icon icon-book text-muted"></i>
  33. <?php echo $chapter->name . " <i class='icon-angle-right'></i> " . $lang->traincourse->editChapter;?>
  34. </div>
  35. <nav class="panel-actions btn-toolbar">
  36. <div class="btn-group">
  37. </div>
  38. </nav>
  39. </div>
  40. <div class='panel-body'>
  41. <form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='ajaxForm'>
  42. <table class='table table-form'>
  43. <tbody>
  44. <?php $class = $chapter->type == 'chapter' ? "class='hidden'" : '';?>
  45. <tr>
  46. <th><?php echo $lang->traincourse->type;?></th>
  47. <td><?php echo html::select('type', $lang->traincourse->typeList, $chapter->type, "class='form-control' onchange='toggleContentBox(this.value)'");?></td>
  48. <td></td>
  49. </tr>
  50. <tr>
  51. <th><?php echo $lang->traincourse->parentChapter;?></th>
  52. <td><?php echo html::select('parent', $optionMenu, $chapter->parent, "class='form-control chosen'");?></td>
  53. <td></td>
  54. </tr>
  55. <tr>
  56. <th><?php echo $lang->traincourse->chapterName;?></th>
  57. <td colspan="2"><?php echo html::input('name', $chapter->name, "class='form-control' eutocomplete='off'");?></td>
  58. </tr>
  59. <tr id='contentBox'>
  60. <th><?php echo $lang->traincourse->chapterDesc;?></th>
  61. <td colspan='2'><?php echo html::textarea('desc', htmlSpecialString($chapter->desc), "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
  62. </tr>
  63. <?php if(empty($chapter->files)):?>
  64. <tr <?php echo $class?>>
  65. <th><?php echo $lang->traincourse->file;?></th>
  66. <td colspan='2'><?php echo $this->fetch('file', 'ajaxUploadLargeFile', 'module=traincourse');?></td>
  67. </tr>
  68. <?php else:?>
  69. <tr>
  70. <th><?php echo $lang->file->common?></th>
  71. <td colspan='2'><?php echo $this->fetch('file', 'printFiles', array('files' => $chapter->files, 'fieldset' => 'false'));?></td>
  72. </tr>
  73. <?php endif;?>
  74. </tbody>
  75. <tfoot>
  76. <tr>
  77. <td colspan='3' class='text-center form-actions'> <?php echo html::submitButton();?> </td>
  78. </tr>
  79. </tfoot>
  80. </table>
  81. </form>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>