Skip to content

Commit

Permalink
Merge pull request #4 from OnePlc/1.0.1-dev
Browse files Browse the repository at this point in the history
1.0.1 dev
  • Loading branch information
Praesidiarius authored Apr 1, 2021
2 parents e9181f8 + 8c0b92f commit 2ac62d7
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 30 deletions.
26 changes: 5 additions & 21 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
Copyright (c) 2019-2021, 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:
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.
1. 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.
2. 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.
3. Neither the name of the copyright holder 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 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 HOLDER 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.
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,48 @@

This is a collection of templates to build software with onePlace

- Cards
**You can actually use this collection of bootstrap based html templates for every laminas-mvc based application**

### Included Components

- [Cards](https://getbootstrap.com/docs/4.0/components/card/)

## Installation

The easiest way to install onePlace Templates is via composer
```shell script
composer require oneplace/oneplace-templates
```


## Quick Start

Just use the templates you want and customize them in the way
you need. Here is an example of an form based on a bootstrap card

```php
# Define Body
$sCardBody = 'YOUR-HTML-OR-PARTIAL-HERE';

# Define Footer
$sCardFooter = $this->partial('templates/card/basic_footer', [
'sButtonLabel' => $this->translate('Save Calendar'),
'sButtonIcon' => 'fas fa-save',
'bCancelButton' => true,
'sCancelButtonAction' => '/calendar',
]);

?>
<form action="" method="POST">
<div class="row">
<?php
# Print Card
echo $this->partial('templates/card/basic', [
'sCardTitle' => $this->translate('Manage Calendar'),
'sCardBody' => $sCardBody,
'sCardFooter' => $sCardFooter,
]);
?>
</div>
</form>
```
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "onePlace Templates",
"type": "oneplace-module",
"license": "BSD-3-Clause",
"version": "1.0.0",
"version": "1.0.1",
"keywords": [
"laminas",
"mvc",
Expand All @@ -24,12 +24,12 @@
},
"autoload": {
"psr-4": {
"OnePlace\\Template\\": "src/"
"OnePlace\\Templates\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"OnePlaceTest\\Template\\": "test/"
"OnePlaceTest\\Templates\\": "test/"
}
},
"scripts": {
Expand All @@ -47,7 +47,7 @@
},
"extra": {
"zf": {
"module": "OnePlace\\Template"
"module": "OnePlace\\Templates"
}
}
}
4 changes: 2 additions & 2 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @since 1.0.0
*/

namespace OnePlace\Template;
namespace OnePlace\Templates;

use Laminas\Router\Http\Literal;
use Laminas\Router\Http\Segment;
Expand All @@ -28,7 +28,7 @@
# View Settings
'view_manager' => [
'template_path_stack' => [
'template' => __DIR__ . '/../view',
'templates' => __DIR__ . '/../view',
],
],

Expand Down
Empty file added docs/book/index.md
Empty file.
4 changes: 2 additions & 2 deletions src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @since 1.0.0
*/

namespace OnePlace\Template;
namespace OnePlace\Templates;

use Laminas\Mvc\MvcEvent;
use Laminas\ModuleManager\ModuleManager;
Expand All @@ -24,7 +24,7 @@ class Module {
*
* @since 1.0.0
*/
const VERSION = '1.0.0';
const VERSION = '1.0.1';

/**
* Load module config file
Expand Down

0 comments on commit 2ac62d7

Please sign in to comment.