mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Search related transfers, cleanup.
This commit is contained in:
62
resources/views/related/alreadyRelated.blade.php
Normal file
62
resources/views/related/alreadyRelated.blade.php
Normal file
@@ -0,0 +1,62 @@
|
||||
@if($journals->count() > 0)
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
@foreach($journals as $journal)
|
||||
<tr>
|
||||
<td><a title="Unlink" data-id="{{$journal->id}}" data-parent="{{$parent->id}}" class="btn unrelate btn-xs btn-default" href="#"><span class="glyphicon glyphicon-resize-full"></span></a></td>
|
||||
<td>
|
||||
@if($journal->transactiontype->type == 'Withdrawal')
|
||||
<i class="fa fa-long-arrow-left fa-fw" title="Withdrawal"></i>
|
||||
@endif
|
||||
@if($journal->transactiontype->type == 'Deposit')
|
||||
<i class="fa fa-long-arrow-right fa-fw" title="Deposit"></i>
|
||||
@endif
|
||||
@if($journal->transactiontype->type == 'Transfer')
|
||||
<i class="fa fa-arrows-h fa-fw" title="Transfer"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{$journal->date->format('jS M Y')}}</td>
|
||||
<td>
|
||||
<a title="{{$journal->date->format('jS M Y')}}" href="{{route('transactions.show',$journal->id)}}">{{{$journal->description}}}</a>
|
||||
</td>
|
||||
<td>
|
||||
@if($journal->transactiontype->type == 'Withdrawal')
|
||||
<span class="text-danger">{{Amount::formatTransaction($journal->transactions[0],false)}}</span>
|
||||
@endif
|
||||
@if($journal->transactiontype->type == 'Deposit')
|
||||
<span class="text-success">{{Amount::formatTransaction($journal->transactions[1],false)}}</span>
|
||||
@endif
|
||||
@if($journal->transactiontype->type == 'Transfer')
|
||||
<span class="text-info">{{Amount::formatTransaction($journal->transactions[1],false)}}</span>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{{--
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="pull-right small">
|
||||
@if(isset($account))
|
||||
@foreach($journal->transactions as $index => $t)
|
||||
@if($t->account_id == $account->id)
|
||||
{!! Amount::formatTransaction($t) !!}
|
||||
@endif
|
||||
@endforeach
|
||||
@else
|
||||
@foreach($journal->transactions as $index => $t)
|
||||
@if($index == 0)
|
||||
{!! Amount::formatTransaction($t) !!}
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</span>
|
||||
|
||||
</a>
|
||||
--}}
|
||||
@endforeach
|
||||
</table>
|
||||
@else
|
||||
<p><em>No related transactions</em></p>
|
||||
@endif
|
@@ -19,8 +19,7 @@
|
||||
<div id="relatedSearchResults">
|
||||
</div>
|
||||
<h5>(Already) related transactions</h5>
|
||||
<div>
|
||||
<table id="alreadyRelated" class="table table-bordered table-striped"></table>
|
||||
<div id="alreadyRelated">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
@@ -1,7 +1,9 @@
|
||||
<!-- search for: {{$search}} with {{$journals->count()}} results -->
|
||||
@if($journals->count() > 0)
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
@foreach($journals as $journal)
|
||||
<tr>
|
||||
<td><a href="#">link</a></td>
|
||||
<td><a title="Link" data-id="{{$journal->id}}" data-parent="{{$parent->id}}" class="btn relate btn-xs btn-default" href="#"><span class="glyphicon glyphicon-resize-small"></span></a></td>
|
||||
<td>
|
||||
@if($journal->transactiontype->type == 'Withdrawal')
|
||||
<i class="fa fa-long-arrow-left fa-fw" title="Withdrawal"></i>
|
||||
@@ -30,29 +32,8 @@
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{{--
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="pull-right small">
|
||||
@if(isset($account))
|
||||
@foreach($journal->transactions as $index => $t)
|
||||
@if($t->account_id == $account->id)
|
||||
{!! Amount::formatTransaction($t) !!}
|
||||
@endif
|
||||
@endforeach
|
||||
@else
|
||||
@foreach($journal->transactions as $index => $t)
|
||||
@if($index == 0)
|
||||
{!! Amount::formatTransaction($t) !!}
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</span>
|
||||
|
||||
</a>
|
||||
--}}
|
||||
@endforeach
|
||||
</table>
|
||||
</table>
|
||||
@else
|
||||
<p><em>No results</em></p>
|
||||
@endif
|
Reference in New Issue
Block a user