Show awards on user profile #703 (#866)

This commit is contained in:
Nabeel S
2020-10-11 16:06:09 -04:00
committed by GitHub
parent 151f188886
commit 193fbd369d
16 changed files with 172 additions and 62 deletions

View File

@@ -0,0 +1,23 @@
@if($user->awards->count() > 0)
<table class="table table-hover">
@foreach($user->awards as $award)
<tr>
<td>{{ $award->name }}</td>
<td>{{ $award->description }}</td>
<td>
{{ Form::open(['url' => url('/admin/users/'.$user->id.'/award/'.$award->id),
'method' => 'delete', 'class' => 'pjax_form form-inline']) }}
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit',
'class' => 'btn btn-danger btn-small',
'onclick' => "return confirm('Are you sure?')",
]) }}
{{ Form::close() }}
</td>
</tr>
@endforeach
</table>
@else
<div class="jumbotron">
<p class="text-center">This user has no awards</p>
</div>
@endif

View File

@@ -9,6 +9,15 @@
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
<div class="header">
<h3>Awards</h3>
</div>
@include('admin.users.awards')
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
<div class="header">