diff --git a/frontend/controllers/CabinetController.php b/frontend/controllers/CabinetController.php index d1a633d..60fbf45 100755 --- a/frontend/controllers/CabinetController.php +++ b/frontend/controllers/CabinetController.php @@ -148,7 +148,10 @@ public function actionNotifications() { - return $this->render('notifications'); + $table = Report::find()->all(); + return $this->render('notifications', [ + 'table' => $table, + ]); } public function actionUsers() diff --git a/frontend/models/Report.php b/frontend/models/Report.php index f0eb92e..3257a65 100755 --- a/frontend/models/Report.php +++ b/frontend/models/Report.php @@ -118,7 +118,14 @@ 'play_count', ] ); + } parent::afterSave($insert, $changedAttributes); } + + public function beforeSave($insert) + { + $this->royalty = $this->sum * 0.8 * 0.805; + return parent::beforeSave($insert); + } } diff --git a/frontend/views/cabinet/notifications.php b/frontend/views/cabinet/notifications.php index 172d9b1..30876fe 100755 --- a/frontend/views/cabinet/notifications.php +++ b/frontend/views/cabinet/notifications.php @@ -1,8 +1,10 @@
@@ -22,161 +24,25 @@ Кількість публічних сповіщень твору Загальна Тривалість звучання твору
(год.:хвил.: сек.) 0:00:00 - - - 1 - ЕЩЁ НЕ ВЕЧЕР - Лайма Вайкуле - Р.Паулс - И.Р. Резник - — - 100 - 1 - — - - - 2 - ЛИСТЬЯ ЖЁЛТЫЕ - Лайма Вайкуле - Р.Паулс - Я. Петерс / И.Д. Шаферан - — - 80 - 1 - — - - - 3 - ОГОНЬКИ - Лайма Вайкуле - Р.Паулс - В.Сєрова + + + + title?> + artist?> + - + - — - 60 - 1 + royalty?> + count?> — - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
-- libgit2 0.21.4