initial commit

This commit is contained in:
Arno Kaimbacher 2015-07-19 13:49:24 +07:00
commit 28301e4312
219 changed files with 23035 additions and 0 deletions

View file

@ -0,0 +1,42 @@
@extends('app')
@section('content')
<h1 class="judul">Histori</h1>
<div class="col-md-8">
<table class="table table-striped table-bordered">
<thead>
<th>Student</th>
<th>Book</th>
<th>Borrowed At</th>
<th>Returned At</th>
<th>Fines</th>
</thead>
<tbody>
@foreach($transactions as $transaction)
<tr>
<td>{{ $transaction->student->name }}</td>
<td>{{ $transaction->book->title }}</td>
<td>{{ date('d-M-y', $transaction->borrowed_at) }}</td>
<td>{{ date('d-M-y', $transaction->returned_at) }}</td>
<td>{{ $transaction->fines }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@stop

View file

@ -0,0 +1,43 @@
@extends('app')
@section('content')
<h1 class="judul">Laporan</h1>
<div class="col-md-12">
<table class="table table-striped table-bordered">
<thead>
<th>Student</th>
<th>Book</th>
<th>Borrowed At</th>
<th>Fines</th>
<th colspan="2"><center>What You Gonna Do</center></th>
</thead>
<tbody>
@foreach($transactions as $transaction)
<tr>
<td>{{ $transaction->student->name }}</td>
<td>{{ $transaction->book->title }}</td>
<td>{{ date('d-M-y', $transaction->borrowed_at) }}</td>
<td>Rp. {{ $transaction->fines }}</td>
<td><a href="{{ route('peminjaman.pengembalian', $transaction->id) }}"><span class="glyphicon glyphicon-resize-small" aria-hidden="true"></span>&nbsp; Pengembalian</a></td>
<td><a href="{{ route('peminjaman.perpanjang', $transaction->id) }}"><span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span>&nbsp; Perpanjang Masa Peminjaman</a></td>
</tr>
@endforeach
</tbody>
</table>
</div>
@stop

View file

@ -0,0 +1,73 @@
@extends('app')
@section('content')
<h1 class="judul">Peminjaman</h1>
<div class="col-md-8">
{!! Form::open(['route' => 'peminjaman.post']) !!}
<div class="form-group">
{!! Form::label('student_id', 'Student..') !!}
{!! Form::select('student_id', $students, null, ['id' => 'student_id', 'class' => 'form-control']) !!}
</div>
<div class="form-group">
<!--{!! Form::label('category', 'Category..') !!}
{!! Form::select('category', $categories, null, ['id' => 'category', 'class' => 'form-control']) !!} -->
<select id="category" name="category" class="form-control" >
@foreach($categories as $category)
<option value="{{ $category->id }}" >{{ $category->category }}</option>
@endforeach
</select>
</div>
<div class="form-group">
<!--{!! Form::label('book_id', 'Book..') !!}
{!! Form::select('book_id', [], null, ['id' => 'book_id', 'class' => 'form-control']) !!} -->
<select id="book_id" name="book_id" class="form-control">
<option>-- Choice The Book --</option>
</select>
</div>
<div class="form-group">
{!! Form::submit('Pinjam', ['class' => 'btn btn-primary form-control']) !!}
</div>
{!! Form::close() !!}
</div>
@stop
@section('footer')
<script type="text/javascript">
$('#category').on('change', function(e){
console.log(e);
var category_id = e.target.value;
//ajax
$.get('/api/dropdown/peminjaman/' + category_id, function(data){
//if success data
$('#book_id').empty();
$.each(data, function(index, booksObj){
$('#book_id').append('<option value="' +booksObj.id+ '">' +booksObj.title+ '</option>');
});
});
});
</script>
@stop