#-- WARNING : LUTECE-BACKPORT should only be use in case of error at executing an old plugin. This is a minimal compatibility service. It as to be removed asap so fix your templates ;-) ! -->
<#macro comboWithParams name default_value additionalParameters items>
<@select id='${name}' name='${name}' default_value=default_value items=items params=additionalParameters />
#macro>
<#macro comboSortedWithParams name default_value additionalParameters items id=name>
<@select id='${id}' name='${name}' sort=true default_value=default_value items=items params=additionalParameters />
#macro>
<#macro comboWithParamsAndLength name default_value additionalParameters items max_length >
<@select id='${name}' name='${name}' default_value=default_value items=items maxLength=max_length params=additionalParameters />
#macro>
<#macro combo name default_value items>
<@comboWithParams name="${name}" default_value="${default_value}" additionalParameters="" items=items />
#macro>
<#macro comboSorted name default_value items >
<@combo name="${name}" default_value="${default_value}" items=items?sort_by("name") />
#macro>
<#macro radioImageList name default_value items inline=0>
<#list items as item>
<#if inline><#local orientation='inline' /><#else><#local orientation='vertical' />#if>
<#if default_value='${item.code}'><#local checked=true /><#else><#local checked=false />#if>
<#local radioLabelKey>
#local>
<@radioButton orientation=orientation labelFor='${name}' labelKey=radioLabelKey checked=checked name='${name}' value='${item.code}' />
#list>
#macro>
<#macro checkboxList name default_values items inline=0>
<#list items as item>
<#if inline><#local orientation='inline' /><#else><#local orientation='vertical' />#if>
<@checkBox orientation=orientation labelFor='${item?index}' labelKey='${item.name}' name='${name}' id='${item?index}' value='${item.code}' checked=item.checked />
#list>
#macro>
<#macro dataTable dataTableManager actionMacro='' tableClass='' caption=' ' summary='data table'>
<#if 0 < dataTableManager.items?size >
<#if dataTableManager.enablePaginator>
<@tform type='inline' method='post' action='${dataTableManager.sortUrl}'>
<#if (dataTableManager.paginator.pagesCount > 1) >
<@paginationPageLinks paginator=dataTableManager.paginator />
#if>
<@div>
<@paginationItemCount paginator=dataTableManager.paginator combo=1 nb_items_per_page=dataTableManager.paginator.itemsPerPage?string />
@div>
<@input type='hidden' name='${dataTableManager.id}' id='${dataTableManager.id}' value='${dataTableManager.id}' />
@tform>
#if>
<@table class='${tableClass}' summary='${summary}'>
${caption}
<@tr>
<#list dataTableManager.listColumn as column>
<@th scope='col'>
#i18n{${column.titleKey}}
<#if !(column.typeColumn = "ACTION") && column.sortable>
<@sort jsp_url=dataTableManager.sortUrl attribute=column.parameterName />
#if>
@th>
#list>
@tr>
<#list dataTableManager.items as item>
<@tr>
<#list dataTableManager.listColumn as column>
<#if column.typeColumn = "STRING">
<#assign propName = "item." + column.parameterName>
<#assign value = propName?eval>
<@td>${value!}@td>
<#elseif column.typeColumn = "LABEL">
<#assign propName = "item." + column.parameterName>
<#assign value = propName?eval>
<@td>#i18n{${value!}}@td>
<#elseif column.typeColumn = "BOOLEAN">
<#assign propName = "item." + column.parameterName>
<#assign value = propName?eval>
<#if value?? && value>
<@td><@tag color='success' title='#i18n{${column.labelTrue!}}'><@icon style='check' />#i18n{${column.labelTrue!}}@tag>@td>
<#else>
<@td><@tag color='danger' title='#i18n{${column.labelFalse!}}'><@icon style='times' />#i18n{${column.labelFalse!}}@tag>@td>
#if>
<#elseif column.typeColumn = "EMAIL">
<#assign propName = "item." + column.parameterName>
<#assign value = propName?eval>
<@td><#if value?? && value != ""><@link href='mailto:${value}' title='${value}'>${value}@link>#if>@td>
<#elseif column.typeColumn = "ACTION">
<#if column.parameterName?? && column.parameterName != "">
<#assign macroName = column.parameterName>
<#elseif actionMacro?? && actionMacro != "">
<#assign macroName = actionMacro>
#if>
<#if macroName?? && macroName != "">
<@td><@.vars[macroName] item=item />@td>
#if>
#if>
#list>
@tr>
#list>
@table>
<#if dataTableManager.enablePaginator>
<@tform type='inline' method='post' action='${dataTableManager.sortUrl}'>
<#if (dataTableManager.paginator.pagesCount > 1) >
<@paginationPageLinks paginator=dataTableManager.paginator />
#if>
<@div align='right'>
<@paginationItemCount paginator=dataTableManager.paginator combo=0 nb_items_per_page=dataTableManager.paginator.itemsPerPage?string />
@div>
<@input type='hidden' name='${dataTableManager.id}' id='${dataTableManager.id}' value='${dataTableManager.id}' />
@tform>
#if>
<#else>
#i18n{portal.util.labelNoItem}
#if>
#macro>
<#macro filterPanel dataTableManager formClass=''>
<#if dataTableManager.filterPanel.listFilter?? && 0 < dataTableManager.filterPanel.listFilter?size>
<@tform class='${formClass!}' method='post' action='${dataTableManager.filterPanel.formUrl}'>
<@fieldSet>
<#list dataTableManager.filterPanel.listFilter as filter>
<@formGroup labelFor='description' labelKey='#i18n{${filter.filterLabel}}'>
<#if filter.filterType = "STRING">
<@input type='text' name='${dataTableManager.filterPanelPrefix}${filter.parameterName}' id='${filter.parameterName}' inputSize=30 value='${filter.value!}' />
<#elseif filter.filterType = "BOOLEAN">
<@checkBox labelFor='' labelKey='' name='${dataTableManager.filterPanelPrefix}${filter.parameterName}' id='${dataTableManager.filterPanelPrefix}${filter.parameterName}' value='true' checked=(filter.value?? && filter.value = 'true') />
<#elseif filter.filterType = "DROPDOWNLIST">
<#if filter.value??>
<#local filter_value = filter.value >
<#else>
<#local filter_value = '' >
#if>
<@select name=dataTableManager.filterPanelPrefix+filter.parameterName default_value=filter_value items=filter.refList />
#if>
@formGroup>
#list>
<@formGroup>
<@input type='hidden' name='${dataTableManager.filterPanelPrefix}updateFilters' id='${dataTableManager.filterPanelPrefix}updateFilters' value='true' />
<@input type='hidden' name='${dataTableManager.id}' id='${dataTableManager.id}' value='${dataTableManager.id}' />
<@button type='submit' buttonIcon='search' title='#i18n{portal.util.labelSearch}' hideTitle=['xs'] />
<#if dataTableManager.filterPanel.formUrl?contains("?")>
<#local dataTableResetUrl = dataTableManager.filterPanel.formUrl + "&" + dataTableManager.filterPanelPrefix + "resetFilters=true" />
<#else>
<#local dataTableResetUrl = dataTableManager.filterPanel.formUrl + "?" + dataTableManager.filterPanelPrefix + "resetFilters=true" />
#if>
<@aButton href='${dataTableResetUrl}' title='#i18n{portal.util.labelReset}' buttonIcon='times' hideTitle=['xs'] />
@formGroup>
@fieldSet>
@tform>
#if>
#macro>
<#macro fieldInputText i18nLabelKey inputName mandatory=false value="" maxlength=0 i18nHelpBlockKey='' cssClass=''>
<#if maxlength > 0><#local params = 'maxlength=${maxlength}' />#if>
<@formGroup labelFor='${inputName}' labelKey='#i18n{${i18nLabelKey}}' mandatory=mandatory helpKey='#i18n{${i18nHelpBlockKey}}'>
<@input type='text' name='${inputName}' id='${inputName}' class='${cssClass!}' value='${value}' params=params! />
@formGroup>
#macro>
<#macro fieldInputPassword i18nLabelKey inputName mandatory=false value="" maxlength=0 i18nHelpBlockKey='#i18n{${i18nHelpBlockKey}}' cssClass=''>
<#if maxlength > 0><#local params = 'maxlength=${maxlength}' />#if>
<@formGroup labelFor='${inputName}' labelKey='#i18n{${i18nLabelKey}}' helpKey='' mandatory=mandatory>
<@input type='password' name='${inputName}' id='${inputName}' class='${cssClass!}' value='${value}' params=params! />
@formGroup>
#macro>
<#macro fieldInputWrapper i18nLabelKey inputName mandatory=false value="" maxlength=0 i18nHelpBlockKey='' cssClass='form-control'>
<@formGroup labelFor='${inputName}' labelKey='#i18n{${i18nLabelKey}}' helpKey='#i18n{${i18nHelpBlockKey}}' mandatory=mandatory>
<#nested>
@formGroup>
#macro>
<#macro fieldStaticText i18nLabelKey cssClass=''>
<@formGroup labelKey='#i18n{${i18nLabelKey}}'>
<@staticText>
<#nested>
@staticText>
@formGroup>
#macro>
<#macro fieldInputCalendar i18nLabelKey inputName mandatory=false value="" i18nHelpBlockKey='' cssClass='form-control' language='fr'>
<@formGroup labelFor='${inputName}' labelKey='#i18n{${i18nLabelKey}}' helpKey='#i18n{${i18nHelpBlockKey}}' mandatory=mandatory>
<@inputGroup>
<@inputGroupItem type='text'>
<@icon style='calendar' />
@inputGroupItem>
<@input type='text' name='${inputName}' id='${inputName}' class='${cssClass!}' value='${value}' />
@inputGroup>
<@getDateFlatPicker idField=inputName language=language />
@formGroup>
#macro>
<#macro fieldInputCheckBox i18nLabelKey inputName value="" disabled=false checked=false i18nHelpBlockKey='' cssClass='' >
<@formGroup helpKey='#i18n{${i18nHelpBlockKey}}'>
<@checkBox labelFor='${inputName}id' labelKey='#i18n{${i18nLabelKey}}' class='${cssClass}' id='${inputName}id' name='${inputName}' value='${value}' disabled=disabled checked=checked />
@formGroup>
#macro>
<#macro fieldInputRadioBox i18nLabelKey inputName value="" disabled=false checked=false i18nHelpBlockKey='' cssClass='' >
<@formGroup helpKey='#i18n{${i18nHelpBlockKey}}'>
<@radioButton labelFor='${inputName}id' labelKey='#i18n{${i18nLabelKey}}' id='${inputName}id' name='${inputName}' value='${value}' checked=checked disabled=disabled />
@formGroup>
#macro>
<#macro fieldInputCheckBoxInline inputName value="" disabled=false checked=false >
<@checkBox orientation='inline' labelFor='${inputName}id' id='${inputName}id' name='${inputName}' value='${value}' disabled=disabled checked=checked />
#macro>
<#macro fieldInputRadioBoxInline inputName value="" disabled=false checked=false >
<@radioButton orientation='inline' labelFor='${inputName}id' id='${inputName}id' name='${inputName}' value='${value}' disabled=disabled checked=checked />
#macro>
<#macro fieldInputCombo i18nLabelKey inputName items value="" mandatory=false i18nHelpBlockKey='' cssClass='form-control'>
<@formGroup labelFor='${inputName}' labelKey='#i18n{${i18nLabelKey}}' helpKey='#i18n{${i18nHelpBlockKey}}' mandatory=mandatory>
<#assign params = "class='" + cssClass + "'" >
<@select name=inputName items=items default_value=value params=params />
@formGroup>
#macro>
<#macro fieldTextArea i18nLabelKey inputName mandatory=false value="" maxlength=0 i18nHelpBlockKey='' cssClass=''>
<@formGroup labelFor='${inputName}' labelKey='#i18n{${i18nLabelKey}}' helpKey='#i18n{${i18nHelpBlockKey}}' mandatory=mandatory>
<#if maxlength > 0><#local params='maxlength="${maxlength}"' />#if>
<@input type='textarea' name='${inputName}' id='${inputName}' class='${cssClass!}' params=params>${value!}@input>
@formGroup>
#macro>
<#macro getDatePickerBootstrap idField language format='' showFormat='' >
<@getDateFlatPicker idField=idField language=language />
#macro>
<#macro boxSized col i18nTitleKey boxClass='box-primary' >
<@columns md=col>
<@box class=boxClass>
<@boxHeader title=i18nTitleKey />
<@boxBody>
<#nested>
@boxBody>
@box>
@columns>
#macro>
<#macro rowBox boxClass='box-primary' col=12>
<@row>
<@columns xs=12 sm=col>
<@box class=boxClass>
<#nested>
@box>
@columns>
@row>
#macro>
<#macro rowBoxHeader i18nTitleKey boxClass='box-primary' col=12>
<@rowBox boxClass=boxClass col=col >
<@boxHeader i18nTitleKey=i18nTitleKey />
<@boxBody>
<#nested>
@boxBody>
@rowBox>
#macro>
<#macro headerButtons>
<#nested>
#macro>
<#macro listTabs type='tabs' id='' params=''>
<@tabList style=type id=id params=params />
#macro>
<#macro badge color='primary' badgeIcon='' title='' htmlEl='deprecated' type='deprecated' style='deprecated' class='deprecated' id='' params=''>
<@tag color=color class=class title=title tagIcon=badgeIcon id=id />
#macro>