Subversion Repositories wpShopGermany4

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php

    declare(strict_types=1);

    /**
     * User: Daschmi (daschmi@daschmi.de)
     * Date: 13.02.2020
     * Time: 06:25
     */

    $view = $this->view['wpsg_mod_printshop'];

?>

<div class="product_action product_action_printshop">
        <div class="label">

        <?php echo __("Bestellupload", "wpsg"); ?><br />

        <input type="file" name="wpsg_mod_printshop[<?php echo $view['product_index']; ?>][]" <?php echo (($view['length'] > 1)?'multiple':''); ?> />

    </div>
    <div class="files">

        <?php if (wpsg_isSizedArray($view['files'])) { ?>

            <ul>
                <?php foreach ($view['files'] as $file_index => $f) { ?>
                <li>
                    <input type="checkbox" name="wpsg_mod_printshop[<?php echo $view['product_index'] ?>][delete_file][]" value="<?php echo $file_index; ?>" class="checkbox" style="display:none;" />
                    <a href="<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_printshop', 'downloadFile', ['product_index' => $view['product_index'], 'file_index' => $file_index], false); ?>" target="_blank">
                        <?php echo $f['file_name']; ?>
                    </a>
                    <img
                            onclick="event.target.parentElement.querySelector('.checkbox').checked = 'checked'; event.target.parentElement.style.display = 'none'; return false"
                            class="delete" title="<?php echo __('Datei entfernen.', 'wpsg'); ?>" src="<?php echo WPSG_URL; ?>views/gfx/bin_x.png" alt="<?php echo __('Löschen', 'wpsg'); ?>" alt="X" />
                </li>
                <?php } ?>
            </ul>

        <?php } else { ?>

            <p><?php echo __('Noch keine Uploads durchgeführt.', 'wpsg'); ?></p>

        <?php } ?>

    </div>
</div>