<div class="BAZ_cadre_fiche id{{ form.bn_id_nature }}">
  {% if message and not entry['external-data'] %}
    <div class="alert alert-success">
      {% if message == 'ajout_ok' %}
        {{ _t('BAZ_FICHE_ENREGISTREE') }}
        <a href="{{ url({ params: { vue: 'saisir', id: form.bn_id_nature }}) }}" class="pull-right btn-sm btn btn-primary">
          {{ _t('BAZ_ADD_NEW_ENTRY') }}
        </a>
      {% endif %}
      {% if message == 'modif_ok' %}
        {{ _t('BAZ_FICHE_MODIFIEE') }}
        <a href="{{ url({ tag: entryId, handler: 'edit'}) }}" class="pull-right btn-sm btn btn-primary">
          {{ _t('BAZ_MODIFY_ENTRY_AGAIN') }}
        </a>
      {% endif %}
      <div class="clearfix"></div>
    </div>
  {% endif %}
  {{ renderedEntry|raw }}
  {% if showFooter %}
    <div class="clearfix"></div>
    <div class="BAZ_fiche_info">
      {% if isAdmin %}
        <span class="BAZ_main_fiche_info">
          {{ _t('BAZ_ECRITE') }}
          {{ owner|raw }}
          <span class="category"> ({{ form.bn_label_nature }})</span>
          <br />
          <span class="date_creation">
            {{ _t('BAZ_DATE_CREATION')|capitalize }}
            {{ entry.date_creation_fiche|date('d/m/Y à H:i') }},
          </span>
          <span class="date_mise_a_jour">
            {{ _t('BAZ_DATE_MAJ') }}
            {{ entry.date_maj_fiche|date('d/m/Y à H:i') }}
          </span>
        </span>
      {% endif %}

      <div class="BAZ_actions_fiche">
        {% if currentuser is not empty %}
          {{ include_javascript('javascripts/favorites.js') }}
          <a href="#"
            title="{{ (isUserFavorite) ? _t('FAVORITES_REMOVE') : _t('FAVORITES_ADD') }}"
            data-resource="{{ entryId }}" 
            data-user="{{ currentuser }}"
            data-toggle="tooltip"
            data-placement="right"
            class="btn btn-icon btn-default btn-xs favorites{{ (isUserFavorite) ? ' user-favorite' : '' }}">
            <i class="{{ (isUserFavorite) ? 'fas' : 'far' }} fa-star"></i>
          </a>
        {% endif %}
        {% if canShow %}
          <a class="btn btn-entry-action btn-sm btn-default" href="{{ entry['external-data'] ? entry.url : url({ tag: entryId }) }}">
            <i class="fa fa-eye"></i>
            <span>{{ _t('BAZ_SEE_ENTRY') }}</span>
          </a>
        {% endif %}
        {% if not entry['external-data'] %}
          {% if canEdit %}
            <a class="btn btn-entry-action btn-sm btn-default" href="{{ url({ tag: entryId, handler: 'edit' }) }}">
              <i class="fa fa-pencil-alt icon-pencil"></i>
              <span>{{ _t('BAZ_MODIFIER') }}</span>
            </a>
          {% endif %}
      {% if isAdmin %}
          <span class="dropup">
            <a
              title="{{ _t('TEMPLATE_DUPLICATE_PAGE') ~ ' ' ~ entryId }}"
              class="dropdown-toggle btn btn-entry-action btn-sm btn-default"
              id="duplicate-dropup"
              data-toggle="dropdown"
              aria-haspopup="true"
              aria-expanded="false"
            >
              <i class="fas fa-copy"></i><span>{{ _t('TEMPLATE_DUPLICATE') }}</span>
              <span class="caret"></span>
            </a>
            <ul class="dropdown-menu" aria-labelledby="duplicate-dropup">
              <li>
                <a
                  href="{{ url({ tag: entryId, handler: 'duplicate' }) }}"
                  title="{{ _t('TEMPLATE_DUPLICATE_ENTRY') ~ ' ' ~ entryId }}"
                >
                  {{ _t('TEMPLATE_DUPLICATE_LOCALLY') }}
                </a>
              </li>
              <li>
                <a
                  href="{{ url({ tag: entryId, handler: 'duplicate' }) ~ '&toUrl=1'}} "
                  title="{{ _t('TEMPLATE_DUPLICATE_ENTRY') ~ ' ' ~ entryId }}"
                >
                  {{ _t('TEMPLATE_DUPLICATE_IN_ANOTHER_WIKI') }}
                </a>
              </li>
            </ul>
          {% endif %}
          {% if canDelete %}
            <a class="btn btn-entry-action btn-sm btn-danger modalbox"
              href="{{ url({ tag: entryId, handler: 'deletepage', params: { incomingurl: incomingUrl|url_encode }}) }}"
              data-confirm-text="{{ _t('BAZ_CONFIRM_SUPPRIMER_FICHE') }}">
              <i class="fa fa-trash icon-trash icon-white"></i>
              <span>{{ _t('BAZ_SUPPRIMER') }}</span>
            </a>
          {% endif %}
        {% endif %}
      </div>
      
    </div>
  {% endif %}
</div>
