Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andchir/shopkeeper4-comments
Reviews and ratings for Symfony4
https://github.com/andchir/shopkeeper4-comments
comments rating reviews shopkeeper4 symfony-bundle symfony4
Last synced: 13 days ago
JSON representation
Reviews and ratings for Symfony4
- Host: GitHub
- URL: https://github.com/andchir/shopkeeper4-comments
- Owner: andchir
- License: mit
- Created: 2019-11-17T21:09:29.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T22:50:29.000Z (about 2 years ago)
- Last Synced: 2024-11-24T16:26:27.920Z (about 1 month ago)
- Topics: comments, rating, reviews, shopkeeper4, symfony-bundle, symfony4
- Language: Twig
- Homepage:
- Size: 14.1 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.txt
- License: LICENSE
Awesome Lists containing this project
README
# Reviews and ratings for Symfony4
![Comments - screenshot #1](https://github.com/andchir/shopkeeper4-comments/blob/master/Resources/docs/screenshots/screenshot001.png?raw=true "Comments - screenshot #1")
Can be used in Shopkeeper4 and in other applications using Symfony 4. Used DoctrineMongoDBBundle 4+.
## Installing
~~~
composer config extra.symfony.allow-contrib true
~~~
~~~
composer require andchir/shopkeeper4-comments
~~~Create classes for your entities using ``Andchir\CommentsBundle\Document\CommentAbstract`` and ``Andchir\CommentsBundle\Repository\CommentRepositoryInterface``
or use these examples:
~~~
vendor/andchir/shopkeeper4-comments/Document/Comment.php.dist
vendor/andchir/shopkeeper4-comments/Repository/CommentRepository.php.dist
~~~Add to your twig template:
~~~
{% block stylesheets -%}
{{ parent() }}
{% endblock -%}
~~~
Your block name may vary.~~~
{% include '@Comments/Default/async.html.twig' with {'threadId': currentCategory.contentTypeName ~ '_' ~ currentId} only %}
~~~## Installing component for [Shopker](https://github.com/andchir/shopker)
Add to config/resources/admin_menu.yaml
~~~
- { title: 'COMMENTS', route: '/module/comments', icon: 'icon-message-circle' }
~~~Open "src/App/Repository/CommentRepository.php"
and replace
~~~
class CommentRepository extends DocumentRepository implements CommentRepositoryInterface
~~~
to:
~~~
class CommentRepository extends BaseRepository implements CommentRepositoryInterface
~~~## Manual installing
composer.json
~~~
"autoload": {
"psr-4": {
...
"Andchir\\CommentsBundle\\": "vendor/andchir/shopkeeper4-comments/"
}
},
~~~config/bundles.php
~~~
Andchir\CommentsBundle\CommentsBundle::class => ['all' => true]
~~~## Development
Create symlink:
~~~
ln -s /path/to/vendor/andchir/shopkeeper4-comments/frontend/projects/comments/src/app \
/path/to/frontend/projects/admin2/src/app/comments
~~~Build for development mode:
~~~
ng build comments --optimization false --build-optimizer false --source-map true \
--baseHref="/admin/module/comments/" \
--deployUrl="/bundles/comments/admin/bundle-dev/" \
--outputPath="../public/bundles/comments/admin/bundle-dev" --watch=true
~~~Build for production:
~~~
ng build comments --configuration production --baseHref="/admin/module/comments/" \
--deployUrl="/bundles/comments/admin/bundle/" \
--outputPath="../public/bundles/comments/admin/bundle"
~~~