<#-- 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_bulma.html <#macro commonsName>Commons Bulma 0.7.2 <#macro commonsDescription>Freemarker Commons macros powered by Bulma CSS Framework v0.7.2 <#macro coreAdminCSSLinks> <#macro coreAdminJSLinks> <#global gClassActive='is-active' /> <#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=" />
<#macro paginationAdmin paginator combo=0 form=1 nb_items_per_page=nb_items_per_page showcount=1 showall=0> <#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 ( paginator.pagesCount > 1 )> <#if ( paginator.pageCurrent - offsetPrev > 1 )>  #i18n{portal.util.labelFirst} <#if ( paginator.pageCurrent > 1 )>  #i18n{portal.util.labelPrevious} <#else>    <#if ( paginator.pageCurrent - offsetPrev > 1 )> ... <#list paginator.pagesLinks as link> <#if link.index == paginator.pageCurrent> ${link.name} <#else> ${link.name} <#if ( paginator.pageCurrent + offsetNext < paginator.pagesCount )> ... <#if ( paginator.pageCurrent < paginator.pagesCount )>  #i18n{portal.util.labelNext} <#if ( paginator.pageCurrent + offsetNext < paginator.pagesCount )>  #i18n{portal.util.labelLast} <#else>    <#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 /> <#macro paginationCombo paginator nb_items_per_page=nb_items_per_page showall=0>
<#macro paginationItemCount paginator combo=0 nb_items_per_page=nb_items_per_page showcount=1 showall=0>
<#-- Display combo --> <#if combo == 1 > <@paginationCombo paginator=paginator nb_items_per_page=nb_items_per_page showall=showall /> <#-- Display item count --> <#if showcount == 1 >
<#if (paginator.labelItemCount)?? && paginator.labelItemCount?has_content>${paginator.labelItemCount} : ${paginator.itemsCount}
<#-- NAVIGATION --> <#macro item_navigation item_navigator id='item-navigator' align='' hideButtonTitle=[] buttonColor='seacondary card-header-icon' buttonSize='sm'> <#local class = alignmentSettings(align) /> <#macro actionButtons button1Name='' button2Name='' i18nValue1Key='portal.admin.message.buttonValidate' i18nValue2Key='portal.admin.message.buttonCancel' url1='' url2='' icon1='save' icon2='times' offset=3 > <@formGroup> <#if url1 != ''> <@aButton href='${url1}' class='button is-primary' buttonIcon=icon1 title='#i18n{${i18nValue1Key}}' /> <#else> <@button type='submit' name=button1Name buttonIcon=icon1 title='#i18n{${i18nValue1Key}}' /> <#if url2 != ''> <@aButton href=url2 class='button is-default' buttonIcon=icon2 title='#i18n{${i18nValue2Key}}' /> <#else> <#if button2Name != ''> <@button type='submit' name=button2Name class='button is-default' buttonIcon=icon2 title='#i18n{${i18nValue2Key}}' /> <#macro messages errors=[] infos=[] warnings=[] errors_class="alert alert-danger" infos_class="alert alert-info" warnings_class="alert alert-warning"> <#if errors??> <#if errors?size > 0 >
<#list errors as error > ${error.message}
<#if infos??> <#if infos?size > 0 >
<#list infos as info > ${info.message}
<#if warnings??> <#if warnings?size > 0 >
x <#list warnings as warning > ${warning.message}
<#---------------------------NEW MACROS------------------------------> <#-- TABLE --> <#-- class: --> <#macro table id='' class='is-fullwidth' responsive=true condensed=true hover=true striped=false headBody=true bordered=false collapsed=false caption='' params='' deprecated...> <@deprecatedWarning args=deprecated /> <#local class = class /> <#if condensed> <#local class += ' is-narrow' /> <#if hover> <#local class += ' is-hoverable' /> <#if striped> <#local class += ' is-striped' /> <#if bordered> <#local class += ' is-bordered' /> <#if collapsed> <#local class += ' collapse' /> <#if responsive>
id="${id}"<#if params!=''> ${params}> <#if caption!=''> <#if headBody> <#nested> <#if headBody>
${caption}
<#if responsive>
<#macro tableHead id='' class='' params=''> id="${id}"<#if class?trim!=''> class="${class?trim}"<#if params!=''> ${params}> <#nested> <#macro tableBody id='' class='' params=''> id="${id}"<#if class?trim!=''> class="${class?trim}"<#if params!=''> ${params}> <#nested> <#macro tableFoot id='' class='' params=''> id="${id}"<#if class?trim!=''> class="${class?trim}"<#if params!=''> ${params}> <#nested> <#macro tableHeadBodySeparator id='' class='' params=''> id="${id}"<#if class?trim!=''> class="${class?trim}"<#if params!=''> ${params}> <#-- MACRO TR --> <#macro tr id='' class='' hide=[] params=''> <#local class += ' ' + displaySettings(hide,'is-inline') + ' ' + alignmentSettings(align) /> id="${id}"<#if class?trim!=''> class="${class?trim}"<#if params!=''> ${params}> <#nested> <#-- MACRO TH --> <#-- valign: baseline|top|middle|bottom|bottom|text-top --> <#macro th id='' title='' scope='' class='' align='' valign='' hide=[] cols=0 xs=0 sm=0 md=0 lg=0 xl=0 colspan=0 rowspan=0 flex=false params=''> <#local class += ' ' + displaySettings(hide,'is-inline') + ' ' + alignmentSettings(align) /> <#if valign!=''><#local class += ' align-' + valign /> id="${id}"<#if class?trim!=''> class="${class?trim}"<#if title!=''> title="${title}"<#if scope!=''> scope="${scope}"<#if colspan gt 0> colspan="${colspan}"<#if rowspan gt 0> rowspan="${rowspan}"<#if params!=''> ${params}> <#nested> <#-- MACRO TD --> <#macro td id='' class='' hide=[] align='' valign='' xs=0 sm=0 md=0 lg=0 xl=0 colspan=0 rowspan=0 flex=false params='' deprecated...> <@deprecatedWarning args=deprecated /> <#local class += ' ' + displaySettings(hide,'is-inline') + ' ' + alignmentSettings(align) /> <#if valign!=''><#local class += ' align-' + valign /> id="${id}"<#if colspan gt 0> colspan="${colspan}"<#if rowspan gt 0> rowspan="${rowspan}"<#if params!=''> ${params}> <#if flex>
<#nested> <#if flex>
<#-- ICONS --> <#-- Icons from FontAwesome 5.8.1 --> <#macro icon prefix='fa-' style='fa-lg' 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 = 'fas ' + prefix /> <#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 /> <#-- 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 params!=''> ${params}> <#nested> <#-- FORM --> <#-- type: inline/horizontal/form --> <#-- enctype: multipart/form-data | text/plain --> <#macro tform type='' class='' align='' hide=[] action='' method='post' name='' id='' role='' collapsed=false enctype='' params='' deprecated...> <@deprecatedWarning args=deprecated /> <#local class = class /> <#if align!=''><#local class += ' ' + alignmentSettings(align) /> <#if hide??><#local class += ' ' + displaySettings(hide,'block') /> <#if collapsed><#local class += ' collapse' /> <#switch type> <#case 'horizontal'> <#local class += ' is-horizontal'> <#break> <#case 'inline'> <#local class += 'is-flex is-justify-content-flex-start is-align-items-center card-header-icon'> <#break> <#default> <#local class += ''>
id="${id}"<#if action!=''> action="${action}"<#if method!=''> method="${method}"<#if name!=''> name="${name}"<#if role!=''> role="${role}"<#if method='post' && enctype!=''> enctype='${enctype}'<#if params!=''> ${params}> <#nested>
<#-- FORM ELEMENT STRUCTURE --> <#-- formStyle values: empty/inline/horizontal/navbar-form/navbar-left... Default is horizontal --> <#-- class: is-success/is-danger/is-warning... --> <#-- groupStyle: is-success/is-danger/is-warning... --> <#macro formGroup formStyle='' class='' groupStyle='' rows=1 labelKey='' labelFor='' labelId='' labelClass='' helpKey='' id='' mandatory=false hideLabel=[] collapsed=false params='' deprecated...> <@deprecatedWarning args=deprecated /> <#assign propagateAddons = false> <#if groupStyle='addons'><#assign propagateAddons = true> <#switch formStyle> <#case 'horizontal'> <#local class += ' is-horizontal'> <#break> <#default> <#local class += ''> <#local labelDisplayClass = displaySettings(hideLabel,'') /> <#if collapsed><#local class += ' collapse' />
<#if groupStyle!='addons'> <#if formStyle='horizontal'>
<#assign propagateMandatory = mandatory> <#nested> <#assign propagateMandatory = false> <#if formStyle='horizontal'>
<#if helpKey !=''>

