3
0
Fork 0
This repository has been archived on 2024-11-14. You can view files and clone it, but cannot push or open issues or pull requests.
ThemeParkPlus-Panel/resources/views/panel/message.blade.php

70 lines
2.9 KiB
PHP
Raw Normal View History

2021-06-27 19:01:43 +00:00
@extends('layouts.admin')
@section('css')
<link rel="stylesheet" href="{{ asset('assets/minified/themes/default.min.css') }}"/>
@endsection
@section('page', 'Dashboard')
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-lg-12 col-md-8col-xs-12 col-sm-12">
@php($message = \App\Message::orderByDesc('id')->first())
@if(!empty($message))
2021-06-29 20:05:00 +00:00
@component('components.panel')
@slot('title')
@php($time = strtotime($message->created_at))
{{ \App\Cache\Cache::getUsername($message->uuid) }}<span style="float: right">{{ date('d-m-Y', $time) }} at {{ date('H:m', $time) }}</span>
@endslot
2021-06-27 19:01:43 +00:00
{!! $message->content !!}
2021-06-29 20:05:00 +00:00
@endcomponent
2021-06-27 19:01:43 +00:00
@endif
</div>
<div class="box box-success col-lg-12 col-md-12 hidden-xs hidden-sm">
<div class="box-header">
<h4>Edit Message</h4>
</div>
<div class="box-body">
<form method="post" action="">
@csrf
@if(session('error'))
<div class="alert alert-danger" role="alert">
{{ session('error') }}
<a class="close" data-dismiss="alert" aria-label="close">&times;</a>
</div>
@elseif(session('success'))
<div class="alert alert-success" role="alert">
{{ session('success') }}
<a class="close" data-dismiss="alert" aria-label="close">&times;</a>
</div>
@endif
<textarea id="editor" name="message" class="editor" placeholder="Message">{!! !empty($message) ? $message->content : '' !!}</textarea>
<button class="btn btn-primary btn-block" type="submit" name="submit" style="margin-top: 5px">Post Message</button>
</form>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')
<script src="{{ asset('assets/minified/sceditor.min.js') }}"></script>
<script>
var textarea = document.getElementById("editor");
sceditor.create(textarea, {
plugins: 'undo, autosave',
format: 'bbcode',
style: '{{ asset('assets/minified/themes/default.min.css') }}',
emoticonsRoot: '{{ asset('assets/img').'/' }}',
locale: 'en',
width: '100%'
});
</script>
@endsection