from server 11.01
This commit is contained in:
parent
d9be37cf6a
commit
5425010b38
|
|
@ -43,7 +43,6 @@ class Post extends Model
|
||||||
'powerseo_description' => 'required',
|
'powerseo_description' => 'required',
|
||||||
'powerseo_keywords' => 'required',
|
'powerseo_keywords' => 'required',
|
||||||
'excerpt' => 'required',
|
'excerpt' => 'required',
|
||||||
'category_groups' => 'required',
|
|
||||||
'awtor' => 'required',
|
'awtor' => 'required',
|
||||||
'img_source' => 'required'
|
'img_source' => 'required'
|
||||||
];
|
];
|
||||||
|
|
@ -177,16 +176,16 @@ class Post extends Model
|
||||||
|
|
||||||
public function filterFields($fields, $context = null)
|
public function filterFields($fields, $context = null)
|
||||||
{
|
{
|
||||||
if($this->awtor){
|
if(isset($this->awtor)){
|
||||||
if($this->awtor->type == 'other'){
|
if($this->awtor->type == 'other'){
|
||||||
$fields->author_name->hidden = false;
|
$fields->author_name->hidden = false;
|
||||||
}else{
|
}elseif(isset($fields->author_name)){
|
||||||
$fields->author_name->value = null;
|
//$fields->author_name->value = null;
|
||||||
$fields->author_name->hidden = true;
|
$fields->author_name->hidden = true;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$fields->author_name->value = null;
|
//$fields->author_name->hidden = true;
|
||||||
$fields->author_name->hidden = true;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($fields->category_groups)){
|
if(isset($fields->category_groups)){
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ default = 0
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
{% partial 'snowfall' %}
|
<!-- {% partial 'snowfall' %} -->
|
||||||
|
|
||||||
{% partial 'new/mobile-search' %}
|
{% partial 'new/mobile-search' %}
|
||||||
<section class="big-banner">
|
<section class="big-banner">
|
||||||
|
|
@ -57,7 +57,8 @@ default = 0
|
||||||
|
|
||||||
<div class="header-left">
|
<div class="header-left">
|
||||||
<a href="/" class="header-logo">
|
<a href="/" class="header-logo">
|
||||||
<img src="{{ 'assets/images/newYearLogo.png'|theme}}" alt="" />
|
<!-- <img src="{{ 'assets/images/newYearLogo.png'|theme}}" alt="" /> -->
|
||||||
|
<img src="{{ 'assets/new/icons/orientlogo.svg'|theme}}" alt="Orient News" />
|
||||||
</a>
|
</a>
|
||||||
<h1> {{'site.slogan'|_}}</h1>
|
<h1> {{'site.slogan'|_}}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ random = 0
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
{% partial 'snowfall' %}
|
<!-- {% partial 'snowfall' %} -->
|
||||||
|
|
||||||
{% partial 'new/mobile-search' %}
|
{% partial 'new/mobile-search' %}
|
||||||
|
|
||||||
|
|
@ -61,7 +61,9 @@ random = 0
|
||||||
|
|
||||||
<div class="header-left">
|
<div class="header-left">
|
||||||
<a href="/" class="header-logo">
|
<a href="/" class="header-logo">
|
||||||
<img src="{{ 'assets/images/newYearLogo.png'|theme}}" alt="logo" />
|
<!-- <img src="{{ 'assets/images/newYearLogo.png'|theme}}" alt="logo" /> -->
|
||||||
|
<img src="{{ 'assets/new/icons/orientlogo.svg'|theme}}" alt="Orient News" />
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
<h1> {{'site.slogan'|_}}</h1>
|
<h1> {{'site.slogan'|_}}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ function onStart(){
|
||||||
if($this['categorySlug']){
|
if($this['categorySlug']){
|
||||||
$this['mediaPostsFilter'] = Tps\Tps\Models\Media::where('type', $this['categorySlug'])->orderBy('created_at', 'DESC')->get();
|
$this['mediaPostsFilter'] = Tps\Tps\Models\Media::where('type', $this['categorySlug'])->orderBy('created_at', 'DESC')->get();
|
||||||
}else{
|
}else{
|
||||||
$this['mediaPostsFilter'] = Tps\Tps\Models\Media::all();
|
$this['mediaPostsFilter'] = Tps\Tps\Models\Media::orderBy('created_at', 'DESC')->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -130,7 +130,7 @@ function onStart(){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% partial 'new/pagination' items = blogPosts.posts %}
|
{% partial 'new/pagination' items = blogPosts.posts %}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -116,9 +116,12 @@ function onStart(){
|
||||||
|
|
||||||
|
|
||||||
<!-- <h5>ORIENT NEWS</h5>
|
<!-- <h5>ORIENT NEWS</h5>
|
||||||
<h5>Фото: figma.com</h5> -->
|
-->
|
||||||
|
{% if post.img_source %}
|
||||||
|
<h5 style="font-style: italic;text-align: right;">{{ 'Фото'|_ }}: {{ post.img_source }}</h5>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% partial 'new/social' %}
|
{% partial 'new/social' %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
title = "report/awtor"
|
||||||
|
url = "/report/qawtorq/:year"
|
||||||
|
layout = "report"
|
||||||
|
is_hidden = 0
|
||||||
|
robot_index = "index"
|
||||||
|
robot_follow = "follow"
|
||||||
|
==
|
||||||
|
<?php
|
||||||
|
function onStart(){
|
||||||
|
$this['backendUsers'] = Tps\Tps\Models\Authors::all();
|
||||||
|
$this['yearq'] = $this->param('year');
|
||||||
|
$this['allPost'] = $this['posts'] = RainLab\Blog\Models\Post::count();
|
||||||
|
$this['allPostYear'] = $this['posts'] = RainLab\Blog\Models\Post::whereYear('published_at', $this['yearq'])->count();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
==
|
||||||
|
<style>
|
||||||
|
table {
|
||||||
|
border-spacing: 0px;
|
||||||
|
border-collapse: separate;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
border: 1px solid #999;
|
||||||
|
padding: 8px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div style="padding: 20px;">
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<h2>{{ yearq }} report</h2>
|
||||||
|
</div>
|
||||||
|
<table style="border: 1px solid black;width: 100%;">
|
||||||
|
<tr style="background: #ffc577;font-weight: bold;">
|
||||||
|
<td>NO:</td>
|
||||||
|
<td>Users</td>
|
||||||
|
<td>ALL</td>
|
||||||
|
<td style="background: #ffc577;">ALL ({{ yearq }})</td>
|
||||||
|
<td>Yanwar</td>
|
||||||
|
<td>Fewral</td>
|
||||||
|
<td>Mart</td>
|
||||||
|
<td>Aprel</td>
|
||||||
|
<td>May</td>
|
||||||
|
<td>Iyun</td>
|
||||||
|
<td>Iyul</td>
|
||||||
|
<td>Awgust</td>
|
||||||
|
<td>Sentyabr</td>
|
||||||
|
<td>Oktyabr</td>
|
||||||
|
<td>Noyabr</td>
|
||||||
|
<td>Dekabr</td>
|
||||||
|
</tr>
|
||||||
|
{% for index, record in backendUsers %}
|
||||||
|
{% partial 'report/report' user = record.name index = index userId = record.id year = yearq %}
|
||||||
|
{% endfor %}
|
||||||
|
<tr style="background: #a77427;font-weight: bold;">
|
||||||
|
<td colspan="2" >HEMMESI</td>
|
||||||
|
<td>{{ allPost }}</td>
|
||||||
|
<td style="background: #a77427;">{{ allPostYear }}</td>
|
||||||
|
{% partial 'report/yearAll' month = 1 %}
|
||||||
|
{% partial 'report/yearAll' month = 2 %}
|
||||||
|
{% partial 'report/yearAll' month = 3 %}
|
||||||
|
{% partial 'report/yearAll' month = 4 %}
|
||||||
|
{% partial 'report/yearAll' month = 5 %}
|
||||||
|
{% partial 'report/yearAll' month = 6 %}
|
||||||
|
{% partial 'report/yearAll' month = 7 %}
|
||||||
|
{% partial 'report/yearAll' month = 8 %}
|
||||||
|
{% partial 'report/yearAll' month = 9 %}
|
||||||
|
{% partial 'report/yearAll' month = 10 %}
|
||||||
|
{% partial 'report/yearAll' month = 11 %}
|
||||||
|
{% partial 'report/yearAll' month = 12 %}
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
{% for photo in post.media_file %}
|
{% for photo in post.media_file %}
|
||||||
<div class="swiper-slide">
|
<div class="swiper-slide">
|
||||||
<div class="photo-scroller-item">
|
<div class="photo-scroller-item">
|
||||||
<img src="{{photo.media|media|resize(283)}}" />
|
<img src="{{photo.media|media|resize(483)}}" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue