@cContainer class='section'>
<@cRow>
<@cCol>
<@cForm action='jsp/site/Portal.jsp' >
<@cInput type='hidden' name='page' value='search' />
<@cField label='#i18n{portal.search.search_results.buttonSearch}' for='query' >
<@cInputGroup>
<@cInput name='query' placeholder='Exemple: composant' value='${query!}' />
<@cInputGroupAddon>
<@cBtn label='#i18n{portal.search.search_results.buttonSearch}' nestedPos='after' >
@cBtn>
@cInputGroupAddon>
@cInputGroup>
@cField>
<#if type_filter != "none">
<@cField label='#i18n{portal.search.search_results.typeFilter}' for='type_filter' >
<#-- type_filter -->
<#if type_filter == "option">
<@cSelect name='type_filter'>
<#list list_type_and_link as map>
<#assign labelOption><#if map_index != 0>${map.type}<#else>#i18n{portal.search.search_results.typeFilterNone}#if>#assign>
<@cOption value=map.type label=labelOption />
#list>
@cSelect>
<#else>
<#list list_type_and_link as map>
<#if type_filter != "checkbox" || map_index != 0>
<@cInput type=type_filter name="type_filter" value=map.type />
<#if map.link?exists && map.link != "">
<@cLink label='${map.type}' href=map.link!><#if map_index != 0>${map.type}<#else>#i18n{portal.search.search_results.typeFilterNone}#if>@cLink>
<#else>
<#if map_index != 0>${map.type}<#else>#i18n{portal.search.search_results.typeFilterNone}#if>
#if>
#if>
#list>
#if>
@cField>
#if>
<#if date_filter == '1'>
<#-- date_filter 0/1 -->
<@cFieldset legend='#i18n{portal.search.search_results.dateFilter}'>
<@cField label='#i18n{ i18nLabelKey="portal.search.search_results.dateFilterAfter" }' for='date_after'>
<@input name='date_after' />
@cField>
<@cField label='#i18n{ i18nLabelKey="portal.search.search_results.dateFilterBefore" }' for='date_before'>
<@input name='date_before' />
@cField>
@cFieldset>
#if>
<#if taglist?has_content>
<#if tag_filter == "1" && taglist?trim != "">
<@cFormRow>
<#-- tag_filter -->
<#list taglist?split(" ") as tag>
<#if tag?exists && tag?trim !="">
<@cBtn label=tag class='btn btn-outline-action' name='tag_filter' value=tag />
#if>
#list>
@cFormRow>
#if>
#if>
@cForm>
@cCol>
@cRow>
<@cRow>
<@cCol class='p-sm-4'>
<@cTitle level=2 class='h3'>#i18n{portal.search.search_results.title}@cTitle>
<@cCard>
<#if error?has_content><@cAlert title=error type='danger' />#if>
<#-- included sponsored links if available - might be null -->
${sponsoredlinks_set!}
<#if results_list??>
<#if results_list?size gt 0>
<@chList class='list-group list-group-flush'>
<#list results_list as result>
<#assign imgUrl='' >
<#assign resultHeader='[ ${result.type} ] - ${result.title}' >
<#list result.url?split("=") as x><#assign imgUrl=x >#list>
<#assign resultUrl = result.url! />
<#assign resultTitle = '[ ${result.type!} ] ${result.title!}' />
<#assign resultDate = '${result.date?date?string.short!}' />
<@chItem class='list-group-item d-flex justify-content-between'>
<@cLink href=resultUrl label='${resultTitle} ${resultDate}' title='${resultTitle}' />
@chItem>
#list>
@chList>
<#else>
<@cAlert title='#i18n{portal.util.labelNoItem}' dismissible=false type='warning' outline=true />
#if>
#if>
@cCard>
<@cRow class='mt-5'>
<@cCol>
<@cPagination paginator=paginator />
@cCol>
<@cCol class='d-flex justify-content-end'>
<@cText>#i18n{portal.search.search_results.labelResultsCount} : ${paginator.itemsCount} #i18n{portal.search.search_results.labelResultsRange} : ${paginator.rangeMin} - ${paginator.rangeMax}@cText>
@cCol>
@cRow>
@cCol>
@cRow>
@cContainer>