<template v-slot:popupentry ="{entry}">
  <div>
    <div class="popup-entry-content">
	<div>
      <template v-for="field in [{{ params.necessary_fields|filter(v => v not in ['url','bf_longitude','bf_latitude', 'geolocation', 'owner', 'date_creation_fiche', 'date_maj_fiche'])|map(p => "'#{p}'")|join(',')|raw }}]">
        {% set imWidth = 140 %}
        {% set imHeight = 140 %}
        {% set imagemethod = 'fit' %}
        <popup-entry-field 
          :entry="entry" 
          :prop="field" 
          :withlabel="1" 
          :oneline="0" 
          :imagewidth="{{ imWidth }}" 
          :imageheight="{{ imHeight }}" 
          :imagemethod="{{ imagemethod|json_encode }}" 
          :imagetoken="{{ csrfToken("POST api/images/cache/#{imWidth}/#{imHeight}/#{imagemethod}")|json_encode }}"
          ></popup-entry-field>
      </template>
    </div>
    <a class="btn btn-primary btn-block btn-popup-map{% if isInIframe %} newtab{% endif %}" 
      {% if not isInIframe %}:class="{modalbox:!isExternalUrl(entry)}" 
      :target="{blank:isExternalUrl(entry)}"
      data-iframe="1"{% endif %}
      data-size="modal-lg"
      :title="entry.title || entry.id_fiche"
      :href="`${entry.url{% if not isInIframe %}+(!isExternalUrl(entry)?'/iframe':''){% endif %}}`">{{ _t('BAZ_SEE_ENTRY') }}</a>
  </div>
</template>
