{* themes/deinTheme/templates/safety_documents.tpl *}
{assign var="safety_image_path" value="https://{$SERVER_NAME}/media/images/safety"}

{assign var="documentLabels" value=[
    'Bedienungsanleitung' => 'Allg. Sicherheitshinweise',
    'EU_Datenblatt' => 'EU-Datenblatt',
    'Energielabel' => 'Energielabel',
    'Produktdatenblatt' => 'Produktdatenblatt',
    'Sicherheitsdatenblatt' => 'Sicherheitsdatenblatt',
    'Zertifikat' => 'Zertifikat',
    'null_feld' => 'Allg. Sicherheitshinweise'
]}





{if $shopArticle->wdocuments && $shopArticle->wdocuments|@count > 0}
    <div class="dokumente">
        <h2>Verfügbare Dokumente</h2>
            <div class="document-list">
            {foreach from=$shopArticle->wdocuments item=document}
                <div class="document-item">
                    <div class="document-icon">
                        <img src="{$PARENT_THEME_DIR}/media/images/pdf.png" alt="PDF" style="width: 24px; height: 24px;">
                    </div>
                    <div class="document-link">
                        <a href="{$safety_image_path}/{$document.file_name|escape}" 
                            target="_blank" 
                            style="text-decoration: none; color: #007BFF;">
                            {$document.label|escape} - {$shopArticle->name} 
                        </a>
                    </div>
                </div>
            {/foreach}
        </div>
    
    </div>
{else}
    <p>Keine zusätzlichen Dokumente verfügbar.</p>
{/if}



