mirror of
https://github.com/Karaka-Management/oms-Search.git
synced 2026-01-11 18:48:41 +00:00
Merge branch 'develop'
This commit is contained in:
commit
a9e99bb777
35
.github/dev_bug_report.md
vendored
35
.github/dev_bug_report.md
vendored
|
|
@ -1,35 +0,0 @@
|
||||||
---
|
|
||||||
name: Dev Bug Report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
title: ''
|
|
||||||
labels: stat_backlog, type_bug
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Bug Description
|
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
# How to Reproduce
|
|
||||||
|
|
||||||
Steps to reproduce the behavior:
|
|
||||||
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
## Minimal Code Example
|
|
||||||
|
|
||||||
```
|
|
||||||
// your code ...
|
|
||||||
```
|
|
||||||
|
|
||||||
# Expected Behavior
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
# Screenshots
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
# Additional Information
|
|
||||||
Add any other context about the problem here.
|
|
||||||
18
.github/dev_feature_request.md
vendored
18
.github/dev_feature_request.md
vendored
|
|
@ -1,18 +0,0 @@
|
||||||
---
|
|
||||||
name: Dev Feature Request
|
|
||||||
about: Suggest an idea for this project
|
|
||||||
title: ''
|
|
||||||
labels: stat_backlog, type_feature
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# What is the feature you request
|
|
||||||
* A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
||||||
* A clear and concise description of what you want to happen.
|
|
||||||
|
|
||||||
# Alternatives
|
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
|
||||||
|
|
||||||
# Additional Information
|
|
||||||
Add any other context or screenshots about the feature request here.
|
|
||||||
40
.github/user_bug_report.md
vendored
40
.github/user_bug_report.md
vendored
|
|
@ -1,40 +0,0 @@
|
||||||
---
|
|
||||||
name: User Bug Report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
title: ''
|
|
||||||
labels: stat_backlog, type_bug
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Bug Description
|
|
||||||
|
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
# How to Reproduce
|
|
||||||
|
|
||||||
Steps to reproduce the behavior:
|
|
||||||
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
# Expected Behavior
|
|
||||||
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
# Screenshots
|
|
||||||
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
# System Information
|
|
||||||
|
|
||||||
- System: [e.g. PC or iPhone11, ...]
|
|
||||||
- OS: [e.g. iOS]
|
|
||||||
- Browser [e.g. chrome, safari]
|
|
||||||
- KarakaVersion [e.g. 22]
|
|
||||||
|
|
||||||
# Additional Information
|
|
||||||
|
|
||||||
Add any other context about the problem here.
|
|
||||||
21
.github/user_feature_request.md
vendored
21
.github/user_feature_request.md
vendored
|
|
@ -1,21 +0,0 @@
|
||||||
---
|
|
||||||
name: User Feature Request
|
|
||||||
about: Suggest an idea for this project
|
|
||||||
title: ''
|
|
||||||
labels: stat_backlog, type_feature
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# What is the feature you request
|
|
||||||
|
|
||||||
* A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
||||||
* A clear and concise description of what you want to happen.
|
|
||||||
|
|
||||||
# Alternatives
|
|
||||||
|
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
|
||||||
|
|
||||||
# Additional Information
|
|
||||||
|
|
||||||
Add any other context or screenshots about the feature request here.
|
|
||||||
|
|
@ -20,7 +20,7 @@ use phpOMS\Router\RouteVerb;
|
||||||
return [
|
return [
|
||||||
'^.*/search(\?.*|$)' => [
|
'^.*/search(\?.*|$)' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\Search\Controller\ApiController:routeSearch',
|
'dest' => '\Modules\Search\Controller\ApiController:search',
|
||||||
'verb' => RouteVerb::ANY,
|
'verb' => RouteVerb::ANY,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::NAME,
|
'module' => ApiController::NAME,
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,21 @@
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
return [];
|
use Modules\Search\Controller\BackendController;
|
||||||
|
use Modules\Search\Models\PermissionCategory;
|
||||||
|
use phpOMS\Account\PermissionType;
|
||||||
|
use phpOMS\Router\RouteVerb;
|
||||||
|
|
||||||
|
return [
|
||||||
|
'^.*/search(\?.*|$)' => [
|
||||||
|
[
|
||||||
|
'dest' => '\Modules\Search\Controller\BackendController:search',
|
||||||
|
'verb' => RouteVerb::ANY,
|
||||||
|
'permission' => [
|
||||||
|
'module' => BackendController::NAME,
|
||||||
|
'type' => PermissionType::READ,
|
||||||
|
'state' => PermissionCategory::SEARCH,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
# Contributor Covenant Code of Conduct
|
|
||||||
|
|
||||||
## Our Pledge
|
|
||||||
|
|
||||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
||||||
|
|
||||||
## Our Standards
|
|
||||||
|
|
||||||
Examples of behavior that contributes to creating a positive environment include:
|
|
||||||
|
|
||||||
* Using welcoming and inclusive language
|
|
||||||
* Being respectful of differing viewpoints and experiences
|
|
||||||
* Gracefully accepting constructive criticism
|
|
||||||
* Focusing on what is best for the community
|
|
||||||
* Showing empathy towards other community members
|
|
||||||
|
|
||||||
Examples of unacceptable behavior by participants include:
|
|
||||||
|
|
||||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
|
||||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
||||||
* Public or private harassment
|
|
||||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
|
||||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
||||||
|
|
||||||
## Our Responsibilities
|
|
||||||
|
|
||||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
|
||||||
|
|
||||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
|
||||||
|
|
||||||
## Enforcement
|
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at spl1nes.com@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
|
||||||
|
|
||||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
|
||||||
|
|
||||||
## Attribution
|
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
|
||||||
|
|
||||||
[homepage]: http://contributor-covenant.org
|
|
||||||
[version]: http://contributor-covenant.org/version/1/4/
|
|
||||||
|
|
@ -1,82 +0,0 @@
|
||||||
# Development
|
|
||||||
|
|
||||||
## Development environment
|
|
||||||
|
|
||||||
The setup and configuration of the development environment is in the hands of every developer themselves. However, it is recommended to follow the setup instructions in the [Developer-Guide](https://github.com/Karaka-Management/Developer-Guide/blob/develop/general/setup.md).
|
|
||||||
|
|
||||||
## Code of conduct
|
|
||||||
|
|
||||||
Every organization member and contributor to the organization must follow the [code of conduct](../Policies & Guidelines/Code of conduct.md).
|
|
||||||
|
|
||||||
## Code changes
|
|
||||||
|
|
||||||
### Topics / Tasks / Todos
|
|
||||||
|
|
||||||
Generally, the development philosophy is result orientated. This means that anyone can propose tasks, pick up existing tasks or right away implement their code changes. However, implementing code changes without consulting with a senior developer in advance has a much higher risk of code changes not getting admitted. The easiest way to discuss a code change idea in advance are the github [issues](https://github.com/Karaka-Management/Karaka/issues) or [discussions](https://github.com/Karaka-Management/Karaka/discussions).
|
|
||||||
|
|
||||||
Developers are encouraged to pick open tasks with high priorities according to their own skill level. Senior developers may directly assign tasks to developers based on their importance. New developers may find it easier to start with a task that has a low priority as they often also have a lower difficulty.
|
|
||||||
|
|
||||||
Open tasks can be found in the project overview: [PROJECT.md](https://github.com/Karaka-Management/Organization-Guide/blob/master/Project/PROJECT.md)
|
|
||||||
|
|
||||||
Tasks currently in development are prefixed in the priority column with an asterisk `*` and a name tag in the task description of the developer who is working on the task.
|
|
||||||
|
|
||||||
The open tasks are reviewed once a month by a senior developer. The senior developer updates the project overview if necessary and requests feedback regarding development status of important tasks under development. During this process important tasks may also get directly assigned to developers. This review is performed on a judgmental bases of the senior basis.
|
|
||||||
|
|
||||||
### Code style
|
|
||||||
|
|
||||||
Code changes must follow the [style guidelines](https://github.com/Karaka-Management/Developer-Guide/tree/develop/standards). Additionally, the automatic code style inspection tools must return no errors, failures or warnings. Developers should test their changes with inspection tools and configurations mentioned in the [inspection documentation](https://github.com/Karaka-Management/Developer-Guide/blob/develop/quality/inspections.md) in advance before submitting them for review.
|
|
||||||
|
|
||||||
In rare cases errors, failures or warnings during the automatic inspection are acceptable. Reasons can be changes in the programming language, special cases which cannot, are difficult or must be individually configured in the inspection settings. If this is the case for a code change and if inspection configuration changes are necessary are decided by the senior developer performing the code review.
|
|
||||||
|
|
||||||
Automated checks which are run during the review process:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
php ./vendor/bin/phpcs --severity=1 ./ --standard="Build/Config/phpcs.xml"
|
|
||||||
npx eslint ./ -c ./Build/Config/.eslintrc.json
|
|
||||||
```
|
|
||||||
|
|
||||||
### Tests
|
|
||||||
|
|
||||||
Code changes must follow the inspection guidelines (i.e. code coverage) mentioned in the [inspection documentation](https://github.com/Karaka-Management/Developer-Guide/blob/develop/quality/inspections.md). Developers should check if the code changes comply with the inspection guidelines before submitting them.
|
|
||||||
|
|
||||||
In rare cases it might be not possible to follow the inspection guidelines. In such cases the senior developer performing the code review may decide if the code change still gets accepted.
|
|
||||||
|
|
||||||
Automated tests which are run during the review process:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
php ./vendor/bin/phpunit -c tests/PHPUnit/phpunit_default.xml
|
|
||||||
php ./vendor/bin/phpstan analyse --autoload-file=phpOMS/Autoloader.php -l 9 -c Build/Config/phpstan.neon ./
|
|
||||||
npx jasmine-node ./
|
|
||||||
./cOMS/tests/test.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Additional inspections which are run but might be ignored during the review depending on the use case are mentioned in the [inspection documentation](https://github.com/Karaka-Management/Developer-Guide/blob/develop/quality/inspections.md) as other checks.
|
|
||||||
|
|
||||||
### Demo
|
|
||||||
|
|
||||||
Some code changes may also require changes or extensions in the demo setup scripts. The demo setup script try to simulate a real world use case by generating and modifying mostly random data. This is also a good way to setup and “manually” test the code changes in a larger picture. The demo setup script can be found in the [demoSetup](https://github.com/Karaka-Management/demoSetup) repository. The demo setup script takes a long time due to the large amount of user input simulated data which is generated. Therefore it is recommended to run this only sporadically.
|
|
||||||
|
|
||||||
### Code review
|
|
||||||
|
|
||||||
In addition to the automatic code review performed by the various inspection tools such as (phpcs, phpstan, phpunit, eslint and custom scripts) a senior developer must check the proposed code change before it is merged with the respective `develop` branch. Only upon the approval by the reviewer a code change requests gets merged as no other developers have permission in the software to make such code merges.
|
|
||||||
|
|
||||||
In case a code change request is not approved the reviewer states the reason for the decision, this may include some tips and requests which will allow the contributor to make improvements so that the code change may get approved.
|
|
||||||
|
|
||||||
If the code reviewer only finds minor issues with the proposed code change the reviewer may make small changes to the proposed code change and inform the contributor to speed up the implementation process. Code reviewers are encouraged to do this with new contributors to avoid long iteration processes and to not discourage new developers. However, communication is key and severe issues with code change requests or if the contributor already made multiple code change requests in the past the reviewer should not implement the improvements by himself and rather decline the code change requests with his reasoning.
|
|
||||||
|
|
||||||
### Release flow
|
|
||||||
|
|
||||||
Code changes must be performed in a new branch. A new branch can be created with:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git checkout -b new-branch-name
|
|
||||||
```
|
|
||||||
|
|
||||||
The name of the branch can be chosen freely however it is recommended to follow the following branch naming conventions:
|
|
||||||
|
|
||||||
* `feature-*` for feature implementations
|
|
||||||
* `bug-*` for bug fixes
|
|
||||||
* `security-*` for security related fixes/improvements
|
|
||||||
* `general-*` for general improvements (i.e. code documentation improvements, code style improvements)
|
|
||||||
|
|
||||||
The senior developer who performs the code review merges the change request into the `develop` branch upon approval.
|
|
||||||
|
|
@ -29,8 +29,6 @@ use phpOMS\Router\WebRouter;
|
||||||
*/
|
*/
|
||||||
final class ApiController extends Controller
|
final class ApiController extends Controller
|
||||||
{
|
{
|
||||||
private $router = null;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
@ -55,22 +53,11 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function routeSearch(HttpRequest $request, ResponseAbstract $response, mixed $data = null) : void
|
public function search(HttpRequest $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
$this->app->dispatcher->dispatch(
|
$data = $this->routeSearch($request, $response, $data);
|
||||||
$this->router->route(
|
|
||||||
$request->getDataString('search') ?? '',
|
|
||||||
$request->getDataString('CSRF'),
|
|
||||||
$request->getRouteVerb(),
|
|
||||||
$this->app->appId,
|
|
||||||
$this->app->unitId,
|
|
||||||
$this->app->accountManager->get($request->header->account)
|
|
||||||
),
|
|
||||||
$request,
|
|
||||||
$response
|
|
||||||
);
|
|
||||||
|
|
||||||
if (empty($response->data)) {
|
if (empty($data)) {
|
||||||
$this->fillJsonRawResponse($request, $response, []);
|
$this->fillJsonRawResponse($request, $response, []);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
75
Controller/BackendController.php
Normal file
75
Controller/BackendController.php
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.1
|
||||||
|
*
|
||||||
|
* @package Modules\Search
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://jingga.app
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\Search\Controller;
|
||||||
|
|
||||||
|
use phpOMS\Application\ApplicationAbstract;
|
||||||
|
use phpOMS\Contract\RenderableInterface;
|
||||||
|
use phpOMS\Message\RequestAbstract;
|
||||||
|
use phpOMS\Message\ResponseAbstract;
|
||||||
|
use phpOMS\Router\WebRouter;
|
||||||
|
use phpOMS\Views\View;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Backend controller
|
||||||
|
*
|
||||||
|
* @package Modules\Search
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @link https://jingga.app
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
final class BackendController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function __construct(ApplicationAbstract $app)
|
||||||
|
{
|
||||||
|
parent::__construct($app);
|
||||||
|
|
||||||
|
$this->router = new WebRouter();
|
||||||
|
$this->router->importFromFile(__DIR__ . '/../Admin/SearchCommands.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Backend method to handle basic search request
|
||||||
|
*
|
||||||
|
* @param RequestAbstract $request Request
|
||||||
|
* @param ResponseAbstract $response Response
|
||||||
|
* @param array $data Generic data
|
||||||
|
*
|
||||||
|
* @return RenderableInterface
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function search(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||||
|
{
|
||||||
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
|
$view->setTemplate('/Modules/Search/Theme/Backend/search-result');
|
||||||
|
|
||||||
|
$internalRequest = clone $request;
|
||||||
|
$internalResponse = clone $response;
|
||||||
|
|
||||||
|
$internalResponse->header = clone $request->header;
|
||||||
|
|
||||||
|
$internalResponse->data = [];
|
||||||
|
|
||||||
|
$temp = empty($request->getDataString('search')) ? [] : $this->routeSearch($internalRequest, $internalResponse, $data);
|
||||||
|
$view->data = empty($temp) ? [] : \reset($temp);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -15,7 +15,10 @@ declare(strict_types=1);
|
||||||
namespace Modules\Search\Controller;
|
namespace Modules\Search\Controller;
|
||||||
|
|
||||||
use Modules\Search\Models\Search;
|
use Modules\Search\Models\Search;
|
||||||
|
use phpOMS\Message\Http\HttpRequest;
|
||||||
|
use phpOMS\Message\ResponseAbstract;
|
||||||
use phpOMS\Module\ModuleAbstract;
|
use phpOMS\Module\ModuleAbstract;
|
||||||
|
use phpOMS\Router\RouterInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search class.
|
* Search class.
|
||||||
|
|
@ -75,4 +78,41 @@ class Controller extends ModuleAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public static array $dependencies = [];
|
public static array $dependencies = [];
|
||||||
|
|
||||||
|
protected ?RouterInterface $router = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Api method to handle basic search request
|
||||||
|
*
|
||||||
|
* @param HttpRequest $request Request
|
||||||
|
* @param ResponseAbstract $response Response
|
||||||
|
* @param array $data Generic data
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function routeSearch(HttpRequest $request, ResponseAbstract $response, mixed $data = null) : array
|
||||||
|
{
|
||||||
|
if ($this->router === null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->app->dispatcher->dispatch(
|
||||||
|
$this->router->route(
|
||||||
|
$request->getDataString('search') ?? '',
|
||||||
|
$request->getDataString('CSRF'),
|
||||||
|
$request->getRouteVerb(),
|
||||||
|
$this->app->appId,
|
||||||
|
$this->app->unitId,
|
||||||
|
$this->app->accountManager->get($request->header->account)
|
||||||
|
),
|
||||||
|
$request,
|
||||||
|
$response
|
||||||
|
);
|
||||||
|
|
||||||
|
return $response->data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
ICAL.txt
2
ICAL.txt
|
|
@ -1,6 +1,6 @@
|
||||||
# Individual Contributor License Agreement ("CLA") 1.0
|
# Individual Contributor License Agreement ("CLA") 1.0
|
||||||
|
|
||||||
Thank you for your interest in Karaka-Management (the "Company"). In order to clarify the intellectual property license granted with Contributions from any person or entity, the Company must provide a Contributor License Agreement ("CLA") on file that has been made available to each Contributor. This license is for your protection as a Contributor as well as the protection of the Company and its users; it does not change your rights to use your own Contributions for any other purpose.
|
Thank you for your interest in Jingga e. K. (the "Company"). In order to clarify the intellectual property license granted with Contributions from any person or entity, the Company must provide a Contributor License Agreement ("CLA") on file that has been made available to each Contributor. This license is for your protection as a Contributor as well as the protection of the Company and its users; it does not change your rights to use your own Contributions for any other purpose.
|
||||||
|
|
||||||
By contributing to the Company You accept and agree to the following terms and conditions for Your present and future Contributions submitted to the Company. In return, the Company shall not use Your Contributions in a way that is contrary to the public benefit or inconsistent with its bylaws in effect at the time of the Contribution. Except for the license granted herein to the Company and recipients of software distributed by the Company, You reserve all right, title, and interest in and to Your Contributions.
|
By contributing to the Company You accept and agree to the following terms and conditions for Your present and future Contributions submitted to the Company. In return, the Company shall not use Your Contributions in a way that is contrary to the public benefit or inconsistent with its bylaws in effect at the time of the Contribution. Except for the license granted herein to the Company and recipients of software distributed by the Company, You reserve all right, title, and interest in and to Your Contributions.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ Version 2.0
|
||||||
|
|
||||||
Subject to the terms and conditions of this License, each Contributor grants to You after purchase a perpetual, worldwide, non-exclusive, irrevocable copyright license to prepare Derivative Works of, publicly display, publicly perform the Work and such Derivative Works in Source or Object form. You are not allowed to sublicense, reproduce, or distribute the Work and such Derivative Works in Source or Object form.
|
Subject to the terms and conditions of this License, each Contributor grants to You after purchase a perpetual, worldwide, non-exclusive, irrevocable copyright license to prepare Derivative Works of, publicly display, publicly perform the Work and such Derivative Works in Source or Object form. You are not allowed to sublicense, reproduce, or distribute the Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
3. Redistribution.
|
3. Redistribution
|
||||||
|
|
||||||
You may not reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form.
|
You may not reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ namespace Modules\Search\Models;
|
||||||
use phpOMS\Stdlib\Base\Enum;
|
use phpOMS\Stdlib\Base\Enum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Permision state enum.
|
* Permission category enum.
|
||||||
*
|
*
|
||||||
* @package Modules\Search\Models
|
* @package Modules\Search\Models
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ Currently Karaka is still developing the first Alpha version. As soon as we have
|
||||||
|
|
||||||
General updates can be found in our info section at https://jingga.app/info and developer updates can be found in our developer section at https://jingga.app/dev. In our developer section you can also check out the automatically generated reports such as code coverage, code style, static analysis etc. as well as our code style guide lines and developer documentation.
|
General updates can be found in our info section at https://jingga.app/info and developer updates can be found in our developer section at https://jingga.app/dev. In our developer section you can also check out the automatically generated reports such as code coverage, code style, static analysis etc. as well as our code style guide lines and developer documentation.
|
||||||
|
|
||||||
* [Project Status](https://github.com/Karaka-Management/Organization-Guide/blob/master/Project/PROJECT.md)
|
* [Project Status](https://github.com/orgs/Karaka-Management/projects/10)
|
||||||
|
|
||||||
## Tech stack
|
## Tech stack
|
||||||
|
|
||||||
|
|
@ -62,7 +62,7 @@ General updates can be found in our info section at https://jingga.app/info and
|
||||||
|
|
||||||
## Become a contributor
|
## Become a contributor
|
||||||
|
|
||||||
Karaka has a very open culture and we always welcome new people who share our philosophy in providing create solutions which just work. You can find the development process description which also describes how to become a contributer in the [Organization documentation](https://github.com/Karaka-Management/Organization-Guide/blob/master/Processes/Development.md).
|
Karaka has a very open culture and we always welcome new people who share our philosophy in providing create solutions which just work. You can find the development process description which also describes how to become a contributer in the [Organization documentation](https://github.com/Karaka-Management/Organization-Guide/blob/master/Processes/01_Development.md).
|
||||||
|
|
||||||
## Misc
|
## Misc
|
||||||
|
|
||||||
|
|
|
||||||
17
Theme/Backend/Lang/de.lang.php
Normal file
17
Theme/Backend/Lang/de.lang.php
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.1
|
||||||
|
*
|
||||||
|
* @package Modules\Localization
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://jingga.app
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
return ['Search' => [
|
||||||
|
'NoResults' => 'Keine Surchergebnisse',
|
||||||
|
]];
|
||||||
17
Theme/Backend/Lang/en.lang.php
Normal file
17
Theme/Backend/Lang/en.lang.php
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.1
|
||||||
|
*
|
||||||
|
* @package Modules\Localization
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://jingga.app
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
return ['Search' => [
|
||||||
|
'NoResults' => 'No search results',
|
||||||
|
]];
|
||||||
108
Theme/Backend/search-result.tpl.php
Normal file
108
Theme/Backend/search-result.tpl.php
Normal file
|
|
@ -0,0 +1,108 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.1
|
||||||
|
*
|
||||||
|
* @package Modules\QA
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://jingga.app
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
|
$isEmpty = true;
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
foreach ($this->data as $controller) :
|
||||||
|
if (empty($controller)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$first = \reset($controller);
|
||||||
|
?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="box col-xs-12">
|
||||||
|
<h1><?= $first['module']; ?></h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php if ($first['type'] === 'list_links') : ?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="portlet">
|
||||||
|
<table class="default sticky"><tbody>
|
||||||
|
<?php foreach ($controller as $data) :
|
||||||
|
if (empty($data)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$isEmpty = false;
|
||||||
|
|
||||||
|
$summary = $data['summary'];
|
||||||
|
$summary = \trim($summary, " #\n");
|
||||||
|
?>
|
||||||
|
<tr data-href="<?= UriFactory::build($data['link']); ?>">
|
||||||
|
<td class="wf-100">
|
||||||
|
<a href="<?= UriFactory::build($data['link']); ?>">
|
||||||
|
<?= $this->printHtml(\trim($data['title'])); ?>
|
||||||
|
</a>
|
||||||
|
<td class="sm-hidden">
|
||||||
|
<?php if (!empty($data['tags'])) : ?>
|
||||||
|
<?php foreach ($data['tags'] as $tag) : ?>
|
||||||
|
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>">
|
||||||
|
<?= empty($tag->icon) ? '' : '<i class="g-icon">' . $this->printHtml($tag->icon) . '</i>'; ?>
|
||||||
|
<?= $this->printHtml($tag->getL11n()); ?>
|
||||||
|
</span>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php elseif ($first['type'] === 'list_accounts') : ?>
|
||||||
|
<div class="row">
|
||||||
|
<?php foreach ($controller as $data) :
|
||||||
|
if (empty($data)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$isEmpty = false;
|
||||||
|
?>
|
||||||
|
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
|
<section class="portlet">
|
||||||
|
<div class="portlet-head">
|
||||||
|
<a style="display: flex; align-items: center;" href="<?= UriFactory::build($data['link']); ?>">
|
||||||
|
<img class="profile-image" alt="account" loading="lazy"
|
||||||
|
src="<?= UriFactory::build($data['image']); ?>">
|
||||||
|
<span style="margin-left: .5rem;"><?= $this->printHtml($data['title']); ?></span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body">
|
||||||
|
<div>
|
||||||
|
<table class="wf-100" style="font-size: .9rem;">
|
||||||
|
<?php if (!empty($data['email'])) : ?><tr><td><a href=""><?= $this->printHtml($data['email']); ?></a><?php endif; ?>
|
||||||
|
<?php if (!empty($data['phone'])) : ?><tr><td><?= $this->printHtml($data['phone']); ?><?php endif; ?>
|
||||||
|
<?php if (!empty($data['city'])) : ?><tr><td><?= $this->printHtml($data['city']); ?><?php endif; ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
<?php if ($isEmpty) : ?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<section class="portlet">
|
||||||
|
<div class="portlet-body"><?= $this->getHtml('NoResults'); ?></div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
@ -1,4 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.1
|
||||||
|
*
|
||||||
|
* @package Modules\Search\tests
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://jingga.app
|
||||||
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
\ini_set('memory_limit', '2048M');
|
\ini_set('memory_limit', '2048M');
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ use phpOMS\Message\Http\HttpResponse;
|
||||||
use phpOMS\Module\ModuleAbstract;
|
use phpOMS\Module\ModuleAbstract;
|
||||||
use phpOMS\Module\ModuleManager;
|
use phpOMS\Module\ModuleManager;
|
||||||
use phpOMS\Router\WebRouter;
|
use phpOMS\Router\WebRouter;
|
||||||
use phpOMS\Uri\HttpUri;
|
|
||||||
use phpOMS\Utils\TestUtils;
|
use phpOMS\Utils\TestUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -102,7 +101,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertGreaterThan(0, \count($searchRoutes));
|
self::assertGreaterThan(0, \count($searchRoutes));
|
||||||
|
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest();
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
$request->setData('search', ':help introduction');
|
$request->setData('search', ':help introduction');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user