-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2028f90
commit c9044b9
Showing
65 changed files
with
5,740 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#-------------------------------------------------------------------------------------- | ||
# Application settings | ||
#-------------------------------------------------------------------------------------- | ||
APP_NAME = 'Task Tracker' | ||
APP_DOMAIN = ylab-test.dev | ||
COOKIE_VALIDATION_KEY = 'H04V16iCzDD9980ebfTf99i4kSDNlvLpE09r0Wkp' | ||
|
||
YII_DEBUG = true | ||
YII_ENV = dev | ||
|
||
#-------------------------------------------------------------------------------------- | ||
# E-mails | ||
#-------------------------------------------------------------------------------------- | ||
ADMIN_EMAIL = '[email protected]' | ||
ROBOT_EMAIL = ${ADMIN_EMAIL} | ||
SYSTEM_EMAIL = ${ADMIN_EMAIL} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
.htaccess | ||
.env | ||
node_modules | ||
robots.txt | ||
.DS_Store | ||
.idea | ||
Thumbs.db | ||
.buildpath | ||
.settings | ||
composer.phar | ||
|
||
/vendor | ||
|
||
|
||
### macOS template | ||
*.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
### Windows template | ||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
### JetBrains template | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff: | ||
.idea/workspace.xml | ||
.idea/tasks.xml | ||
|
||
# Sensitive or high-churn files: | ||
.idea/dataSources/ | ||
.idea/dataSources.ids | ||
.idea/dataSources.xml | ||
.idea/dataSources.local.xml | ||
.idea/sqlDataSources.xml | ||
.idea/dynamic.xml | ||
.idea/uiDesigner.xml | ||
|
||
# Gradle: | ||
.idea/gradle.xml | ||
.idea/libraries | ||
|
||
# Mongo Explorer plugin: | ||
.idea/mongoSettings.xml | ||
|
||
## File-based project format: | ||
*.iws | ||
|
||
## Plugin-specific files: | ||
|
||
# IntelliJ | ||
/out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
### Vagrant template | ||
.vagrant/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Установка | ||
Убедитесь, что установлен Apache, PHP, composer, NPM | ||
Не требуется MySQL! Работаем с SQLite (дабы не усложнять окружение) | ||
|
||
## Запуск composer | ||
``` | ||
composer global require "fxp/composer-asset-plugin" | ||
composer install | ||
``` | ||
|
||
Проверяем наличие необходимых системных компонентов | ||
``` | ||
php requirements.php | ||
``` | ||
Обращаем внимание на warnings, не должно быть ошибок | ||
|
||
## Настройка рабочего окружения | ||
Копируем файл `.env.dist` в `.env`, меняем в нем нужные настройки. | ||
|
||
Копируем файл `web/.htaccess.example` в `web/.htaccess` (если в качестве веб-сервера установлен Apache). | ||
|
||
В каталоге runtime созадаем пустой файл `data.db` | ||
|
||
## Миграции | ||
Запускаем миграции | ||
``` | ||
php yii migrate | ||
``` | ||
|
||
## Frontend API | ||
|
||
`/api/tasks` - просмотр всех задач | ||
|
||
`/api/task/10` - просмотр задачи с id=10 | ||
|
||
`/api/task/10/change-status` - сменить статус для задачи с id=10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace app\assets; | ||
|
||
use yii\web\AssetBundle; | ||
|
||
/** | ||
* Класс DashboardAsset | ||
* | ||
* @package app\assets | ||
* @author Марунин Алексей | ||
* @since 1.0 | ||
*/ | ||
class DashboardAsset extends AssetBundle | ||
{ | ||
public $sourcePath = '@app/assets'; | ||
public $baseUrl = '@web'; | ||
|
||
public $css = [ | ||
'css/custom.css', | ||
]; | ||
|
||
public $js = [ | ||
'js/app.js', | ||
]; | ||
|
||
public $depends = [ | ||
'dmstr\web\AdminLteAsset', | ||
]; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
.alert.alert-help { | ||
background-color: #fcf8e3; | ||
border-color: #faebcc; | ||
color: #8a6d3b; | ||
} | ||
|
||
.table.detail-view th.kv-form-attribute-label { | ||
width: 25%; | ||
text-align: right; | ||
vertical-align: middle; | ||
} | ||
|
||
.table.detail-view th.kv-align-center { | ||
text-align: center; | ||
} | ||
|
||
.table.detail-view th.kv-align-top { | ||
vertical-align: top; | ||
} | ||
|
||
.table.detail-view td { | ||
vertical-align: middle; | ||
} | ||
|
||
.table.detail-view-custom .kv-form-attribute .help-block { | ||
margin-bottom: -15px; | ||
} | ||
|
||
.user-header { | ||
height: 75px !important; | ||
} | ||
|
||
.user-panel>.info { | ||
position: relative; | ||
} | ||
|
||
.main-header .logo img { | ||
margin-bottom: 10px; | ||
height: 50px; | ||
width: auto; | ||
} | ||
|
||
.auth-login .panel { | ||
border-bottom: none; | ||
box-shadow: none; | ||
-webkit-box-shadow: none; | ||
} | ||
|
||
.auth-login h1 { | ||
color: #fff; | ||
} | ||
|
||
.auth-login .panel-heading.logo-heading { | ||
text-align: center; | ||
background-color: #00a65a; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
function onChangeTaskStatus( task_id ) { | ||
var el = $( '#task-' + task_id + '-status' ); | ||
var status_id = el.val(); | ||
|
||
el.attr( 'disabled', 'disabled' ); | ||
$.ajax( { | ||
url: '/task/change-status?id=' + task_id, | ||
type: 'post', | ||
data: { | ||
'status_id': status_id | ||
} | ||
} ) | ||
.done( function ( response ) { | ||
el.val( response.status_id ); | ||
} ) | ||
.fail( function ( response ) { | ||
} ) | ||
.always( function() { | ||
el.removeAttr( 'disabled' ); | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
/** | ||
* Yii bootstrap file. | ||
* Used for enhanced IDE code autocompletion. | ||
* Note: To avoid "Multiple Implementations" PHPStorm warning and make autocomplete faster | ||
* exclude or "Mark as Plain Text" vendor/yiisoft/yii2/Yii.php file | ||
*/ | ||
class Yii extends \yii\BaseYii | ||
{ | ||
/** | ||
* @var BaseApplication|WebApplication|ConsoleApplication the application instance | ||
*/ | ||
public static $app; | ||
} | ||
/** | ||
* Class BaseApplication | ||
* Used for properties that are identical for both WebApplication and ConsoleApplication | ||
* | ||
*/ | ||
abstract class BaseApplication extends yii\base\Application | ||
{ | ||
} | ||
/** | ||
* Class WebApplication | ||
* Include only Web application related components here | ||
* | ||
* @property User $user User component. | ||
*/ | ||
class WebApplication extends yii\web\Application | ||
{ | ||
} | ||
/** | ||
* Class ConsoleApplication | ||
* Include only Console application related components here | ||
*/ | ||
class ConsoleApplication extends yii\console\Application | ||
{ | ||
} | ||
/** | ||
* User component | ||
* Include only Web application related components here | ||
*/ | ||
class User extends \yii\web\User | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"name": "ylab/yii2-test", | ||
"description": "YLab, Test app", | ||
"version": "1.0", | ||
"type": "project", | ||
"license": "proprietary", | ||
"homepage": "http://yiilab.com/", | ||
"keywords": [ "yii2", "YLab", "web application" ], | ||
|
||
"authors": [ | ||
{ | ||
"name": "Alexey Marunin", | ||
"email": "[email protected]", | ||
"role": "Developer" | ||
} | ||
], | ||
|
||
"require": { | ||
"php": ">=5.6.0", | ||
"yiisoft/yii2": "2.0.11.2", | ||
"vlucas/phpdotenv": "2.4.0", | ||
"rmrevin/yii2-fontawesome": "^2.17", | ||
"dmstr/yii2-adminlte-asset": "2.4.2", | ||
"kartik-v/yii2-detail-view": "^1.7", | ||
"kartik-v/yii2-widget-select2": "^2.0", | ||
"kartik-v/yii2-widget-datepicker": "^1.4", | ||
"kartik-v/yii2-builder": "^1.6", | ||
"yiisoft/yii2-httpclient": "*" | ||
}, | ||
|
||
"minimum-stability": "stable", | ||
"config": { | ||
"process-timeout": 1800 | ||
}, | ||
|
||
"extra": { | ||
"asset-installer-paths": { | ||
"npm-asset-library": "vendor/npm", | ||
"bower-asset-library": "vendor/bower" | ||
} | ||
}, | ||
|
||
"require-dev": { | ||
"yiisoft/yii2-debug": "^2.0" | ||
} | ||
} |
Oops, something went wrong.