small quality changes
This commit is contained in:
parent
e0c45bc13e
commit
bab2640cc9
|
|
@ -31,9 +31,30 @@ class MessageController extends Controller
|
|||
return view('messages.deleted')->with('messages', $messages);
|
||||
}
|
||||
|
||||
public function compose()
|
||||
public function compose(Request $request)
|
||||
{
|
||||
return view('messages.create');
|
||||
$replyName = "";
|
||||
$replySubject = "RE: ";
|
||||
$replyContent = "\n\n\n-------------------------------------\n";
|
||||
|
||||
if ($request->has('replyTo')) {
|
||||
$id = $request->replyTo;
|
||||
$message = Message::findOrFail($id);
|
||||
if ($message->sendto_id != Auth::id()) {
|
||||
abort(404);
|
||||
}
|
||||
$replyName = $message->user->name;
|
||||
$replySubject .= $message->subject;
|
||||
$replyContent .= "On " . $message->created_at->format('F d, Y') . " " . $replyName . " wrote: \n" . $message->content;
|
||||
}
|
||||
|
||||
$data = [
|
||||
'replyName' => $replyName,
|
||||
'replySubject' => $replySubject,
|
||||
'replyContent' => $replyContent,
|
||||
];
|
||||
|
||||
return view('messages.create')->with($data);
|
||||
}
|
||||
|
||||
public function delete_all()
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ class PageController extends Controller
|
|||
if ($request->has('q')) {
|
||||
$users = User::where('name', 'LIKE', '%' . $request->q . '%')->paginate(10);
|
||||
} else {
|
||||
$users = User::paginate(10);
|
||||
$users = User::latest('last_seen')->paginate(10);
|
||||
}
|
||||
|
||||
return view('pages.users')->with('users', $users);
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
<label class="form-check-label" for="remember">
|
||||
{{ __('Remember Me') }}
|
||||
</label>
|
||||
<button type="submit" class="greenbutton">Log in!</button>
|
||||
<button type="submit" class="greenbutton" onClick="this.form.submit();this.disabled=true">Log in!</button>
|
||||
@if (Route::has('password.request'))
|
||||
<br><br>
|
||||
<a class="btn btn-link" href="{{ route('password.request') }}"
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@
|
|||
<p>An Invite Key is required to sign up. You can obtain one from a person that has played ARCHBLOX.</p>
|
||||
<p>Don't beg for keys.</p>
|
||||
<br>
|
||||
<button class="greenbutton">Sign Up!</button>
|
||||
<button class="greenbutton" onClick="this.form.submit();this.disabled=true">Sign Up!</button>
|
||||
</div>
|
||||
<div id="footer_signup">
|
||||
<p>ARCHBLOX is not affiliated with Roblox Corp, Lego, Sony, SEGA, Microsoft, Nintendo and Morbius. It's Morbin time!</p>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@
|
|||
@endsection
|
||||
|
||||
@section('content')
|
||||
<button class="greybutton" onclick="window.location=document.referrer;">Back</button>
|
||||
<button type="button" class="greybutton" onclick="window.location=document.referrer;">Back</button>
|
||||
@if ($message->sendto_id == Auth::id())
|
||||
<button type="button" class="greybutton" onclick="window.location='/my/messages/compose?replyTo={{ $message->id }}'">Reply</button>
|
||||
@endif
|
||||
@if (Auth::id() != $message->user_id)
|
||||
<form action="{{ route('delete_message', $message->id) }}" method="post" style="display:inline-block">
|
||||
@csrf
|
||||
|
|
|
|||
|
|
@ -14,13 +14,26 @@
|
|||
<br>
|
||||
<form action="{{ route('send_message') }}" method="POST">
|
||||
@csrf
|
||||
<p>To: <input type="text" name="name" placeholder="Username"
|
||||
@if (request()->has('to')) value="{{ request()->to }}" @else value="{{ old('name') }}" @endif></p>
|
||||
<p>Subject: <input type="text" name="subject" placeholder="Subject" value="{{ old('subject') }}"></p>
|
||||
<textarea style="width: calc(100% - 5px); height: 170px; min-height: 170px; resize: vertical;"
|
||||
placeholder="Write your message..." name="message">{{ old('message') }}</textarea>
|
||||
<button class="greenbutton" type="submit">Send</button>
|
||||
<button class="redbutton" type="reset"><a href="{{ route('inbox') }}"
|
||||
style="color:white;font-weight:normal">Cancel</a></button>
|
||||
@if (request()->has('replyTo'))
|
||||
<p>To: <input type="text" name="name" placeholder="Username" value="{{ $replyName }}"></p>
|
||||
<p>Subject: <input type="text" name="subject" placeholder="Subject" value="{{ $replySubject }}"></p>
|
||||
<button type="button" onClick="document.getElementById('message').value = ''" style="margin-top:3px;margin-bottom:3px">Clear Message</button>
|
||||
<textarea style="width: calc(100% - 5px); height: 170px; min-height: 170px; resize: vertical;"
|
||||
placeholder="Write your message..." id="message" name="message">{{ old('message') ? old('message') : $replyContent }}</textarea>
|
||||
<button class="greenbutton" type="submit">Send</button>
|
||||
<button class="redbutton" type="reset"><a href="{{ route('inbox') }}"
|
||||
style="color:white;font-weight:normal">Cancel</a></button>
|
||||
@else
|
||||
<p>To: <input type="text" name="name" placeholder="Username"
|
||||
@if (request()->has('to')) value="{{ request()->to }}" @else value="{{ old('name') }}" @endif>
|
||||
</p>
|
||||
<p>Subject: <input type="text" name="subject" placeholder="Subject" value="{{ old('subject') }}"></p>
|
||||
<button type="button" onClick="document.getElementById('message').value = ''" style="margin-top:3px;margin-bottom:3px">Clear Message</button>
|
||||
<textarea style="width: calc(100% - 5px); height: 170px; min-height: 170px; resize: vertical;"
|
||||
placeholder="Write your message..." id="message" name="message">{{ old('message') }}</textarea>
|
||||
<button class="greenbutton" type="submit">Send</button>
|
||||
<button class="redbutton" type="reset"><a href="{{ route('inbox') }}"
|
||||
style="color:white;font-weight:normal">Cancel</a></button>
|
||||
@endif
|
||||
</form>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
@section('content')
|
||||
<h1 id="usernameframe">My Messages</h1>
|
||||
<button class="greenbutton"><a href="{{ route('compose') }}" style="color:white;font-weight:normal">New
|
||||
<button type="button" class="greenbutton"><a href="{{ route('compose') }}" style="color:white;font-weight:normal">New
|
||||
Message</a></button>
|
||||
<form action="{{ route('recover_all') }}" method="POST" style="display:inline-block">
|
||||
@csrf
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
@section('content')
|
||||
<h1 id="usernameframe">My Messages</h1>
|
||||
<button class="greenbutton"><a href="{{ route('compose') }}" style="color:white;font-weight:normal">New
|
||||
<button type="button" class="greenbutton"><a href="{{ route('compose') }}" style="color:white;font-weight:normal">New
|
||||
Message</a></button>
|
||||
<form action="{{ route('delete_all') }}" method="POST" style="display:inline-block">
|
||||
@csrf
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
@section('content')
|
||||
<h1 id="usernameframe">My Messages</h1>
|
||||
<button class="greenbutton"><a href="{{ route('compose') }}" style="color:white;font-weight:normal">New
|
||||
<button type="button" class="greenbutton"><a href="{{ route('compose') }}" style="color:white;font-weight:normal">New
|
||||
Message</a></button>
|
||||
<br>
|
||||
<br>
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
@endif
|
||||
@switch($user->settings->message_preference)
|
||||
@case(2)
|
||||
<a href="/my/messages/compose?to={{ $user->name }}"><button class="greybutton">Message</button></a>
|
||||
<a href="/my/messages/compose?to={{ $user->name }}"><button class="greybutton" type="button">Message</button></a>
|
||||
@break
|
||||
@case(1)
|
||||
@if (Auth::user()->isFriendWith($user))
|
||||
|
|
|
|||
Loading…
Reference in New Issue