123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- <?php
- global $myUser, $conf;
- User::check_access('planning','read');
- require_once(__DIR__.SLASH.'Planning.class.php');
- require_once(__DIR__.SLASH.'PlanningEventType.class.php');
- ?>
- <div class="planning-page"
- data-planning-share="<?php echo $conf->get('planning_allow_share')==true ? 1:0; ?>"
- data-event-editable="<?php echo $conf->get('planning_allow_event_edit')==true ? 1:0; ?>"
- >
- <div class="row " >
- <!-- search results -->
- <div class="col-md-12"><div class="loaderStd pageLoader hidden" id="loader-1"></div></div>
- <div class='planning-title' data-id='1'></div>
- <div class="col-xl-12 clo-md-12 planning-view">
- <div id='planning-calendars'>
- <div id="planning-datepicker"></div>
- <?php if($myUser->can('planning', 'edit')): ?>
- <div class="btn btn-primary mt-3 w-100" onclick="planning_edit();"><i class="far fa-calendar-plus"></i> Ajouter un agenda</div>
- <?php endif; ?>
- <hr>
- <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>
- <ul id="plannings" class="planning-list no-select">
- <li class="hidden" data-id="{{id}}" data-default="{{default}}">
- <label>
- <div class="planning-box" style="background-color:{{color}}"><input type="checkbox" onclick="planning_select()" data-type="checkbox"></div>
- <div class="d-inline-block">
- <div>{{label}}</div>
- <div class="planning-owner text-muted">{{ownerName}}</div>
- </div>
- </label>
- <div class="planning-option-btn">
- <?php if($myUser->can('planning', 'edit')): ?>
- <i onclick="planning_edit(this)" title="Configurer" class="fas fa-cog"></i>
- <?php endif; ?>
- <?php if($myUser->can('planning', 'delete')): ?>
- {{#editable}}
- <i onclick="planning_delete(this)" title="Supprimer" class="far fa-trash-alt"></i>
- {{/editable}}
- <?php endif; ?>
- </div>
- </li>
- </ul>
- <div class="shared-plannings-block">
- <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>
- <ul id="shared-plannings" class="planning-list"></ul>
- </div>
- </div>
- <div id='planning' data-start-hour="<?php echo $conf->get('planning_day_start'); ?>" data-end-hour="<?php echo $conf->get('planning_day_end'); ?>"></div>
- </div>
- </div>
- <div id="planning-event-panel" class="planning-event-panel fold">
- <div id="planning-event-form" data-planning="">
- <h1>Édition événement planning</h1>
- <div class="row">
- <div class="input-group col-md-5">
- <div class="input-group-prepend">
- <span class="input-group-text">Type</span>
- </div>
- <div class="input-group-append">
- <div id="planning-event-type" class="btn-group">
- <button type="button" class="btn btn-light dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <i class="fas fa-tag"></i> Rendez vous
- </button>
- <div class="dropdown-menu">
- <?php foreach(PlanningEventType::getAll(array(),array('sort')) as $type): ?>
- <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>
- <?php endforeach; ?>
- </div>
- </div>
- </div>
- </div>
- <div class="input-group col-md-7">
- <div class="input-group-prepend">
- <span class="input-group-text">Agenda</span>
- </div>
- <select id="event-planning" class="form-control"></select>
- </div>
- </div>
- <div class="row">
- <div class="input-group col-md-12">
- <div class="input-group-prepend">
- <span class="input-group-text">Libellé</span>
- </div>
- <input type="text" id="label" class="form-control">
- </div>
- </div>
- <!-- start / end -->
- <div class="row">
- <div class="input-group col-md-6">
- <div class="input-group-prepend">
- <span class="input-group-text">Du</span>
- </div>
- <input type="text" id="startDate" class="form-control" data-type="date" value="" maxlength="10" placeholder="jj/mm/aaaa" pattern="[0-9/]{10}">
- <div class="input-group-prepend input-group-append">
- <div class="input-group-text p-1">à</div>
- </div>
- <input type="number" id="startHour" min="0" max="23" class="form-control col-sm-2" value="13">
- <div class="input-group-prepend input-group-append">
- <span class="input-group-text p-1"> : </span>
- </div>
- <input type="number" id="startMinut" min="0" max="59" class="form-control col-sm-2" value="00" >
- </div>
- <div class="input-group col-md-6">
- <div class="input-group-prepend">
- <div class="input-group-text">Au</div>
- </div>
- <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">
- <div class="input-group-prepend input-group-append">
- <div class="input-group-text p-1">à</div>
- </div>
- <input type="number" id="endHour" min="0" max="23" class="form-control col-sm-2" value="18">
- <div class="input-group-prepend input-group-append">
- <span class="input-group-text p-1"> : </span>
- </div>
- <input type="number" id="endMinut" min="0" max="59" class="form-control col-sm-2" value="00">
- </div>
- </div>
- <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>
- <div id="event-advanced" class="row hidden mt-2">
- <div class="col-md-12">
- <div class="row">
- <div class="col-md-12">
- <label>Commentaire</label>
- <textarea id="description" class="form-control w-100"></textarea>
- </div>
- </div>
- <div class="row mt-2">
- <div class="input-group col-md-12">
- <div class="input-group-prepend">
- <span class="input-group-text">Lieu</span>
- </div>
- <div class="input-group-prepend">
- <input type="text" data-type="location" id="street" placeholder="Rue" class="form-control">
- </div>
- <input type="text" id="zip" placeholder="Code postal" class="form-control">
- <input type="text" id="city" placeholder="Ville" class="form-control">
- </div>
- </div>
- <!-- notifications -->
- <div class="row mt-2">
- <div class="input-group col-md-12">
- <div class="input-group-prepend">
- <span class="input-group-text"><i class="far fa-bell mr-1"></i> Rappel</span>
- </div>
-
- <input type="number" id="notificationNumber" class="form-control">
- <select type="text" id="notificationUnity" class="form-control">
- <option value="minut">Minute</option>
- <option value="hour">Heure</option>
- <option value="day">Jour</option>
- </select>
- <div class="input-group-prepend">
- <span class="input-group-text"> Avant l'évenènement.</span>
- </div>
- </div>
- </div>
- <!-- récurrence a terminer coté fullcalendar / dav et a decommenter-->
- <!-- <div class="row mt-2">
- <div class="col-md-12">
- <div class="input-group">
- <div class="input-group-prepend">
- <span class="input-group-text"><i class="fas fa-redo-alt mr-1"></i> Répéter l'évenement </span>
- </div>
- <select type="text" onchange="planning_event_repeat_change();" id="event-repeat-type" class="form-control">
- <option value="never">Jamais</option>
- <option value="daily">Quotidiennement</option>
- <option value="weekly">Hebdomadairement</option>
- <option value="monthly">Mensuelement</option>
- <option value="yearly">Annuellement</option>
- </select>
-
- </div>
- </div>
- </div> -->
- <div id="event-repeat-options" class="hidden">
- <div class="row mt-2 hidden justify-content-md-center" data-type-form="daily">
- <div class="col-md-3 form-inline">
- <label><input type="radio" data-value="allDays" checked="checked" name="dailyRepeatFrequency" class="mr-1"> Tous les jours</label>
- </div>
- <div class="col-md-2 text-muted pt-2 font-weight-bold text-uppercase">Ou</div>
- <div class="col-md-4 input-group">
- <div class="input-group-prepend">
- <span class="input-group-text"><label class="m-0"><input name="dailyRepeatFrequency" data-value="selectDays" type="radio"> Tous les </label></span>
- </div>
- <input type="text" id="event-repeat-daily-number" class="form-control">
- <div class="input-group-append">
- <span class="input-group-text"> Jours </span>
- </div>
- </div>
- </div>
- <div class="row mt-2 hidden justify-content-md-center" data-type-form="weekly">
- <div class="col-md-12 form-inline">
- <label>Jour de la semaine</label>
- <label class="m-1"><input data-type="checkbox" type="checkbox" data-value="1" checked="checked"> Lundi </label>
- <label class="m-1"><input data-type="checkbox" type="checkbox" data-value="2" checked="checked"> Mardi </label>
- <label class="m-1"><input data-type="checkbox" type="checkbox" data-value="3" checked="checked"> Mercredi </label>
- <label class="m-1"><input data-type="checkbox" type="checkbox" data-value="4" checked="checked"> Jeudi </label>
- <label class="m-1"><input data-type="checkbox" type="checkbox" data-value="5" checked="checked"> Vendredi </label>
- <label class="m-1"><input data-type="checkbox" type="checkbox" data-value="6"> Samedi </label>
- <label class="m-1"><input data-type="checkbox" type="checkbox" data-value="7"> Dimanche </label>
- </div>
- </div>
- <div class="row mt-2 hidden justify-content-md-center" data-type-form="monthly">
- <div class="col-md-6 input-group">
- <div class="input-group-prepend">
- <span class="input-group-text">Le</span>
- </div>
- <input type="number" id="event-repeat-monthly-number" placeholder="1,2,3,4..." class="form-control">
- <select class="form-control" id="event-repeat-monthly-day">
- <option value="1">Lundi</option>
- <option value="2">Mardi</option>
- <option value="3">Mercredi</option>
- <option value="4">Jeudi</option>
- <option value="5">Vendredi</option>
- <option value="6">Samedi</option>
- <option value="7">Dimanche</option>
- </select>
- <div class="input-group-append">
- <span class="input-group-text">du mois</span>
- </div>
- </div>
- </div>
- <div class="row mt-2 hidden justify-content-md-center" data-type-form="yearly">
- <div class="col-md-6 input-group">
- <div class="input-group-prepend">
- <span class="input-group-text">Le</span>
- </div>
- <input type="number" placeholder="1,2,3,4..." id="event-repeat-yearly-number" class="form-control">
- <select class="form-control" id="event-repeat-yearly-month">
- <option value="1">Janvier</option>
- <option value="2">Février</option>
- <option value="3">Mars</option>
- <option value="4">Avril</option>
- <option value="5">Mai</option>
- <option value="6">Juin</option>
- <option value="7">Juillet</option>
- <option value="8">Aout</option>
- <option value="9">Septembre</option>
- <option value="10">Octobre</option>
- <option value="11">Novembre</option>
- <option value="12">Décembre</option>
- </select>
- </div>
- </div>
- <div class="row mt-2">
- <div class="col-md-4 input-group">
- <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>
- </div>
- <div class="col-md-4 input-group">
- <div class="input-group-prepend">
- <span class="input-group-text"> <label class="m-0"><input data-value="until" name="repeatEndType" type="radio"> Jusqu'au </label></span>
- </div>
- <input type="text" id="event-repeat-until" data-type="date" class="form-control">
- </div>
- <div class="col-md-4 input-group">
- <div class="input-group-prepend">
- <span class="input-group-text"> <label class="m-0"><input data-value="occurences" name="repeatEndType" type="radio"> Répéter </label></span>
- </div>
- <input type="number" id="event-repeat-occurences" class="form-control">
- <div class="input-group-prepend">
- <span class="input-group-text"> fois </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <hr class="mb-0">
- <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>
- </div>
- </div>
- <!-- Edition de calendrier -->
- <div class="modal fade" id="planningModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
- <div class="modal-dialog modal-lg" role="document">
- <div class="modal-content">
- </div>
- </div>
- </div>
- </div>
|