Split earnings/spendings in search view
MODIFY
public/style.css
public/style.css
@@ -125,6 +125,10 @@ body {
/* Form */
+form.tight input {
+ margin: 0;
+}
+
label, input, select {
display: block;
}

MODIFY
resources/views/search/index.blade.php
resources/views/search/index.blade.php
@section('body')
<h1>Search</h1>
- <form method="GET">
- <div class="row spacing-top-large spacing-bottom-large">
+ <form method="GET" class="tight">
+ <div class="row spacing-top-large">
<div class="column">
<input type="text" name="query" />
</div>
</div>
</form>
@if (!empty($query))
+ @if (sizeof($earnings))
+ <h2 class="spacing-top-large spacing-bottom-medium">Earnings</h2>
<table class="box">
<thead>
<tr>
- <th>Type</th>
<th>Description</th>
</tr>
</thread>
<tbody>
@foreach ($earnings as $earning)
<tr>
- <td>Earning</td>
<td>{{ $earning->description }}</td>
</tr>
@endforeach
+ </tbody>
+ </table>
+ @endif
+ @if (sizeof($spendings))
+ <h2 class="spacing-top-large spacing-bottom-medium">Spendings</h2>
+ <table class="box">
+ <thead>
+ <tr>
+ <th>Description</th>
+ </tr>
+ </thread>
+ <tbody>
@foreach ($spendings as $spending)
<tr>
- <td>Spending</td>
<td>{{ $spending->description }}</td>
</tr>
@endforeach
</tbody>
</table>
@endif
+ @endif
@endsection

Split earnings/spendings in search view