server blog featerd and author
This commit is contained in:
parent
a59741dc4e
commit
44c1a0bd39
|
|
@ -1,63 +1,59 @@
|
|||
# ===================================
|
||||
# Field Definitions
|
||||
# ===================================
|
||||
|
||||
fields:
|
||||
|
||||
title:
|
||||
label: rainlab.blog::lang.post.title
|
||||
placeholder: rainlab.blog::lang.post.title_placeholder
|
||||
|
||||
label: 'rainlab.blog::lang.post.title'
|
||||
placeholder: 'rainlab.blog::lang.post.title_placeholder'
|
||||
type: text
|
||||
slug:
|
||||
label: rainlab.blog::lang.post.slug
|
||||
# span: right
|
||||
placeholder: rainlab.blog::lang.post.slug_placeholder
|
||||
label: 'rainlab.blog::lang.post.slug'
|
||||
placeholder: 'rainlab.blog::lang.post.slug_placeholder'
|
||||
preset:
|
||||
field: title
|
||||
type: slug
|
||||
|
||||
type: text
|
||||
toolbar:
|
||||
type: partial
|
||||
path: post_toolbar
|
||||
cssClass: collapse-visible
|
||||
|
||||
secondaryTabs:
|
||||
stretch: true
|
||||
fields:
|
||||
content:
|
||||
tab: rainlab.blog::lang.post.tab_edit
|
||||
tab: 'rainlab.blog::lang.post.tab_edit'
|
||||
type: RainLab\Blog\FormWidgets\BlogMarkdown
|
||||
# type: richeditor
|
||||
cssClass: field-slim blog-post-preview
|
||||
cssClass: 'field-slim blog-post-preview'
|
||||
stretch: true
|
||||
mode: split
|
||||
|
||||
locale:
|
||||
tab: rainlab.blog::lang.post.tab_categories
|
||||
label: Language of Post
|
||||
tab: 'rainlab.blog::lang.post.tab_categories'
|
||||
label: 'Language of Post'
|
||||
span: left
|
||||
type: dropdown
|
||||
default: ru
|
||||
options:
|
||||
ru: Russian
|
||||
en: English
|
||||
|
||||
translated_post:
|
||||
label: Translated Post id
|
||||
label: 'Translated Post id'
|
||||
type: number
|
||||
tab: rainlab.blog::lang.post.tab_categories
|
||||
tab: 'rainlab.blog::lang.post.tab_categories'
|
||||
span: right
|
||||
|
||||
active_categories:
|
||||
tab: rainlab.blog::lang.post.tab_categories
|
||||
tab: 'rainlab.blog::lang.post.tab_categories'
|
||||
type: relation
|
||||
commentAbove: rainlab.blog::lang.post.categories_comment
|
||||
placeholder: rainlab.blog::lang.post.categories_placeholder
|
||||
|
||||
|
||||
commentAbove: 'rainlab.blog::lang.post.categories_comment'
|
||||
placeholder: 'rainlab.blog::lang.post.categories_placeholder'
|
||||
author:
|
||||
label: 'Post author'
|
||||
span: auto
|
||||
type: text
|
||||
tab: 'rainlab.blog::lang.post.tab_manage'
|
||||
featured:
|
||||
label: Featured
|
||||
span: auto
|
||||
type: checkbox
|
||||
tab: 'rainlab.blog::lang.post.tab_manage'
|
||||
published_at:
|
||||
tab: rainlab.blog::lang.post.tab_manage
|
||||
label: rainlab.blog::lang.post.published_on
|
||||
tab: 'rainlab.blog::lang.post.tab_manage'
|
||||
label: 'rainlab.blog::lang.post.published_on'
|
||||
span: left
|
||||
cssClass: checkbox-align
|
||||
type: datepicker
|
||||
|
|
@ -67,35 +63,18 @@ secondaryTabs:
|
|||
field: published
|
||||
condition: checked
|
||||
published:
|
||||
tab: rainlab.blog::lang.post.tab_manage
|
||||
label: rainlab.blog::lang.post.published
|
||||
tab: 'rainlab.blog::lang.post.tab_manage'
|
||||
label: 'rainlab.blog::lang.post.published'
|
||||
span: right
|
||||
type: checkbox
|
||||
|
||||
user:
|
||||
tab: rainlab.blog::lang.post.tab_manage
|
||||
label: rainlab.blog::lang.post.published_by
|
||||
span: left
|
||||
type: relation
|
||||
nameFrom: login
|
||||
emptyOption: rainlab.blog::lang.post.current_user
|
||||
|
||||
excerpt:
|
||||
tab: rainlab.blog::lang.post.tab_manage
|
||||
label: rainlab.blog::lang.post.excerpt
|
||||
tab: 'rainlab.blog::lang.post.tab_manage'
|
||||
label: 'rainlab.blog::lang.post.excerpt'
|
||||
type: textarea
|
||||
size: small
|
||||
|
||||
# featured_images:
|
||||
# tab: rainlab.blog::lang.post.tab_manage
|
||||
# label: rainlab.blog::lang.post.featured_images
|
||||
# type: fileupload
|
||||
# mode: image
|
||||
# imageWidth: 200
|
||||
# imageHeight: 200
|
||||
featured_image:
|
||||
label: Featured image
|
||||
tab: rainlab.blog::lang.post.tab_manage
|
||||
label: 'Featured image'
|
||||
tab: 'rainlab.blog::lang.post.tab_manage'
|
||||
type: mediafinder
|
||||
mode: image
|
||||
span: storm
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
<?php namespace RainLab\Blog\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateRainlabBlogPosts extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('rainlab_blog_posts', function($table)
|
||||
{
|
||||
$table->string('author')->nullable();
|
||||
$table->boolean('featured')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('rainlab_blog_posts', function($table)
|
||||
{
|
||||
$table->dropColumn('author');
|
||||
$table->dropColumn('featured');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -69,3 +69,6 @@
|
|||
1.5.3:
|
||||
- 'Updated table rainlab_blog_categories'
|
||||
- builder_table_update_rainlab_blog_categories_3.php
|
||||
1.5.4:
|
||||
- 'Updated table rainlab_blog_posts'
|
||||
- builder_table_update_rainlab_blog_posts.php
|
||||
|
|
|
|||
7
rss.xml
7
rss.xml
|
|
@ -6,6 +6,13 @@
|
|||
<description></description>
|
||||
<atom:link href="/rss.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
<item>
|
||||
<title>В День города в Ашхабаде запустят 200 новых такси и 400 автобусов</title>
|
||||
<link>/v-den-goroda-v-ashhabade-zapustyat-200-novyh-taksi-i-400-avtobusov</link>
|
||||
<guid>/v-den-goroda-v-ashhabade-zapustyat-200-novyh-taksi-i-400-avtobusov</guid>
|
||||
<pubDate>Fri, 21 May 2021 13:00:00 +0500</pubDate>
|
||||
<description></description>
|
||||
</item>
|
||||
<item>
|
||||
<title>Бердымухамедов поручил изучить возможность производства водорода в Туркменистане</title>
|
||||
<link>/berdymuhamedov-poruchil-izuchit-vozmozhnost-proizvodstva-vodoroda-v-turkmenistane</link>
|
||||
|
|
|
|||
|
|
@ -55,6 +55,9 @@ post = "post"
|
|||
</header>
|
||||
<div class="news__body">
|
||||
{{post.content|md}}
|
||||
{% if post.author %}
|
||||
<p style="text-align: right"><em><strong>{{post.author}}</strong></em></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="news__footer">
|
||||
<div class="news__footer-social">
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@
|
|||
<meta name="msapplication-TileImage" content="{{'assets/images/icon/cropped-cropped-orienticon-270x270.png'|theme}}">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
Loading…
Reference in New Issue