Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pasdeloup committed May 18, 2016
0 parents commit f7ae6c5
Show file tree
Hide file tree
Showing 71 changed files with 9,077 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/web/bundles/
/web/assetic/
/web/css/
/web/images/
/web/js/
/app/bootstrap.php.cache
/app/cache/*
/app/config/parameters.yml
/app/logs/*
!app/cache/.gitkeep
!app/logs/.gitkeep
/app/phpunit.xml
/build/
/vendor/
/bin/
/composer.phar
/components/
/.idea
*.php~
19 changes: 19 additions & 0 deletions LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2016 Sedona

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
122 changes: 122 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
Sedona Back Office
==================

Installation
------------

### Requirements

- Symfony 2.7


### Step 1: Download the Bundle

Open a command console, enter your project directory and execute the
following command to download the latest stable version of this bundle:

```bash
$ composer require "sedona/sbo" "~1"
```

This command requires you to have Composer installed globally, as explained
in the [installation chapter](https://getcomposer.org/doc/00-intro.md)
of the Composer documentation.

### Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles
in the `app/AppKernel.php` file of your project, if you don't use them
already, you also need to add a few more bundles:

```php
<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...

new FOS\JsRoutingBundle\FOSJsRoutingBundle(),

new JMS\DiExtraBundle\JMSDiExtraBundle($this),
new JMS\AopBundle\JMSAopBundle(),

new Sg\DatatablesBundle\SgDatatablesBundle(),
new Avanzu\AdminThemeBundle\AvanzuAdminThemeBundle(),

new Sedona\SBORuntimeBundle\SedonaSBORuntimeBundle(),
);

if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
// ...
$bundles[] = new Sedona\SBOGeneratorBundle\SedonaSBOGeneratorBundle();
}
// ...
}

// ...
}
```

### Step 3: Create a base layout

Create a template app/Resources/views/layout_admin.html.twig

```
{% extends 'SedonaSBORuntimeBundle:layout:base-layout.html.twig' %}
{% block avanzu_logo %}
<a href="{{ path('admin_home') }}" class="logo">
<img src="{{ asset('bundles/sedonasboadmintheme/images/sedona-logo.png') }}"/> Test SBO
</a>
{% endblock %}
{% block title %}Administration{% endblock %}
{% block page_title %}Administration{% endblock %}
{% block page_subtitle %}Administration area{% endblock %}
```

### Step 4: Add some basic configuration

Add in routing.yml

admin:
resource: "@AppBundle/Controller/Admin"
type: annotation
prefix: /admin

fos_js_routing:
resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"


Add in config.yml

jms_di_extra:
locations:
all_bundles: false
bundles: [SedonaSBOTestBundle]
directories: ["%kernel.root_dir%/../src"]


And activate translation in it by uncommenting

translator: { fallback: "%locale%" }


Generator usage
---------------

php app/console sbo:generate:crud --entity SedonaSBOTestBundle:Track --with-write --overwrite

To be working, each Entity should have its __toString() method declared.

Association fields OneToMany are created but commented by default:

* in datatable: before uncommenting, the column name should be changed (entity.name by default)
* in form: only entities with few lines should be uncommented, for long datas, should be replaced by a select2



38 changes: 38 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "sedona/sbo",
"type": "library",
"description": "Sedona Back-Office bundles",
"license": "MIT",
"authors": [
{
"name": "Sedona",
"email": "contact@sedona.fr"
}
],
"autoload": {
"psr-4": {
"": "src/"
}
},
"require": {
"php": ">=5.3.9",

"doctrine/orm" : "^2.4.8",
"doctrine/doctrine-bundle" : "~1.4",
"twig/extensions" : "^1.3",
"symfony/symfony" : "~2.7",
"symfony/assetic-bundle" : "~2.3",

"symfony/monolog-bundle" : "~2.4",
"friendsofsymfony/jsrouting-bundle" : "^1.5",
"jms/di-extra-bundle" : "~1.5",
"Trsteel/ckeditor-bundle" : "~1.8",
"helios-ag/fm-elfinder-bundle" : "~5.0",
"datatables/datatables" : "^1.10",
"moment/moment" : "^2.10",
"knplabs/knp-menu-bundle" : "~2.0",
"knplabs/knp-paginator-bundle" : "~2.4",
"avanzu/admin-theme-bundle" : "~1.3",
"sg/datatablesbundle" : "^0.10.0"
}
}
Loading

0 comments on commit f7ae6c5

Please sign in to comment.