Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ongr-io/demo.ongr.io
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.3.0
Choose a base ref
...
head repository: ongr-io/demo.ongr.io
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 3,605 additions and 2,532 deletions.
  1. +15 −11 .gitignore
  2. +4 −3 .travis.yml
  3. +1 −1 Gulpfile.js
  4. +1 −1 LICENSE
  5. +20 −17 README.md
  6. +0 −2 app/AppCache.php
  7. +22 −10 app/AppKernel.php
  8. +708 −0 app/Resources/data/demo.json
  9. BIN {src/ONGR/DemoBundle/Resources/public → app/Resources}/images/am_exp.png
  10. BIN {src/ONGR/DemoBundle/Resources/public → app/Resources}/images/discover.png
  11. BIN {src/ONGR/DemoBundle/Resources/public → app/Resources}/images/english.jpg
  12. BIN app/Resources/images/favicon-16x16.png
  13. BIN app/Resources/images/favicon-32x32.png
  14. BIN app/Resources/images/favicon-96x96.png
  15. BIN app/Resources/images/favicon.ico
  16. BIN {src/ONGR/DemoBundle/Resources/public → app/Resources}/images/french.jpg
  17. BIN {src/ONGR/DemoBundle/Resources/public → app/Resources}/images/german.jpg
  18. BIN app/Resources/images/kochloeffelhalter_clipper_1.jpg
  19. BIN app/Resources/images/logo.png
  20. BIN {src/ONGR/DemoBundle/Resources/public → app/Resources}/images/maestro.png
  21. BIN {src/ONGR/DemoBundle/Resources/public → app/Resources}/images/mastercard.png
  22. BIN app/Resources/images/mp30_pfeffer-od.salzmhle_minimill_2_1.jpg
  23. BIN {src/ONGR/DemoBundle/Resources/public → app/Resources}/images/paypal.png
  24. BIN app/Resources/images/pfeffer-oder-salzmuehle-willi_3.jpg
  25. BIN app/Resources/images/servierbrett_set_plato_atmo_01.jpg
  26. BIN {src/ONGR/DemoBundle/Resources/public → app/Resources}/images/spanish.jpg
  27. BIN app/Resources/images/tablett_set_spun_lazy_susan_atmo_01.jpg
  28. BIN app/Resources/images/umbra_330639-560_conceal_atmo_01.jpg
  29. BIN {src/ONGR/DemoBundle/Resources/public → app/Resources}/images/visa.png
  30. BIN app/Resources/images/wanduhr_cage_hell_02.jpg
  31. BIN app/Resources/java/compiler.jar
  32. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/scripts/main.js
  33. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/common/_breadcrumb.scss
  34. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/common/_filters.scss
  35. +12 −2 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/common/_footer.scss
  36. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/common/_header.scss
  37. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/common/_minicart.scss
  38. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/common/_navbar.scss
  39. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/common/_sorting.scss
  40. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/common/_topbar.scss
  41. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/ongr.scss
  42. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/pages/_category.scss
  43. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/pages/_content.scss
  44. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/pages/_home.scss
  45. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/pages/_list.scss
  46. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/pages/_product.scss
  47. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/utils/_mixins.scss
  48. 0 {src/ONGR/DemoBundle/Resources/public → app/Resources}/style/utils/_scroll-top.scss
  49. +4 −3 {src/ONGR/DemoBundle → app}/Resources/translations/messages.en.yml
  50. +63 −42 app/Resources/views/base.html.twig
  51. +18 −0 app/Resources/views/content/show.html.twig
  52. +61 −0 app/Resources/views/default/imprint.html.twig
  53. +15 −17 src/ONGR/DemoBundle/Resources/views/home.html.twig → app/Resources/views/default/index.html.twig
  54. +72 −0 app/Resources/views/inc/footer.html.twig
  55. +5 −7 {src/ONGR/DemoBundle/Resources/views/Common → app/Resources/views/inc}/header.html.twig
  56. +47 −0 app/Resources/views/inc/minicart.html.twig
  57. +3 −6 {src/ONGR/DemoBundle/Resources/views/Common → app/Resources/views/inc}/navbar.html.twig
  58. +88 −0 app/Resources/views/inc/topbar.html.twig
  59. +12 −0 app/Resources/views/macros/breadcrumbs.html.twig
  60. +15 −0 app/Resources/views/macros/category_tree.html.twig
  61. +1 −0 {src/ONGR/DemoBundle → app}/Resources/views/macros/filters.html.twig
  62. +79 −0 app/Resources/views/product/list.html.twig
  63. +11 −0 app/Resources/views/product/search.html.twig
  64. +73 −0 app/Resources/views/product/show.html.twig
  65. +1 −1 app/autoload.php
  66. +67 −109 app/config/config.yml
  67. +7 −8 app/config/config_dev.yml
  68. +3 −1 app/config/config_prod.yml
  69. +7 −16 app/config/parameters.yml.dist
  70. +0 −18 app/config/project_defaults.yml
  71. +12 −8 app/config/routing.yml
  72. +3 −3 app/config/routing_dev.yml
  73. +14 −22 app/config/security.yml
  74. +35 −0 app/config/services.yml
  75. +3 −0 app/deploy/after-symlink.yml
  76. +0 −34 app/phpunit.xml.dist
  77. +10 −8 {app → bin}/console
  78. +143 −0 bin/symfony_requirements
  79. +1 −1 bower.json
  80. +32 −32 composer.json
  81. +864 −852 composer.lock
  82. +11 −0 deploy.yml
  83. +4 −7 package.json
  84. +18 −25 phpunit.xml.dist
  85. +7 −0 rollback.yml
  86. +9 −0 src/AppBundle/AppBundle.php
  87. +39 −0 src/AppBundle/Controller/CartController.php
  88. +19 −0 src/AppBundle/Controller/ContentController.php
  89. +29 −0 src/AppBundle/Controller/DefaultController.php
  90. +54 −0 src/AppBundle/Controller/ProductController.php
  91. +72 −0 src/AppBundle/Document/Category.php
  92. +15 −14 src/{ONGR/DemoBundle/Document/ProductReview.php → AppBundle/Document/Content.php}
  93. +64 −0 src/AppBundle/Document/Product.php
  94. +109 −0 src/AppBundle/Service/CategoryFilter.php
  95. +104 −0 src/AppBundle/Twig/BreadcrumbExtension.php
  96. +150 −0 src/AppBundle/Twig/CategoryTreeExtension.php
  97. +89 −0 src/AppBundle/Twig/ProductListExtension.php
  98. +0 −107 src/ONGR/DemoBundle/Controller/CategoryController.php
  99. +0 −54 src/ONGR/DemoBundle/Controller/ContentController.php
  100. +0 −42 src/ONGR/DemoBundle/Controller/ProductController.php
  101. +0 −32 src/ONGR/DemoBundle/Document/Category.php
  102. +0 −25 src/ONGR/DemoBundle/Document/Content.php
  103. +0 −183 src/ONGR/DemoBundle/Document/Product.php
  104. +0 −36 src/ONGR/DemoBundle/Document/ProductOrigin.php
  105. +0 −21 src/ONGR/DemoBundle/ONGRDemoBundle.php
  106. +0 −35 src/ONGR/DemoBundle/Resources/config/routing.yml
  107. +0 −103 src/ONGR/DemoBundle/Resources/data/ongr.json
  108. BIN src/ONGR/DemoBundle/Resources/public/images/logo.png
  109. +0 −10 src/ONGR/DemoBundle/Resources/views/Category/breadcrumbs.html.twig
  110. +0 −23 src/ONGR/DemoBundle/Resources/views/Category/category.html.twig
  111. +0 −12 src/ONGR/DemoBundle/Resources/views/Category/inc/categorytree.html.twig
  112. +0 −12 src/ONGR/DemoBundle/Resources/views/Category/inc/topmenu.html.twig
  113. +0 −5 src/ONGR/DemoBundle/Resources/views/Category/tree.html.twig
  114. +0 −105 src/ONGR/DemoBundle/Resources/views/Common/footer.html.twig
  115. +0 −37 src/ONGR/DemoBundle/Resources/views/Common/minicart.html.twig
  116. +0 −88 src/ONGR/DemoBundle/Resources/views/Common/topbar.html.twig
  117. +0 −3 src/ONGR/DemoBundle/Resources/views/Content/link.html.twig
  118. +0 −30 src/ONGR/DemoBundle/Resources/views/Content/page.html.twig
  119. +0 −1 src/ONGR/DemoBundle/Resources/views/Content/snippet.html.twig
  120. +0 −10 src/ONGR/DemoBundle/Resources/views/Product/breadcrumbs.html.twig
  121. +0 −78 src/ONGR/DemoBundle/Resources/views/Product/list.html.twig
  122. +0 −71 src/ONGR/DemoBundle/Resources/views/Product/product.html.twig
  123. +0 −32 src/ONGR/DemoBundle/Resources/views/Product/search.html.twig
  124. +0 −23 src/ONGR/DemoBundle/Resources/views/layout.html.twig
  125. +17 −0 tests/AppBundle/Controller/DefaultControllerTest.php
  126. +100 −43 {app → var}/SymfonyRequirements.php
  127. 0 {app → var}/cache/.gitkeep
  128. 0 {app → var}/logs/.gitkeep
  129. 0 var/sessions/.gitkeep
  130. +20 −4 web/.htaccess
  131. +17 −3 web/app.php
  132. +13 −11 web/app_dev.php
  133. +93 −12 web/config.php
  134. BIN web/favicon.ico
