<#if list_comments?size gt 3> <@appointmentTabs tab='day' form=appointmentForm context=context>
<@tform class='d-inline-block' name='manage_appointmentdesk' action='jsp/admin/plugins/appointment/modules/desk/ManageAppointmentDesks.jsp' method='get'> <#assign dDay = day?date> <#assign pDay = dDay?long - (1 * 24 * 60 * 60 * 1000)> <@input type='hidden' name='id_form' value='${idForm!1}' /> <@input type='hidden' name='day' value='${pDay?number_to_date}' /> <@input type='hidden' name='context' value='${context}' />
<@tform class='d-inline-block' name='manage_appointmentdesk' action='jsp/admin/plugins/appointment/modules/desk/ManageAppointmentDesks.jsp' method='get' class='hidden-xs'> <#assign nDay = dDay?long + (1 * 24 * 60 * 60 * 1000)> <@input type='hidden' name='id_form' value='${idForm!1}' /> <@input type='hidden' name='day' value='${nDay?number_to_date}' /> <@input type='hidden' name='context' value='${context}' />
<#if day?date?string != .now?date?string > <@tform class='d-inline-block'name='manage_appointmentdesk' action='jsp/admin/plugins/appointment/modules/desk/ManageAppointmentDesks.jsp' method='get'> <#assign dDay = .now> <@input type='hidden' name='id_form' value='${idForm!1}' /> <@input type='hidden' name='day' value='${dDay?date}' /> <@input type='hidden' name='context' value='${context}' /> <@tform type='inline' id='manage_appointmentdesk' name='manage_appointmentdesk' action='jsp/admin/plugins/appointment/modules/desk/ManageAppointmentDesks.jsp' method='get'> <@input type='hidden' name='id_form' value='${idForm!1}' /> <@input type='hidden' name='context' value='${context}' />
<#if list_slot?size gt 0>
<@table id='selectable' class='clearfix' headBody=true> <#-- Check if day selected is less than today, if < 0 the add desk button is not displayed --> <#assign isLteToday = (day?date?long / 86400000)?round - (.now?date?long / 86400000)?round + 1 /> <#if activateEditMode && isLteToday gte 0 > <@button type='button' color='link' params=' data-bs-toggle="modal" data-bs-target="#deskModal"' title='#i18n{appointmentdesk.manage_appointmentdesks.label.addDesk}' hideTitle=[''] > <@iconStack class='fa-1x'> <@icon style='desktop' class='fa-stack-2x' /> <@icon style='plus mt-1' class='fa-stack-1x' /> <#assign x=numb_desk> <#list 1..x as seq > #i18n{module.appointment.desk.label.desk} #i18n{module.appointment.desk.label.deskNo}${seq} #i18n{module.appointment.desk.label.surbooking} <#if permission_add_comment?boolean> <@button id='toggle-add-comment' style='none' color='info mt-2 me-1' title='#i18n{appointment.create_comment.pageTitle}' params='data-bs-toggle="modal" data-bs-target="#commentModal" ' hideTitle=[''] > <@iconStack class='fa-xs'> <@icon prefix='' style='far fa-comment fa-stack-2x' /> <@icon prefix='' style='fas fa-plus fa-stack-1x' /> <#if list_comments?size gt 0> <#list list_comments as comment> <#assign comment_class=''/> <#if ( comment.startingValidityTime?? && comment.startingValidityTime == '00:00' && comment.endingValidityTime?? &&comment.endingValidityTime == '00:00' )> <#assign comment_class=' allday'/> <#compress> <#assign comment_title>${comment.comment?replace('\n', '')?replace('\r', '')?replace('\rn', '')?replace('\'', ''')}

<#if ( comment.startingValidityTime?? && comment.startingValidityTime != '00:00' && comment.endingValidityTime?? &&comment.endingValidityTime != '00:00' )> ${comment.startingValidityTime!}/${comment.endingValidityTime!} ${comment_title!?remove_beginning('

')?remove_ending('

')?replace('\\\\"', '\\"')?replace('\\"', '\"')}

