<commit_before><#import "/WEB-INF/macros/records.ftl" as records>
<#import "/WEB-INF/macros/common.ftl" as common>
<#import "/WEB-INF/macros/pagination.ftl" as paging>
<html>
<head>
  <title>Occurrence Download - GBIF</title>
</head>
<body class="search">

<content tag="infoband">
  <div class="content">
    <h1>Occurrence download</h1>
    <h3><@common.doilink doi=download.doi /> ${niceDate(download.created)}</h3>
  </div>
  <#if action.dwcaExists()>
    <div class="box">
      <div class="content">
        <ul>
          <li class="single last"><h4>${download.totalRecords!0}</h4>Occurrences</li>
        </ul>
        <a href="${download.downloadLink}" class="candy_blue_button download_button"><span>Download</span></a>
      </div>
    </div>
  </#if>
</content>


<#if action.isRunning()>
  <@common.notice title="Download running">
      <p>The download has been started and is currently being processed.</p>
      <p>Please expect 10 to 15 minutes for the download to complete.</p>
      <#if currentUser?? && currentUser.userName=download.request.creator>
        <p>A notification email with a link to download the results will be sent to the following addresses once ready:
          <ul>
            <#list download.request.notificationAddresses as email>
                <li>${email}</li>
            </#list>
          </ul>
        </p>
      </#if>
  </@common.notice>

<#elseif download.isAvailable()>
  <@common.notice title="Please note">
    <#if action.dwcaExists()>
      <p>The download result will be retained for as long as possible, but might be removed in the future.</p>
      <p>The <@common.doilink doi=download.doi url="/occurrence/download/${download.key}"/> will always resolve to this page, even if the download is removed.</p>
    <#else>
      <p>The download result for this search is no longer available.</p>
      <p>Please contact <@common.helpdesk/> to restore it.</p>
    </#if>
  </@common.notice>
<#else>
  <@common.notice title="${download.status}">
      <p>The download request was unsuccessful. Please try it again or contact the <@common.helpdesk/>.</p>
  </@common.notice>
</#if>

<@common.article id="details" title="Download details" class="results">
  <div class="fullwidth">
    <dl>
      <dt>Identifier</dt>
      <dd><@common.doi download.doi /></dd>

      <dt>Cite as</dt>
      <dd><@common.citeDownload download/></dd>

      <dt>Query</dt>
      <dd><@records.dFilter download /></dd>

      <#if download.isAvailable()>
        <dt>Size</dt>
        <dd>${action.getHumanRedeableBytesSize(download.size)}</dd>
      </#if>

      <dt>Format</dt>
      <dd><@s.text name="enum.downloadformat.${download.request.format}" /></dd>


      <dt>Status</dt>
      <#if download.isAvailable() && !action.dwcaExists()>
          <dd><@s.text name="enum.downloadstatus.unavailable" /></dd>
      <#else>
          <dd><@s.text name="enum.downloadstatus.${download.status}" /></dd>
      </#if>

      <dt></dt>
      <dd class="small"><@records.dLink download /></dd>
    </dl><commit_msg>Show DOI links for downloads only on downloads that have them.<commit_after><#import "/WEB-INF/macros/records.ftl" as records>
<#import "/WEB-INF/macros/common.ftl" as common>
<#import "/WEB-INF/macros/pagination.ftl" as paging>
<html>
<head>
  <title>Occurrence Download - GBIF</title>
</head>
<body class="search">

<content tag="infoband">
  <div class="content">
    <h1>Occurrence download</h1>
    <h3><#if download.doi?has_content><@common.doilink doi=download.doi /> </#if>${niceDate(download.created)}</h3>
  </div>
  <#if action.dwcaExists()>
    <div class="box">
      <div class="content">
        <ul>
          <li class="single last"><h4>${download.totalRecords!0}</h4>Occurrences</li>
        </ul>
        <a href="${download.downloadLink}" class="candy_blue_button download_button"><span>Download</span></a>
      </div>
    </div>
  </#if>
</content>


<#if action.isRunning()>
  <@common.notice title="Download running">
      <p>The download has been started and is currently being processed.</p>
      <p>Please expect 10 to 15 minutes for the download to complete.</p>
      <#if currentUser?? && currentUser.userName=download.request.creator>
        <p>A notification email with a link to download the results will be sent to the following addresses once ready:
          <ul>
            <#list download.request.notificationAddresses as email>
                <li>${email}</li>
            </#list>
          </ul>
        </p>
      </#if>
  </@common.notice>

<#elseif download.isAvailable()>
  <@common.notice title="Please note">
    <#if action.dwcaExists()>
      <p>The download result will be retained for as long as possible, but might be removed in the future.</p>
      <#if download.doi?has_content><p>The <@common.doilink doi=download.doi url="/occurrence/download/${download.key}"/> will always resolve to this page, even if the download is removed.</p></#if>
    <#else>
      <p>The download result for this search is no longer available.</p>
      <p>Please contact <@common.helpdesk/> to restore it.</p>
    </#if>
  </@common.notice>
<#else>
  <@common.notice title="${download.status}">
      <p>The download request was unsuccessful. Please try it again or contact the <@common.helpdesk/>.</p>
  </@common.notice>
</#if>

<@common.article id="details" title="Download details" class="results">
  <div class="fullwidth">
    <dl>
      <#if download.doi?has_content>
        <dt>Identifier</dt>
        <dd><@common.doi download.doi /></dd>

        <dt>Cite as</dt>
        <dd><@common.citeDownload download/></dd>
      </#if>

      <dt>Query</dt>
      <dd><@records.dFilter download /></dd>

      <#if download.isAvailable()>
        <dt>Size</dt>
        <dd>${action.getHumanRedeableBytesSize(download.size)}</dd>
      </#if>

      <dt>Format</dt>
      <dd><@s.text name="enum.downloadformat.${download.request.format}" /></dd>


      <dt>Status</dt>
      <#if download.isAvailable() && !action.dwcaExists()>
          <dd><@s.text name="enum.downloadstatus.unavailable" /></dd>
      <#else>
          <dd><@s.text name="enum.downloadstatus.${download.status}" /></dd>
      </#if>

      <dt></dt>
      <dd class="small"><@records.dLink download /></dd>
    </dl>
{'fraction_non_alphanumeric': 0.17752988047808765, 'fraction_numerical': 0.00350597609561753, 'mean_word_length': 3.0568842921784096, 'pattern_counts': {'":': 0, '<': 249, '<?xml version=': 0, '>': 249, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 81, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5996085', 'n_tokens_mistral': 2108, 'n_tokens_neox': 2041, 'n_words': 480}