Resourcify admin cp controllers, routes, and views
This commit is contained in:
parent
03e52915bd
commit
17804eed27
40 changed files with 208 additions and 431 deletions
|
@ -17,7 +17,7 @@ class ArticlesController extends Controller
|
|||
{
|
||||
$posts = Article::select('id', 'title', 'published')->orderBy('id', 'desc')->get();
|
||||
|
||||
return view('admin.articles.list', ['posts' => $posts]);
|
||||
return view('admin.articles.index', ['posts' => $posts]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -29,7 +29,7 @@ class ArticlesController extends Controller
|
|||
{
|
||||
$message = session('message');
|
||||
|
||||
return view('admin.articles.new', ['message' => $message]);
|
||||
return view('admin.articles.create', ['message' => $message]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -65,13 +65,13 @@ class ArticlesController extends Controller
|
|||
$unique = strpos($msg, '1062');
|
||||
if ($unique !== false) {
|
||||
//We've checked for error 1062, i.e. duplicate titleurl
|
||||
return redirect('admin/blog/new')->withInput()->with('message', 'Duplicate title, please change');
|
||||
return redirect('/admin/blog/create')->withInput()->with('message', 'Duplicate title, please change');
|
||||
}
|
||||
//this isn't the error you're looking for
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return view('admin.articles.newsuccess', ['id' => $article->id, 'title' => $article->title]);
|
||||
return redirect('/admin/blog');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -112,18 +112,7 @@ class ArticlesController extends Controller
|
|||
$article->published = $published;
|
||||
$article->save();
|
||||
|
||||
return view('admin.articles.editsuccess', ['id' => $articleId]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the delete confirmation form for an article.
|
||||
*
|
||||
* @param string The article id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function delete($articleId)
|
||||
{
|
||||
return view('admin.articles.delete', ['id' => $articleId]);
|
||||
return redirect('/admin/blog');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -136,6 +125,6 @@ class ArticlesController extends Controller
|
|||
{
|
||||
Article::where('id', $articleId)->delete();
|
||||
|
||||
return view('admin.articles.deletesuccess', ['id' => $articleId]);
|
||||
return redirect('/admin/blog');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ class ClientsController extends Controller
|
|||
{
|
||||
$clients = MicropubClient::all();
|
||||
|
||||
return view('admin.clients.list', ['clients' => $clients]);
|
||||
return view('admin.clients.index', compact('clients'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -27,7 +27,23 @@ class ClientsController extends Controller
|
|||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('admin.clients.new');
|
||||
return view('admin.clients.create');
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the request to adda new client name.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
MicropubClient::create([
|
||||
'client_url' => $request->input('client_url'),
|
||||
'client_name' => $request->input('client_name'),
|
||||
]);
|
||||
|
||||
return redirect('/admin/clients');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -47,22 +63,6 @@ class ClientsController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the request to adda new client name.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
MicropubClient::create([
|
||||
'client_url' => $request->input('client_url'),
|
||||
'client_name' => $request->input('client_name'),
|
||||
]);
|
||||
|
||||
return view('admin.clients.newsuccess');
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the request to edit a client name.
|
||||
*
|
||||
|
@ -73,17 +73,23 @@ class ClientsController extends Controller
|
|||
public function update($clientId, Request $request)
|
||||
{
|
||||
$client = MicropubClient::findOrFail($clientId);
|
||||
if ($request->input('edit')) {
|
||||
$client->client_url = $request->input('client_url');
|
||||
$client->client_name = $request->input('client_name');
|
||||
$client->save();
|
||||
$client->client_url = $request->input('client_url');
|
||||
$client->client_name = $request->input('client_name');
|
||||
$client->save();
|
||||
|
||||
return view('admin.clietns.editsuccess');
|
||||
}
|
||||
if ($request->input('delete')) {
|
||||
$client->delete();
|
||||
return redirect('/admin/clients');
|
||||
}
|
||||
|
||||
return view('admin.clients.deletesuccess');
|
||||
}
|
||||
/**
|
||||
* Process a request to delete a client.
|
||||
*
|
||||
* @param string The client id
|
||||
* @return redirect
|
||||
*/
|
||||
public function destroy($articleId)
|
||||
{
|
||||
MicropubClient::where('id', $articleId)->delete();
|
||||
|
||||
return redirect('/admin/clients');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ class ContactsController extends Controller
|
|||
{
|
||||
$contacts = Contact::all();
|
||||
|
||||
return view('admin.contacts.list', ['contacts' => $contacts]);
|
||||
return view('admin.contacts.index', compact('contacts'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -29,30 +29,7 @@ class ContactsController extends Controller
|
|||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('admin.contacts.new');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form to edit an existing contact.
|
||||
*
|
||||
* @param string The contact id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function edit($contactId)
|
||||
{
|
||||
$contact = Contact::findOrFail($contactId);
|
||||
|
||||
return view('admin.contacts.edit', ['contact' => $contact]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form to confirm deleting a contact.
|
||||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function delete($contactId)
|
||||
{
|
||||
return view('admin.contacts.delete', ['id' => $contactId]);
|
||||
return view('admin.contacts.create');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -71,7 +48,20 @@ class ContactsController extends Controller
|
|||
$contact->facebook = $request->input('facebook');
|
||||
$contact->save();
|
||||
|
||||
return view('admin.contacts.newsuccess', ['id' => $contact->id]);
|
||||
return redirect('/admin/contacts');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form to edit an existing contact.
|
||||
*
|
||||
* @param string The contact id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function edit($contactId)
|
||||
{
|
||||
$contact = Contact::findOrFail($contactId);
|
||||
|
||||
return view('admin.contacts.edit', compact('contact'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -105,7 +95,7 @@ class ContactsController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
return view('admin.contacts.editsuccess');
|
||||
return redirect('/admin/contacts');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -119,7 +109,7 @@ class ContactsController extends Controller
|
|||
$contact = Contact::findOrFail($contactId);
|
||||
$contact->delete();
|
||||
|
||||
return view('admin.contacts.deletesuccess');
|
||||
return redirect('/admin/contacts');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -30,7 +30,7 @@ class NotesController extends Controller
|
|||
$note->originalNote = $note->getOriginal('note');
|
||||
}
|
||||
|
||||
return view('admin.notes.list', ['notes' => $notes]);
|
||||
return view('admin.notes.index', comapct('notes'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -40,32 +40,7 @@ class NotesController extends Controller
|
|||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('admin.notes.new');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the form to edit a specific note.
|
||||
*
|
||||
* @param string The note id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function edit($noteId)
|
||||
{
|
||||
$note = Note::find($noteId);
|
||||
$note->originalNote = $note->getOriginal('note');
|
||||
|
||||
return view('admin.notes.edit', ['id' => $noteId, 'note' => $note]);
|
||||
}
|
||||
|
||||
/**
|
||||
* The delete note page.
|
||||
*
|
||||
* @param int id
|
||||
* @return view
|
||||
*/
|
||||
public function delete($noteId)
|
||||
{
|
||||
return view('admin.notes.delete', ['id' => $id]);
|
||||
return view('admin.notes.create');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -82,7 +57,7 @@ class NotesController extends Controller
|
|||
['photosize' => 'At least one uploaded file exceeds size limit of 5MB']
|
||||
);
|
||||
if ($validator->fails()) {
|
||||
return redirect('/admin/note/new')
|
||||
return redirect('/admin/notes/create')
|
||||
->withErrors($validator)
|
||||
->withInput();
|
||||
}
|
||||
|
@ -101,10 +76,21 @@ class NotesController extends Controller
|
|||
|
||||
$note = $this->noteService->createNote($data);
|
||||
|
||||
return view('admin.notes.newsuccess', [
|
||||
'id' => $note->id,
|
||||
'shorturl' => $note->shorturl,
|
||||
]);
|
||||
return redirect('/admin/notes');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the form to edit a specific note.
|
||||
*
|
||||
* @param string The note id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function edit($noteId)
|
||||
{
|
||||
$note = Note::find($noteId);
|
||||
$note->originalNote = $note->getOriginal('note');
|
||||
|
||||
return view('admin.notes.edit', compact('note'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -126,7 +112,7 @@ class NotesController extends Controller
|
|||
dispatch(new SendWebMentions($note));
|
||||
}
|
||||
|
||||
return view('admin.notes.editsuccess', ['id' => $noteId]);
|
||||
return redirect('/admin/notes');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -140,6 +126,6 @@ class NotesController extends Controller
|
|||
$note = Note::findOrFail($id);
|
||||
$note->delete();
|
||||
|
||||
return view('admin.notes.deletesuccess');
|
||||
return redirect('/admin/notes');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ class PlacesController extends Controller
|
|||
{
|
||||
$places = Place::all();
|
||||
|
||||
return view('admin.places.list', ['places' => $places]);
|
||||
return view('admin.places.index', compact('places'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,7 +36,25 @@ class PlacesController extends Controller
|
|||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('admin.places.new');
|
||||
return view('admin.places.create');
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a request to make a new place.
|
||||
*
|
||||
* @param Illuminate\Http\Request $request
|
||||
* @return Illuminate\View\Factory view
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$data = [];
|
||||
$data['name'] = $request->name;
|
||||
$data['description'] = $request->description;
|
||||
$data['latitude'] = $request->latitude;
|
||||
$data['longitude'] = $request->longitude;
|
||||
$place = $this->placeService->createPlace($data);
|
||||
|
||||
return redirect('/admin/places');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,24 +79,6 @@ class PlacesController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a request to make a new place.
|
||||
*
|
||||
* @param Illuminate\Http\Request $request
|
||||
* @return Illuminate\View\Factory view
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$data = [];
|
||||
$data['name'] = $request->name;
|
||||
$data['description'] = $request->description;
|
||||
$data['latitude'] = $request->latitude;
|
||||
$data['longitude'] = $request->longitude;
|
||||
$place = $this->placeService->createPlace($data);
|
||||
|
||||
return view('admin.places.newsuccess');
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a request to edit a place.
|
||||
*
|
||||
|
@ -94,6 +94,6 @@ class PlacesController extends Controller
|
|||
$place->location = new Point((float) $request->latitude, (float) $request->longitude);
|
||||
$place->save();
|
||||
|
||||
return view('admin.places.editsuccess');
|
||||
return redirect('/admin/places');
|
||||
}
|
||||
}
|
||||
|
|
27
resources/views/admin/articles/create.blade.php
Normal file
27
resources/views/admin/articles/create.blade.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
New Article « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@if(isset($message))<p class="error">{{ $message }}</p>@endif
|
||||
<form action="/admin/blog/" method="post" accept-charset="utf-8" enctype="multipart/form-data" id="newarticle">
|
||||
{{ csrf_field() }}
|
||||
<label for="title">Title (URL):</label>
|
||||
<br>
|
||||
<input type="text" name="title" id="title" value="{{ old('title') }}" placeholder="Title here">
|
||||
<br>
|
||||
<input type="text" name="url" id="url" value="{{ old('url') }}" placeholder="Article URL">
|
||||
<br>
|
||||
<label for="main">Main:</label>
|
||||
<br>
|
||||
<textarea name="main" id="main" placeholder="Article here">{{ old('main') }}</textarea>
|
||||
<br>
|
||||
<label for="published">Published:</label><input type="checkbox" name="published" id="published" value="1">
|
||||
<br>
|
||||
<p>Or you can upload an <code>.md</code> file:</p><input type="file" accept=".md" name="article">
|
||||
<br>
|
||||
<button type="submit" name="save">Save</button>
|
||||
</form>
|
||||
@stop
|
|
@ -1,13 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
Delete Article? « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<form action="/admin/blog/delete/{{ $id }}" method="post">
|
||||
<label for="delete">Are you sure you want to delete this post? </label><input type="checkbox" name="delete" id="delete">
|
||||
<br>
|
||||
<input type="submit" id="submit" value="Submit">
|
||||
</form>
|
||||
@stop
|
|
@ -1,9 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
Article Deleted « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<p>You have successfully deletd the article with id: {{ $id }}</p>
|
||||
@stop
|
|
@ -5,8 +5,9 @@ Edit Article « Admin CP
|
|||
@stop
|
||||
|
||||
@section('content')
|
||||
<form action="/admin/blog/edit/{{ $id }}" method="post" accept-charset="utf-8">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<form action="/admin/blog/{{ $id }}" method="post" accept-charset="utf-8">
|
||||
{{ csrf_field() }}
|
||||
{{ method_field('PUT') }}
|
||||
<label for="title">Title (URL):</label>
|
||||
<br>
|
||||
<input type="text" name="title" id="title" value="{!! $post['0']['title'] !!}">
|
||||
|
@ -21,21 +22,12 @@ Edit Article « Admin CP
|
|||
<br>
|
||||
<input type="submit" name="save" value="Save">
|
||||
</form>
|
||||
<h2>Preview</h2>
|
||||
@stop
|
||||
|
||||
@section('scripts')
|
||||
@parent
|
||||
<script src="/assets/frontend/marked.min.js"></script>
|
||||
<script>
|
||||
var preview = document.createElement('div');
|
||||
preview.classList.add('preview');
|
||||
var main = document.querySelector('main');
|
||||
main.appendChild(preview);
|
||||
var textarea = document.querySelector('textarea');
|
||||
window.setInterval(function () {
|
||||
var markdown = textarea.value;
|
||||
preview.innerHTML = marked(markdown);
|
||||
}, 5000);
|
||||
</script>
|
||||
<hr>
|
||||
<form action="/admin/blog/{{ $id }}" method="post">
|
||||
{{ csrf_field() }}
|
||||
{{ method_field('DELETE') }}
|
||||
<button type="submit" name="submit">
|
||||
Delete
|
||||
</button>
|
||||
</form>
|
||||
@stop
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
Article Successfully Edited « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<p>Successfully edited article with id: {{ $id }}</p>
|
||||
@stop
|
|
@ -8,7 +8,7 @@ List Articles « Admin CP
|
|||
<p>Select article to edit:</p>
|
||||
<ol reversed>
|
||||
@foreach($posts as $post)
|
||||
<li><a href="/admin/blog/edit/{{ $post['id'] }}">{{ $post['title'] }}</a>@if($post['published'] == '0')<span class="notpublished">not published</span>@endif <a href="/admin/blog/delete/{{ $post['id'] }}">Delete?</a>
|
||||
<li><a href="/admin/blog/{{ $post['id'] }}/edit">{{ $post['title'] }}</a>@if($post['published'] == '0')<span class="notpublished">not published</span>@endif
|
||||
@endforeach
|
||||
</ol>
|
||||
@stop
|
|
@ -1,49 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
New Article « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@if(isset($message))<p class="error">{{ $message }}</p>@endif
|
||||
<form action="/admin/blog/new" method="post" accept-charset="utf-8" enctype="multipart/form-data" id="newarticle">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<label for="title">Title (URL):</label>
|
||||
<br>
|
||||
<input type="text" name="title" id="title" value="{{ old('title') }}" placeholder="Title here">
|
||||
<br>
|
||||
<input type="text" name="url" id="url" value="{{ old('url') }}" placeholder="Article URL">
|
||||
<br>
|
||||
<label for="main">Main:</label>
|
||||
<br>
|
||||
<textarea name="main" id="main" placeholder="Article here">{{ old('main') }}</textarea>
|
||||
<br>
|
||||
<label for="published">Published:</label><input type="checkbox" name="published" id="published" value="1">
|
||||
<br>
|
||||
<p>Or you can upload an <code>.md</code> file:</p><input type="file" accept=".md" name="article">
|
||||
<br>
|
||||
<button type="submit" name="save">Save</button>
|
||||
</form>
|
||||
<h2>Preview</h2>
|
||||
@stop
|
||||
|
||||
@section('scripts')
|
||||
@parent
|
||||
<script src="/assets/frontend/marked.min.js"></script>
|
||||
<script>
|
||||
var preview = document.createElement('div');
|
||||
preview.classList.add('preview');
|
||||
var main = document.querySelector('main');
|
||||
main.appendChild(preview);
|
||||
var textarea = document.querySelector('textarea');
|
||||
window.setInterval(function () {
|
||||
var markdown = textarea.value;
|
||||
preview.innerHTML = marked(markdown);
|
||||
}, 5000);
|
||||
</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
|
|
@ -1,9 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
New Article Success « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<p>Successfully created article with id: {{ $id }}, title: {{ $title }}</p>
|
||||
@stop
|
|
@ -6,7 +6,7 @@ New Client « Admin CP
|
|||
|
||||
@section('content')
|
||||
<h1>New Client</h1>
|
||||
<form action="/admin/clients/new" method="post" accept-charset="utf-8">
|
||||
<form action="/admin/clients/" method="post" accept-charset="utf-8">
|
||||
{{ csrf_field() }}
|
||||
<input type="text" name="client_url" id="client_url" placeholder="client_url"><br>
|
||||
<input type="text" name="client_name" id="client_name" placeholder="client_name"><br>
|
|
@ -1,9 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
Edit Client « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<p>Successfully deleted the client information.</p>
|
||||
@stop
|
|
@ -6,10 +6,17 @@ Edit Client « Admin CP
|
|||
|
||||
@section('content')
|
||||
<h1>Edit Client</h1>
|
||||
<form action="/admin/clients/edit/{{ $id }}" method="post" accept-charset="utf-8">
|
||||
<form action="/admin/clients/{{ $id }}" method="post" accept-charset="utf-8">
|
||||
{{ csrf_field() }}
|
||||
{{ method_field('PUT') }}
|
||||
<input type="text" name="client_url" id="client_url" value="{{ $client_url }}"><br>
|
||||
<input type="text" name="client_name" id="client_name" value="{{ $client_name }}"><br>
|
||||
<input type="submit" name="edit" value="Edit"><br><br>
|
||||
<input type="submit" name="delete" value="Delete">
|
||||
<input type="submit" name="submit" value="Edit">
|
||||
</form>
|
||||
<hr>
|
||||
<form action="/admin/clients/{{ $id }}" method="post">
|
||||
{{ csrf_field() }}
|
||||
{{ method_field('DELETE') }}
|
||||
<button type="submit">Delete Client</button>
|
||||
</form>
|
||||
@stop
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
Edit Client « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<p>Successfully edited the client information.</p>
|
||||
@stop
|
|
@ -9,9 +9,9 @@ List Clients « Admin CP
|
|||
<ul>
|
||||
@foreach($clients as $client)
|
||||
<li>{{ $client['client_url'] }} : {{ $client['client_name'] }}
|
||||
<a href="/admin/clients/edit/{{ $client['id'] }}">edit?</a>
|
||||
<a href="/admin/clients/{{ $client['id'] }}/edit">edit?</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<p>Createn a <a href="/admin/clients/new">new entry</a>?</p>
|
||||
<p>Create a <a href="/admin/clients/new">new entry</a>?</p>
|
||||
@stop
|
|
@ -1,9 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
New Client « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<p>Succesfully created new client info.</p>
|
||||
@stop
|
|
@ -6,8 +6,8 @@ New Contact « Admin CP
|
|||
|
||||
@section('content')
|
||||
<h1>New Contact</h1>
|
||||
<form action="/admin/contacts/new" method="post" accept-charset="utf-8">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<form action="/admin/contacts/" method="post" accept-charset="utf-8">
|
||||
{{ csrf_field() }}
|
||||
<label for="name">Real Name:</label> <input type="text" name="name" id="name" placeholder="Real Name"><br>
|
||||
<label for="nick">Nick:</label> <input type="text" name="nick" id="nick" placeholder="local_nick"><br>
|
||||
<label for="homepage">Homepage:</label> <input type="text" name="homepage" id="homepage" placeholder="https://homepage.com"><br>
|
|
@ -1,14 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
Delete Contact? « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<form action="/admin/contacts/delete/{{ $id }}" method="post">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<label for="delete">Are you sure you want to delete this contact? </label><input type="checkbox" name="delete" id="delete">
|
||||
<br>
|
||||
<input type="submit" id="submit" value="Submit">
|
||||
</form>
|
||||
@stop
|
|
@ -1,9 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
Deleted Contact « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<p>Successfully deleted the contact information.</p>
|
||||
@stop
|
|
@ -6,8 +6,9 @@ Edit Contact « Admin CP
|
|||
|
||||
@section('content')
|
||||
<h1>Edit Contact</h1>
|
||||
<form action="/admin/contacts/edit/{{ $contact->id }}" method="post" enctype="multipart/form-data" accept-charset="utf-8">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<form action="/admin/contacts/{{ $contact->id }}" method="post" enctype="multipart/form-data" accept-charset="utf-8">
|
||||
{{ csrf_token() }}
|
||||
{{ method_field('PUT') }}
|
||||
<fieldset class="note-ui">
|
||||
<legend>Conctact</legend>
|
||||
<div>
|
||||
|
@ -37,6 +38,5 @@ Edit Contact « Admin CP
|
|||
<input type="submit" name="submit" value="Submit">
|
||||
</fieldset>
|
||||
</form>
|
||||
<p>Or do you want to <a href="/admin/contacts/delete/{{ $contact->id }}">delete</a> this contact?</p>
|
||||
<p>Instead of uploading an image, you can <a href="/admin/contacts/edit/{{ $contact->id }}/getavatar">grab from their homepage</a>?</p>
|
||||
@stop
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
Edit Contact « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<p>Successfully edited the contact information.</p>
|
||||
@stop
|
|
@ -22,7 +22,7 @@ List Contacts « Admin CP
|
|||
<td>{{ $contact->homepage }}</td>
|
||||
<td>{{ $contact->twitter }}</td>
|
||||
<td>{{ $contact->facebook }}</td>
|
||||
<td><a href="/admin/contacts/edit/{{ $contact->id }}">edit</a></td>
|
||||
<td><a href="/admin/contacts/{{ $contact->id }}/edit">edit</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
|
@ -1,9 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
New Contact « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<p>Succesfully created new contact entry.</p>
|
||||
@stop
|
|
@ -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
|
|
@ -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
|
|
@ -1,9 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
Delete Note Success « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<p>The note was successfully deleted.</p>
|
||||
@stop
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -6,8 +6,8 @@ New Place « Admin CP
|
|||
|
||||
@section('content')
|
||||
<h1>New Place</h1>
|
||||
<form action="/admin/places/new" method="post" accept-charset="utf-8">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<form action="/admin/places/" method="post" accept-charset="utf-8">
|
||||
{{ csrf_field() }}
|
||||
<label for="name">Name:</label> <input type="text" name="name" id="name" placeholder="Place Name"><br>
|
||||
<label for="description">Description:</label> <input type="text" name="description" id="description" placeholder="Description"><br>
|
||||
<label for="latitude">Latitude:</label> <input type="text" name="latitude" id="latitude" placeholder="Latitude"><br>
|
|
@ -6,8 +6,9 @@ Edit Place « Admin CP
|
|||
|
||||
@section('content')
|
||||
<h1>Edit Place</h1>
|
||||
<form action="/admin/places/edit/{{ $id }}" method="post" accept-charset="utf-8">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<form action="/admin/places/{{ $id }}" method="post" accept-charset="utf-8">
|
||||
{{ csrf_field() }}
|
||||
{{ method_field('PUT') }}
|
||||
<input type="text" name="name" id="name" value="{{ $name }}"><br>
|
||||
<input type="text" name="description" id="description" value="{{ $description }}"><br>
|
||||
<input type="text" name="latitude" id="latitude" value="{{ $latitude }}"><br>
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
Edit Place « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<p>Successfully edited the place information.</p>
|
||||
@stop
|
|
@ -8,8 +8,8 @@ List Places « Admin CP
|
|||
<h1>Places</h1>
|
||||
<ul>
|
||||
@foreach($places as $place)
|
||||
<li>{{ $place['name'] }} <a href="/admin/places/edit/{{ $place['id'] }}">edit?</a></li>
|
||||
<li>{{ $place['name'] }} <a href="/admin/places/{{ $place['id'] }}/edit">edit?</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<p>Createn a <a href="/admin/places/new">new entry</a>?</p>
|
||||
<p>Create a <a href="/admin/places/create">new entry</a>?</p>
|
||||
@stop
|
|
@ -1,9 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
New Place « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<p>Succesfully created new place info.</p>
|
||||
@stop
|
|
@ -8,17 +8,17 @@ Admin CP
|
|||
<h1>Hello {{ $name }}!</h1>
|
||||
|
||||
<h2>Articles</h2>
|
||||
<p>You can either <a href="/admin/articles/new">create</a> new blog posts, or <a href="/admin/articles/edit">edit</a> them.<p>
|
||||
<p>You can either <a href="/admin/articles/create">create</a> new blog posts, or <a href="/admin/articles/">edit</a> them.<p>
|
||||
|
||||
<h2>Notes</h2>
|
||||
<p>You can either <a href="/admin/notes/new">create</a> new notes, or <a href="/admin/notes/edit">edit</a> them.<p>
|
||||
<p>You can either <a href="/admin/notes/create">create</a> new notes, or <a href="/admin/notes/">edit</a> them.<p>
|
||||
|
||||
<h2>Clients</h2>
|
||||
<p>You can either <a href="/admin/clients/new">create</a> new contacts, or <a href="/admin/clients/edit">edit</a> them.</p>
|
||||
<p>You can either <a href="/admin/clients/create">create</a> new contacts, or <a href="/admin/clients/">edit</a> them.</p>
|
||||
|
||||
<h2>Contacts</h2>
|
||||
<p>You can either <a href="/admin/contacts/new">create</a> new contacts, or <a href="/admin/contacts/edit">edit</a> them.</p>
|
||||
<p>You can either <a href="/admin/contacts/create">create</a> new contacts, or <a href="/admin/contacts/">edit</a> them.</p>
|
||||
|
||||
<h2>Places</h2>
|
||||
<p>You can either <a href="/admin/places/new">create</a> new places, or <a href="/admin/places/edit">edit</a> them.</p>
|
||||
<p>You can either <a href="/admin/places/create">create</a> new places, or <a href="/admin/places/">edit</a> them.</p>
|
||||
@stop
|
||||
|
|
|
@ -41,55 +41,54 @@ Route::group(['domain' => config('url.longurl')], function () {
|
|||
});
|
||||
|
||||
//Articles
|
||||
Route::group(['prefix' => 'articles'], function () {
|
||||
Route::get('/new', 'ArticlesController@create');
|
||||
Route::get('/edit', 'ArticlesController@index');
|
||||
Route::get('/edit/{id}', 'ArticlesController@edit');
|
||||
Route::get('/delete/{id}', 'ArticlesController@delete');
|
||||
Route::post('/new', 'ArticlesController@store');
|
||||
Route::post('/edit/{id}', 'ArticlesController@update');
|
||||
Route::post('/delete/{id}', 'ArticlesController@detroy');
|
||||
Route::group(['prefix' => 'blog'], function () {
|
||||
Route::get('/', 'ArticlesController@index');
|
||||
Route::get('/create', 'ArticlesController@create');
|
||||
Route::post('/', 'ArticlesController@store');
|
||||
Route::get('/{id}/edit', 'ArticlesController@edit');
|
||||
Route::put('/{id}', 'ArticlesController@update');
|
||||
Route::delete('/{id}', 'ArticlesController@destroy');
|
||||
});
|
||||
|
||||
//Notes
|
||||
Route::group(['prefix' => 'notes'], function () {
|
||||
Route::get('/edit', 'NotesController@index');
|
||||
Route::get('/new', 'NotesController@create');
|
||||
Route::get('/edit/{id}', 'NotesController@edit');
|
||||
Route::get('/delete/{id}', 'NotesController@delete');
|
||||
Route::post('/new', 'NotesController@store');
|
||||
Route::post('/edit/{id}', 'NotesController@update');
|
||||
Route::post('/delete/{id}', 'NotesController@destroy');
|
||||
Route::get('/', 'NotesController@index');
|
||||
Route::get('/create', 'NotesController@create');
|
||||
Route::post('/', 'NotesController@store');
|
||||
Route::get('/{id}/edit', 'NotesController@edit');
|
||||
Route::put('/{id}', 'NotesController@update');
|
||||
Route::delete('/{id}', 'NotesController@destroy');
|
||||
});
|
||||
|
||||
//Micropub Clients
|
||||
Route::group(['prefix' => 'clients'], function () {
|
||||
Route::get('/edit', 'ClientsController@index');
|
||||
Route::get('/new', 'ClientsController@create');
|
||||
Route::get('/edit/{id}', 'ClientsController@edit');
|
||||
Route::post('/new', 'ClientsController@store');
|
||||
Route::post('/edit/{id}', 'ClientsController@update');
|
||||
Route::get('/', 'ClientsController@index');
|
||||
Route::get('/create', 'ClientsController@create');
|
||||
Route::post('/', 'ClientsController@store');
|
||||
Route::get('/{id}', 'ClientsController@edit');
|
||||
Route::put('/{id}', 'ClientsController@update');
|
||||
Route::delete('/{id}', 'ClientsController@destroy');
|
||||
});
|
||||
|
||||
//Contacts
|
||||
Route::group(['prefix' => 'contacts'], function () {
|
||||
Route::get('/edit', 'ContactsController@index');
|
||||
Route::get('/new', 'ContactsController@create');
|
||||
Route::get('/edit/{id}', 'ContactsController@edit');
|
||||
Route::get('/delete/{id}', 'ContactsController@delete');
|
||||
Route::post('/new', 'ContactsController@store');
|
||||
Route::post('/edit/{id}', 'ContactsController@update');
|
||||
Route::post('/delete/{id}', 'ContactsController@destroy');
|
||||
Route::get('/edit/{id}/getavatar', 'ContactsController@getAvatar');
|
||||
Route::get('/', 'ContactsController@index');
|
||||
Route::get('/create', 'ContactsController@create');
|
||||
Route::post('/', 'ContactsController@store');
|
||||
Route::get('/{id}', 'ContactsController@edit');
|
||||
Route::put('/{id}', 'ContactsController@update');
|
||||
Route::delete('/{id}', 'ContactsController@destroy');
|
||||
Route::get('/{id}/getavatar', 'ContactsController@getAvatar');
|
||||
});
|
||||
|
||||
//Places
|
||||
Route::group(['prefix' => 'places'], function () {
|
||||
Route::get('/edit', 'PlacesController@index');
|
||||
Route::get('/new', 'PlacesController@create');
|
||||
Route::get('/edit/{id}', 'PlacesController@edit');
|
||||
Route::post('/new', 'PlacesController@store');
|
||||
Route::post('/edit/{id}', 'PlacesController@update');
|
||||
Route::get('/', 'PlacesController@index');
|
||||
Route::get('/create', 'PlacesController@create');
|
||||
Route::post('/', 'PlacesController@store');
|
||||
Route::get('/{id}', 'PlacesController@edit');
|
||||
Route::put('/{id}', 'PlacesController@update');
|
||||
Route::delete('/{id}', 'PlacesController@destroy');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue