@pageContainer>
<@pageColumn>
<@pageHeader title='#i18n{portal.system.manage_caches.titleCacheList}'>
<@tform method='post' type='inline'>
<@formGroup labelFor='search_cache' labelKey='#i18n{portal.system.manage_plugins.buttonFilter}' hideLabel=['all'] formStyle='inline'>
<@inputGroup>
<@input type='text' name='search_cache' id='search_cache' placeHolder='#i18n{portal.system.manage_plugins.buttonFilter}' params='autocomplete="off" addons' />
<@button color='primary' title='#i18n{portal.system.manage_plugins.buttonFilter}' buttonIcon='filter' hideTitle=['all'] />
@inputGroup>
@formGroup>
@tform>
<@tform method='post' action='jsp/admin/system/DoResetCaches.jsp' type='inline'>
<@input type='hidden' name='token' value='${token}' />
<@button type='submit' buttonIcon='trash' title='#i18n{portal.system.manage_caches.buttonFlush}' color='danger' hideTitle=['xs','sm'] />
@tform>
@pageHeader>
<@div class='mt-3'>
<@alert class='alert-minor' title='#i18n{portal.system.manage_caches.featureDescription}' iconTitle='info-circle'/>
<@alert class='alert-warning alert-important' color='danger' title='#i18n{portal.system.manage_caches.cautionTitle}' iconTitle='exclamation-circle'>#i18n{portal.system.manage_caches.cautionMessage}@alert>
@div>
<@manageFeature>
<#assign id=0>
<#list services_list as service>
<@manageFeatureItem liClass='item-labels' id='cache_${id}'>
<@manageFeatureItemColumn auto=true>
<#if service.cacheEnable>
<@tag color='success' title='#i18n{portal.system.manage_caches.imgAltEnable}'><@icon style='check' />@tag>
<#else>
<@tag color='danger' title='#i18n{portal.system.manage_caches.imgAltDisable}'><@icon style='times' />@tag>
#if>
@manageFeatureItemColumn>
<@manageFeatureItemColumn class='searchable' flex=false>
${service.name}
<@p class='text-secondary small mb-0'>#i18n{portal.system.manage_caches.columnTitleCacheSize} : ${service.cacheSize!}@p>
@manageFeatureItemColumn>
<@manageFeatureItemColumn auto=true align='end'>
<@aButton href='jsp/admin/system/CacheInfos.jsp?id_cache=${id}' title='#i18n{portal.util.labelMore}' buttonIcon='eye' color='default' class='btn-icon me-1' hideTitle=['all'] />
<#-- a required cache is never disabled, a cache whose reset is prevented is never cleared: a disabled button keeps the place of the action -->
<#if (service.required)!false>
<@span class='d-inline-block me-1' params='title="#i18n{portal.system.manage_caches.labelRequired}"'><@button class='btn-icon' buttonIcon='lock' color='default' title='#i18n{portal.system.manage_caches.labelRequired}' hideTitle=['all'] disabled=true />@span>
<#else>
<@tform method='post' type='inline' class='me-1' action='jsp/admin/system/ConfirmToggleCache.jsp'>
<@input type='hidden' name='id_cache' value='${id}' />
<@input type='hidden' name='token' value='${token}' />
<#if service.cacheEnable>
<@button type='submit' class='btn-icon' buttonIcon='player-stop' title='#i18n{portal.system.manage_caches.actionDisable}' color='danger' hideTitle=['all'] />
<#else>
<@button type='submit' class='btn-icon' buttonIcon='player-play' title='#i18n{portal.system.manage_caches.actionEnable}' color='success' hideTitle=['all'] />
#if>
@tform>
#if>
<#if (service.preventReset)!false>
<@span class='d-inline-block' params='title="#i18n{portal.system.manage_caches.labelPreventReset}"'><@button class='btn-icon' buttonIcon='trash-off' color='default' title='#i18n{portal.system.manage_caches.labelPreventReset}' hideTitle=['all'] disabled=true />@span>
<#else>
<@tform method='post' type='inline' action='jsp/admin/system/DoResetCaches.jsp'>
<@input type='hidden' name='id_cache' value='${id}' />
<@input type='hidden' name='token' value='${token}' />
<@button type='submit' class='btn-icon' buttonIcon='trash' title='#i18n{portal.system.manage_caches.actionClear}' color='danger' hideTitle=['all'] />
@tform>
#if>
@manageFeatureItemColumn>
@manageFeatureItem>
<#assign id=id + 1>
#list>
@manageFeature>
@pageColumn>
@pageContainer>