create.html.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php $this->app->loadConfig('file');?>
  2. <?php if($docType and strpos($config->doc->officeTypes, $docType) !== false and !empty($config->file->libreOfficeTurnon) and $config->file->convertType == 'collabora'):?>
  3. <?php include $app->getModuleRoot() . 'common/view/header.lite.html.php';?>
  4. <div id="mainContent" class="main-content">
  5. <div class='center-block'>
  6. <div class='main-header'>
  7. <h2><?php echo $lang->doc->create;?></h2>
  8. </div>
  9. <form class="load-indicator main-form form-ajax" id="dataform" method='post'>
  10. <table class='table table-form'>
  11. <tbody>
  12. <?php if($objectType == 'project'):?>
  13. <tr>
  14. <th><?php echo $lang->doc->project;?></th>
  15. <td class='required'><?php echo html::select('project', $objects, $objectID, "class='form-control picker-select' onchange=loadExecutions(this.value)");?></td>
  16. <?php if($this->app->tab == 'doc'):?>
  17. <th><?php echo $lang->doc->execution?></th>
  18. <td id='executionBox'><?php echo html::select('execution', $executions, '', "class='form-control picker-select' data-placeholder='{$lang->doc->placeholder->execution}' onchange='loadObjectModules(\"execution\", this.value)'")?></td>
  19. <?php endif;?>
  20. </tr>
  21. <?php elseif($objectType == 'execution'):?>
  22. <tr>
  23. <th><?php echo $lang->doc->execution;?></th>
  24. <td class='required'><?php echo html::select('execution', $objects, $objectID, "class='form-control picker-select' onchange='loadObjectModules(\"execution\", this.value)'");?></td>
  25. </tr>
  26. <?php elseif($objectType == 'product'):?>
  27. <tr>
  28. <th><?php echo $lang->doc->product;?></th>
  29. <td class='required'><?php echo html::select('product', $objects, $objectID, "class='form-control picker-select' onchange='loadObjectModules(\"product\", this.value)'");?></td>
  30. </tr>
  31. <?php endif;?>
  32. <tr>
  33. <th class='w-100px'><?php echo $lang->doc->libAndModule?></th>
  34. <td colspan='3' class='required'><span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control picker-select'");?></span></td>
  35. </tr>
  36. <tr>
  37. <th><?php echo $lang->doc->title;?></th>
  38. <td colspan='3'><?php echo html::input('title', '', "class='form-control' required");?></td>
  39. </tr>
  40. <tr>
  41. <th><?php echo $lang->doc->keywords;?></th>
  42. <td colspan='3'><?php echo html::input('keywords', '', "class='form-control'");?></td>
  43. </tr>
  44. <tr>
  45. <th><?php echo $lang->doclib->control;?></th>
  46. <td colspan='3' <?php if($objectType != 'mine') echo "class='aclBox'";?>>
  47. <?php echo html::radio('acl', $lang->doc->aclList, $objectType == 'mine' ? 'private' : 'open', "onchange='toggleAcl(this.value, \"doc\")'");?>
  48. </td>
  49. </tr>
  50. <tr id='whiteListBox' class='hidden'>
  51. <th><?php echo $lang->doc->whiteList;?></th>
  52. <td colspan='3'>
  53. <div class='input-group'>
  54. <span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
  55. <?php echo html::select('groups[]', $groups, '', "class='form-control picker-select' multiple data-drop-direction='top'")?>
  56. </div>
  57. <div class='input-group'>
  58. <span class='input-group-addon'><?php echo $lang->doclib->user?></span>
  59. <?php echo html::select('users[]', $users, '', "class='form-control picker-select' multiple data-drop-direction='top'")?>
  60. <?php echo $this->fetch('my', 'buildContactLists', "dropdownName=users");?>
  61. </div>
  62. </td>
  63. </tr>
  64. <tr>
  65. <td colspan='4' class='text-center form-actions'>
  66. <?php
  67. echo html::submitButton();
  68. echo html::hidden('status', 'normal');
  69. echo html::hidden('type', $docType);
  70. echo html::hidden('contentType', 'html');
  71. ?>
  72. </td>
  73. </tr>
  74. </tbody>
  75. </table>
  76. </form>
  77. </div>
  78. </div>
  79. <?php js::set('textType', $config->doc->textTypes);?>
  80. <?php js::set('objectType', $objectType);?>
  81. <?php js::set('docType', $docType);?>
  82. <?php js::set('holders', $lang->doc->placeholder);?>
  83. <script>
  84. function openEditURL(docID, fileID)
  85. {
  86. var editUrl = createLink('file', 'download', "fileID=" + fileID + "&mouse=left&edit=1");
  87. window.open(editUrl);
  88. parent.location.href = createLink('doc', 'view', "docID=" + docID);
  89. }
  90. </script>
  91. <?php include $app->getModuleRoot() . 'common/view/footer.lite.html.php';?>
  92. <?php else:?>
  93. <?php
  94. $oldDir = getcwd();
  95. chdir($app->getModuleRoot() . 'doc/view');
  96. include './create.html.php';
  97. chdir($oldDir);
  98. ?>
  99. <?php endif;?>