#--
-- Return true if the given entry is an entry type Image
-- @param entry the entry to check
-- @return true if the entry is an entry type Image
-->
<#function isEntryTypeImage entry>
<#return entry.entryType?has_content && entry.entryType.idType?has_content && entry.entryType.idType == id_entry_type_image>
#function>
<#--
-- Return true if the given entry is an entry type MyLuteceUser
-- @param entry the entry to check
-- @return true if the entry is an entry type MyLuteceUser
-->
<#function isEntryTypeMyLuteceUser entry>
<#return entry.entryType?has_content && entry.entryType.idType?has_content && entry.entryType.idType == id_entry_type_mylutece_user>
#function>
<#--
-- Return true if the given entry is an entry type Geolocation
-- @param entry the entry to check
-- @return true if the entry is an entry type Geolocation
-->
<#function isEntryTypeGeolocation entry>
<#return entry.entryType?has_content && entry.entryType.idType?has_content && entry.entryType.idType == id_entry_type_geolocation>
#function>
<#--
-- Build the HTML of the given record field
-- @param entry the entry of the record field
-- @param recordfield the recordfield
-- @param first true if the record field is the first record field of the list of record fields of the given entry
-- @return the HTLM code of the record field
-->
<#macro getRecordFieldHtml entry recordfield first>
<#if isEntryTypeGeolocation( entry )>
${entry.getHtmlRecordFieldValue( locale, recordfield, false )}
<#if recordfield.field?? && recordfield.field.title?? && recordfield.field.title == 'address' && recordfield.value?has_content>
<#include "../../../skin/plugins/directory/" + entry.mapProvider.frontHtmlCode />
#if>
<#else>
<#if !first>
#if>
<#if isEntryTypeImage( entry )>
<#if recordfield.field?? & recordfield.field.isShownInResultRecord( )>
${entry.getHtmlRecordFieldValue( locale, recordfield, false )}
#if>
<#elseif isEntryTypeMyLuteceUser(entry) && !permission_visualisation_mylutece_user>
${record_field.value}
<#else>
${entry.getHtmlRecordFieldValue( locale,recordfield, false )}
#if>
#if>
#macro>
<#--
-- Build the HTML code to display the actions
-- @param resource_actions the actions to display
-- @return the HTML code of the actions
-->
<#macro display_actions resource_actions >
<#if resource_actions.workflow_action_list?exists>
<#list resource_actions.workflow_action_list as action>
width="${action.icon.width}"#if><#if action.icon.height!=-1> height="${action.icon.height}"#if> title="${action.name}" alt="${action.name}"/>
#list>
#if>
<#list resource_actions.record.actions?sort as action>
<#if (action.nameKey!="directory.action.history.name") || (action.nameKey=="directory.action.history.name" && history_workflow)>
btn-danger<#elseif action.nameKey="directory.action.enable.name">btn-success<#else>btn-primary#if>" href="${action.url}?id_directory_record=${resource_actions.record.idRecord}&id_directory=${directory.idDirectory}" title="${action.description}">
#if>
#list>