@if(count($product->auctions) == 0)
<p>{{ Lang::get('product.noauctions') }}</p>
@else
<table class="table table-hover">
    <tr>
        <th>{{ Lang::get('auction.end') }}</th>
        <th>{{ Lang::get('auction.amount') }}</th>
        <th>{{ Lang::get('auction.bestbid') }}</th>
        @unless($product->user_id == Auth::user()->id)
        <th>{{ Lang::get('auction.quickbid') }}</th>
        @endunless
        <th></th>
    </tr>
    @foreach($product->auctions as $auction)
        {!! Form::open(['url' => 'product/'.$product->id.'/bid/'.$auction->id]) !!}
        <tr>
            <td><a href="/auction/{{ $auction->id }}">{{ $auction->enddate }}</a></td>
            <td><a href="/auction/{{ $auction->id }}">{{ $auction->amount }} kg</a></td>
            <td><a href="/auction/{{ $auction->id }}">{{ $auction->bestBid() }} €</a></td>
            @unless($product->user_id == Auth::user()->id)
            <td>

                <div class="input-group">
                    <!--Bid Form Input -->
                    {!! 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">
                    {!! Form::submit(Lang::get('auction.submit'), ['class' => 'btn btn-blue form-control']) !!}
                </div>
                
            </td>
            @endunless
        </tr>
        {!! Form::close() !!}
    @endforeach
</table>
@endif