Browse Source

Merge remote-tracking branch 'origin/dev' into dev

vadimcesnokov 1 năm trước cách đây
mục cha
commit
42950a7490

+ 8 - 7
modules/manager/views/layouts/sidebar.php

@@ -76,7 +76,7 @@ $profile = Yii::$app->user->identity->profile;
                             ['label' => 'КД блок', 'url' => ['/manager/kd'], 'iconStyle' => 'far', 'iconClass' => 'nav-icon far fa-circle text-warning'],
                             ['label' => 'НЧ блок ', 'url' => ['/manager/nh'], 'iconStyle' => 'far', 'iconClassAdded' => 'text-danger'],
                             ['label' => 'Слайдер', 'url' => ['/manager/top-slider'], 'iconStyle' => 'far', 'iconClassAdded' => 'text-primary'],
-                            ['label' => 'Сброс кэша главной', 'url' => ['/manager/design/purge'], 'iconStyle' => 'fa', 'iconClassAdded' => 'fa-shower','badge' => '<span class="right badge badge-danger">New</span>'],
+                            ['label' => 'Сброс кэша главной', 'url' => ['/manager/design/purge'], 'iconStyle' => 'fa', 'iconClassAdded' => 'fa-shower'],
                         ]
                     ],
                     ['label' => 'Рубрики', 'icon' => 'th', 'url' => ['/manager/news/topiclist'],
@@ -99,7 +99,7 @@ $profile = Yii::$app->user->identity->profile;
                             ['label' => 'Меню', 'url' => ['/manager/tagsfilter/index'], 'iconStyle' => 'far', 'iconClass'=>'nav-icon fas fa-th-list']
                         ]
                     ],
