<#-- -- Build the attribute for sorting table -- @param filter the filter -- @return the attributes used in the URL --> <#function buildSortSearchAttribute filter> <#assign sortSearchAttribute = "" /> <#if filter??> <#if filter.filterExtenderType?? && filter.filterExtenderType != ""> <#assign sortSearchAttribute = sortSearchAttribute + "&filterExtenderType=" + filter.filterExtenderType /> <#if filter.filterIdExtendableResource?? && filter.filterIdExtendableResource != ""> <#assign sortSearchAttribute = sortSearchAttribute + "&filterIdExtendableResource=" + filter.filterIdExtendableResource /> <#if filter.filterExtendableResourceType?? && filter.filterExtendableResourceType != ""> <#assign sortSearchAttribute = sortSearchAttribute + "&filterExtendableResourceType=" + filter.filterExtendableResourceType /> <#return sortSearchAttribute /> <#-- -- Check if the given extender type has a config or not -- @param listExtender the list of extenders -- @param extenderType the extender type -- @return true if it has a config, false otherwise --> <#function isExtenderConfigRequired listExtenders extenderType> <#if listExtenders?? && listExtenders?has_content> <#list listExtenders as extender> <#if extender.key = extenderType> <#return extender.configRequired /> <#return false /> <#-- -- Check if the given extender type has a history or not -- @param listExtender the list of extenders -- @param extenderType the extender type -- @return true if it has a history, false otherwise --> <#function isExtenderHistoryEnable listExtenders extenderType> <#if listExtenders?? && listExtenders?has_content> <#list listExtenders as extender> <#if extender.key = extenderType> <#return extender.historyEnable /> <#return false /> <#function isExtenderStateEnable listExtenders extenderType> <#if listExtenders?? && listExtenders?has_content> <#list listExtenders as extender> <#if extender.key = extenderType> <#return extender.stateEnable /> <#return false /> <#-- -- Check if the user has the permission to see the button -- @param idExtender the id extender -- @param permission the permission key -- @param mapActionsPermissions the map of permission -- @return true if he has the permission, false otherwise --> <#function isAuthorized idExtender permission mapActionPermissions> <#if mapActionPermissions?? && mapActionPermissions?has_content> <#if mapActionPermissions["" + idExtender]??> <#return mapActionPermissions["" + idExtender][permission] /> <#return false />