simialbi / yii2-kanban
Kanban board module for yii2
Installs: 1 065
Dependents: 1
Suggesters: 0
Security: 0
Stars: 10
Watchers: 7
Forks: 11
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.6
- arogachev/yii2-sortable: ^0.1.6
- bower-asset/fullcalendar: 4.2.*
- fortawesome/font-awesome: ^5.12.0
- kartik-v/yii2-widget-fileinput: ^1.0.9
- npm-asset/highlight.js: ^9.18.1
- npm-asset/swiper: ^6.3.5
- rmrevin/yii2-fontawesome: ^3.4.0
- simialbi/yii2-simialbi-base: >=0.10.2 <1.0 | ^1.0.0
- simialbi/yii2-summernote: ^1.1.0
- simialbi/yii2-widget-chart: ^0.7.0
- simialbi/yii2-widget-datedropper: ^1.0.0
- simialbi/yii2-widget-hideseek: ^1.0.0
- simialbi/yii2-widget-turbo: ^1.0.0
- simshaun/recurr: ^5.0.0
- yiisoft/yii2: ^2.0.20
- yiisoft/yii2-bootstrap4: ^2.0.4
Requires (Dev)
- ext-gd: *
- ext-mbstring: *
- phpunit/phpunit: <7
- simialbi/yii2-ticket: ~1.0@dev
- yiisoft/yii2-coding-standards: ~2.0
Suggests
- ext-gd: For autogeneration of visualisations
- ext-mbstring: For encoding conversion
- 2.3.0
- 2.2.9
- 2.2.8
- 2.2.7
- 2.2.6
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.1
- 2.1.0
- dev-master / 2.0.x-dev
- 2.0.1
- 2.0.0
- 1.10.1
- 1.10.0
- 1.9.4
- 1.9.3
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.10
- 1.8.9
- 1.8.8
- 1.8.7
- 1.8.6
- 1.8.5
- 1.8.4
- 1.8.3
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.4
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.1
- 1.4.0
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0
This package is auto-updated.
Last update: 2024-10-12 10:08:46 UTC
README
Resources
Installation
The preferred way to install this extension is through composer.
Either run
$ php composer.phar require --prefer-dist simialbi/yii2-kanban
or add
"simialbi/yii2-kanban": "^2.0.0"
to the require
section of your composer.json
.
Usage
In order to use this module, you will need to:
- Setup Module your application so that the module is available.
- Create a user identity class which extends UserInterface
Setup Module
Configure the module in the modules section of your Yii configuration file.
'modules' => [ 'kanban' => [ 'class' => 'simialbi\yii2\kanban\Module', //'statuses' => [], //'statusColors' => [], //'on boardCreated' => function ($event) {}, //[...] ] ]
Parameters
Notice: The Statuses
Task::STATUS_NOT_BEGUN
,Task::STATUS_DONE
andTASK::STATUS_LATE
will automatically be defined if you do not define them.
Events
Setup console config and apply migrations
Apply the migrations either with the following command: yii migrate --migration-namespaces='simialbi\yii2\kanban\migrations'
or configure your console like this:
[ 'controllerMap' => [ 'migrate' => [ 'class' => 'yii\console\controllers\MigrateController', 'migrationNamespaces' => [ 'simialbi\yii2\kanban\migrations' ] ] ] ]
and apply the yii migrate
command.
Create identity
Create an identity class which implements simialbi\yii2\models\UserInterface
e.g.:
<?php use yii\db\ActiveRecord; use simialbi\yii2\models\UserInterface; class User extends ActiveRecord implements UserInterface { /** * {@inheritDoc} */ public static function tableName() { return 'user'; } /** * {@inheritDoc} */ public static function findIdentity($id) { return static::findOne($id); } /** * {@inheritDoc} */ public static function findIdentityByAccessToken($token, $type = null) { return static::findOne(['access_token' => $token]); } /** * {@inheritDoc} */ public function getId() { return $this->id; } /** * {@inheritDoc} */ public function getAuthKey() { return $this->auth_key; } /** * {@inheritDoc} */ public function validateAuthKey($authKey) { return $this->getAuthKey() === $authKey; } /** * {@inheritDoc} */ public function getImage() { return $this->image; } /** * {@inheritDoc} */ public function getName() { return trim($this->first_name . ' ' . $this->last_name); } /** * {@inheritDoc} */ public function getEmail() { return $this->email; } /** * {@inheritDoc} */ public function getMobile() { return $this->mobile; } /** * {@inheritDoc} */ public static function findIdentities() { return static::find()->all(); } }
After creating this class define it as identity class in your application configuration:
'components' => [ 'user' => [ 'identityClass' => 'app\models\User' ] ]
Configure jQuery UI (optional)
If you don't use jQuery UI somewhere else in your application, you can minify the load by just load the needed scripts:
'components' => [ 'assetManager' => [ 'bundles' => [ 'yii\jui\JuiAsset' => [ 'css' => [], 'js' => [ 'ui/data.js', 'ui/scroll-parent.js', 'ui/widget.js', 'ui/widgets/mouse.js', 'ui/widgets/sortable.js', ], 'publishOptions' => [ 'only' => [ 'ui/*', 'ui/widgets/*' ] ] ] ] ] ]
Notice: If you use the full jquery ui package, the bootstrap tooltip used by this module gets overridden by jui tooltip
Example Usage
Now you can access the kanban module by navigating to /kanban
.
Notice: Some of the actions can only be done as authenticated (logged in) user like creating boards, buckets etc.
License
yii2-kanban is released under MIT license. See bundled LICENSE for details.