part.showevent.php 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <div id="event" title="<?php echo $l->t("View an event");?>">
  2. <ul>
  3. <li><a href="#tabs-1"><?php echo $l->t('Eventinfo'); ?></a></li>
  4. <li><a href="#tabs-2"><?php echo $l->t('Repeating'); ?></a></li>
  5. <!--<li><a href="#tabs-3"><?php echo $l->t('Alarm'); ?></a></li>
  6. <li><a href="#tabs-4"><?php echo $l->t('Attendees'); ?></a></li>-->
  7. </ul>
  8. <div id="tabs-1">
  9. <table width="100%">
  10. <tr>
  11. <th width="75px"><?php echo $l->t("Title");?>:</th>
  12. <td>
  13. <?php echo isset($_['title']) ? htmlspecialchars($_['title']) : '' ?>
  14. </td>
  15. </tr>
  16. </table>
  17. <table width="100%">
  18. <tr>
  19. <th width="75px"><?php echo $l->t("Category");?>:</th>
  20. <td>
  21. <?php
  22. if(count($_['categories']) == 0){
  23. echo $l->t('No categories selected');
  24. }else{
  25. echo '<select id="category" name="categories[]" multiple="multiple" title="' . $l->t("Select category") . '">';
  26. echo OCP\html_select_options($_['categories'], $_['categories'], array('combine'=>true));
  27. echo '</select>';
  28. }
  29. ?>
  30. </td>
  31. <th width="75px">&nbsp;&nbsp;&nbsp;<?php echo $l->t("Calendar");?>:</th>
  32. <td>
  33. <select name="calendar" disabled="disabled">
  34. <option>
  35. <?php
  36. $calendar = OC_Calendar_App::getCalendar($_['calendar']);
  37. echo $calendar['displayname'] . ' ' . $l->t('of') . ' ' . $calendar['userid'];
  38. ?>
  39. </option>
  40. </select>
  41. </td>
  42. <th width="75px">&nbsp;</th>
  43. <td>
  44. <input type="hidden" name="calendar" value="<?php echo $_['calendar_options'][0]['id'] ?>">
  45. </td>
  46. </tr>
  47. </table>
  48. <hr>
  49. <table width="100%">
  50. <tr>
  51. <th width="75px"></th>
  52. <td>
  53. <input onclick="Calendar.UI.lockTime();" type="checkbox"<?php if($_['allday']){echo 'checked="checked"';} ?> id="allday_checkbox" name="allday" disabled="disabled">
  54. <?php echo $l->t("All Day Event");?>
  55. </td>
  56. </tr>
  57. <tr>
  58. <th width="75px"><?php echo $l->t("From");?>:</th>
  59. <td>
  60. <?php echo $_['startdate'];?>
  61. &nbsp;&nbsp; <?php echo (!$_['allday'])?$l->t('at'):''; ?> &nbsp;&nbsp;
  62. <?php echo $_['starttime'];?>
  63. </td>
  64. </tr>
  65. <tr>
  66. <th width="75px"><?php echo $l->t("To");?>:</th>
  67. <td>
  68. <?php echo $_['enddate'];?>
  69. &nbsp;&nbsp; <?php echo (!$_['allday'])?$l->t('at'):''; ?> &nbsp;&nbsp;
  70. <?php echo $_['endtime'];?>
  71. </td>
  72. </tr>
  73. </table>
  74. <input type="button" class="submit" value="<?php echo $l->t("Advanced options"); ?>" onclick="Calendar.UI.showadvancedoptions();" id="advanced_options_button">
  75. <div id="advanced_options" style="display: none;">
  76. <hr>
  77. <table>
  78. <tr>
  79. <th width="85px"><?php echo $l->t("Location");?>:</th>
  80. <td>
  81. <?php echo isset($_['location']) ? htmlspecialchars($_['location']) : '' ?>
  82. </td>
  83. </tr>
  84. </table>
  85. <table>
  86. <tr>
  87. <th width="85px" style="vertical-align: top;"><?php echo $l->t("Description");?>:</th>
  88. <td>
  89. <?php echo isset($_['description']) ? htmlspecialchars($_['description']) : '' ?></textarea>
  90. </tr>
  91. </table>
  92. </div>
  93. </div>
  94. <div id="tabs-2">
  95. <table style="width:100%">
  96. <tr>
  97. <th width="75px"><?php echo $l->t("Repeat");?>:</th>
  98. <td>
  99. <select id="repeat" name="repeat">
  100. <?php
  101. echo OCP\html_select_options(array($_['repeat_options'][$_['repeat']]), $_['repeat']);
  102. ?>
  103. </select></td>
  104. <td><input type="button" style="float:right;" class="submit" value="<?php echo $l->t("Advanced"); ?>" onclick="Calendar.UI.showadvancedoptionsforrepeating();" id="advanced_options_button"></td>
  105. </tr>
  106. </table>
  107. <div id="advanced_options_repeating" style="display:none;">
  108. <table style="width:100%">
  109. <tr id="advanced_month" style="display:none;">
  110. <th width="75px"></th>
  111. <td>
  112. <select id="advanced_month_select" name="advanced_month_select">
  113. <?php
  114. echo OCP\html_select_options(array($_['repeat_month_options'][$_['repeat_month']]), $_['repeat_month']);
  115. ?>
  116. </select>
  117. </td>
  118. </tr>
  119. </table>
  120. <table style="width:100%">
  121. <tr id="advanced_year" style="display:none;">
  122. <th width="75px"></th>
  123. <td>
  124. <select id="advanced_year_select" name="advanced_year_select">
  125. <?php
  126. echo OCP\html_select_options(array($_['repeat_year_options'][$_['repeat_year']]), $_['repeat_year']);
  127. ?>
  128. </select>
  129. </td>
  130. </tr>
  131. </table>
  132. <table style="width:100%">
  133. <tr id="advanced_weekofmonth" style="display:none;">
  134. <th width="75px"></th>
  135. <td id="weekofmonthcheckbox">
  136. <select id="weekofmonthoptions" name="weekofmonthoptions">
  137. <?php
  138. echo OCP\html_select_options(array($_['repeat_weekofmonth_options'][$_['repeat_weekofmonth']]), $_['repeat_weekofmonth']);
  139. ?>
  140. </select>
  141. </td>
  142. </tr>
  143. </table>
  144. <table style="width:100%">
  145. <tr id="advanced_weekday" style="display:none;">
  146. <th width="75px"></th>
  147. <td id="weeklycheckbox">
  148. <select id="weeklyoptions" name="weeklyoptions[]" multiple="multiple" style="width: 150px;" title="<?php echo $l->t("Select weekdays") ?>">
  149. <?php
  150. if (!isset($_['weekdays'])) {$_['weekdays'] = array();}
  151. echo OCP\html_select_options(array($_['repeat_weekly_options'][$_['repeat_weekdays']]), $_['repeat_weekdays'], array('combine'=>true));
  152. ?>
  153. </select>
  154. </td>
  155. </tr>
  156. </table>
  157. <table style="width:100%">
  158. <tr id="advanced_byyearday" style="display:none;">
  159. <th width="75px"></th>
  160. <td id="byyeardaycheckbox">
  161. <select id="byyearday" name="byyearday[]" multiple="multiple" title="<?php echo $l->t("Select days") ?>">
  162. <?php
  163. if (!isset($_['repeat_byyearday'])) {$_['repeat_byyearday'] = array();}
  164. echo OCP\html_select_options(array($_['repeat_byyearday_options'][$_['repeat_byyearday']]), $_['repeat_byyearday'], array('combine'=>true));
  165. ?>
  166. </select><?php echo $l->t('and the events day of year.'); ?>
  167. </td>
  168. </tr>
  169. </table>
  170. <table style="width:100%">
  171. <tr id="advanced_bymonthday" style="display:none;">
  172. <th width="75px"></th>
  173. <td id="bymonthdaycheckbox">
  174. <select id="bymonthday" name="bymonthday[]" multiple="multiple" title="<?php echo $l->t("Select days") ?>">
  175. <?php
  176. if (!isset($_['repeat_bymonthday'])) {$_['repeat_bymonthday'] = array();}
  177. echo OCP\html_select_options(array($_['repeat_bymonthday_options'][$_['repeat_bymonthday']]), $_['repeat_bymonthday'], array('combine'=>true));
  178. ?>
  179. </select><?php echo $l->t('and the events day of month.'); ?>
  180. </td>
  181. </tr>
  182. </table>
  183. <table style="width:100%">
  184. <tr id="advanced_bymonth" style="display:none;">
  185. <th width="75px"></th>
  186. <td id="bymonthcheckbox">
  187. <select id="bymonth" name="bymonth[]" multiple="multiple" title="<?php echo $l->t("Select months") ?>">
  188. <?php
  189. if (!isset($_['repeat_bymonth'])) {$_['repeat_bymonth'] = array();}
  190. echo OCP\html_select_options(array($_['repeat_bymonth_options'][$_['repeat_bymonth']]), $_['repeat_bymonth'], array('combine'=>true));
  191. ?>
  192. </select>
  193. </td>
  194. </tr>
  195. </table>
  196. <table style="width:100%">
  197. <tr id="advanced_byweekno" style="display:none;">
  198. <th width="75px"></th>
  199. <td id="bymonthcheckbox">
  200. <select id="byweekno" name="byweekno[]" multiple="multiple" title="<?php echo $l->t("Select weeks") ?>">
  201. <?php
  202. if (!isset($_['repeat_byweekno'])) {$_['repeat_byweekno'] = array();}
  203. echo OCP\html_select_options(array($_['repeat_byweekno_options'][$_['repeat_byweekno']]), $_['repeat_byweekno'], array('combine'=>true));
  204. ?>
  205. </select><?php echo $l->t('and the events week of year.'); ?>
  206. </td>
  207. </tr>
  208. </table>
  209. <table style="width:100%">
  210. <tr>
  211. <th width="75px"><?php echo $l->t('Interval'); ?>:</th>
  212. <td>
  213. <?php echo isset($_['repeat_interval']) ? $_['repeat_interval'] : '1'; ?>
  214. </td>
  215. </tr>
  216. <tr>
  217. <th width="75px"><?php echo $l->t('End'); ?>:</th>
  218. <td>
  219. <select id="end" name="end">
  220. <?php
  221. if($_['repeat_end'] == '') $_['repeat_end'] = 'never';
  222. echo OCP\html_select_options(array($_['repeat_end_options'][$_['repeat_end']]), $_['repeat_end']);
  223. ?>
  224. </select>
  225. </td>
  226. </tr>
  227. <tr>
  228. <th></th>
  229. <td id="byoccurrences" style="display:none;">
  230. <?php echo $_['repeat_count'] . ' ' . $l->t('occurrences'); ?>
  231. </td>
  232. </tr>
  233. <tr>
  234. <th></th>
  235. <td id="bydate" style="display:none;">
  236. <?php echo $_['repeat_date']; ?>
  237. </td>
  238. </tr>
  239. </table>
  240. </div>
  241. </div>
  242. <!--<div id="tabs-3">//Alarm</div>
  243. <div id="tabs-4">//Attendees</div>-->
  244. </div>