-
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.
initial commit - features missing - coming in next commit
- Loading branch information
Praesidiarius
committed
Jan 24, 2020
0 parents
commit 0c13bbb
Showing
26 changed files
with
1,402 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,12 @@ | ||
.vagrant/ | ||
.idea/ | ||
vendor/ | ||
config/development.config.php | ||
public/themes/vuze | ||
public/themes/ablepro | ||
data/cache/* | ||
!data/cache/.gitkeep | ||
phpunit.xml | ||
composer.lock | ||
.phpunit.result.cache | ||
docs/html/ |
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,42 @@ | ||
language: php | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
env: | ||
global: | ||
- COMPOSER_ARGS="--no-interaction" | ||
- COVERAGE_DEPS="php-coveralls/php-coveralls" | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
- php: 7.2 | ||
env: | ||
- DEPS=lowest | ||
- php: 7.2 | ||
env: | ||
- DEPS=latest | ||
- CS_CHECK=true | ||
|
||
before_install: | ||
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi | ||
|
||
install: | ||
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs | ||
- if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi | ||
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi | ||
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi | ||
- stty cols 120 && composer show | ||
|
||
script: | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi | ||
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi | ||
|
||
after_script: | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then vendor/bin/php-coveralls -v ; fi | ||
|
||
notifications: | ||
email: false |
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,25 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file, in reverse chronological order by release. | ||
|
||
## 1.0.0 - TBD | ||
|
||
### Added | ||
|
||
- Its a composer package now | ||
|
||
### Changed | ||
|
||
- 100% of 0.9.x Codebase | ||
|
||
### Deprecated | ||
|
||
- 100% of 0.9.x Codebase | ||
|
||
### Removed | ||
|
||
- 100% of 0.9.x Codebase | ||
|
||
### Fixed | ||
|
||
- Removed dependencies |
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,2 @@ | ||
Copyright (c) 2019-2020, Verein onePlace | ||
All rights reserved. (https://1plc.ch/) |
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,27 @@ | ||
Copyright (c) 2019-2020, Verein onePlace | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
- Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
- Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
- Neither the name of Verein onePlace nor the names of its contributors may | ||
be used to endorse or promote products derived from this software without | ||
specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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,37 @@ | ||
# oneplace-task | ||
|
||
[![Build Status](https://travis-ci.com/OnePlc/PLC_X_Task.svg?branch=master)](https://travis-ci.com/OnePlc/PLC_X_Task) | ||
[![Coverage Status](https://coveralls.io/repos/github/OnePlc/PLC_X_Task/badge.svg?branch=master)](https://coveralls.io/github/OnePlc/PLC_X_Task?branch=master) | ||
|
||
## Introduction | ||
|
||
This is the Task Module for onePlace Software Framework based on Laminas Project (former Zend Framework) | ||
|
||
Create your web based apps on the fly! onePlace brings you extended Entity and Table Models, | ||
View Helpers and much more - so you can build your Webapp to manage database based data, | ||
in almost any layout you can image. | ||
|
||
onePlace is built for maximum freedom of choice for your app, and so only small | ||
parts of laminas mvc are utilized. a lot is done from scratch to give you more freedom / customization. | ||
|
||
## Task Module | ||
|
||
This task module is a starting point for your own onePlace modules. | ||
It expands on [oneplace-core](https://github.com/OnePlc/PLC_X_Core) and uses the onePlace / Laminas MVC layer and module systems. | ||
|
||
## Installation | ||
|
||
The easiest way to install onePlace Task is via composer | ||
```shell script | ||
composer require oneplace/oneplace-task | ||
``` | ||
|
||
## Getting started | ||
|
||
how to utilize user manager | ||
|
||
how to create own modules | ||
|
||
## Documentation | ||
|
||
Documentation will be extended soon. |
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,50 @@ | ||
{ | ||
"name": "oneplace/oneplace-task", | ||
"description": "onePlace Task Module", | ||
"type": "oneplace-module", | ||
"license": "BSD-3-Clause", | ||
"keywords": [ | ||
"laminas", | ||
"mvc", | ||
"task", | ||
"oneplace", | ||
"framework" | ||
], | ||
"require-dev": { | ||
"phpunit/phpunit": "^8", | ||
"oneplace/oneplace-core": "^1.0.0", | ||
"laminas/laminas-test": "^3.3.0" | ||
}, | ||
"require": { | ||
"php": "^7.1", | ||
"oneplace/oneplace-core": "^1.0.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"OnePlace\\Task\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"OnePlaceTest\\Task\\": "test/" | ||
} | ||
}, | ||
"scripts": { | ||
"cs-check": "phpcs", | ||
"cs-fix": "phpcbf", | ||
"development-disable": "laminas-development-mode disable", | ||
"development-enable": "laminas-development-mode enable", | ||
"development-status": "laminas-development-mode status", | ||
"post-create-project-cmd": [ | ||
"@development-enable", | ||
"php -r '$file = file_get_contents(\".gitignore\"); $file = str_replace(\"composer.lock\", \"\", $file); file_put_contents(\".gitignore\", $file);'" | ||
], | ||
"serve": "php -S 0.0.0.0:8080 -t public", | ||
"test": "phpunit" | ||
}, | ||
"extra": { | ||
"zf": { | ||
"module": "OnePlace\\Task" | ||
} | ||
} | ||
} |
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,64 @@ | ||
<?php | ||
/** | ||
* module.config.php - Task Config | ||
* | ||
* Main Config File for Task Module | ||
* | ||
* @category Config | ||
* @package Task | ||
* @author Verein onePlace | ||
* @copyright (C) 2020 Verein onePlace <admin@1plc.ch> | ||
* @license https://opensource.org/licenses/BSD-3-Clause | ||
* @version 1.0.0 | ||
* @since 1.0.0 | ||
*/ | ||
|
||
namespace OnePlace\Task; | ||
|
||
use Laminas\Router\Http\Literal; | ||
use Laminas\Router\Http\Segment; | ||
use Laminas\ServiceManager\Factory\InvokableFactory; | ||
|
||
return [ | ||
# Task Module - Routes | ||
'router' => [ | ||
'routes' => [ | ||
# Module Basic Route | ||
'task' => [ | ||
'type' => Segment::class, | ||
'options' => [ | ||
'route' => '/task[/:action[/:id]]', | ||
'constraints' => [ | ||
'action' => '[a-zA-Z][a-zA-Z0-9_-]*', | ||
'id' => '[0-9]+', | ||
], | ||
'defaults' => [ | ||
'controller' => Controller\TaskController::class, | ||
'action' => 'index', | ||
], | ||
], | ||
], | ||
'task-api' => [ | ||
'type' => Segment::class, | ||
'options' => [ | ||
'route' => '/task/api[/:action[/:id]]', | ||
'constraints' => [ | ||
'action' => '[a-zA-Z][a-zA-Z0-9_-]*', | ||
'id' => '[0-9]+', | ||
], | ||
'defaults' => [ | ||
'controller' => Controller\ApiController::class, | ||
'action' => 'index', | ||
], | ||
], | ||
], | ||
], | ||
], | ||
|
||
# View Settings | ||
'view_manager' => [ | ||
'template_path_stack' => [ | ||
'task' => __DIR__ . '/../view', | ||
], | ||
], | ||
]; |
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,6 @@ | ||
$sModuleName = "Article" | ||
$sModuleKey = "article" | ||
$sTargetDir = "C:\Users\Praesidiarius\PhpstormProjects\OS\PLC_X_Article_NoGIT" | ||
|
||
# Copy Task | ||
Copy-Item -Path "..\*" -Destination "$sTargetDir" -recurse -Force |
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,59 @@ | ||
-- | ||
-- Base Table | ||
-- | ||
CREATE TABLE `task` ( | ||
`Task_ID` int(11) NOT NULL, | ||
`label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
`created_by` int(11) NOT NULL, | ||
`created_date` datetime NOT NULL, | ||
`modified_by` int(11) NOT NULL, | ||
`modified_date` datetime NOT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; | ||
|
||
ALTER TABLE `task` | ||
ADD PRIMARY KEY (`Task_ID`); | ||
|
||
ALTER TABLE `task` | ||
MODIFY `Task_ID` int(11) NOT NULL AUTO_INCREMENT; | ||
|
||
-- | ||
-- Permissions | ||
-- | ||
INSERT INTO `permission` (`permission_key`, `module`, `label`, `nav_label`, `nav_href`, `show_in_menu`) VALUES | ||
('add', 'OnePlace\\Task\\Controller\\TaskController', 'Add', '', '', 0), | ||
('edit', 'OnePlace\\Task\\Controller\\TaskController', 'Edit', '', '', 0), | ||
('index', 'OnePlace\\Task\\Controller\\TaskController', 'Index', 'Tasks', '/task', 1), | ||
('list', 'OnePlace\\Task\\Controller\\ApiController', 'List', '', '', 1), | ||
('view', 'OnePlace\\Task\\Controller\\TaskController', 'View', '', '', 0); | ||
|
||
-- | ||
-- Form | ||
-- | ||
INSERT INTO `core_form` (`form_key`, `label`) VALUES ('task-single', 'Task'); | ||
|
||
-- | ||
-- Index List | ||
-- | ||
INSERT INTO `core_index_table` (`table_name`, `form`, `label`) VALUES | ||
('task-index', 'task-single', 'Task Index'); | ||
|
||
-- | ||
-- Tabs | ||
-- | ||
INSERT INTO `core_form_tab` (`Tab_ID`, `form`, `title`, `subtitle`, `icon`, `counter`, `sort_id`, `filter_check`, `filter_value`) VALUES ('task-base', 'task-single', 'Task', 'Base', 'fas fa-cogs', '', '0', '', ''); | ||
|
||
-- | ||
-- Buttons | ||
-- | ||
INSERT INTO `core_form_button` (`Button_ID`, `label`, `icon`, `title`, `href`, `class`, `append`, `form`, `mode`, `filter_check`, `filter_value`) VALUES | ||
(NULL, 'Save Task', 'fas fa-save', 'Save Task', '#', 'primary saveForm', '', 'task-single', 'link', '', ''), | ||
(NULL, 'Edit Task', 'fas fa-edit', 'Edit Task', '/task/edit/##ID##', 'primary', '', 'task-view', 'link', '', ''), | ||
(NULL, 'Add Task', 'fas fa-plus', 'Add Task', '/task/add', 'primary', '', 'task-index', 'link', '', ''); | ||
|
||
-- | ||
-- Fields | ||
-- | ||
INSERT INTO `core_form_field` (`Field_ID`, `type`, `label`, `fieldkey`, `tab`, `form`, `class`, `url_view`, `url_ist`, `show_widget_left`, `allow_clear`, `readonly`, `tbl_cached_name`, `tbl_class`, `tbl_permission`) VALUES | ||
(NULL, 'text', 'Name', 'label', 'task-base', 'task-single', 'col-md-3', '/task/view/##ID##', '', 0, 1, 0, '', '', ''); | ||
|
||
COMMIT; |
Empty file.
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,28 @@ | ||
# Quick Start | ||
|
||
Now that you have basic knowledge of oneplace, we'll show you the easy way to get started. | ||
|
||
## Install onePlace Task | ||
|
||
The easiest way to get started is to install the task module via | ||
Composer. | ||
|
||
If you have not yet done so, [install Composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx). | ||
|
||
Go to the directory, where you installed oneplace core and run: | ||
|
||
```bash | ||
$ composer require oneplace/oneplace-task | ||
``` | ||
|
||
## Setup | ||
Open the browser and login to your oneplace app. | ||
|
||
Go to /update | ||
|
||
You will see that a new module is detected and it needs db install. | ||
|
||
click "Update" | ||
|
||
now you have the module enabled and active. you can now add new fields / tabs | ||
and manage permissions with the user module |
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,15 @@ | ||
docs_dir: docs/book | ||
site_dir: docs/html | ||
nav: | ||
- Home: index.md | ||
- Introduction: intro.md | ||
- 'Quick Start': quick-start.md | ||
- Reference: | ||
- 'Dynamic Fields': dynamic-fields.md | ||
- Examples: examples.md | ||
site_name: oneplace-task | ||
site_description: "onePlace Application Task Module" | ||
repo_url: 'https://github.com/OnePlc/PLC_X_Task' | ||
theme: readthedocs | ||
extra: | ||
project: onePlc |
Oops, something went wrong.