<@tableHeadBodySeparator /> <#assign idx=1> <#list list_slot?sort_by('startingDateTime') as slot> class="first"> ${slot.startingTime!} <#setting datetime_format="iso"> <#list 1..x as seq > slot-open<#else>slot-close" data-start="${slot.startingDateTime!?datetime.iso?string["HHmm"]}" data-end="${slot.endingDateTime!?datetime.iso?string["HHmm"]}" data-marker=".desk-${seq}.slot-${slot.idSlot!}.start-${slot.startingDateTime?datetime.iso?string["ddMM-HHmm"]}" data-slot="{'idSlot':'${slot.idSlot!}','startingDateTime':'${slot.startingDateTime}','endingDateTime':'${slot.endingDateTime}','maxCapacity':'${slot.maxCapacity}','isOpen':'<#if slot.isOpen && seq lte slot.maxCapacity >true<#else>false','isSpecific':'${slot.isSpecific?c}','idForm':'${slot.idForm!1}'}" > <#assign idx=0>
<#else> <@row> <@columns offsetSm=3 sm=4> <@alert class='' color='warning'>

#i18n{module.appointment.desk.message.noDataAvailable}

<@modal id='qModal'> <@modalBody>

#i18n{module.appointment.desk.message.labelLoading}

<@modal id='slottoggle' size='sm'> <@modalBody>
<@radioButton id='doOpenSlot' name='doManageSlot' value='1' labelFor='doOpenSlot' labelKey='#i18n{module.appointment.desk.label.open}' /> <@radioButton id='doCloseSlot' name='doManageSlot' value='0' labelFor='doCloseSlot' labelKey='#i18n{module.appointment.desk.label.close}' />
<@button id='saveSlotState' color='primary' title='#i18n{module.appointment.desk.label.save}' /> <@button id='cancelSlotState' color='secondary' title='#i18n{module.appointment.desk.label.cancel}' params='data-bs-dismiss="modal" aria-label="#i18n{module.appointment.desk.label.cancel}"' />
<#if activateEditMode> <@modal id='deskModal'> <@modalHeader modalTitle='#i18n{module.appointment.desk.increment.defaultTitle}' /> <@modalBody>

#i18n{module.appointment.desk.increment.defaultTitle}

<@tform id='form-validate' action='jsp/admin/plugins/appointment/modules/desk/ManageAppointmentDesks.jsp' params='enctype="multipart/form-data"'> <@input type='hidden' name='action' value='incrementMaxCapacity' /> <@input type='hidden' name='id_form' value='${idForm!}' /> <@input type='hidden' id='day' name='day' value='${day!}' /> <@formGroup labelFor='incrementing_value' labelKey='#i18n{module.appointment.desk.increment.labelIncrementingValue}' helpKey='${formGroupHelpKey!}' mandatory=true> <@input type='number' name='incrementing_value' id='incrementing_value' value='1' maxlength=2 params='onkeypress="return validateQty(event);"' min=1 max=10 /> <@formGroup labelFor='type' labelKey='#i18n{module.appointment.desk.increment.labelType}'> <@select name='type' id='type' items=list_types default_value='' /> <@formGroup labelFor='startingDate' labelKey='#i18n{module.appointment.desk.increment.labelStartingDate}'> <@inputGroup> <@input type='text' name='starting_date' id='startingDate' value="${day!}" /> <@inputGroupItem type='text'> <@icon style='calendar' /> <@formGroup labelFor='startingTime' labelKey='#i18n{module.appointment.desk.increment.labelStartingTime}'> <@inputGroup> <@input type='text' name='starting_time' id='startingTime' value='' /> <@inputGroupItem type='text'> <@icon style='clock' /> <@formGroup labelFor='endingDate' labelKey='#i18n{module.appointment.desk.increment.labelEndingDate}'> <@inputGroup> <@input type='text' name='ending_date' id='endingDate' value="${day!}" /> <@inputGroupItem type='text'> <@icon style='calendar' /> <@formGroup labelFor='endingTime' labelKey='#i18n{module.appointment.desk.increment.labelEndingTime}'> <@inputGroup> <@input type='text' name='ending_time' id='endingTime' value='' /> <@inputGroupItem type='text'> <@icon style='clock' /> <@formGroup> <@button type='submit' name='save' id='save' buttonIcon='check' title='#i18n{module.appointment.desk.increment.labelValidate}' /> <@getCommentModal 'commentModal' '#i18n{appointment.create_comment.pageTitle}' "comment" "startingValidityDate" "endingValidityDate" "idStartingTime" "idEndingTime" "doAddComment" idForm mailing_list locale "appointmentdesk" '${context!}-${day!}' /> <@getCommentModal 'modify-comment' '#i18n{appointment.modify_comment.pageTitle}' "comment" "modifyStartingValidityDate" "modifyEndingValidityDate" "idModifyStartingTime" "idModifyEndingTime" "doModifyComment" idForm mailing_list locale "appointmentdesk" '${context!}-${day!}' /> <#if activateEditMode> <#include "/admin/util/editor/editor.html" /> <@initEditor type='comment' />