From a9f0427e2edb98ac62d97be15a03b87086084cb0 Mon Sep 17 00:00:00 2001 From: yarik Date: Wed, 28 Dec 2016 14:21:48 +0200 Subject: [PATCH] Play count --- console/migrations/m161228_121804_play_count_type.php | 16 ++++++++++++++++ frontend/models/IntellectualProperty.php | 2 +- frontend/views/cabinet/sales.php | 14 ++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 console/migrations/m161228_121804_play_count_type.php diff --git a/console/migrations/m161228_121804_play_count_type.php b/console/migrations/m161228_121804_play_count_type.php new file mode 100644 index 0000000..a92da9b --- /dev/null +++ b/console/migrations/m161228_121804_play_count_type.php @@ -0,0 +1,16 @@ +alterColumn('intellectual_property', 'play_count', 'integer USING (play_count::integer)'); + } + + public function down() + { + + } +} diff --git a/frontend/models/IntellectualProperty.php b/frontend/models/IntellectualProperty.php index 7b27dcc..95a161c 100755 --- a/frontend/models/IntellectualProperty.php +++ b/frontend/models/IntellectualProperty.php @@ -39,6 +39,7 @@ [ [ 'user_id', + 'play_count', ], 'integer', ], @@ -59,7 +60,6 @@ 'contract', 'type', 'author_role', - 'play_count', ], 'string', 'max' => 255, diff --git a/frontend/views/cabinet/sales.php b/frontend/views/cabinet/sales.php index 03718cb..ffdb8c2 100755 --- a/frontend/views/cabinet/sales.php +++ b/frontend/views/cabinet/sales.php @@ -97,6 +97,20 @@ field( $property, + 'percent', + [ + 'options' => [ + 'class' => 'input-wrapp-320', + ], + ] + ) + ->textInput(); + ?> + +
+ field( + $property, 'registration_date', [ 'options' => [ -- libgit2 0.21.4