Commit 02aafad35c6e63f8505a68f20c3199e0414c38af
Merge remote-tracking branch 'origin/master'
Showing
3 changed files
with
31 additions
and
1 deletions
Show diff stats
console/migrations/m161228_121804_play_count_type.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +use yii\db\Migration; | ||
4 | + | ||
5 | +class m161228_121804_play_count_type extends Migration | ||
6 | +{ | ||
7 | + public function up() | ||
8 | + { | ||
9 | + $this->alterColumn('intellectual_property', 'play_count', 'integer USING (play_count::integer)'); | ||
10 | + } | ||
11 | + | ||
12 | + public function down() | ||
13 | + { | ||
14 | + | ||
15 | + } | ||
16 | +} |
frontend/models/IntellectualProperty.php
@@ -39,6 +39,7 @@ | @@ -39,6 +39,7 @@ | ||
39 | [ | 39 | [ |
40 | [ | 40 | [ |
41 | 'user_id', | 41 | 'user_id', |
42 | + 'play_count', | ||
42 | ], | 43 | ], |
43 | 'integer', | 44 | 'integer', |
44 | ], | 45 | ], |
@@ -59,7 +60,6 @@ | @@ -59,7 +60,6 @@ | ||
59 | 'contract', | 60 | 'contract', |
60 | 'type', | 61 | 'type', |
61 | 'author_role', | 62 | 'author_role', |
62 | - 'play_count', | ||
63 | ], | 63 | ], |
64 | 'string', | 64 | 'string', |
65 | 'max' => 255, | 65 | 'max' => 255, |
frontend/views/cabinet/sales.php
@@ -97,6 +97,20 @@ | @@ -97,6 +97,20 @@ | ||
97 | <?php | 97 | <?php |
98 | echo $form->field( | 98 | echo $form->field( |
99 | $property, | 99 | $property, |
100 | + 'percent', | ||
101 | + [ | ||
102 | + 'options' => [ | ||
103 | + 'class' => 'input-wrapp-320', | ||
104 | + ], | ||
105 | + ] | ||
106 | + ) | ||
107 | + ->textInput(); | ||
108 | + ?> | ||
109 | + </div> | ||
110 | + <div class="style"> | ||
111 | + <?php | ||
112 | + echo $form->field( | ||
113 | + $property, | ||
100 | 'registration_date', | 114 | 'registration_date', |
101 | [ | 115 | [ |
102 | 'options' => [ | 116 | 'options' => [ |