Commit f9404a230ebdab2218a859fe457bbc90b7a6f422
1 parent
c55512a1
Start gallery
Showing
11 changed files
with
44 additions
and
27 deletions
Show diff stats
.gitignore
backend/components/croppers/GoldenGardenFlowersCrop.php
@@ -5,8 +5,8 @@ namespace backend\components\croppers; | @@ -5,8 +5,8 @@ namespace backend\components\croppers; | ||
5 | 5 | ||
6 | class GoldenGardenFlowersCrop extends AbstractCrop | 6 | class GoldenGardenFlowersCrop extends AbstractCrop |
7 | { | 7 | { |
8 | - const WIDTH = 946; | ||
9 | - const HEIGHT = 1773; | ||
10 | - const X = 235; | ||
11 | - const Y = 1746; | 8 | + const WIDTH = 942; |
9 | + const HEIGHT = 1769; | ||
10 | + const X = 237; | ||
11 | + const Y = 1748; | ||
12 | } | 12 | } |
13 | \ No newline at end of file | 13 | \ No newline at end of file |
backend/components/croppers/GoldenGardenGiantCrop.php
@@ -5,8 +5,8 @@ namespace backend\components\croppers; | @@ -5,8 +5,8 @@ namespace backend\components\croppers; | ||
5 | 5 | ||
6 | class GoldenGardenGiantCrop extends AbstractCrop | 6 | class GoldenGardenGiantCrop extends AbstractCrop |
7 | { | 7 | { |
8 | - const WIDTH = 1359; | ||
9 | - const HEIGHT = 1948; | ||
10 | - const X = 867; | ||
11 | - const Y = 1961; | 8 | + const WIDTH = 1354; |
9 | + const HEIGHT = 1943; | ||
10 | + const X = 870; | ||
11 | + const Y = 1964; | ||
12 | } | 12 | } |
13 | \ No newline at end of file | 13 | \ No newline at end of file |
backend/components/croppers/GoldenGardenVegiesCrop.php
@@ -5,8 +5,8 @@ namespace backend\components\croppers; | @@ -5,8 +5,8 @@ namespace backend\components\croppers; | ||
5 | 5 | ||
6 | class GoldenGardenVegiesCrop extends AbstractCrop | 6 | class GoldenGardenVegiesCrop extends AbstractCrop |
7 | { | 7 | { |
8 | - const WIDTH = 946; | ||
9 | - const HEIGHT = 1773; | ||
10 | - const X = 827; | ||
11 | - const Y = 1746; | 8 | + const WIDTH = 942; |
9 | + const HEIGHT = 1769; | ||
10 | + const X = 828; | ||
11 | + const Y = 1750; | ||
12 | } | 12 | } |
13 | \ No newline at end of file | 13 | \ No newline at end of file |
backend/components/croppers/UkrSeedsFloraMiniCrop.php
@@ -5,8 +5,8 @@ namespace backend\components\croppers; | @@ -5,8 +5,8 @@ namespace backend\components\croppers; | ||
5 | 5 | ||
6 | class UkrSeedsFloraMiniCrop extends AbstractCrop | 6 | class UkrSeedsFloraMiniCrop extends AbstractCrop |
7 | { | 7 | { |
8 | - const WIDTH = 299; | ||
9 | - const HEIGHT = 502; | ||
10 | - const X = 301; | ||
11 | - const Y = 598; | 8 | + const WIDTH = 294; |
9 | + const HEIGHT = 497; | ||
10 | + const X = 304; | ||
11 | + const Y = 600; | ||
12 | } | 12 | } |
13 | \ No newline at end of file | 13 | \ No newline at end of file |
backend/components/croppers/UkrSeedsFloraVegiesCrop.php
@@ -5,8 +5,8 @@ namespace backend\components\croppers; | @@ -5,8 +5,8 @@ namespace backend\components\croppers; | ||
5 | 5 | ||
6 | class UkrSeedsFloraVegiesCrop extends AbstractCrop | 6 | class UkrSeedsFloraVegiesCrop extends AbstractCrop |
7 | { | 7 | { |
8 | - const WIDTH = 341; | ||
9 | - const HEIGHT = 638; | ||
10 | - const X = 331; | ||
11 | - const Y = 722; | 8 | + const WIDTH = 337; |
9 | + const HEIGHT = 636; | ||
10 | + const X = 333; | ||
11 | + const Y = 724; | ||
12 | } | 12 | } |
13 | \ No newline at end of file | 13 | \ No newline at end of file |
backend/components/croppers/UkrSeedsNovikFlowersCrop.php
@@ -5,8 +5,8 @@ namespace backend\components\croppers; | @@ -5,8 +5,8 @@ namespace backend\components\croppers; | ||
5 | 5 | ||
6 | class UkrSeedsNovikFlowersCrop extends AbstractCrop | 6 | class UkrSeedsNovikFlowersCrop extends AbstractCrop |
7 | { | 7 | { |
8 | - const WIDTH = 1359; | ||
9 | - const HEIGHT = 1948; | ||
10 | - const X = 867; | ||
11 | - const Y = 1961; | 8 | + const WIDTH = 784; |
9 | + const HEIGHT = 1475; | ||
10 | + const X = 789; | ||
11 | + const Y = 1458; | ||
12 | } | 12 | } |
13 | \ No newline at end of file | 13 | \ No newline at end of file |
backend/components/croppers/UkrSeedsNovikMiniCrop.php
@@ -5,7 +5,7 @@ namespace backend\components\croppers; | @@ -5,7 +5,7 @@ namespace backend\components\croppers; | ||
5 | 5 | ||
6 | class UkrSeedsNovikMiniCrop extends AbstractCrop | 6 | class UkrSeedsNovikMiniCrop extends AbstractCrop |
7 | { | 7 | { |
8 | - const WIDTH = 1028; | 8 | + const WIDTH = 943; |
9 | const HEIGHT = 1469; | 9 | const HEIGHT = 1469; |
10 | const X = 710; | 10 | const X = 710; |
11 | const Y = 1390; | 11 | const Y = 1390; |
backend/components/croppers/UkrSeedsNovikVegiesCrop.php
@@ -5,7 +5,7 @@ namespace backend\components\croppers; | @@ -5,7 +5,7 @@ namespace backend\components\croppers; | ||
5 | 5 | ||
6 | class UkrSeedsNovikVegiesCrop extends AbstractCrop | 6 | class UkrSeedsNovikVegiesCrop extends AbstractCrop |
7 | { | 7 | { |
8 | - const WIDTH = 1182; | 8 | + const WIDTH = 1061; |
9 | const HEIGHT = 1825; | 9 | const HEIGHT = 1825; |
10 | const X = 827; | 10 | const X = 827; |
11 | const Y = 1718; | 11 | const Y = 1718; |
backend/controllers/ImageController.php
@@ -6,6 +6,7 @@ use backend\components\croppers\CropContext; | @@ -6,6 +6,7 @@ use backend\components\croppers\CropContext; | ||
6 | use backend\components\croppers\CropFactory; | 6 | use backend\components\croppers\CropFactory; |
7 | 7 | ||
8 | use Yii; | 8 | use Yii; |
9 | +use yii\helpers\FileHelper; | ||
9 | use yii\web\Controller; | 10 | use yii\web\Controller; |
10 | use backend\models\UploadForm; | 11 | use backend\models\UploadForm; |
11 | use yii\web\UploadedFile; | 12 | use yii\web\UploadedFile; |
@@ -36,6 +37,12 @@ class ImageController extends Controller | @@ -36,6 +37,12 @@ class ImageController extends Controller | ||
36 | return $this->render('index', ['model' => $model, 'ukrSeeds' => $ukrSeeds]); | 37 | return $this->render('index', ['model' => $model, 'ukrSeeds' => $ukrSeeds]); |
37 | } | 38 | } |
38 | 39 | ||
40 | + public function actionGallery() | ||
41 | + { | ||
42 | + $files = FileHelper::findFiles(dirname(dirname(__DIR__)) . '/uploads/'); | ||
43 | + return $this->render('gallery', ['files' => $files]); | ||
44 | + } | ||
45 | + | ||
39 | public function actionGetParams($crop_id) | 46 | public function actionGetParams($crop_id) |
40 | { | 47 | { |
41 | if (Yii::$app->request->isAjax) { | 48 | if (Yii::$app->request->isAjax) { |