Merge pull request #1624 from david-me/clickable-transaction-notifier

Can have link in success message to the transaction it refers to
This commit is contained in:
James Cole 2018-08-21 15:52:52 +02:00 committed by GitHub
commit 024cf610a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -369,6 +369,7 @@ class SingleController extends Controller
event(new StoredTransactionJournal($journal, $data['piggy_bank_id']));
session()->flash('success_uri', route('transactions.show', [$journal->id]));
session()->flash('success', (string)trans('firefly.stored_journal', ['description' => $journal->description]));
app('preferences')->mark();

View File

@ -14,7 +14,17 @@
<button type="button" class="close" data-dismiss="alert">
<span>&times;</span><span class="sr-only">{{ 'close'|_ }}</span>
</button>
{% if session_has('success_uri') %}
<a href="{{ session('success_uri') }}">
{% endif %}
<strong>{{ 'flash_success'|_ }}</strong> {{ session('success') }}
{% if session_has('success_uri') %}
</a>
{% endif %}
</div>
{% endif %}