<?php if(count($product->auctions) == 0): ?>
<p><?php echo e(Lang::get('product.noauctions')); ?></p>
<?php else: ?>
<table class="table table-hover">
    <tr>
        <th><?php echo e(Lang::get('auction.end')); ?></th>
        <th><?php echo e(Lang::get('auction.amount')); ?></th>
        <th><?php echo e(Lang::get('auction.bestbid')); ?></th>
        <?php if ( ! ($product->user_id == Auth::user()->id)): ?>
        <th><?php echo e(Lang::get('auction.quickbid')); ?></th>
        <?php endif; ?>
        <th></th>
    </tr>
    <?php foreach($product->auctions as $auction): ?>
        <?php echo Form::open(['url' => 'product/'.$product->id.'/bid/'.$auction->id]); ?>

        <tr>
            <td><a href="/auction/<?php echo e($auction->id); ?>"><?php echo e($auction->enddate); ?></a></td>
            <td><a href="/auction/<?php echo e($auction->id); ?>"><?php echo e($auction->amount); ?> kg</a></td>
            <td><a href="/auction/<?php echo e($auction->id); ?>"><?php echo e($auction->bestBid()); ?> €</a></td>
            <?php if ( ! ($product->user_id == Auth::user()->id)): ?>
            <td>

                <div class="input-group">
                    <!--Bid Form Input -->
                    <?php echo Form::text('bid', null, ['class' => 'form-control', 'placeholder' => Lang::get('auction.minimumbid', ['bid' => $auction->bestBid() +
                    $auction->minraise])]); ?>

                    <div class="input-group-addon">€</div>
                </div>
            </td>
            <td>
                <div class="form-group">
                    <?php echo Form::submit(Lang::get('auction.submit'), ['class' => 'btn btn-blue form-control']); ?>

                </div>
                
            </td>
            <?php endif; ?>
        </tr>
        <?php echo Form::close(); ?>

    <?php endforeach; ?>
</table>
<?php endif; ?>