page.list.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <?php
  2. global $myUser, $conf;
  3. User::check_access('planning','read');
  4. require_once(__DIR__.SLASH.'Planning.class.php');
  5. require_once(__DIR__.SLASH.'PlanningEventType.class.php');
  6. ?>
  7. <div class="planning-page"
  8. data-planning-share="<?php echo $conf->get('planning_allow_share')==true ? 1:0; ?>"
  9. data-event-editable="<?php echo $conf->get('planning_allow_event_edit')==true ? 1:0; ?>"
  10. >
  11. <div class="row " >
  12. <!-- search results -->
  13. <div class="col-md-12"><div class="loaderStd pageLoader hidden" id="loader-1"></div></div>
  14. <div class='planning-title' data-id='1'></div>
  15. <div class="col-xl-12 clo-md-12 planning-view">
  16. <div id='planning-calendars'>
  17. <div id="planning-datepicker"></div>
  18. <?php if($myUser->can('planning', 'edit')): ?>
  19. <div class="btn btn-primary mt-3 w-100" onclick="planning_edit();"><i class="far fa-calendar-plus"></i> Ajouter un agenda</div>
  20. <?php endif; ?>
  21. <hr>
  22. <h4 class="pointer no-select" onclick="$('#plannings').slideToggle(150); $(this).find('>i').toggleClass('fa-angle-right')">Mes agendas <i class="right pointer fas fa-angle-down"></i></h4>
  23. <ul id="plannings" class="planning-list no-select">
  24. <li class="hidden" data-id="{{id}}" data-default="{{default}}">
  25. <label>
  26. <div class="planning-box" style="background-color:{{color}}"><input type="checkbox" onclick="planning_select()" data-type="checkbox"></div>
  27. <div class="d-inline-block">
  28. <div>{{label}}</div>
  29. <div class="planning-owner text-muted">{{ownerName}}</div>
  30. </div>
  31. </label>
  32. <div class="planning-option-btn">
  33. <?php if($myUser->can('planning', 'edit')): ?>
  34. <i onclick="planning_edit(this)" title="Configurer" class="fas fa-cog"></i>
  35. <?php endif; ?>
  36. <?php if($myUser->can('planning', 'delete')): ?>
  37. {{#editable}}
  38. <i onclick="planning_delete(this)" title="Supprimer" class="far fa-trash-alt"></i>
  39. {{/editable}}
  40. <?php endif; ?>
  41. </div>
  42. </li>
  43. </ul>
  44. <div class="shared-plannings-block">
  45. <h4 class="pointer no-select" onclick="$('#shared-plannings').slideToggle(150); $(this).find('>i').toggleClass('fa-angle-right')">Agendas partagés <i class="right pointer fas fa-angle-down"></i></h4>
  46. <ul id="shared-plannings" class="planning-list"></ul>
  47. </div>
  48. </div>
  49. <div id='planning' data-start-hour="<?php echo $conf->get('planning_day_start'); ?>" data-end-hour="<?php echo $conf->get('planning_day_end'); ?>"></div>
  50. </div>
  51. </div>
  52. <div id="planning-event-panel" class="planning-event-panel fold">
  53. <div id="planning-event-form" data-planning="">
  54. <h1>Édition événement planning</h1>
  55. <div class="row">
  56. <div class="input-group col-md-5">
  57. <div class="input-group-prepend">
  58. <span class="input-group-text">Type</span>
  59. </div>
  60. <div class="input-group-append">
  61. <div id="planning-event-type" class="btn-group">
  62. <button type="button" class="btn btn-light dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  63. <i class="fas fa-tag"></i> Rendez vous
  64. </button>
  65. <div class="dropdown-menu">
  66. <?php foreach(PlanningEventType::getAll(array(),array('sort')) as $type): ?>
  67. <a class="dropdown-item" data-color="<?php echo $type->color; ?>" data-id="<?php echo $type->id; ?>" style="color:<?php echo $type->color; ?>;" href="#"><i class="<?php echo $type->icon; ?>"></i> <?php echo $type->label; ?></a>
  68. <?php endforeach; ?>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="input-group col-md-7">
  74. <div class="input-group-prepend">
  75. <span class="input-group-text">Agenda</span>
  76. </div>
  77. <select id="event-planning" class="form-control"></select>
  78. </div>
  79. </div>
  80. <div class="row">
  81. <div class="input-group col-md-12">
  82. <div class="input-group-prepend">
  83. <span class="input-group-text">Libellé</span>
  84. </div>
  85. <input type="text" id="label" class="form-control">
  86. </div>
  87. </div>
  88. <!-- start / end -->
  89. <div class="row">
  90. <div class="input-group col-md-6">
  91. <div class="input-group-prepend">
  92. <span class="input-group-text">Du</span>
  93. </div>
  94. <input type="text" id="startDate" class="form-control" data-type="date" value="" maxlength="10" placeholder="jj/mm/aaaa" pattern="[0-9/]{10}">
  95. <div class="input-group-prepend input-group-append">
  96. <div class="input-group-text p-1">à</div>
  97. </div>
  98. <input type="number" id="startHour" min="0" max="23" class="form-control col-sm-2" value="13">
  99. <div class="input-group-prepend input-group-append">
  100. <span class="input-group-text p-1"> : </span>
  101. </div>
  102. <input type="number" id="startMinut" min="0" max="59" class="form-control col-sm-2" value="00" >
  103. </div>
  104. <div class="input-group col-md-6">
  105. <div class="input-group-prepend">
  106. <div class="input-group-text">Au</div>
  107. </div>
  108. <input type="text" id="endDate" class="form-control" data-type="date" maxlength="10" placeholder="jj/mm/aaaa" pattern="[0-9/]{10}" title="Format jj/mm/aaaa">
  109. <div class="input-group-prepend input-group-append">
  110. <div class="input-group-text p-1">à</div>
  111. </div>
  112. <input type="number" id="endHour" min="0" max="23" class="form-control col-sm-2" value="18">
  113. <div class="input-group-prepend input-group-append">
  114. <span class="input-group-text p-1"> : </span>
  115. </div>
  116. <input type="number" id="endMinut" min="0" max="59" class="form-control col-sm-2" value="00">
  117. </div>
  118. </div>
  119. <div onclick="$('#event-advanced').toggleClass('hidden')" class="btn btn-link pl-0 mt-3 text-uppercase"><i class="fas fa-plus"></i> Plus d'options</div>
  120. <div id="event-advanced" class="row hidden mt-2">
  121. <div class="col-md-12">
  122. <div class="row">
  123. <div class="col-md-12">
  124. <label>Commentaire</label>
  125. <textarea id="description" class="form-control w-100"></textarea>
  126. </div>
  127. </div>
  128. <div class="row mt-2">
  129. <div class="input-group col-md-12">
  130. <div class="input-group-prepend">
  131. <span class="input-group-text">Lieu</span>
  132. </div>
  133. <div class="input-group-prepend">
  134. <input type="text" data-type="location" id="street" placeholder="Rue" class="form-control">
  135. </div>
  136. <input type="text" id="zip" placeholder="Code postal" class="form-control">
  137. <input type="text" id="city" placeholder="Ville" class="form-control">
  138. </div>
  139. </div>
  140. <!-- notifications -->
  141. <div class="row mt-2">
  142. <div class="input-group col-md-12">
  143. <div class="input-group-prepend">
  144. <span class="input-group-text"><i class="far fa-bell mr-1"></i> Rappel</span>
  145. </div>
  146. <input type="number" id="notificationNumber" class="form-control">
  147. <select type="text" id="notificationUnity" class="form-control">
  148. <option value="minut">Minute</option>
  149. <option value="hour">Heure</option>
  150. <option value="day">Jour</option>
  151. </select>
  152. <div class="input-group-prepend">
  153. <span class="input-group-text"> Avant l'évenènement.</span>
  154. </div>
  155. </div>
  156. </div>
  157. <!-- récurrence a terminer coté fullcalendar / dav et a decommenter-->
  158. <!-- <div class="row mt-2">
  159. <div class="col-md-12">
  160. <div class="input-group">
  161. <div class="input-group-prepend">
  162. <span class="input-group-text"><i class="fas fa-redo-alt mr-1"></i> Répéter l'évenement </span>
  163. </div>
  164. <select type="text" onchange="planning_event_repeat_change();" id="event-repeat-type" class="form-control">
  165. <option value="never">Jamais</option>
  166. <option value="daily">Quotidiennement</option>
  167. <option value="weekly">Hebdomadairement</option>
  168. <option value="monthly">Mensuelement</option>
  169. <option value="yearly">Annuellement</option>
  170. </select>
  171. </div>
  172. </div>
  173. </div> -->
  174. <div id="event-repeat-options" class="hidden">
  175. <div class="row mt-2 hidden justify-content-md-center" data-type-form="daily">
  176. <div class="col-md-3 form-inline">
  177. <label><input type="radio" data-value="allDays" checked="checked" name="dailyRepeatFrequency" class="mr-1"> Tous les jours</label>
  178. </div>
  179. <div class="col-md-2 text-muted pt-2 font-weight-bold text-uppercase">Ou</div>
  180. <div class="col-md-4 input-group">
  181. <div class="input-group-prepend">
  182. <span class="input-group-text"><label class="m-0"><input name="dailyRepeatFrequency" data-value="selectDays" type="radio"> Tous les </label></span>
  183. </div>
  184. <input type="text" id="event-repeat-daily-number" class="form-control">
  185. <div class="input-group-append">
  186. <span class="input-group-text"> Jours </span>
  187. </div>
  188. </div>
  189. </div>
  190. <div class="row mt-2 hidden justify-content-md-center" data-type-form="weekly">
  191. <div class="col-md-12 form-inline">
  192. <label>Jour de la semaine</label>
  193. <label class="m-1"><input data-type="checkbox" type="checkbox" data-value="1" checked="checked"> Lundi </label>
  194. <label class="m-1"><input data-type="checkbox" type="checkbox" data-value="2" checked="checked"> Mardi </label>
  195. <label class="m-1"><input data-type="checkbox" type="checkbox" data-value="3" checked="checked"> Mercredi </label>
  196. <label class="m-1"><input data-type="checkbox" type="checkbox" data-value="4" checked="checked"> Jeudi </label>
  197. <label class="m-1"><input data-type="checkbox" type="checkbox" data-value="5" checked="checked"> Vendredi </label>
  198. <label class="m-1"><input data-type="checkbox" type="checkbox" data-value="6"> Samedi </label>
  199. <label class="m-1"><input data-type="checkbox" type="checkbox" data-value="7"> Dimanche </label>
  200. </div>
  201. </div>
  202. <div class="row mt-2 hidden justify-content-md-center" data-type-form="monthly">
  203. <div class="col-md-6 input-group">
  204. <div class="input-group-prepend">
  205. <span class="input-group-text">Le</span>
  206. </div>
  207. <input type="number" id="event-repeat-monthly-number" placeholder="1,2,3,4..." class="form-control">
  208. <select class="form-control" id="event-repeat-monthly-day">
  209. <option value="1">Lundi</option>
  210. <option value="2">Mardi</option>
  211. <option value="3">Mercredi</option>
  212. <option value="4">Jeudi</option>
  213. <option value="5">Vendredi</option>
  214. <option value="6">Samedi</option>
  215. <option value="7">Dimanche</option>
  216. </select>
  217. <div class="input-group-append">
  218. <span class="input-group-text">du mois</span>
  219. </div>
  220. </div>
  221. </div>
  222. <div class="row mt-2 hidden justify-content-md-center" data-type-form="yearly">
  223. <div class="col-md-6 input-group">
  224. <div class="input-group-prepend">
  225. <span class="input-group-text">Le</span>
  226. </div>
  227. <input type="number" placeholder="1,2,3,4..." id="event-repeat-yearly-number" class="form-control">
  228. <select class="form-control" id="event-repeat-yearly-month">
  229. <option value="1">Janvier</option>
  230. <option value="2">Février</option>
  231. <option value="3">Mars</option>
  232. <option value="4">Avril</option>
  233. <option value="5">Mai</option>
  234. <option value="6">Juin</option>
  235. <option value="7">Juillet</option>
  236. <option value="8">Aout</option>
  237. <option value="9">Septembre</option>
  238. <option value="10">Octobre</option>
  239. <option value="11">Novembre</option>
  240. <option value="12">Décembre</option>
  241. </select>
  242. </div>
  243. </div>
  244. <div class="row mt-2">
  245. <div class="col-md-4 input-group">
  246. <span class="input-group-text w-100"><label class="m-0 w-100"><input data-value="allTime" checked="checked" name="repeatEndType" type="radio"> Tout le temps </label></span>
  247. </div>
  248. <div class="col-md-4 input-group">
  249. <div class="input-group-prepend">
  250. <span class="input-group-text"> <label class="m-0"><input data-value="until" name="repeatEndType" type="radio"> Jusqu'au </label></span>
  251. </div>
  252. <input type="text" id="event-repeat-until" data-type="date" class="form-control">
  253. </div>
  254. <div class="col-md-4 input-group">
  255. <div class="input-group-prepend">
  256. <span class="input-group-text"> <label class="m-0"><input data-value="occurences" name="repeatEndType" type="radio"> Répéter </label></span>
  257. </div>
  258. <input type="number" id="event-repeat-occurences" class="form-control">
  259. <div class="input-group-prepend">
  260. <span class="input-group-text"> fois </span>
  261. </div>
  262. </div>
  263. </div>
  264. </div>
  265. </div>
  266. </div>
  267. <hr class="mb-0">
  268. <div class="btn btn-link ml-0 pl-0 text-uppercase btn-save-event" onclick="planning_event_save()"><i class="fa fa-check"></i> Enregistrer</div>
  269. </div>
  270. </div>
  271. <!-- Edition de calendrier -->
  272. <div class="modal fade" id="planningModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  273. <div class="modal-dialog modal-lg" role="document">
  274. <div class="modal-content">
  275. </div>
  276. </div>
  277. </div>
  278. </div>