-
-
-
-
= $data[ 'views' ] ?>
-
-
Page views
-
Lorem ipsum psdea itgum rixt.
+
+
+
+
+
= $data[ 'views' ] ?>
+
+
Page views
+
Lorem ipsum psdea itgum rixt.
+
-
-
-
-
-
-
= round(intval($data[ 'new' ]), 2) ?> %
-
-
New sessions
-
Lorem ipsum psdea itgum rixt.
+
+
+
+
+
= round(intval($data[ 'new' ]), 2) ?> %
+
+
New sessions
+
Lorem ipsum psdea itgum rixt.
+
-
-
- 'Analytics',
- 'toolbarLayout' => false,
- ]
- ); ?>
-
- 'serial',
- 'dataProvider' => $data[ 'plot' ],
- 'categoryField' => 'day',
- 'categoryAxis' => [
- 'labelFrequency' => 5,
- ],
- 'graphs' => [
- [
- "balloon" => [
- "drop" => true,
- "adjustBorderColor" => false,
- "color" => "#ffffff",
- ],
- "bullet" => "round",
- "bulletBorderAlpha" => 1,
- "bulletColor" => "#FFFFFF",
- "bulletSize" => 5,
- "hideBulletsCount" => 50,
- "lineThickness" => 2,
- "title" => "red line",
- "useLineColorForBulletBorder" => true,
- "valueField" => "users",
- "balloonText" => "
Users: [[users]]",
- "lineColor" => '#9ABCC3',
- ],
- [
- "balloon" => [
- "drop" => true,
- "adjustBorderColor" => false,
- "color" => "#ffffff",
- ],
- "bullet" => "round",
- "bulletBorderAlpha" => 1,
- "bulletColor" => "#FFFFFF",
- "bulletSize" => 5,
- "hideBulletsCount" => 50,
- "lineThickness" => 2,
- "title" => "red line",
- "useLineColorForBulletBorder" => true,
- "valueField" => "sessions",
- "balloonText" => "
Sessions: [[sessions]]",
- "lineColor" => '#A8E3D6',
- ],
- ],
- 'chartCursor' => [
- "pan" => true,
- "valueLineEnabled" => true,
- "valueLineBalloonEnabled" => true,
- "cursorAlpha" => 1,
- "cursorColor" => "#1ABB9C",
- "limitToGraph" => "g1",
- "valueLineAlpha" => 0.2,
- "valueZoomable" => true,
- ],
- ];
+
+ 'Analytics',
+ ]
+ ); ?>
+
+ 'serial',
+ 'dataProvider' => $data[ 'plot' ],
+ 'categoryField' => 'day',
+ 'categoryAxis' => [
+ 'labelFrequency' => 5,
+ ],
+ 'graphs' => [
+ [
+ "balloon" => [
+ "drop" => true,
+ "adjustBorderColor" => false,
+ "color" => "#ffffff",
+ ],
+ "bullet" => "round",
+ "bulletBorderAlpha" => 1,
+ "bulletColor" => "#FFFFFF",
+ "bulletSize" => 5,
+ "hideBulletsCount" => 50,
+ "lineThickness" => 2,
+ "title" => "red line",
+ "useLineColorForBulletBorder" => true,
+ "valueField" => "users",
+ "balloonText" => "Users: [[users]]",
+ "lineColor" => '#9ABCC3',
+ ],
+ [
+ "balloon" => [
+ "drop" => true,
+ "adjustBorderColor" => false,
+ "color" => "#ffffff",
+ ],
+ "bullet" => "round",
+ "bulletBorderAlpha" => 1,
+ "bulletColor" => "#FFFFFF",
+ "bulletSize" => 5,
+ "hideBulletsCount" => 50,
+ "lineThickness" => 2,
+ "title" => "red line",
+ "useLineColorForBulletBorder" => true,
+ "valueField" => "sessions",
+ "balloonText" => "Sessions: [[sessions]]",
+ "lineColor" => '#A8E3D6',
+ ],
+ ],
+ 'chartCursor' => [
+ "pan" => true,
+ "valueLineEnabled" => true,
+ "valueLineBalloonEnabled" => true,
+ "cursorAlpha" => 1,
+ "cursorColor" => "#1ABB9C",
+ "limitToGraph" => "g1",
+ "valueLineAlpha" => 0.2,
+ "valueZoomable" => true,
+ ],
+ ];
+
+ echo Widget::widget(
+ [
+ 'chartConfiguration' => $chartConfiguration,
+ 'width' => '100%',
+ ]
+ );
+ ?>
+
+
- echo Widget::widget(
- [
- 'chartConfiguration' => $chartConfiguration,
- 'width' => '100%',
- ]
- );
- ?>
-
-
-
-
+
-
- 'Analytics',
- 'toolbarLayout' => false,
- ]
- ); ?>
-
- "pie",
- "titleField" => "category",
- "valueField" => "column-1",
- "dataProvider" => [
- [
- "category" => "New Visitor",
- "column-1" => round(intval($data[ 'new' ]), 2),
- ],
- [
- "category" => "Returning Visitor",
- "column-1" => 100 - round(intval($data[ 'new' ]), 2),
- ],
- ],
- "colors" => [
- "#A8E3D6",
- "#9ABCC3",
- ],
- ];
+
+ 'Analytics',
+ ]
+ ); ?>
+
+ "pie",
+ "titleField" => "category",
+ "valueField" => "column-1",
+ "dataProvider" => [
+ [
+ "category" => "New Visitor",
+ "column-1" => round(intval($data[ 'new' ]), 2),
+ ],
+ [
+ "category" => "Returning Visitor",
+ "column-1" => 100 - round(intval($data[ 'new' ]), 2),
+ ],
+ ],
+ "colors" => [
+ "#A8E3D6",
+ "#9ABCC3",
+ ],
+ ];
+
+ echo Widget::widget(
+ [
+ 'chartConfiguration' => $chartConfiguration,
+ 'width' => '100%',
+ ]
+ );
+ ?>
+
+
+
- echo Widget::widget(
- [
- 'chartConfiguration' => $chartConfiguration,
- 'width' => '100%',
- ]
- );
- ?>
-
-
-
-
-
-
- 'Analytics',
- 'toolbarLayout' => false,
- ]
- ); ?>
-
- [
- 'class' => 'bar_tabs',
- ],
- 'items' => [
- [
- 'label' => 'Browsers',
- 'content' => $this->render(
- '_table',
- [
- 'data' => $browsers,
- 'name' => 'Browser',
- ]
- ),
- 'active' => true,
- ],
- [
- 'label' => 'Cities',
- 'content' => $this->render(
- '_table',
- [
- 'data' => $cityes,
- 'name' => 'City',
- ]
- ),
- ],
- [
- 'label' => 'Countries',
- 'content' => $this->render(
- '_table',
- [
- 'data' => $countries,
- 'name' => 'Country',
- ]
- ),
- ],
- ],
- ]
- );
-
- ?>
-
-
-
-
+
+
+ 'Analytics',
+ ]
+ ); ?>
+
+ [
+ 'class' => 'bar_tabs',
+ ],
+ 'items' => [
+ [
+ 'label' => 'Browsers',
+ 'content' => $this->render(
+ '_table',
+ [
+ 'data' => $browsers,
+ 'name' => 'Browser',
+ ]
+ ),
+ 'active' => true,
+ ],
+ [
+ 'label' => 'Cities',
+ 'content' => $this->render(
+ '_table',
+ [
+ 'data' => $cityes,
+ 'name' => 'City',
+ ]
+ ),
+ ],
+ [
+ 'label' => 'Countries',
+ 'content' => $this->render(
+ '_table',
+ [
+ 'data' => $countries,
+ 'name' => 'Country',
+ ]
+ ),
+ ],
+ ],
+ ]
+ );
+
+ ?>
+
+
+
+
diff --git a/backend/views/site/index.php b/backend/views/site/index.php
index 77c091c..40c5d12 100755
--- a/backend/views/site/index.php
+++ b/backend/views/site/index.php
@@ -4,19 +4,18 @@
* @var View $this
*/
- use artbox\gentelella\widgets\XPanel;
use backend\assets\AnalyticsAsset;
use yii\web\View;
+ use yiister\gentelella\widgets\Panel;
$this->title = 'Artbox !';
AnalyticsAsset::register($this);
?>
- 'Hello!',
- 'toolbar' => false,
+ 'header' => 'Hello!',
]
); ?>
diff --git a/backend/views/sitemap/index.php b/backend/views/sitemap/index.php
index 45bbae1..ace4e26 100644
--- a/backend/views/sitemap/index.php
+++ b/backend/views/sitemap/index.php
@@ -1,8 +1,8 @@
false,
- 'title' => $this->title,
+ 'header' => $this->title,
'options' => [
- 'class' => 'sitemap-buttons',
+ 'class' => 'x_panel sitemap-buttons',
],
]
);
diff --git a/backend/views/sitemap/update.php b/backend/views/sitemap/update.php
index 3666492..7613798 100644
--- a/backend/views/sitemap/update.php
+++ b/backend/views/sitemap/update.php
@@ -1,11 +1,11 @@
title = \Yii::t('core', 'Update sitemap');
$this->params[ 'breadcrumbs' ][] = $this->title;
$form = ActiveForm::begin();
- $xPanel = XPanel::begin(
+ $xPanel = Panel::begin(
[
- 'title' => \Yii::t('core', 'Static pages'),
- 'toolbarLayout' => '{collapse}',
- 'options' => [
- 'class' => 'dynamic_fields',
+ 'header' => \Yii::t('core', 'Static pages'),
+ 'collapsable' => true,
+ 'options' => [
+ 'class' => 'x_panel dynamic_fields',
],
]
);
@@ -91,10 +91,10 @@
]
);
$xPanel::end();
- $xPanel2 = XPanel::begin(
+ $xPanel2 = Panel::begin(
[
- 'title' => \Yii::t('core', 'Dynamic pages'),
- 'toolbarLayout' => '{collapse}',
+ 'header' => \Yii::t('core', 'Dynamic pages'),
+ 'collapsable' => true,
]
);
?>
diff --git a/common/config/bootstrap.php b/common/config/bootstrap.php
index 60f0345..6828027 100644
--- a/common/config/bootstrap.php
+++ b/common/config/bootstrap.php
@@ -3,4 +3,7 @@
Yii::setAlias('@frontend', dirname(dirname(__DIR__)) . '/frontend');
Yii::setAlias('@backend', dirname(dirname(__DIR__)) . '/backend');
Yii::setAlias('@console', dirname(dirname(__DIR__)) . '/console');
- Yii::setAlias('@storage', dirname(dirname(__DIR__)) . '/storage');
\ No newline at end of file
+ Yii::setAlias('@storage', dirname(dirname(__DIR__)) . '/storage');
+ if (!Yii::getAlias('@artbox/core', false)) {
+ Yii::setAlias('@artbox/core', dirname(dirname(__DIR__)) . '/artweb/artbox-core');
+ }
\ No newline at end of file
diff --git a/common/config/settings.php b/common/config/settings.php
index a2dc835..4a95e12 100755
--- a/common/config/settings.php
+++ b/common/config/settings.php
@@ -19,7 +19,7 @@
'google' => '',
'twitter' => '',
'name' => '',
- 'logo' => '',
+ 'logo' => null,
'about' => '',
'analytics_key' => '',
'robots' => '',
diff --git a/composer.json b/composer.json
index 262f67e..f3c8783 100644
--- a/composer.json
+++ b/composer.json
@@ -18,8 +18,6 @@
"minimum-stability": "stable",
"require": {
"php": ">=7.0",
- "artweb/artbox-core": "~0.0.1",
- "artweb/artbox-gentelella": "~0.0.1",
"yiisoft/yii2": "~2.0",
"yiisoft/yii2-bootstrap": "~2.0",
"yiisoft/yii2-swiftmailer": "~2.0",
@@ -58,5 +56,11 @@
"type": "vcs",
"url": "git@gitlab.artweb.com.ua:yarik.nechyporuk/artbox-gentelella.git"
}
- ]
+ ],
+ "autoload": {
+ "psr-4": {
+ "artbox\\core\\": "artweb/artbox-core/",
+ "artbox\\gentelella\\": "artweb/artbox-gentelella/"
+ }
+ }
}
diff --git a/frontend/models/ContactForm.php b/frontend/models/ContactForm.php
deleted file mode 100644
index d50b316..0000000
--- a/frontend/models/ContactForm.php
+++ /dev/null
@@ -1,74 +0,0 @@
- 'Verification Code',
- ];
- }
-
- /**
- * Sends an email to the specified email address using the information collected by this model.
- *
- * @param string $email the target email address
- *
- * @return bool whether the email was sent
- */
- public function sendEmail($email)
- {
- return Yii::$app->mailer->compose()
- ->setTo($email)
- ->setFrom([ $this->email => $this->name ])
- ->setSubject($this->subject)
- ->setTextBody($this->body)
- ->send();
- }
- }
diff --git a/frontend/models/PasswordResetRequestForm.php b/frontend/models/PasswordResetRequestForm.php
deleted file mode 100644
index cf37a12..0000000
--- a/frontend/models/PasswordResetRequestForm.php
+++ /dev/null
@@ -1,81 +0,0 @@
- '\common\models\User',
- 'filter' => [ 'status' => User::STATUS_ACTIVE ],
- 'message' => 'There is no user with this email address.',
- ],
- ];
- }
-
- /**
- * Sends an email with a link, for resetting the password.
- *
- * @return bool whether the email was send
- */
- public function sendEmail()
- {
- /* @var $user User */
- $user = User::findOne(
- [
- 'status' => User::STATUS_ACTIVE,
- 'email' => $this->email,
- ]
- );
-
- if (!$user) {
- return false;
- }
-
- if (!User::isPasswordResetTokenValid($user->password_reset_token)) {
- $user->generatePasswordResetToken();
- if (!$user->save()) {
- return false;
- }
- }
-
- return Yii::$app->mailer->compose(
- [
- 'html' => 'passwordResetToken-html',
- 'text' => 'passwordResetToken-text',
- ],
- [ 'user' => $user ]
- )
- ->setFrom([ Yii::$app->params[ 'supportEmail' ] => Yii::$app->name . ' robot' ])
- ->setTo($this->email)
- ->setSubject('Password reset for ' . Yii::$app->name)
- ->send();
- }
- }
diff --git a/frontend/models/ResetPasswordForm.php b/frontend/models/ResetPasswordForm.php
deleted file mode 100644
index 5811460..0000000
--- a/frontend/models/ResetPasswordForm.php
+++ /dev/null
@@ -1,71 +0,0 @@
-_user = User::findByPasswordResetToken($token);
- if (!$this->_user) {
- throw new InvalidParamException('Wrong password reset token.');
- }
- parent::__construct($config);
- }
-
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [
- 'password',
- 'required',
- ],
- [
- 'password',
- 'string',
- 'min' => 6,
- ],
- ];
- }
-
- /**
- * Resets password.
- *
- * @return bool if password was reset.
- */
- public function resetPassword()
- {
- $user = $this->_user;
- $user->setPassword($this->password);
- $user->removePasswordResetToken();
-
- return $user->save(false);
- }
- }
diff --git a/frontend/models/SignupForm.php b/frontend/models/SignupForm.php
deleted file mode 100644
index f7cb2e3..0000000
--- a/frontend/models/SignupForm.php
+++ /dev/null
@@ -1,98 +0,0 @@
- '\common\models\User',
- 'message' => 'This username has already been taken.',
- ],
- [
- 'username',
- 'string',
- 'min' => 2,
- 'max' => 255,
- ],
-
- [
- 'email',
- 'trim',
- ],
- [
- 'email',
- 'required',
- ],
- [
- 'email',
- 'email',
- ],
- [
- 'email',
- 'string',
- 'max' => 255,
- ],
- [
- 'email',
- 'unique',
- 'targetClass' => '\common\models\User',
- 'message' => 'This email address has already been taken.',
- ],
-
- [
- 'password',
- 'required',
- ],
- [
- 'password',
- 'string',
- 'min' => 6,
- ],
- ];
- }
-
- /**
- * Signs user up.
- *
- * @return User|null the saved model or null if saving fails
- */
- public function signup()
- {
- if (!$this->validate()) {
- return null;
- }
-
- $user = new User();
- $user->username = $this->username;
- $user->email = $this->email;
- $user->setPassword($this->password);
- $user->generateAuthKey();
-
- return $user->save() ? $user : null;
- }
- }
--
libgit2 0.21.4