FEATURE: add support for writing blog posts
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
return [
|
||||
|
||||
'allowComments' => 'Allow comments?',
|
||||
'new' => 'Write new',
|
||||
'overview' => 'All articles'
|
||||
];
|
||||
@@ -0,0 +1,89 @@
|
||||
<div class="row">
|
||||
<div class="columns large-6">
|
||||
<label>
|
||||
@lang('admin/contents.field_title')
|
||||
|
||||
<input type="text" name="title" class="slug-source" placeholder="@lang('admin/contents.field_title')"
|
||||
value="{{old('title', $page->title)}}" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="columns large-4">
|
||||
<label>
|
||||
@lang('admin/contents.field_url')
|
||||
|
||||
<input type="text" name="url" class="slug-target" placeholder="@lang('admin/contents.field_url')"
|
||||
value="{{old('url', $page->url)}}" />
|
||||
|
||||
@if (isset($errors) && $errors->has('url'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('url') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
</div>
|
||||
<div class="column large-2 text-center">
|
||||
<label>
|
||||
@lang('admin/contents.lockUrl')<br />
|
||||
|
||||
<input type="checkbox" value="1" id="lockUrl"
|
||||
@if(old('lockUrl') || ($page->id > 0 && \Illuminate\Support\Str::slug($page->title) != $page->url)) checked
|
||||
@endif name="lockUrl" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="columns large-6">
|
||||
<label>
|
||||
<select name="status">
|
||||
@foreach($contentStatuses as $status => $translation)
|
||||
<option value="{{$status}}" @if(old('status', $page->status) == $status) selected @endif>
|
||||
{{$translation}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
|
||||
@if (isset($errors) && $errors->has('status'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('status') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="column large-6">
|
||||
<label>
|
||||
@lang('article::article.allowComments')
|
||||
<input type="checkbox" value="1" @if(old('allowComments', isset($page->module_settings->allowComments) ? $page->module_settings->allowComments : true)) checked @endif name="allowComments" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@if($module->support_categories && count($categories))
|
||||
<div class="column large-12">
|
||||
<label>
|
||||
@lang('admin/contents.category')
|
||||
|
||||
<select name="category">
|
||||
<option value=""> ---</option>
|
||||
@foreach($categories as $category)
|
||||
<option value="{{$category->id}}"
|
||||
@if($category->id == old('category', $page->category_id)) selected @endif>
|
||||
{{str_repeat(' - ', $category->real_depth)}} {{$category->name}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<label>
|
||||
<textarea name="pageContent" id="pageContent" class="wysiwyg-editor">
|
||||
{{old('pageContent', $page->content)}}
|
||||
</textarea>
|
||||
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user