Resourcify admin cp controllers, routes, and views

This commit is contained in:
Jonny Barnes 2017-03-03 13:22:21 +00:00
parent 03e52915bd
commit 17804eed27
40 changed files with 208 additions and 431 deletions

View file

@ -16,7 +16,7 @@ New Note « Admin CP
@endif
@include('templates.new-note-form', [
'micropub' => false,
'action' => '/admin/note/new',
'action' => '/admin/note',
'id' => 'newnote-admin'
])
@stop
@ -25,9 +25,6 @@ New Note « Admin CP
@include('templates.mapbox-links')
<script src="/assets/js/newnote.js"></script>
<script src="/assets/frontend/store2.min.js"></script>
<script src="/assets/frontend/alertify.js"></script>
<script src="/assets/js/form-save.js"></script>
<link rel="stylesheet" href="/assets/frontend/alertify.css">
@stop

View file

@ -1,16 +0,0 @@
@extends('master')
@section('title')
Delete Note « Admin CP
@stop
@section('content')
<form action="/admin/note/delete/{{ $id }}" method="post" accept-charset="utf-8">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<fieldset class="note-ui">
<legend>Delete Note</legend>
<p>Are you sure you want to delete the note?
<label for="kludge"></label><input type="submit" value="Submit">
</fieldset>
</form>
@stop

View file

@ -1,9 +0,0 @@
@extends('master')
@section('title')
Delete Note Success « Admin CP
@stop
@section('content')
<p>The note was successfully deleted.</p>
@stop

View file

@ -5,14 +5,15 @@ Edit Note « Admin CP
@stop
@section('content')
<form action="/admin/note/edit/{{ $id }}" method="post" accept-charset="utf-8">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<form action="/admin/notes/{{ $note->id }}" method="post" accept-charset="utf-8">
{{ csrf_field() }}
{{ method_field('PUT') }}
<fieldset class="note-ui">
<legend>Edit Note</legend>
<label for="in-reply-to" accesskey="r">Reply-to: </label><input type="text" name="in-reply-to" id="in-reply-to" placeholder="in-reply-to-1 in-reply-to-2 …" tabindex="1" value="{{ $note->in_reply_to }}"><br>
<label for="content" accesskey="n">Note: </label><textarea name="content" id="content" placeholder="Note" tabindex="2">{{ $note->originalNote }}</textarea><br>
<label for="webmentions" accesskey="w">Send webmentions: </label><input type="checkbox" name="webmentions" id="webmentions" checked="checked" tabindex="3"><br>
<label for="kludge"></label><input type="submit" value="Submit" tabindex="6"> <a href="/admin/note/delete/{{ $id }}">Delete note?</a>
<label for="kludge"></label><input type="submit" value="Submit" tabindex="6">
</fieldset>
</form>
@stop

View file

@ -1,9 +0,0 @@
@extends('master')
@section('title')
Note Successfully Edited « Admin CP
@stop
@section('content')
<p>Successfully edited note with id: {{ $id }}.</p>
@stop

View file

@ -8,7 +8,7 @@ List Notes « Admin CP
<p>Select note to edit:</p>
<ol reversed>
@foreach($notes as $note)
<li><a href="/admin/note/edit/{{ $note->id }}">{{ $note->originalNote }}</a></li>
<li><a href="/admin/notes/{{ $note->id }}/edit">{{ $note->originalNote }}</a></li>
@endforeach
</ol>
@stop

View file

@ -1,9 +0,0 @@
@extends('master')
@section('title')
New Note Success « Admin CP
@stop
@section('content')
<p>Successfully created note with id: {{ $id }}. {{ $shorturl }}</p>
@stop