mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 09:17:03 +00:00
Add admin messages show view
This commit is contained in:
parent
a71a2c96b7
commit
7e015bfb6d
1 changed files with 34 additions and 0 deletions
34
resources/views/admin/messages/show.blade.php
Normal file
34
resources/views/admin/messages/show.blade.php
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
@extends('admin.partial.template-full')
|
||||||
|
|
||||||
|
@section('section')
|
||||||
|
<div class="title">
|
||||||
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
|
<div class="font-weight-bold"># {{$message->id}}</div>
|
||||||
|
<div class="font-weight-bold h3">Message</div>
|
||||||
|
<div>
|
||||||
|
@if($message->read_at)
|
||||||
|
<span class="btn btn-outline-secondary btn-sm disabled" disabled>Read</span>
|
||||||
|
@else
|
||||||
|
<button type="button" class="btn btn-outline-primary btn-sm" id="markRead">Mark Read</button>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@push('scripts')
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('#markRead').on('click', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
axios.post('/i/admin/messages/mark-read', {
|
||||||
|
id: '{{$message->id}}',
|
||||||
|
}).then(res => {
|
||||||
|
window.location.href = window.location.href;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
@endpush
|
Loading…
Reference in a new issue