Print status after printing single note.

This commit is contained in:
kplaczek
2018-08-16 22:07:59 +02:00
parent 41b7d5778d
commit 081aa0f7a4
2 changed files with 18 additions and 6 deletions

View File

@@ -241,6 +241,7 @@ class Main extends Controller
return redirect()->route('list');
} elseif ($request->exists('print')) {
$this->paper->sendPrint($request->input('title'), $request->input('text'), $request->input('icon'));
$request->session()->flash('print_status', 'Wydrukowano notatkę: ' . (strlen($request->input('title')) ? $request->input('title') : substr($request->input('text'), 0, 20)) . '!');
}
return redirect()->route('edit', ['id' => $note->id, 'slug' => $note->topic_slug]);
} else {

View File

@@ -2,10 +2,21 @@
@section('content')
<style>
body .column .ui.form textarea:not([rows]) {max-height: inherit; height: 20em}
body .column .ui.form textarea:not([rows]) {
max-height: inherit;
height: 20em
}
</style>
<div class="ui container">
@if(Session::has('print_status'))
<div class="ui info message">
<div class="header">
{{ Session::get('print_status') }}
</div>
</div>
@endif
<div class="ui one column middle aligned stackable grid">
<div class="ui column">
@if($type == 'template')