-                    ['label' => 'Опросы', 'icon' => 'th', 'url' => ['/manager/inquirer/'],
+                    ['label' => 'Опросы', 'icon' => 'thumbs-up', 'url' => ['/manager/inquirer/'],
 						'badge' => '<span class="right badge badge-danger">New</span>',
                         'items' => [
                             ['label' => 'Список опросов', 'url' => ['/manager/inquirer/index'], 'iconStyle' => 'far'],
@@ -107,16 +107,17 @@ $profile = Yii::$app->user->identity->profile;
                         ]
                     ],
 
-                    ['label' => 'Статистика', 'icon' => 'th', 'url' => ['/manager/stats/index'],
+                    ['label' => 'Статистика', 'icon' => 'chart-pie', 'url' => ['/manager/stats/index'],
+						'badge' => '<span class="right badge badge-danger">New</span>',
                         'items' => [
-                            ['label' => 'доска', 'url' => ['/manager/stats/index'], 'iconStyle' => 'far'],
-                            ['label' => 'Авторы', 'url' => ['/manager/stats/authors'], 'iconStyle' => 'far'],
-                            ['label' => 'Автор по дням', 'url' => ['/manager/stats/authorsd'], 'iconStyle' => 'far']
+                            ['label' => 'доска', 'url' => ['/manager/stats/index'], 'iconStyle' => 'fas', 'icon'=>'tachometer-alt'],
+                            ['label' => 'Авторы', 'url' => ['/manager/stats/authors'], 'iconStyle' => 'far', 'icon'=>'user-circle'],
+                            ['label' => 'Автор по дням', 'url' => ['/manager/stats/authorsd'], 'iconStyle' => 'far', 'icon'=>'user']
                         ]
                     ],
                     ['label' => 'Персоны','icon' => 'user', 'url' => ['/manager/person/']
 					],
-                    ['label' => 'Авторы','icon' => 'user', 'url' => ['/manager/authors/'],'badge' => '<span class="right badge badge-danger">New</span>'
+                    ['label' => 'Авторы','icon' => 'user', 'url' => ['/manager/authors/'],
 					],
                     ['label' => 'пользователи', 'icon' => 'user', 'url' => ['/user/admin/index'], 'visible' => Yii::$app->user->can('view_manage_users_page'),
 						'items' => [

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 8 - 0
modules/manager/views/stats/chartjs.php


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 203 - 761
modules/manager/views/stats/index.php


+ 46 - 0
views/layouts/lenta/countdown.php

@@ -0,0 +1,46 @@
+<?php
+
+$this->registerJs(
+<<<JS
+const deadline = new Date(2023, 9, 12, 23, 59, 59);
+  // id таймера
+  let timerId = null;
+  // склонение числительных
+  function declensionNum(num, words) {
+    return words[(num % 100 > 4 && num % 100 < 20) ? 2 : [2, 0, 1, 1, 1, 2][(num % 10 < 5) ? num % 10 : 5]];
+  }
+  // вычисляем разницу дат и устанавливаем оставшееся времени в качестве содержимого элементов
+  function countdownTimer() {
+    const diff = deadline - new Date();
+    if (diff <= 0) {
+      clearInterval(timerId);
+    }
+    const days = diff > 0 ? Math.floor(diff / 1000 / 60 / 60 / 24) : 0;
+    const hours = diff > 0 ? Math.floor(diff / 1000 / 60 / 60) % 24 : 0;
+    const minutes = diff > 0 ? Math.floor(diff / 1000 / 60) % 60 : 0;
+    const seconds = diff > 0 ? Math.floor(diff / 1000) % 60 : 0;
+    _days.dataset.title = declensionNum(days, ['день', 'дня', 'дней']);
+    _hours.dataset.title = declensionNum(hours, ['час', 'часа', 'часов']);
+    _minutes.dataset.title = declensionNum(minutes, ['минута', 'минуты', 'минут']);
+//    _seconds.dataset.title = declensionNum(seconds, ['секунда', 'секунды', 'секунд']);
+
+	_days.textContent = days + ' ' + _days.dataset.title;
+    _hours.textContent = hours + ' ' + _hours.dataset.title;
+    _minutes.textContent = minutes + ' ' + _minutes.dataset.title;
+//    _seconds.textContent = seconds < 10 ? '0' + seconds : seconds;
+//	_seconds.textContent = _seconds.textContent + ' ' + _seconds.dataset.title;
+}
+  // получаем элементы, содержащие компоненты даты
+  const _days = document.querySelector('.timer__days');
+  const _hours = document.querySelector('.timer__hours');
+  const _minutes = document.querySelector('.timer__minutes');
+  const _seconds = document.querySelector('.timer__seconds');
+  // вызываем функцию countdownTimer
+  countdownTimer();
+  // вызываем функцию countdownTimer каждую секунду
+  timerId = setInterval(countdownTimer, 1000);
+JS
+    ,
+    yii\web\View::POS_END,
+    'counter'
+);

+ 6 - 2
views/layouts/lenta/lenta.php

@@ -20,10 +20,12 @@ $keyadd = News::keyFilter();
 </h3>
 </div>
 ';
+<br><span class="timer__seconds"></span>
 */
 $lenta .= '<style>.lenta .list-wrapper .lenta_fix:hover{background:#60b740;}</style>
-<div class="lenta_fix"><h3>
-    <a href="https://%D0%BD%D0%B0%D1%80%D0%BE%D0%B4%D0%BD%D1%8B%D0%B9%D0%B7%D0%BD%D0%B0%D0%BA%D0%BA%D0%B0%D1%87%D0%B5%D1%81%D1%82%D0%B2%D0%B0.%D1%80%D1%84" title="Народный знак качества"><img src="/img/nzk_button.png" width="275px" height="80px" alt="Народный знак качества"></a><div class="published_at"></div>
+<div class="lenta_fix"><div style="text-align: center;font-weight: 600;">До окончания номинирования</div><h3>
+    <a href="https://%D0%BD%D0%B0%D1%80%D0%BE%D0%B4%D0%BD%D1%8B%D0%B9%D0%B7%D0%BD%D0%B0%D0%BA%D0%BA%D0%B0%D1%87%D0%B5%D1%81%D1%82%D0%B2%D0%B0.%D1%80%D1%84" title="Народный знак качества"><img src="/img/nzk_button.png" width="275px" height="80px" alt="Народный знак качества" style="margin-left: -20px;"></a>
+    <div class="count" style="font-size:20px;width:130px;line-height: 24px;"><span class="timer__days"></span><br><span class="timer__hours"></span><br><span class="timer__minutes"></span></div>
 </h3>
 </div>
 ';
@@ -48,3 +50,5 @@ $lenta .= '<style>.lenta .list-wrapper .lenta_fix:hover{background:#60b740;}</st
         <a href="/news">Все новости</a>
     </div>
 </div>
+<?
+	$this->render('countdown');

+ 3 - 3
views/news/view.php

@@ -43,9 +43,9 @@ if( isset( $model->dt_pub ) && strtotime( $model->dt_pub ) < strtotime('2015-01-
 	$retina = $bad;
 };
  */
-
+$txt_date = date( "[Y-m-d] ", strtotime( $model->dt_pub ) );
 Yii::$app->og->title =($model->meta_title)?$model->meta_title:$model->title;
-Yii::$app->og->description = ($model->lid && trim($model->lid) <> '')?str_replace( '"', "&quot;", strip_tags($model->lid) ):trim(str_replace( '"',"'",substr(strip_tags( $model->text ),0,150)))."...";
+Yii::$app->og->description = ($model->lid && trim($model->lid) <> '')?str_replace( '"', "&quot;", strip_tags($model->lid) ):$txt_date.trim(str_replace( '"',"'",substr(strip_tags( $model->text ),0,150)))."...";
 
 if( $model->active == 'N' || $model->dt_pub > date("Y-m-d H:i:s") || $model->noindex == 'Y' ){
     Yii::$app->og->noindex = 'Y';
@@ -56,7 +56,7 @@ if( $model->active == 'N' || $model->dt_pub > date("Y-m-d H:i:s") || $model->noi
     \Yii::$app->og->og_image = $model->image->url;
     \Yii::$app->og->og_type = "article";
     \Yii::$app->og->og_title = htmlspecialchars(($model->meta_title)?strip_tags(str_replace( '"',"&quot;",$model->meta_title)):strip_tags(str_replace( '"',"&quot;",$model->title)));
-    \Yii::$app->og->og_description = ($model->lid && trim($model->lid) <> '')?str_replace( '"',"&quot;",strip_tags($model->lid)):trim(str_replace( '"',"&quot;",substr(strip_tags( $model->text ),0,150)))."...";
+    \Yii::$app->og->og_description = ($model->lid && trim($model->lid) <> '')?str_replace( '"',"&quot;",strip_tags($model->lid)):$txt_date.trim(str_replace( '"',"&quot;",substr(strip_tags( $model->text ),0,150)))."...";
     \Yii::$app->og->dtpub = date( "r", strtotime( $model->dt_pub ) );
 }
 

+ 1 - 1
views/site/index/wide_widget_video.php

@@ -22,7 +22,7 @@ $key = 'okey';
 <div class="row partner-news"  style="height-min:360px">
     <div class="col-md-8">
         <div class="cont">
-			<iframe width="100%" height="100%" style="aspect-ratio: 16 / 9;" src="https://www.youtube.com/embed/5FNI26lPfgE?autoplay=1" title="Crystal Bay Yacht Club | Lamai | Koh Samui | Thailand | Live Beach Webcam | 2160p 4K" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
+			<iframe width="100%" height="100%" style="aspect-ratio: 16 / 9;" loading="lazy" src="https://www.youtube.com/embed/5FNI26lPfgE?autoplay=1" title="Crystal Bay Yacht Club | Lamai | Koh Samui | Thailand | Live Beach Webcam | 2160p 4K" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
         </div>
     </div>
     <div class="col-md-4" >

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác