@row class='hidden-desktop'>
<@columns>
<#list listDays as day>
<@row>
<@columns>
<@table>
<@tableHead>
<@tr>
<@th>
#i18n{${list_days_of_week[day_index]}}
${day.date?date}
@th>
@tr>
@tableHead>
<@tableBody>
<#assign currentTime = startingTime />
<#assign currentMinute = startingMinute />
<#assign currentHour = startingHour />
<#if day.listAppointmentResourceDTO?has_content>
<#list day.listAppointmentResourceDTO as appointment>
<#assign nbOccur = ( ( ( appointment.startingHour * 60 + appointment.startingMinute ) - currentTime ) / duration)?round />
<#if nbOccur > 0>
<#list 1..nbOccur as i>
<@updateCurrentTimeHourAndMinute durationApp=duration />
#list>
#if>
<@tr>
<@updateCurrentTimeHourAndMinute durationApp=appointment.duration />
<@td class="appointment-slot-avaiable" title="">
<@div>
<@link href="jsp/admin/plugins/appointment/ManageAppointments.jsp?view=viewAppointment&id_appointment=${appointment.idApppointment}&id_form=${appointment.idForm!}" title="#i18n{module.appointment.resource.resource_calendar.viewAppointment}">
<#if appointment.startingHour < 10>0#if>${appointment.startingHour}h<#if appointment.startingMinute < 10>0#if>${appointment.startingMinute} - <#if appointment.endingHour < 10>0#if>${appointment.endingHour}h<#if appointment.endingMinute < 10>0#if>${appointment.endingMinute}
@link>
@div>
@td>
@tr>
#list>
<#else>
<@tr>
<@td class="appointment-slot-closed appointment-row1">
#i18n{module.appointment.resource.labelNoAppointment}
@td>
@tr>
#if>
@tableBody>
@table>
@columns>
@row>
#list>
@columns>
@row>
<@row class='visible-desktop'>
<@columns>
<@table>
<@tr>
<@td>
<@table>
<@tr>
<@td class="appointment-row1"> @td>
@tr>
<#assign nbOccur = ( ( endingTime - startingTime ) / duration)?round />
<#assign currentTime = startingTime />
<#assign currentMinute = startingMinute />
<#assign currentHour = startingHour />
<#list 1..nbOccur as i>
<@tr>
<@td class="appointment-row1">
<#if currentHour < 10>0#if>${currentHour}h<#if currentMinute < 10>0#if>${currentMinute}
<@updateCurrentTimeHourAndMinute durationApp=duration />
@td>
@tr>
#list>
@table>
@td>
<#list listDays as day>
<@td>
<@table class="table appointment-inner-table">
<@tableHead>
<@tr>
<@th>
#i18n{${list_days_of_week[day_index]}}
${day.date?date}
@th>
@tr>
@tableHead>
<@tableBody>
<#assign currentTime = startingTime />
<#assign currentMinute = startingMinute />
<#assign currentHour = startingHour />
<#list day.listAppointmentResourceDTO as appointment>
<#assign nbOccur = ( ( ( appointment.startingHour * 60 + appointment.startingMinute ) - currentTime ) / duration)?round />
<#if nbOccur > 0>
<#list 1..nbOccur as i>
<@addEmptyLine durationApp=duration />
#list>
#if>
<@tr>
<#assign rowspan=((appointment.duration)/duration)?round>
<@updateCurrentTimeHourAndMinute durationApp=appointment.duration />
<@td class="appointment-slot-avaiable appointment-row${rowspan} appointment-tooltip" title="">
<@div>
<@link href="jsp/admin/plugins/appointment/ManageAppointments.jsp?view=viewAppointment&id_appointment=${appointment.idApppointment}&id_form=${appointment.idForm!}" title="#i18n{module.appointment.resource.resource_calendar.viewAppointment}">
<#if appointment.startingHour < 10>0#if>${appointment.startingHour}h<#if appointment.startingMinute < 10>0#if>${appointment.startingMinute}
@link>
@div>
<@span class="appointment-tooltip-title">
<@getCellTitle startingHour=appointment.startingHour startingMinute=appointment.startingMinute endingHour=appointment.endingHour endingMinute=appointment.endingMinute appointmentDescription=appointment.appointmentDescription />
@span>
@td>
@tr>
#list>
<#assign maxTime = endingTime />
<#assign nbOccur = ( ( maxTime - currentTime ) / duration )?round />
<#if nbOccur > 0>
<#list 1..nbOccur as i>
<@addEmptyLine durationApp=duration/>
#list>
#if>
@tableBody>
@table>
@td>
#list>
@tr>
@table>
@columns>
@row>
<#macro addEmptyLine durationApp>
<#assign saveCurrentHour = currentHour />
<#assign saveCurrentMinute = currentMinute />
<@updateCurrentTimeHourAndMinute durationApp=durationApp />
<@tr>
<@td class="appointment-slot-closed appointment-row1 appointment-tooltip" title="">
<@span class="appointment-tooltip-title">
<@getCellTitle startingHour=saveCurrentHour startingMinute=saveCurrentMinute endingHour=currentHour endingMinute=currentMinute appointmentDescription='' />
@span>
@td>
@tr>
#macro>
<#macro updateCurrentTimeHourAndMinute durationApp>
<#assign currentTime = currentTime + durationApp />
<#assign currentMinute = currentMinute + durationApp />
<#if currentMinute >= 60>
<#assign nbOccursPriv = (currentMinute / 60 )?floor />
<#list 1..nbOccursPriv as i>
<#assign currentHour = currentHour + 1 />
#list>
<#assign currentMinute = currentMinute % 60 />
#if>
#macro>
<#macro getCellTitle startingHour startingMinute endingHour endingMinute appointmentDescription>
<#if startingHour < 10>0#if>${startingHour}h<#if startingMinute < 10>0#if>${startingMinute} - <#if endingHour < 10>0#if>${endingHour}h<#if endingMinute < 10>0#if>${endingMinute}
<#if appointmentDescription != ''>
${appointmentDescription}
#if>
#macro>