26 changes: 15 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
# Composer
/vendor/
/bin/*

# Symfony directories
/phpunit.xml
/app/bootstrap.php.cache
/app/config/parameters.yml
/app/cache/*
/app/logs/*
/app/check.php
/build/
/phpunit.xml
/var/*
!/var/cache
/var/cache/*
!var/cache/.gitkeep
!/var/logs
/var/logs/*
!var/logs/.gitkeep
!/var/sessions
/var/sessions/*
!var/sessions/.gitkeep
!var/SymfonyRequirements.php
/vendor/
/web/bundles/
/web/css/
/web/js/
/web/images/
/web/fonts/

/bower_components/
/node_modules
/node_modules
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -15,12 +15,13 @@ install:
- npm install
- npm link
before_script:
- app/console ongr:es:index:create
- app/console ongr:es:index:import --raw src/ONGR/DemoBundle/Resources/data/ongr.json
- bin/console ongr:es:index:create
- bin/console ongr:es:index:import app/Resources/data/demo.json
- php -S localhost:8000 web/app_dev.php &
- sleep 3
script:
- bin/phpcs -p --standard=PSR2 --extensions=php ./src
- vendor/bin/phpunit
- vendor/bin/phpcs -p --standard=PSR2 --extensions=php ./src
notifications:
webhooks:
urls:
2 changes: 1 addition & 1 deletion Gulpfile.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ var concat = require('gulp-concat');
var uglify = require('gulp-uglify');

var dir = {
assets: './src/ONGR/DemoBundle/Resources/public/',
assets: './app/Resources/',
dist: './web/',
bower: './bower_components/',
bootstrapJS: './bower_components/bootstrap-sass/assets/javascripts/bootstrap/'
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014-2015 NFQ Technologies UAB
Copyright (c) 2014-2016 NFQ Technologies UAB

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
37 changes: 20 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
# Demo of ONGR bundles
# Demo app of the ONGR bundles

This is the showcase of how can be used the ONGR bundles.
Demo app will show you how the ONGR bundles could be used in particular project. Depending on what you want:
- Just to see it in action - please do a _Very quick setup_.
- Get a hands-on experience from development side - please proceed with a _Quick setup for development_.

> WARNING: `master` branch is for development, if you want to try out a stable version we recommend to use a latest tagged version.
**WARNING**: Please keep in mind, that the `master` branch is for development. And if you want to try a stable version - we recommend you to use a latest tagged version.

If you have any questions, don't hesitate to ask them on [![Join the chat at https://gitter.im/ongr-io/support](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ongr-io/support?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
chat, or just come to say Hi ;).
If you will need any help or have any questions, don't hesitate to ask on [![Join the chat at https://gitter.im/ongr-io/support](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ongr-io/support?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) chat, or just come to say Hi ;).

## Very quick setup

## Quick setup
* Step 1: Install [Kitematic from Docker](https://kitematic.com).
* Step 2: Open [Kitematic from Docker](https://kitematic.com) and search for the `ongr/demo-presentation`. When you found it, press `CREATE`.
* Step 3: When this is finished, just click on the `Web Preview` link in the right side.

## Quick setup for the development

This example is based on [Symfony framework](https://github.com/symfony/symfony-standard) project by using ONGR bundles.
So if you want to use ONGR bundles we assume that you know how to work with [Symfony](https://github.com/symfony/symfony) framework.

To run this demo you gonna need:
* PHP >=5.5
* Elasticsearch
* **Linux/Unix** based environment or **OS X**. Sorry, currently we do not support Microsoft Windows as a development environment, but this might change in the future. For now you could try it with a _Very quick setup_ guide.

If you have you own development env got straight to the [Step 4](#step-4) to install assets and demo data.
If you already have your own development environment, you can go straight to the [Step 4](#step-4) to install assets and demo data.

In case you don't have an environment we have a [Vagrant](https://www.vagrantup.com) box configuration in the [testing-vm repository](https://github.com/ongr-io/testing-vm).

> We do not support Microsoft Windows as a development environment. This might change in the future but for now you either need **Linux/Unix** based environment or **OS X**.
In case you don't have an environment, we have a [Vagrant](https://www.vagrantup.com) box configuration in the [testing-vm repository](https://github.com/ongr-io/testing-vm).

### Step 1

@@ -33,9 +38,7 @@ git clone https://github.com/ongr-io/testing-vm.git ongr

### Step 2

Provision your new box.

> First time it will take about 5-15 min (depending on your internet connection).
Provision your new box. At the first time it might take about 5-15 min (depending on your internet connection).

```bash
cd ongr
@@ -52,7 +55,7 @@ git clone https://github.com/ongr-io/Demo.git public
vagrant ssh
```

> WARNING: Do not change `public` folder name, it's hardcoded vhost location in the [testing-vm](https://github.com/ongr-io/testing-vm)
**WARNING**: Do not change `public` folder name, it's hardcoded vhost location in the [testing-vm](https://github.com/ongr-io/testing-vm)

### Step 4

@@ -63,12 +66,12 @@ composer install --no-interaction
npm install
bower install
gulp
app/console ongr:es:index:create
app/console ongr:es:index:import --raw src/ONGR/DemoBundle/Resources/data/ongr.json
bin/console ongr:es:index:create
bin/console ongr:es:index:import app/Resources/data/demo.json
```

### Step 5

Navigate your browser to the http://ongr.dev

> Make sure you have correct host definition in the `/etc/hosts`. ongr.dev is our host example from [testing-vm](https://github.com/ongr-io/testing-vm)
**NOTE**: Please make sure that your host definition in the `/etc/hosts` is correct. _ongr.dev_ is our host example from [testing-vm](https://github.com/ongr-io/testing-vm)
2 changes: 0 additions & 2 deletions app/AppCache.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

require_once __DIR__.'/AppKernel.php';

use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;

class AppCache extends HttpCache
32 changes: 22 additions & 10 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
@@ -7,27 +7,24 @@ class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
$bundles = [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),

//Third party
new ONGR\DemoBundle\ONGRDemoBundle(),
new ONGR\ElasticsearchBundle\ONGRElasticsearchBundle(),
new ONGR\RouterBundle\ONGRRouterBundle(),
new ONGR\FilterManagerBundle\ONGRFilterManagerBundle(),
new ONGR\ContentBundle\ONGRContentBundle(),
new ONGR\RouterBundle\ONGRRouterBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
new ONGR\ApiBundle\ONGRApiBundle(),
);
new AppBundle\AppBundle(),
];

if (in_array($this->getEnvironment(), array('dev', 'test'))) {
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
@@ -36,8 +33,23 @@ public function registerBundles()
return $bundles;
}

public function getRootDir()
{
return __DIR__;
}

public function getCacheDir()
{
return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
}

public function getLogDir()
{
return dirname(__DIR__).'/var/logs';
}

public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
}
}
Loading