#-- WARNING : be careful to white-space and lines break in FreeMarker macros.
# This macro template can be used to output white-space-sensitive formats (like RSS files).
# See http://dev.lutece.paris.fr/jira/browse/LUTECE-765
-->
<#-- Do not remove this comment -->
<#-- Information about this commons file -->
<#macro commonsFile>commons_bs4.html#macro>
<#macro commonsName>Commons Bootstrap 4.3#macro>
<#macro commonsDescription>Freemarker Commons macros powered by Bootstrap CSS Framework 4.3#macro>
<#macro coreAdminCSSLinks>
#macro>
<#macro coreAdminJSLinks>
#macro>
<#global gClassActive='active' />
<#assign mainColor = 'info' />
<#-- PAGINATION -->
<#macro pagination paginator>
<#assign nbLinkPagesToDisplay = 10 />
<#assign offsetPrev = nbLinkPagesToDisplay / 2 />
<#assign offsetNext = nbLinkPagesToDisplay / 2 />
<#if ( paginator.pageCurrent <= nbLinkPagesToDisplay - offsetPrev )>
<#assign offsetPrev = paginator.pageCurrent - 1 />
<#assign offsetNext = nbLinkPagesToDisplay - offsetPrev />
<#elseif ( paginator.pageCurrent + offsetNext > paginator.pagesCount )>
<#assign offsetNext = paginator.pagesCount - paginator.pageCurrent />
<#assign offsetPrev = nbLinkPagesToDisplay - offsetNext />
#if>
<#if ( paginator.pagesCount > 1 )>
<#if ( paginator.pageCurrent - offsetPrev > 1 )>
<@link href='${paginator.firstPageLink?xhtml}'>
<@icon style='double-left' /> #i18n{portal.util.labelFirst}
@link>
#if>
<#if ( paginator.pageCurrent > 1 )>
<@link href='${paginator.previousPageLink?xhtml}'>
<@icon style='angle-left' /> #i18n{portal.util.labelPrevious}
@link>
<#else>
#if>
<#if ( paginator.pageCurrent - offsetPrev > 1 )>
...
#if>
<#list paginator.pagesLinks as link>
<#if link.index == paginator.pageCurrent>
${link.name}
<#else>
<@link href='${link.url?xhtml}'>${link.name}@link>
#if>
#list>
<#if ( paginator.pageCurrent + offsetNext < paginator.pagesCount )>
...
#if>
<#if ( paginator.pageCurrent < paginator.pagesCount )>
<@link href='${paginator.nextPageLink?xhtml}'>
<@icon style='angle-right' /> #i18n{portal.util.labelNext}
@link>
<#if ( paginator.pageCurrent + offsetNext < paginator.pagesCount )>
<@link href='${paginator.lastPageLink?xhtml}'>
<@icon style='angle-double-right' /> #i18n{portal.util.labelLast}
@link>
#if>
<#else>
#if>
#if>
#macro>
<#-- PAGINATION ADMIN -->
<#macro paginationAdmin paginator combo=0 form=1 nb_items_per_page=nb_items_per_page showcount=1 showall=0>
<#if (paginator.pagesCount > 1) >
<@paginationPageLinks paginator=paginator />
#if>
<#if form == 1 >
<@tform type='inline' params='style="display:block;"'>
<@paginationItemCount paginator=paginator combo=combo nb_items_per_page=nb_items_per_page showcount=showcount showall=showall/>
@tform>
<#else>
<@paginationItemCount paginator=paginator combo=combo nb_items_per_page=nb_items_per_page showcount=showcount showall=showall/>
#if>
#macro>
<#-- PAGINATION LINKS -->
<#macro paginationPageLinks paginator >
<#assign nbLinkPagesToDisplay = 10 />
<#assign offsetPrev = nbLinkPagesToDisplay / 2 />
<#assign offsetNext = nbLinkPagesToDisplay / 2 />
<#if ( paginator.pageCurrent <= nbLinkPagesToDisplay - offsetPrev )>
<#assign offsetPrev = paginator.pageCurrent - 1 />
<#assign offsetNext = nbLinkPagesToDisplay - offsetPrev />
<#elseif ( paginator.pageCurrent + offsetNext > paginator.pagesCount )>
<#assign offsetNext = paginator.pagesCount - paginator.pageCurrent />
<#assign offsetPrev = nbLinkPagesToDisplay - offsetNext />
#if>
<@ul class='pagination justify-content-end'>
<#if ( paginator.pageCurrent - offsetPrev > 1 )>
<@aButton style='close' params='data-dismiss="alert"' href='#'>x@aButton>
<#list warnings as warning >
<@icon style='info-circle' /> ${warning.message}
#list>
#if>
#if>
#macro>
<#-- TABLE -->
<#-- class: -->
<#macro table id='' class='' responsive=true condensed=true hover=true striped=false bordered=false narrow=false collapsed=false params=''>
<#local class = class />
<#if condensed> <#local class += ' table-sm' /> #if>
<#if hover> <#local class += ' table-hover' /> #if>
<#if striped> <#local class += ' table-striped' /> #if>
<#if bordered> <#local class += ' table-bordered' /> #if>
<#if collapsed> <#local class += ' collapse' /> #if>
<#if responsive>
#macro>
<#-- SORT -->
<#macro sort jsp_url attribute id="" >
<#if jsp_url?contains("?")>
<#assign sort_url = jsp_url + "&sorted_attribute_name=" + attribute + "&asc_sort=" />
<#else>
<#assign sort_url = jsp_url + "?sorted_attribute_name=" + attribute + "&asc_sort=" />
#if>
<@btnGroup ariaLabel='sortButton'>
<@aButton color='default' size='sm' class='btn-just-icon' id='sort${id!}_${attribute!}' href='${sort_url}true#sort${id!}_${attribute!}' title='#i18n{portal.util.sort.asc}' buttonIcon='chevron-up' hideTitle=['all'] />
<@aButton color='default' size='sm' class='btn-just-icon' href='${sort_url}false#sort${id!}_${attribute!}' title='#i18n{portal.util.sort.desc}' buttonIcon='chevron-down' hideTitle=['all'] />
@btnGroup>
#macro>
<#-- ICONS -->
<#-- Icons from FontAwesome 5.8.1 -->
<#macro icon prefix='fa-' style='' class='' title='' id='' params=''>
<#if style='docker' || style = 'github' || style='gitlab' || style='java' || style='jira' || style='jenkins' || style = 'twitter' >
<#local prefix = 'fab ' + prefix />
<#else>
<#local prefix = 'fa ' + prefix />
#if>
<#switch style>
<#case 'arrows'>
<#local iconStyle = 'arrows-alt' />
<#break>
<#case 'arrows-h'>
<#local iconStyle = 'arrows-alt-h' />
<#break>
<#case 'arrows-v'>
<#local iconStyle = 'arrows-alt-v' />
<#break>
<#case 'clock-o'>
<#local iconStyle = 'clock' />
<#break>
<#case 'close'>
<#local iconStyle = 'times' />
<#break>
<#case 'external-link'>
<#local iconStyle = 'external-link-alt' />
<#break>
<#case 'file-pdf-o'>
<#local iconStyle = 'file-pdf' />
<#break>
<#case 'pencil'>
<#local iconStyle = 'edit' />
<#break>
<#case 'refresh'>
<#local iconStyle = 'sync' />
<#break>
<#default>
<#local iconStyle = style />
#switch>
title='${title}'#if><#if id!=''> id="${id}"#if><#if params!=''> ${params}#if>>
#macro>
<#-- ICONSTACK -->
<#-- iconStack -->
<#-- class: par défaut 2x peut être tout autre taille voir doc FontAwesome -->
<#-- nested: 2 macro @icon une class fa-stack-2x , autre avec class fa-stack-1x dans l'ordre -->
<#macro iconStack class='fa-2x' id='' params=''>
${id}#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#-- FORM -->
<#-- type: inline/horizontal/form -->
<#macro tform type='horizontal' class='' align='' hide=[] action='' method='post' name='' id='' role='form' collapsed=false params=''>
<#local class = class />
<#if align!=''><#local class += ' ' + alignmentSettings(align,'') />#if>
<#if hide??><#local class += ' ' + displaySettings(hide,'block') />#if>
<#if collapsed><#local class += ' collapse' />#if>
<#switch type>
<#case 'horizontal'>
<#local class += ' form-horizontal'>
<#break>
<#case 'inline'>
<#local class += ' form-inline'>
<#break>
<#default>
<#local class += ' form'>
#switch>
#macro>
<#-- FORM ELEMENT STRUCTURE -->
<#-- formStyle values: horizontal/empty/inline Default is horizontal -->
<#-- class: -->
<#-- groupStyle: success/error -->
<#macro formGroup formStyle='horizontal' class='' groupStyle='' rows=1 labelKey='' labelFor='' labelId='' labelClass='' helpKey='' id='' mandatory=false hideLabel=[] collapsed=false params=''>
<#assign mandatory = mandatory>
<#assign labelFor = labelFor>
<#assign labelId = labelId>
<#assign labelKey = labelKey>
<#assign hideLabel = hideLabel>
<#assign helpKey = helpKey>
<#if groupStyle = 'success'>
<#local validation = 'has-success'>
<#elseif groupStyle='error'>
<#local validation = 'has-error'>
#if>
<#if collapsed><#local class += ' collapse' />#if>
#macro>
<#macro formField class=''>
<#nested>
#macro>
<#macro formLabel class='' labelFor='' labelId='' labelKey='' hideLabel=[] mandatory=true>
<#local class += ' ' + displaySettings(hideLabel,'') />
id="${labelId}"#if><#if mandatory=true>ariaLabel="${labelKey} [#i18n{portal.users.modify_attribute.labelMandatory}]"#if>>${labelKey}
#macro>
<#macro formHelp style='inline' class='' labelFor=''>
aria-describedby="${labelFor}" #if>style="display:block;">
<#nested>
#macro>
<#-- INPUT TEXT/TEXTAREA/SEARCH/PASSWORD/EMAIL/FILE -->
<#-- type : text/textarea/password/email/file/number. Default is text -->
<#-- size: sm/lg/EMPTY for medium size -->
<#-- incoming Bootstrap 4 size: form-control-sm/form-control-lg or empty for the normal size -->
<#-- pattern: [A-F][0-9]{5} -->
<#-- language: for input type DATE and datepickers -->
<#macro input name type='text' value='' class='' size='' inputSize=0 maxlength=0 placeHolder='' rows=4 cols=40 richtext=false tabIndex='' id='' disabled=false readonly=false pattern='' title='' min=0 max=0 language='' params=''>
<#if type='textarea'>
<#elseif type='text' || type='search' || type='password' || type='email' || type='file' || type='number'>
<#if type='file'>
#if>
tabindex="${tabIndex}"#if><#if placeHolder!=''> placeholder="${placeHolder}<#if mandatory?? && mandatory> [#i18n{portal.users.modify_attribute.labelMandatory}]#if>"#if><#if title!=''> title="${title}"#if><#if maxlength > 0> maxlength="${maxlength}"#if><#if inputSize!=0> size="${inputSize}"#if><#if disabled> disabled#if><#if readonly> readonly#if><#if id!=''> id="${id}"#if><#if params!=''> ${params}#if><#if pattern!=''>pattern=${pattern}#if><#if min!=0> min="${min}"#if><#if max!=0> max="${max}"#if><#if mandatory?? && mandatory> required#if><#if labelFor?? && labelFor!='' && helpKey?? && helpKey!=''> aria-describedby="${labelFor}_help"#if> />
<#if type='file'>
#if>
<#elseif type='date' || type='datetime'>
<#if type='date'>
<@getDatePickerBootstrap idField='${id}' language=language />
<#elseif type='datetime'>
<@getDateTimePickerBootstrap idField='${id}' language=language />
#if>
<#if id=''><@alert class='danger'>La saisie d'un ID pour le champ est obligatoire@alert>#if>
tabindex="${tabIndex}"#if><#if placeHolder!=''> placeholder="${placeHolder}"#if><#if title!=''> title="${title}"#if><#if maxlength > 0> maxlength="${maxlength}"#if><#if inputSize!=0> size="${inputSize}"#if><#if disabled> disabled#if><#if readonly> readonly#if><#if id!=''> id="${id}"#if><#if params!=''> ${params}#if><#if pattern!=''>pattern=${pattern}#if><#if min!=0> min="${min}"#if><#if max!=0> max="${max}"#if><#if formGroupMandatory?? && formGroupMandatory || mandatory > required #if><#if labelFor?? && labelFor!='' && helpkey?? && helpKey!=''> aria-describedby="${labelFor}_help"#if> />
<#elseif type='hidden'>
<#else>
<@icon style='warning' /> Type not supported
#if>
#macro>
<#-- STATIC TEXT -->
<#-- Bootstrap colors: primary/secondary/success/info/warning/danger/light/black/muted/white/text-black-50/text-white-50 -->
<#macro staticText inForm=true color='' id='' params=''>
id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#--- MACRO SELECT (TO REPLACE "COMBO" MACROS) --->
<#macro select name items='' default_value='' id=name class='' size='' sort=false multiple=0 params='' title='' disabled=false tabIndex=0>
multiple size="${multiple}"#if><#if (tabIndex > 0)> tabindex="${tabIndex}"#if><#if params!=''> ${params}#if><#if title!=''> title="${title}"#if><#if mandatory?? && mandatory> required#if><#if disabled> disabled#if>>
<#if items?has_content>
<#if sort=true>
<#list items?sort_by("name") as item>
<#if default_value="${item.code}">
label="${i18n("portal.util.labelEmpty")}"#if>>${item.name}
<#else>
label="${i18n("portal.util.labelEmpty")}"#if>>${item.name}
#if>
#list>
<#else>
<#list items as item>
<#if default_value="${item.code}">
label="${i18n("portal.util.labelEmpty")}"#if>>${item.name}
<#else>
label="${i18n("portal.util.labelEmpty")}"#if>>${item.name}
#if>
#list>
#if>
<#else>
<#nested>
#if>
#macro>
<#-- CHECKBOX -->
<#-- orientation: vertical/inline. Default is vertical -->
<#-- TODO -->
<#macro checkBox name id labelKey='' labelFor='' orientation='vertical' value='' tabIndex='' title='' disabled=false readonly=false checked=false params='' mandatory=false>
<#if labelFor = ''><#local labelFor = id />#if>
for="${labelFor}"#if><#if title!=''> title="${title}"#if>>
value="${value}"#if><#if tabIndex!=''> tabindex="${tabIndex}"#if><#if checked> checked#if><#if disabled> disabled#if><#if readonly> readonly#if><#if params!=''> ${params}#if><#if mandatory> required#if> />
<#if labelKey!=''>
${labelKey}
<#else>
#if>
#macro>
<#-- RADIO BUTTON -->
<#-- orientation: vertical/inline. Default is vertical -->
<#macro radioButton name id='' value='' labelKey='' labelFor='' orientation='vertical' tabIndex='' title='' disabled=false readonly=false checked=false params=''>
value="${value}"#if><#if tabIndex!=''> tabindex="${tabIndex}"#if><#if checked> checked#if><#if disabled> disabled#if><#if readonly> readonly#if><#if mandatory?? && mandatory> required#if><#if params!=''> ${params}#if> />
<#if labelKey!=''>
${labelKey}
<#else>
#if>
#macro>
<#-- INPUT-GROUP -->
<#-- size: sm/lg/no size-->
<#macro inputGroup size='' class='' id='' params=''>
id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#macro inputGroupItem pos='append' type='btn' id='' params=''>
<#-- pos: append / prepend | Default append -->
<#-- type: btn/text. default is btn -->
#macro>
<#-- DROPDOWN MENU -->
<#-- class: dropdown-menu-right -->
<#-- Expected content : Your link here -->
<#macro dropdownMenu class='' id='' params=''>
#macro>
<#-- ROW -->
<#macro row class='' id='' align='' collapsed=false params=''>
<#if collapsed><#local class += ' ' + 'collapse' />#if>
<#if align!=''><#local class+= ' ' + alignmentSettings(align,'') />#if>
id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#-- COLUMNS -->
<#-- cols = col-xs- (<544px)/col-sm- (>=544px)/col-md- (>=768px)/col-lg- (>=992px)/col-xl- (>=1200px) -->
<#-- Push and Pull are deprecated in Bootstrap 4 -->
<#-- offsetXs, offsetSm, offsetMd, offsetLg and offsetXl are deprecated. Use offset={} instead where the values are listed as following: offset={'xs':int, 'sm':int, 'md':int, 'lg':int, 'xl':int} -->
<#-- Order uses flexbox. Use Order for xs/all breakpoints this way: order=int, or for other breakpoints this way: order={'sm':int, 'md':int, 'lg':int, 'xl':int} -->
<#macro columns tag='div' offsetXs=0 offsetSm=0 offsetMd=0 offsetLg=0 offsetXl=0 offset={} pushXs=0 pushSm=0 pushMd=0 pushLg=0 pushXl=0 pullXs=0 pullSm=0 pullMd=0 pullLg=0 pullXl=0 xs=12 sm=0 md=0 lg=0 xl=0 order={} id='' class='' align='' collapsed=false params=''>
<#if collapsed><#local class += ' ' + 'collapse' />#if>
<#if align!=''><#local class+= ' ' + alignmentSettings(align,'text') />#if>
<#local class += ' ' + responsiveDisplay('col',{'xs':xs, 'sm':sm, 'md':md, 'lg':lg, 'xl':xl}) />
<#if offset?has_content>
<#local class += ' ' + responsiveDisplay('offset',offset) />
<#elseif offsetXs > 0 || offsetSm > 0 || offsetMd > 0 || offsetLg > 0 || offsetXl > 0>
<#local class += ' ' + responsiveDisplay('offset',{'xs':offsetXs, 'sm':offsetSm, 'md':offsetMd, 'lg':offsetLg, 'xl':offsetXl}) />
#if>
<#if order?has_content>
<#if order?is_number>
<#local class += ' order-${order}' />
<#elseif order?is_hash>
<#local class += ' ' + responsiveDisplay('order',order) />
#if>
#if>
<${tag} class="<#if class?trim!=''>${class?trim}#if>"<#if id!=''> id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
${tag}>
#macro>
<#-- LISTS -->
<#macro ul id='' class='' align='' hide=[] collapsed=false params=''>
<#if collapsed><#local class += ' ' + 'collapse' />#if>
<#if align!=''><#local class+= ' ' + alignmentSettings(align,'') />#if>
<#if hide??><#local class += ' ' + displaySettings(hide,'block') />#if>
class="${class?trim}"#if><#if params!=''> ${params}#if><#if id!=''> ${id}#if>>
<#nested>
#macro>
<#macro li id='' params='' class='' hide=[] align=''>
<#local class += ' ' + alignmentSettings(align,'') + ' ' + displaySettings(hide,'block') />
class="${class?trim}"#if><#if params!=''> ${params}#if><#if id!=''> ${id}#if>>
<#nested>
#macro>
<#-- DIV -->
<#macro div id='' class='' hide=[] collapsed=false align='' params=''>
<#if collapsed><#local class += ' ' + 'collapse' />#if>
<#if align!=''><#local class+= ' ' + alignmentSettings(align,'') />#if>
<#if hide??><#local class += ' ' + displaySettings(hide,'block') />#if>
class="${class?trim}"#if><#if id!=''> id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#-- PARAGRAPH -->
<#macro p id='' class='' hide=[] collapsed=false align='' params=''>
<#if collapsed><#local class += ' ' + 'collapse' />#if>
<#local class += ' ' + alignmentSettings(align,'') + ' ' + displaySettings(hide,'block') />
class="${class?trim}"#if><#if params!=''> ${params}#if><#if id!=''> ${id}#if>>
<#nested>
#macro>
<#-- SPAN -->
<#macro span id='' class='' hide=[] collapsed=false align='' params=''>
<#if collapsed><#local class += ' ' + 'collapse' />#if>
<#local class += ' ' + alignmentSettings(align,'') + ' ' + displaySettings(hide,'inline-flex') />
class="${class?trim}"#if><#if params!=''> ${params}#if><#if id!=''> ${id}#if>>
<#nested>
#macro>
<#-- PRE -->
<#macro pre id='' class='' hide=[] collapsed=false align='' params=''>
<#if collapsed><#local class += ' ' + 'collapse' />#if>
<#local class += ' ' + alignmentSettings(align,'') + ' ' + displaySettings(hide,'block') />
class="${class?trim}"#if><#if params!=''> ${params}#if><#if id!=''> ${id}#if>>
<#nested>
#macro>
<#-- TABS -->
<#-- Tab Container -->
<#macro tabs color='' class='' id='' hide=[] collapsed=false params=''>
<#if collapsed><#local class += ' ' + 'collapse' />#if>
<#if hide??><#local class += ' ' + displaySettings(hide,'block') />#if>
id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#-- Tabs List -->
<#-- type: tabs/tabs nav-justified/pills/pills nav-stacked/pills nav-justified -->
<#macro tabList type='tabs' vertical=false id='' color='' params=''>
<#if type != 'pills'>
<#else>
#if>
#macro>
<#-- Tabs -->
<#-- type: -->
<#macro tabLink class='' hide=[] id='' active=false href='' title='' tabIcon='' params=''>
id="${id}"#if><#if params!=''> ${params}#if>>
<#local tabLinkClass = class + ' nav-link' />
<#if active><#local tabLinkClass += ' active' />#if>
<#local tabLinkSettings = 'role="tab" aria-expanded="${active?c}" aria-controls="${href?remove_beginning("#")}"' />
<#if href?contains('#') && href?contains('.jsp') == false>
<#local tabLinkSettings += ' data-toggle="tab"' />
<#local tabLinkId = '${href?remove_beginning("#")}-tab' />
<#else>
<#local tabLinkId = href?keep_after_last('/')?keep_before('.')?lower_case />
#if>
<@link class=tabLinkClass?trim href=href id=tabLinkId title=title params=tabLinkSettings>
<#if tabIcon!=''><@icon style=tabIcon />#if> ${title}
<#nested>
@link>
#macro>
<#-- TAB Content -->
<#macro tabContent id='' params=''>
id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#-- Tab Panel BS4 -->
<#macro tabPanel id params='' active=false>
${params}#if>>
<#nested>
#macro>
<#-- ACCORDION -->
<#-- The accordionContainer is the container for accordionPanel, which itself is the container for accordionHeader and accordionBody -->
<#-- The childId argument in accordionPanel is meant to be used in the two sub-macros: accordionHeader and accordionBody -->
<#macro accordionContainer id params=''>
${params}#if>>
<#assign parentId = id>
<#nested>
#macro>
<#macro accordionPanel color='' collapsed=true childId='' id='' params=''>
id="${id}"#if><#if params!=''> ${params}#if>>
<#if collapsed>
<#assign aClass = 'collapsed'>
<#assign expanded = 'false'>
<#assign childClass = 'collapse'>
<#else>
<#assign aClass = ''>
<#assign expanded = 'true'>
<#assign childClass = 'collapse show'>
#if>
<#assign childId = childId>
<#nested>
#macro>
<#-- ACCORDION ELEMENT -->
<#-- The boxTools parameter is unused, kept for backwards compatibility -->
<#macro accordionHeader id='' title='' parentId=parentId childId=childId boxTools=false params='' headerIcon='' >
<#assign parentId=parentId />
#macro>
<#macro accordionBody id=childId parentId=parentId class=childClass expanded=expanded params=''>
${params}#if>>
<@boxBody>
<#nested>
@boxBody>
#macro>
<#macro progressBar description='' id='' params='style=\"height:18px; margin-top:40px;\"'>
id="${id}"#if><#if params!=''> ${params}#if>>
<#if description!=''>
${description}
#if>
#macro>
<#macro progress color='primary' id='' params='' value=0 min=0 max=100 text=''>
id="${id}"#if><#if params!=''> ${params}#if>>
<#if text=''>${value}%<#else>${text}#if>
#macro>
<#-- INFO-BOX AdminTLE (widget) -->
<#-- color: only for the left side showing the icon. -->
<#-- bgColor: for the right side containing the text -->
<#macro infoBox color='' boxText='' boxIcon='' boxNumber='' unit='' bgColor='' progressBar='' progressDescription='' id='' params=''>
id="${id}"#if><#if params!=''> ${params}#if>>
<@icon style=boxIcon />
${boxText}
${boxNumber?string(",000")}<#if unit!=''> ${unit} #if>
<#if bgColor!='' && progressBar!=''>
#if>
<#if progressDescription!=''>
${progressDescription}
#if>
#macro>
<#-- TAG -->
<#-- color: default/primary/success/info/warning/danger/ -->
<#macro tag color='default' class='' size='' title='' tagIcon='' id='' params=''>
title='${title}'#if><#if id!=''>id='${id}'#if><#if params!=''>${params}#if>>
<#if tagIcon !=''>
<@icon style=tagIcon />
#if>
<#nested>
#macro>
<#-- BUTTON -->
<#-- bootstrap 3 : size: btn-xs/btn-sm/btn-lg -->
<#-- upcoming bootstrap 4 : size: btn-sm for small buttons/empty for medium buttons/btn-lg for large buttons -->
<#-- color: default[bootstrap4 : secondary]/primary/success/warning/danger/info -->
<#-- color (upcoming bootstrap 4): btn-outline-default/btn-outline-primary/btn-outline-success/btn-outline-warning/btn-outline-danger/btn-outline-info/ -->
<#-- style: btn-block/btn-flat/close/navbar-toggle/collapsed... -->
<#-- type: button/submit/reset -->
<#-- params: data-toggle/data-target/data-dismiss... -->
<#-- buttonIcon: icon name ex: info/check/comment/envelope... -->
<#-- iconPosition: left/right -->
<#-- cancel: switch to true for a cancellation form button. Adds the "formnovalidate" attribute to the button, as well as the right class -->
<#-- formId: contains the form ID if the button is outside of the form -->
<#-- buttonTargetId: contains the target element ID -->
<#-- buttonNested=false : If true add content inside the button else -default- outside -->
<#-- showTitle, showTitleXs, showTitleSm, showTitleMd, showTitleLg are deprecated in Lutece v7 -->
<#macro button name='' id='' type='button' size='' color='' style='' class='' params='' value='' title='' tabIndex='' hideTitle=[] showTitle=true showTitleXs=true showTitleSm=true showTitleMd=true showTitleLg=true buttonIcon='' disabled=false iconPosition='left' dropdownMenu=false cancel=false formId='' buttonTargetId='' buttonNested=false>
<#if cancel || color = 'default' || color='btn-default' || color='btn-secondary' || color='secondary'>
<#local buttonColor = 'default' />
<#elseif !cancel && color=''>
<#local buttonColor = mainColor />
<#else>
<#local buttonColor = color />
#if>
<#-- Visibility of button title -->
<#local displayTitleClass = displaySettings(hideTitle,'inline-flex') />
<#if style != ''>
<#if style?contains('card-control')>
<#if style?contains('collapse')>
<#local widgetAction = 'collapse' />
<#elseif style?contains('remove')>
<#local widgetAction = 'remove' />
#if>
<#local btnStyle = style?replace('collapse|remove', '', 'r')?trim />
<#elseif style?contains('modal')>
<#local widgetAction = 'modal' />
<#local btnStyle = style?replace('modal', '', 'r')?trim />
<#else>
<#local btnStyle = style />
#if>
#if>
<#if isContainerTd??>
<#if hideTitle?size gt 0 && isContainerTd>
<#local class += ' btn-just-icon' />
#if>
#if>
<#if buttonNested><#local dropdownMenu=false />#if>
<#if dropdownMenu>
<#else>
<#if !buttonNested><#nested>#if>
#if>
#macro>
<#-- A BUTTON (LINK STYLED AS A BUTTON) -->
<#-- size: sm/lg/or EMPTY for medium size-->
<#-- color: default/primary/success/warning/danger/info/ -->
<#-- style: btn-block/btn-flat/disabled/btn-app -->
<#-- icon: icon name ex: info/check/comment/envelope... -->
<#macro aButton name='' id='' href='' size='' color='' style='btn' align='' class='' params='' title='' tabIndex='' hideTitle=[] buttonIcon='' disabled=false iconPosition='left' dropdownMenu=false>
<#-- Visibility of button title -->
<#local displayTitleClass = displaySettings(hideTitle,'inline') />
<#if color = 'default' || color='btn-default' || color='btn-secondary' || color='secondary'>
<#local buttonColor = 'default' />
<#elseif color = '' || color = 'primary'>
<#local buttonColor = mainColor />
<#else>
<#local buttonColor = color />
#if>
<#if dropdownMenu>
#if>
#macro>
<#-- BTN TOOLBAR -->
<#macro btnToolbar id='' class='' align='' ariaLabel='' params=''>
<#if align!=''><#local class += ' ' + alignmentSettings(align,'') />#if>
aria-label="${ariaLabel}"#if><#if id!=''> id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#-- BTN GROUP -->
<#-- size: sm/empty/lg -->
<#-- align: left/center/right -->
<#macro btnGroup align='' size='' class='' id='' params='' ariaLabel='' hide=[]>
<#local class += ' ' + displaySettings(hide,'inline-flex') + ' ' + alignmentSettings(align,'') />
aria-label="${ariaLabel}"#if><#if id!=''> id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#macro actionButtons button1Name='' button2Name='' i18nValue1Key='portal.admin.message.buttonValidate' i18nValue2Key='portal.admin.message.buttonCancel' url1='' url2='' icon1='save' icon2='times' offset=3 >
<@formGroup rows=2>
<#if url1 != ''>
<@aButton href='${url1}' buttonIcon='${icon1}' title='#i18n{${i18nValue1Key}}' />
<#else>
<@button type='submit' name='${button1Name}' buttonIcon='${icon1}' title='#i18n{${i18nValue1Key}}' />
#if>
<#if url2 != ''>
<@aButton href='${url2}' buttonIcon='${icon2}' title='#i18n{${i18nValue2Key}}' color='secondary' />
<#else>
<#if button2Name != ''>
<@button type='submit' name='${button2Name}' buttonIcon='${icon2}' title='#i18n{${i18nValue2Key}}' color='secondary' />
#if>
#if>
@formGroup>
#macro>
<#-- Radio button/Checkbox as buttons (to use with btnGroup) -->
<#-- type: radio/checkbox -->
<#macro btnGroupRadioCheckbox type='checkbox' color=mainColor size='' name='' id='' params='' ariaLabel='' labelFor='' labelKey='' labelParams='' tabIndex='' value='' checked=false>
${labelParams}#if>>
value="${value}"#if><#if params!=''> ${params}#if><#if tabIndex!=''> tabindex="${tabIndex}"#if><#if checked> checked#if> /><#if labelKey!=''>${labelKey}#if>
#macro>
<#-- Simple links a href, anchors -->
<#macro link href='' class='' id='' name='' title='' alt='' target='' params=''>
class="${class}"#if><#if id!=''> id="${id}"#if><#if name!=''> name="${name}"#if><#if target!=''> target="${target}"#if><#if title!=''> title="${title}"#if><#if alt!=''> alt="${alt}"#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#-- MODAL -->
<#-- bgColor: modal-default/modal-primary/modal-info/modal-warning/modal-danger -->
<#macro modal id params='' bgColor='' size=''>
#macro>
<#macro modalHeader titleLevel='h4' modalTitle='' id='' params=''>
#macro>
<#macro modalBody id='' params=''>
id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#macro modalFooter id='' params=''>
#macro>
<#-- BREADCRUMBS -->
<#macro breadcrumbs id='' params=''>
id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#-- CALLOUT -->
<#-- AdminLTE classes: info/warning/danger/success -->
<#macro callOut color='' titleLevel='h3' title='' callOutIcon='' id='' params=''>
id="${id}"#if><#if params!=''> ${params}#if>>
<#if title!=''><${titleLevel}><#if callOutIcon!=''><@icon style=callOutIcon />#if> ${title}${titleLevel}>#if>
<#nested>
#macro>
<#-- ALERT -->
<#-- classes: alert-success/alert-info/alert-warning/alert-danger + alert-dismissible -->
<#-- color: primary/success/info/warning/danger -->
<#macro alert class='' color='' titleLevel='h3' title='' iconTitle='' dismissible=false id='' params=''>
id="${id}"#if><#if params!=''> ${params}#if>>
<#if dismissible>
×
#if>
<#if title!=''>
<${titleLevel}>
<#if iconTitle!=''><@icon style=iconTitle />#if>
${title}
${titleLevel}>
#if>
<#nested>
#macro>
<#---------------------------------------------------------->
<#-- Card as Box -->
<#-- color: default/primary/info/success/warning/danger -->
<#-- style: solid (no top border) -->
<#-- collapsed: true/false -->
<#---------------------------------------------------------->
<#macro box color='' id='' style='' class='' params='' collapsed=false>
<#local nested><#nested>#local>
<#if !nested?contains('card-body') && !nested?contains('card-footer')>
<#local class += ' margin-bottom:5rem;'>
#if>
id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#-- The boxTools parameter is unused, kept for backwards compatibility -->
<#macro boxHeader title='' i18nTitleKey='' hideTitle=[] showTitle=true id='' params='' boxTools=false titleLevel='h5'>
#macro>
<#macro boxBody id='' class='' collapsed=false align='' params=''>
<#if collapsed><#local class += ' ' + 'collapse' />#if>
<#if align!=''><#local class += ' ' + alignmentSettings(align,'') />#if>
id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#macro boxFooter class='' align='' id='' params=''>
<#if align!=''><#local class += ' ' + alignmentSettings(align,'') />#if>
#macro>
<#---------------------------------------->
<#-- color: Bootstrap -->
<#-- unit: %,... -->
<#macro smallBox color='' title='' text='' boxIcon='' titleLevel='h5' unit='' url='' urlText='' id='' params='' fontSize='40px'>
id="${id}"#if><#if params!=''> ${params}#if>>
#macro>
<#-- AdminLTE Error Page -->
<#-- Error Type: 500,404... -->
<#-- Color: primary/blue/navy/aqua/teal/green/orange/yellow/red/purple/maroon/gray/black... -->
<#macro errorPage color='' errorType='' id='' params=''>
id="${id}"#if><#if params!=''> ${params}#if>>
${errorType}
<@icon style='warning' class='text-${color}' />
<#if errorType=='404'>
#i18n{portal.util.error404.title}
<#elseif errorType='500'>
#i18n{portal.util.error500.title}
<#else>...
#if>
<#if errorType=='404'>
#i18n{portal.util.error404.text}
<#elseif errorType='500'>
#i18n{portal.util.error500.text}
<#else>...
#if>
<@aButton href='' size='' color='bg-${color}' style='btn-flat'>
<@icon style='home' />
#i18n{portal.util.labelBackHome}
@aButton>
#macro>
<#-- CONTEXTUAL BACKGROUND P-->
<#-- Bootstrap colors: primary/success/info/warning/danger -->
<#-- AdminTLE colors: gray/gray-light/black/red/yellow/aqua/blue/light-blue/green/navy/teal/olive/lime/orange/fuchsia/purple/maroon -->
<#macro coloredBg color='' type='p' id='' params=''>
<${type} class="bg-${color}"<#if id!=''> id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
${type}>
#macro>
<#macro listGroup id='' class='' params=''>
id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#macro listGroupItem id='' class='' params=''>
id="${id}"#if><#if params!=''> ${params}#if>>
<#nested>
#macro>
<#macro unstyledList id='' params=''>
id="${id}"#if><#if params!=''> ${params}#if>>
<#assign liClass = "margin">
<#nested>
#macro>
<#-- DROPDOWN MENU LIST -->
<#macro dropdownList id='' params=''>
#macro>
<#macro dropdownItem class='' href='' title='' id='' params=''>
id="${id}"#if><#if params!=''> ${params}#if>>${title}
#macro>
<#-- CARDS -->
<#macro card header=false headerTitle='' headerIcon=false headerTitleIcon=''>
<#if header>#if>
<#nested>
#macro>
<#-- FUNCTION: DISPLAY -->
<#-- This function returns a "visible" or "hidden" class for any component -->
<#-- breakpoints: "all" || "xs"/"sm"/"md"/"lg"/"xl" -->
<#-- display: inline/inline-block/block/table/table-cell/table-row/flex/inline-flex -->
<#function displaySettings breakPoints=[] display=''>
<#local breakPointsOrdered = [] />
<#if breakPoints?seq_contains('all')>
<#local breakPointsOrdered += ['all'] />
#if>
<#if breakPoints?seq_contains('xs')>
<#local breakPointsOrdered += ['xs'] />
#if>
<#if breakPoints?seq_contains('sm')>
<#local breakPointsOrdered += ['sm'] />
#if>
<#if breakPoints?seq_contains('md')>
<#local breakPointsOrdered += ['md'] />
#if>
<#if breakPoints?seq_contains('lg')>
<#local breakPointsOrdered += ['lg'] />
#if>
<#if breakPoints?seq_contains('xl')>
<#local breakPointsOrdered += ['xl'] />
#if>
<#local displayClass = '' />
<#if breakPointsOrdered?? && breakPointsOrdered?size > 0>
<#list breakPointsOrdered as breakPoint>
<#if breakPoint = 'xs' || breakPoint = 'all'>
<#local displayClass += 'd-none' />
<#if breakPoint = 'xs'>
<#if !breakPointsOrdered?seq_contains('sm')>
<#local displayClass += ' d-sm-${display}' />
#if>
#if>
<#elseif breakPoint = 'sm' || breakPoint = 'md' || breakPoint = 'lg' || breakPoint = 'xl'>
<#if breakPoint = 'sm'>
<#if displayClass = ''>
<#local displayClass += ' d-' + breakPoint + '-none' />
<#elseif displayClass = 'd-none' && !breakPointsOrdered?seq_contains('md')>
<#local displayClass += ' d-md-${display}' />
#if>
<#elseif breakPoint = 'md'>
<#if !breakPointsOrdered?seq_contains('sm')>
<#local displayClass += ' d-' + breakPoint + '-none' />
#if>
<#if !breakPointsOrdered?seq_contains('lg')>
<#local displayClass += ' d-lg-${display}' />
#if>
<#elseif breakPoint = 'lg'>
<#if !breakPointsOrdered?seq_contains('md')>
<#local displayClass += ' d-' + breakPoint + '-none' />
#if>
<#if !breakPointsOrdered?seq_contains('xl')>
<#local displayClass += ' d-xl-${display}' />
#if>
<#elseif breakPoint = 'xl'>
<#if !breakPointsOrdered?seq_contains('lg')>
<#local displayClass += ' d-' + breakPoint + '-none' />
#if>
#if>
<#else>
<#local displayClass += ' undefined_breakpoint' />
#if>
#list>
#if>
<#return displayClass?trim>
#function>
<#-- This function returns responsive classes or flex order classes -->
<#-- type: col|offset|order -->
<#function responsiveDisplay type='' breakpoints={}>
<#local responsiveDisplayClass = '' />
<#list breakpoints as breakpointkey,breakpointvalue>
<#if breakpointvalue!=0>
<#if breakpointkey = 'xs'>
<#local responsiveDisplayClass += ' ${type}-${breakpointvalue}' />
<#else>
<#local responsiveDisplayClass += ' ${type}-${breakpointkey}-${breakpointvalue}' />
#if>
#if>
#list>
<#return responsiveDisplayClass?trim>
#function>
<#function alignmentSettings align='' style=''>
<#local x = ''>
<#if align !=''>
<#if align = 'left'>
<#if style = 'text'>
<#local x = 'text-left' />
<#elseif style = ''>
<#local x = 'd-flex justify-content-start' />
#if>
<#elseif align = 'right'>
<#if style = 'text'>
<#local x = 'text-right' />
<#elseif style = ''>
<#local x = 'd-flex justify-content-end' />
#if>
<#elseif align = 'center'>
<#if style = 'text'>
<#local x = 'text-center' />
<#elseif style = ''>
<#local x = 'd-flex justify-content-center' />
#if>
#if>
#if>
<#return x>
#function>
<#-- -------------------------------------------------
-- MACRO ADMIN STRUCTURE - HEADER + NAVBAR + FOOTER --
-------------------------------------------------- -->
<#-- MACRO adminHeader -->
<#macro adminHeader site_name=site_name>
Haut de page
<#if user.userLevel == 0>
#if>
<#if admin_logout_url?has_content>
#if>
#macro>
<#-- MACRO adminFooter -->
<#macro adminFooter >
<@coreAdminJSLinks />
${javascript_files}
#macro>
<#-- MACRO adminHome -->
<#macro adminHome >
#macro>
<#-- adminContentHeader -->
<#macro adminContentHeader>
#macro>
<#-- adminLoginPage -->
<#macro adminLoginPage title='' site_name='SITE_NAME'>
#macro>
<#-- adminHeaderDocumentationLink -->
<#macro adminHeaderDocumentationLink >
<#if feature_documentation?has_content >
<#if feature_documentation?exists>
#if>
#if>
#macro>
<#macro adminSiteColumnOutline columnid=''>
${i18n("portal.site.columnId",columnid)}
<#nested>
#macro>
<#-- adminMessagePage -->
<#macro adminMessagePage title=''>
<#assign title=title />
<#assign alerttype="secondary" />
<#assign icontype="fa-info-circle" />
<#if title??>
<#if title?trim='' >
<#assign title="Information" />
#if>
#if>
<#if message.type == 2 >
<#assign alerttype="danger" />
<#assign icontype="fa-question-circle" />
<#elseif message.type == 3 >
<#assign alerttype="warning" />
<#assign icontype="fa-exclamation-circle" />
<#elseif message.type == 4 >
<#assign alerttype="warning" />
<#assign icontype="fa-question-circle" />
<#elseif message.type == 5 >
<#assign alerttype="danger" />
<#assign icontype="fa-ban" />
#if>
${title!}
${text!}
<#nested>
#macro>
<#-- fieldSet -->
<#macro fieldSet class='' fieldsetId='' fieldsetParams='' legend='' legendClass='' legendId='' legendParams='' hideLegend=[] disabled=false>
class="${class}"#if><#if fieldsetId!=''> id="${fieldsetId}"#if><#if fieldsetParams!=''> ${fieldsetParams}#if><#if disabled> disabled#if>>
<#if legend!=''>
<#local legendClass += ' ' + displaySettings(hideLegend,'block') />
class="${legendClass?trim}"#if><#if legendId!=''> id="${legendId}"#if><#if legendParams!=''> ${legendParams}#if>>${legend}
#if>
<#nested>
#macro>
<#--Badge : BS badge + label -->
<#macro badge color='${mainColor}' badgeIcon='' title='' htmlEl='deprecated' type='deprecated' style='deprecated' class='deprecated' >
title="${title}" #if> >
<#if badgeIcon !=''>
<@icon style=badgeIcon />
#if>
<#nested>
#macro>
<#-- RESPONSIVE -->
<#-- HTML ELEMENTS -->
<#macro img url='' alt='' title='' class='' id='' params=''>
id="${id}"#if><#if params!=''> ${params}#if> />
#macro>
<#-- Email Default Template -->
<#macro emailTemplate title='Lutece' footer_link='https://fr.lutece.paris.fr'>
#macro>
<#macro adminLanguage languages lang action='jsp/admin/DoChangeLanguage.jsp' >
<@row>
<@columns class="mx-4">
<@icon style='language' /> #i18n{portal.admin.admin_home.language}
@columns>
@row>
<@tform method='post' action=action class='form-inline'>
<@row>
<@columns class="mx-4">
<#list languages as language>
<#if lang==language.code>
<#local languageButtonColor='success'>
<#else>
<#local languageButtonColor='default'>
#if>
<@button color='${languageButtonColor}' type='submit' name='language' value='${language.code}' title='${language.name}' size='xs' />
#list>
@columns>
@row>
@tform>
#macro>
<#macro adminAccessibilityMode>
<@tform method='post' action='jsp/admin/DoModifyAccessibilityMode.jsp' class="ml-2">
<@input type='hidden' name='token' value='${token}' />
<#if user.accessibilityMode>
<@button color='link text-dark' size='sm' type='submit' buttonIcon='eye' title='#i18n{portal.users.admin_header.labelDeactivateAccessibilityMode}'/>
<#else>
<@button color='link text-dark' size='sm' type='submit' buttonIcon='eye-slash' title='#i18n{portal.users.admin_header.labelActivateAccessibilityMode}'/>
#if>
@tform>
#macro>