${helpKey}

<#macro formField class=''>
<#nested>
<#macro formLabel class='' labelFor='' labelId='' labelKey='' hideLabel=[] mandatory=true deprecated...> <@deprecatedWarning args=deprecated /> <#local class += ' ' + displaySettings(hideLabel,'') /> <#macro formHelp style='inline' class='' labelFor=''>

id="${labelFor}_help"> <#nested>

<#-- INPUTS & TEXTAREA --> <#-- ---------------------------------------------- --> <#-- name : Mandatory : Name for field --> <#-- type : text/textarea/password/email/file/number/range/color/hidden/tel. Default : text --> <#-- value: '' --> <#-- class: '' --> <#-- id: '' --> <#-- title: '' --> <#-- size: '' --> <#-- inputSize: 0 --> <#-- maxlength: 0 --> <#-- placeHolder: '' --> <#-- rows: 4 Textarea specific --> <#-- cols: 40 Textarea specific --> <#-- pattern: '' [A-F][0-9]{5} --> <#-- tabIndex: '' --> <#-- disabled: false --> <#-- readonly: false --> <#-- min: 0 --> <#-- max: 0 --> <#-- min: 0 --> <#-- params: '' --> <#-- mandatory: false --> <#-- language: for input type DATE and datepickers --> <#-- defaultDate: Format must be "yyyy-MM-dd hh:mm" --> <#-- minDate: Format must be "yyyy-MM-dd hh:mm" --> <#-- maxDate: Format must be "yyyy-MM-dd hh:mm" --> <#-- defaultHour: Format must be "hh" --> <#-- defaultMinute: Format must be "mm" --> <#-- minTime : Format must be "hh:mm" --> <#-- maxTime : Format must be "hh:mm" --> <#-- format='' --> <#-- showFormat='' --> <#-- dateRangeEndId='' --> <#-- dateParams : [] Look at https://flatpickr.js.org/options/ for options list --> <#-- Example : dateParams=[{'inline': 'true'},{'hourIncrement': '4'}] --> <#-- ---------------------------------------------- --> <#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 params='' mandatory=false language=.locale minDate='' maxDate='' defaultDate='' minTime='' maxTime='' defaultTime='' format='' showFormat='' dateRangeEndId='' dateParams=[]> <#if propagateMandatory?? && propagateMandatory ><#local mandatory = true /> <#switch size> <#case 'xs'> <#assign selectSize='small'> <#break> <#case 'sm'> <#assign selectSize='small'> <#break> <#case 'md'> <#assign selectSize='medium'> <#break> <#case 'lg'> <#assign selectSize='large'> <#break> <#default> <#assign selectSize='normal'> <#if type='textarea'> <#elseif type='text' || type='search' || type='password' || type='email' || type='file' || type='number' || type='color' || type='range' || type='tel'> <#if params?contains('addons')>
tabindex="${tabIndex}"<#if placeHolder!=''> placeholder="${placeHolder}"<#if title!=''> title="${title}"<#if maxlength > 0> maxlength="${maxlength}"<#if inputSize!=0> size="${inputSize}"<#if disabled> disabled<#if readonly> readonly<#if id!=''> id="${id}"<#if params!=''> ${params}<#if pattern!=''>pattern=${pattern}<#if min!=max> min="${min}"<#if max!=0> max="${max}"<#if mandatory> required <#if labelFor?? && labelFor!='' && helpkey?? && helpKey!=''> aria-describedby="${labelFor}_help" /> <#if params?contains('addons')>
<#elseif type='file' >
<#elseif type='date' || type='datetime' || type='daterange' || type='datetimerange'> tabindex="${tabIndex}"<#if placeHolder!=''> placeholder="${placeHolder}"<#if title!=''> title="${title}"<#if maxlength > 0> maxlength="${maxlength}"<#if inputSize!=0> size="${inputSize}"<#if disabled> disabled<#if readonly> readonly<#if id!=''> id="${id}"<#if params!=''> ${params}<#if pattern!=''>pattern=${pattern}<#if min!=max> min="${min}"<#if max!=0> max="${max}"<#if mandatory> required <#if labelFor?? && labelFor!='' && helpkey?? && helpKey!=''> aria-describedby="${labelFor}_help" /> <#if type='date'> <@getDate idField='${id}' language=language format=format showFormat=showFormat minDate=minDate maxDate=maxDate defaultDate=defaultDate dateOptions=dateParams /> <#elseif type='datetime'> <@getDateTime idField='${id}' language=language format=format showFormat=showFormat minDate=minDate maxDate=maxDate defaultDate=defaultDate minTime=minTime maxTime=maxTime dateOptions=dateParams /> <#elseif type='daterange'> <#if dateRangeEndId != ''> <@getDateRange idField='${id}' idEndField='${dateRangeEndId}' language=language format=format showFormat=showFormat minDate=minDate maxDate=maxDate defaultDate=defaultDate dateOptions=dateParams /> <#else> <@alert class='danger'>${i18n("portal.util.datepicker.rangeEndId.mandatory")} <#elseif type='datetimerange'> <#if dateRangeEndId != ''> <@getDateTimeRange idField='${id}' idEndField='${dateRangeEndId}' language=language format=format showFormat=showFormat minDate=minDate maxDate=maxDate defaultDate=defaultDate minTime=minTime maxTime=maxTime dateOptions=dateParams /> <#else> <@alert class='danger'>${i18n("portal.util.datepicker.rangeEndId.mandatory")} <#if id=''><@alert class='danger'>${i18n("portal.util.datepicker.id.mandatory")} <#elseif type='hidden'> id="${id}" value="${value}" /> <#else><@icon style='warning' />Type not supported <#-- STATIC TEXT --> <#-- Bootstrap colors: muted/primary/success/info/warning/danger --> <#-- AdminLTE colors: red/yellow/aqua/blue/black/light-blue/green/gray/navy/teal/olive/lime/orange/fuchsia/purple/maroon --> <#macro staticText inForm=true color='' id='' params=''>

id="${id}"<#if params!=''> ${params}> <#nested>

<#-- CHECKBOX --> <#-- orientation: vertical/inline. Default is vertical --> <#macro checkBox name id='' labelKey='' labelFor='' orientation='vertical' value='' tabIndex='' title='' disabled=false readonly=false checked=false params='' mandatory=false deprecated...> <@deprecatedWarning args=deprecated /> <#if id = ''><#local id = name /> <#if orientation!='switch'>