contract blade
This commit is contained in:
27
resources/views/contracts/includes/biddisplay.blade.php
Normal file
27
resources/views/contracts/includes/biddisplay.blade.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<th>Corporation</th>
|
||||
<th>Amount</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($data['bids'] as $bid)
|
||||
<tr>
|
||||
<td>{{ $bid['corporation_name'] }}</td>
|
||||
<td>{{ $bid['bid_amount'] }}</td>
|
||||
@if(auth()->user()->character_id == $bid['character_id'])
|
||||
{{ Form::open(['action' => 'ContractController@displayModifyBid', 'method' => 'POST']) }}
|
||||
{{ Form::hidden('id', $bid['id']) }}
|
||||
{{ Form::hidden('contract_id', $bid['contract_id']) }}
|
||||
{{ Form::submit('Modify Bid', ['class' => 'btn btn-primary']) }}
|
||||
{!! Form::close() !!}
|
||||
|
||||
{{ Form::open(['action' => 'ContractController@deleteBid', 'method' => 'POST']) }}
|
||||
{{ Form::hidden('id', $bid['id']) }}
|
||||
{{ Form::hidden('contract_id', $bid['contract_id']) }}
|
||||
{{ Form::submit('Delete Bid', ['class' => 'btn btn-primary']) }}
|
||||
{!! Form::close() !!}
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
13
resources/views/contracts/includes/nocontracts.blade.php
Normal file
13
resources/views/contracts/includes/nocontracts.blade.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
No Contracts Issued
|
||||
</div>
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -22,12 +22,10 @@
|
||||
</div>
|
||||
<div class="col-sm" align="right">
|
||||
<a href="/contracts/display/newbid/{{$contract['contract_id']}}" class="btn btn-primary" role="button">Bid on Contract</a>
|
||||
|
||||
{!! Form::open(['action' => 'ContractController@displayBid', 'method' => 'POST']) !!}
|
||||
{{ Form::hidden('contract_id', $contract['contract_id']) }}
|
||||
{{ Form::submit('Bid', ['class' => 'btn btn-primary']) }}
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,33 +41,7 @@
|
||||
<hr>
|
||||
<span class="border-dark">
|
||||
@if(count($data['bids']))
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<th>Corporation</th>
|
||||
<th>Amount</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($data['bids'] as $bid)
|
||||
<tr>
|
||||
<td>{{ $bid['corporation_name'] }}</td>
|
||||
<td>{{ $bid['bid_amount'] }}</td>
|
||||
@if(auth()->user()->character_id == $bid['character_id'])
|
||||
{{ Form::open(['action' => 'ContractController@displayModifyBid', 'method' => 'POST']) }}
|
||||
{{ Form::hidden('id', $bid['id']) }}
|
||||
{{ Form::hidden('contract_id', $bid['contract_id']) }}
|
||||
{{ Form::submit('Modify Bid', ['class' => 'btn btn-primary']) }}
|
||||
{!! Form::close() !!}
|
||||
|
||||
{{ Form::open(['action' => 'ContractController@deleteBid', 'method' => 'POST']) }}
|
||||
{{ Form::hidden('id', $bid['id']) }}
|
||||
{{ Form::hidden('contract_id', $bid['contract_id']) }}
|
||||
{{ Form::submit('Delete Bid', ['class' => 'btn btn-primary']) }}
|
||||
{!! Form::close() !!}
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@include('contracts.includes.biddisplay')
|
||||
@else
|
||||
No Bids have been entered.
|
||||
@endif
|
||||
@@ -81,18 +53,6 @@
|
||||
</div>
|
||||
<br>
|
||||
@else
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
No Contracts Issued
|
||||
</div>
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('contracts.includes.nocontracts')
|
||||
@endif
|
||||
@endsection
|
||||
Reference in New Issue
Block a user