"id","hoard","hoardName","latitude","longitude","country","terminalYear1","terminalYear2",{% for ref_heading in ref_headings %}"{{ref_heading}}",{% endfor %}"period","reign","person","mint","denomination","material","startingDate","endingDate","dateText","issue","officina","obverseInscription","obverseMintMark","obverseDescription","reverseInscription","reverseMintMark","reverseDescription","weight","quantity","diameter","axis","imitation","latestCoin","intruder","toCheck","condition","aspects","additionalFields","container","comment"
{% for hoard in data %}
{% for coin in hoard.coins %}
"{{ coin.id }}","{{ hoard.id }}","{{ hoard.findSpotName }}","{{ hoard.findSpotLatitude }}","{{ hoard.findSpotLongitude }}","{% if hoard.countries %}{% for country in hoard.countries %}{{ country.country }}{% if not loop.last %}; {% endif %}{% endfor %}{% endif %}","{{ hoard.terminalYear1 }}","{{ hoard.terminalYear2 }}",{% if num_ref_columns > 0 %}{% for i in 0..(num_ref_columns-1) %}"{% if coin.coinReferences[i] is defined and coin.coinReferences[i] %}{% set cr = coin.coinReferences[i] %}{% if cr.reference.abbreviation is defined and cr.reference.abbreviation %}{{cr.reference.abbreviation}}{% else %}{% if cr.reference.authors is defined and cr.reference.authors %}{{cr.reference.authors}}{% endif %} - {% if cr.reference.year is defined and cr.reference.year %}{{cr.reference.year}}{% endif %} - {% if cr.reference.title is defined and cr.reference.title %}{{cr.reference.title}}{% else %}Untitled{% endif %}{% endif %}{% if cr.reference_str is defined %} {{cr.reference_str}}{% endif %}{% if cr.comment is defined %} {{cr.comment}}{% endif %}{% endif %}",{% endfor %}{% endif %}"{% if coin.period %}{{ coin.period.period }}{% endif %}","{% for reign in coin.reigns %}{{ reign.reign }}{% if not loop.last %} OR {% endif %}{% endfor %}","{% for person in coin.persons %}{{ person.person }} {% if person.title %}({{ person.title }}){% endif %}{% if not loop.last %} OR {% endif %}{% endfor %}","{% for mint in coin.mints %}{{ mint.mint }}{% if not loop.last %} OR {% endif %}{% endfor %}","{% for denomination in coin.denominations %}{{ denomination.denomination }}{% if not loop.last %} OR {% endif %}{% endfor %}","{% for denomination in coin.denominations %}{% if denomination.material %}{{ denomination.material.material }}{% endif %}{% if not loop.last %} OR {% endif %}{% endfor %}","{{ coin.startingDate }}","{{ coin.endingDate }}","{{ coin.dateText | replace({"\r\n":"", "'":"’"}) }}","{{ coin.issue }}","{{ coin.officina }}","{{ coin.obverseInscription | replace({"\r\n":"", "'":"’"})}}","{{ coin.obverseMintMark | replace({"\r\n":"", "'":"’"})}}","{{ coin.obverseDescription | replace({"\r\n":"", "'":"’"}) }}","{{ coin.reverseInscription | replace({"\r\n":"", "'":"’"}) }}","{{ coin.reverseMintMark | replace({"\r\n":"", "'":"’"})}}","{{ coin.reverseDescription | replace({"\r\n":"", "'":"’"}) }}","{{ coin.weight }}","{{ coin.quantity }}","{{ coin.diameter }}","{{ coin.axis }}","{{ coin.imitation }}","{{ coin.latestCoin }}","{{ coin.intruder }}","{{ coin.toCheck }}","{% if coin.condition %}{{ coin.condition.condition }}{% endif %}","{% for aspect in coin.aspects %}{{ aspect.aspect }}{% if not loop.last %},{% endif %}{% endfor %}","{% for af in coin.coinAdditionalFields %}{% if af.additionalField%}{{af.additionalField.additionalField}} {{af.comment}}{% if not loop.last %}; {% endif %}{% endif %}{% endfor %}","{% if coin.container %}{{ coin.container.container }}{% endif %}","{{coin.comment}}"
{% endfor %}
{% endfor %}