
<#if issueInfo??>
<div class="issues">
  <#list issueInfo as article>
    <#if !issueName??>
      <#assign issueName = article.issue>
      <#assign divOpened = true >
      <button type="button" style="border:none;padding: 18px;width: 100%; text-align:left;" class="collapsible">${issueName}</button>
      <div clas="issue" style="list-style:none; display:none; padding: 18px;">
        <p><a href="/vivo/individual?uri=${article.uri?url}">${article.name}</a></p>
    <#elseif issueName == article.issue>
      <p><a href="/vivo/individual?uri=${article.uri?url}">${article.name}</a></p>
    <#else> 
      <#assign issueName = article.issue>
      </div>
      <button type="button" style="border:none;padding: 18px;width: 100%; text-align:left;" class="collapsible">${issueName}</button>
      <div clas="issue" style="list-style:none; display:none;padding: 18px;">
        <p><a href="/vivo/individual?uri=${article.uri?url}">${article.name}</a></p>
    </#if>
  </#list>
  <#if divOpened>
    </div> <#-- Close div -->
  </#if>
</div>
</#if>
<script>
var coll = document.getElementsByClassName("collapsible");
var i;

for (i = 0; i < coll.length; i++) {
  coll[i].addEventListener("click", function() {
    this.classList.toggle("active");
    var content = this.nextElementSibling;
    if (content.style.display === "block") {
      content.style.display = "none";
    } else {
      content.style.display = "block";
    }
  });
}
</script>
