Commit f9404a230ebdab2218a859fe457bbc90b7a6f422

Authored by Administrator
1 parent c55512a1

Start gallery

.gitignore
... ... @@ -3,4 +3,4 @@
3 3 vendor/*
4 4 composer.phar
5 5 uploads/*
6   -
  6 +.idea/*
... ...
backend/components/croppers/GoldenGardenFlowersCrop.php
... ... @@ -5,8 +5,8 @@ namespace backend\components\croppers;
5 5  
6 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 13 \ No newline at end of file
... ...
backend/components/croppers/GoldenGardenGiantCrop.php
... ... @@ -5,8 +5,8 @@ namespace backend\components\croppers;
5 5  
6 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 13 \ No newline at end of file
... ...
backend/components/croppers/GoldenGardenVegiesCrop.php
... ... @@ -5,8 +5,8 @@ namespace backend\components\croppers;
5 5  
6 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 13 \ No newline at end of file
... ...
backend/components/croppers/UkrSeedsFloraMiniCrop.php
... ... @@ -5,8 +5,8 @@ namespace backend\components\croppers;
5 5  
6 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 13 \ No newline at end of file
... ...
backend/components/croppers/UkrSeedsFloraVegiesCrop.php
... ... @@ -5,8 +5,8 @@ namespace backend\components\croppers;
5 5  
6 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 13 \ No newline at end of file
... ...
backend/components/croppers/UkrSeedsNovikFlowersCrop.php
... ... @@ -5,8 +5,8 @@ namespace backend\components\croppers;
5 5  
6 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 13 \ No newline at end of file
... ...
backend/components/croppers/UkrSeedsNovikMiniCrop.php
... ... @@ -5,7 +5,7 @@ namespace backend\components\croppers;
5 5  
6 6 class UkrSeedsNovikMiniCrop extends AbstractCrop
7 7 {
8   - const WIDTH = 1028;
  8 + const WIDTH = 943;
9 9 const HEIGHT = 1469;
10 10 const X = 710;
11 11 const Y = 1390;
... ...
backend/components/croppers/UkrSeedsNovikVegiesCrop.php
... ... @@ -5,7 +5,7 @@ namespace backend\components\croppers;
5 5  
6 6 class UkrSeedsNovikVegiesCrop extends AbstractCrop
7 7 {
8   - const WIDTH = 1182;
  8 + const WIDTH = 1061;
9 9 const HEIGHT = 1825;
10 10 const X = 827;
11 11 const Y = 1718;
... ...
backend/controllers/ImageController.php
... ... @@ -6,6 +6,7 @@ use backend\components\croppers\CropContext;
6 6 use backend\components\croppers\CropFactory;
7 7  
8 8 use Yii;
  9 +use yii\helpers\FileHelper;
9 10 use yii\web\Controller;
10 11 use backend\models\UploadForm;
11 12 use yii\web\UploadedFile;
... ... @@ -36,6 +37,12 @@ class ImageController extends Controller
36 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 46 public function actionGetParams($crop_id)
40 47 {
41 48 if (Yii::$app->request->isAjax) {
... ...
backend/views/image/gallery.php 0 → 100644
  1 +<?php
  2 +
  3 +use \kartik\file\FileInput;
  4 +use yii\widgets\ActiveForm;
  5 +use yii\helpers\Html;
  6 +
  7 +/* @var $this yii\web\View */
  8 +$this->title = 'Image gallery';
  9 +?>
  10 +<?php print_r($files) ?>
... ...