ORIENT/themes/modern2/pages/report/awtor.htm

72 lines
2.4 KiB
HTML

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>