<@cTpl> <#assign items_time= [ { "code":"06:00", "name":"06h00"}, { "code":"09:00", "name":"09h00"}, { "code":"12:00", "name":"12h00"}, { "code":"15:00", "name":"15h00"}, { "code":"18:00", "name":"18h00"}, { "code":"21:00", "name":"21h00"} ]> <#assign items_minutes= [ { "code": "360", "name":"06h00"}, { "code": "540", "name":"09h00"}, { "code": "720", "name":"12h00"}, { "code": "900", "name":"15h00"}, { "code":"1080", "name":"18h00"}, { "code":"1260", "name":"21h00"} ]> <#assign categoryParam><#if category??>&category=${category?url('UTF-8')} <#assign nbSlots = (nb_consecutive_slots!'1')?url('UTF-8')> <#macro timeSelect name items value label> <@cSelect name=name id=name params='aria-label="${label}"'> <#list items as item> <@cOption label=item.name value=item.code selected=(value == item.code) /> <#macro quickSearch days label> <@cForm action='jsp/site/Portal.jsp' class='d-inline-block'> <@cInput type='hidden' name='page' id='quick_${days}_page' value='appointmentsearch' class='' /> <#if category??><@cInput type='hidden' name='category' id='quick_${days}_category' value=category?html class='' /> <@cInput type='hidden' name='to_date' id='quick_${days}_to_date' value=(.now?long + days * 86400000)?number_to_date?string('dd/MM/yyyy') class='' /> <@cBtn label=label type='submit' class='primary btn-sm' params='name="view_search"' />
<#list (errors![]) as error> <@cAlert type='danger' title=error.message /> <#list (infos![]) as info> <@cAlert type='info' title=info.message />
<#if (results.values)??> <#list results.values as groupcommand> <#if groupcommand.values?size gt 0> <@cTitle level=3>#i18n{module.appointment.solrsearchapp.map}

#i18n{module.appointment.solrsearchapp.displayAvailableSlots}

#i18n{module.appointment.solrsearchapp.mapAvailableForBigScreen}

<#else> <@cTitle level=3 class='text-warning mb-4 fs-3'><@cIcon name='alert-triangle' class='me-1' /> #i18n{module.appointment.solrsearchapp.noMoreAvailableSlots}
<@cTitle level=3 class='fs-5'>#i18n{module.appointment.solrsearchapp.simpleSearch}
<@quickSearch days=7 label='#i18n{module.appointment.solrsearchapp.sevenDays}' /> <@quickSearch days=14 label='#i18n{module.appointment.solrsearchapp.fourteenDays}' />
<@cBtn label='#i18n{module.appointment.solrsearchapp.advancedSearch}' type='button' class='secondary btn-sm mb-3' id='advanced_search_button' nestedPos='after' params='aria-expanded="true" aria-controls="advanced_search"'><@cIcon name='settings' class='ms-1' /> <@cForm name='search' action='jsp/site/Portal.jsp' id='advanced_search'> <@cInput type='hidden' name='page' id='search_page' value='appointmentsearch' class='' /> <#if category??><@cInput type='hidden' name='category' id='search_category' value=category?html class='' /> <@cInput type='hidden' name='role' id='search_role' value=(role!'none')?html class='' /> <@cFieldset legend='#i18n{module.appointment.solrsearchapp.dates}' class='mb-3'>
<@cInputDate name='from_date' id='from_date' label='#i18n{module.appointment.solrsearchapp.from}' value=(from_date!'')?html options={'format': 'dd/mm/yyyy', 'dataFormat': 'dd/mm/yyyy'} />
<@timeSelect name='from_time' items=items_time value=from_time!'' label='#i18n{module.appointment.solrsearchapp.from}' />
<@cInputDate name='to_date' id='to_date' label='#i18n{module.appointment.solrsearchapp.to}' value=(to_date!'')?html options={'format': 'dd/mm/yyyy', 'dataFormat': 'dd/mm/yyyy'} />
<@timeSelect name='to_time' items=items_time value=to_time!'' label='#i18n{module.appointment.solrsearchapp.to}' />
<@cFieldset legend='#i18n{module.appointment.solrsearchapp.schedule}' class='mb-3'>
<@timeSelect name='from_day_minute' items=items_minutes value=from_day_minute!'' label='#i18n{module.appointment.solrsearchapp.from}' />
<@timeSelect name='to_day_minute' items=items_minutes value=to_day_minute!'' label='#i18n{module.appointment.solrsearchapp.to}' />
<@cLabel for='nb_consecutive_slots' label='#i18n{module.appointment.solrsearchapp.form.nbSlots.label}' />
<@cInput type='number' name='nb_consecutive_slots' id='nb_consecutive_slots' min=1 step=1 value=(nb_consecutive_slots!'1')?html />
<#assign days = items_days_of_week![]> <@cFieldset legend='#i18n{module.appointment.solrsearchapp.daysOfTheWeek}' class='mb-3'>
<#list days?chunk(4) as column>
<#list column as item> <@cCheckbox name='days_of_week' id='day_${item.code}' value=item.code label=item.name checked=item.checked />
<@cBtn label='#i18n{module.appointment.solrsearchapp.search}' type='submit' class='primary btn-sm' params='name="action_search"' /> <@cBtn label='#i18n{module.appointment.solrsearchapp.reset}' type='submit' class='danger btn-sm' params='name="action_clear"' />
<#if (results.values)??> <#list results.values as groupcommand> <#if groupcommand.values?size gt 0> <@cTitle level=3 id=rdvListeDone???then('', 'rdv_liste')>#i18n{module.appointment.solrsearchapp.firstAvailableSlots} <#assign rdvListeDone = true>
<#list groupcommand.values as group> <#assign first = group.result.list[0]> <#assign groupId = group.groupValue?html>
<@cTitle level=4>${first.title?html} <#if (first.appointmentslot_address_text)??>

${first.appointmentslot_address_text?html}

#i18n{module.appointment.solrsearchapp.nextAvailableSlots} :

${group.result.numFound - group.result.list?size} #i18n{module.appointment.solrsearchapp.otherAvailableSchedules}

<@cBtn label='#i18n{module.appointment.solrsearchapp.completeSchedule}' class='primary btn-sm' id='link_${groupId}_full_calendar' href='${first.url_form_string?html}&nbPlacesToTake=${nbSlots}' />