mohammedeisa/rating-bundle

Meisa Rating bundle

2.0 2015-02-05 14:30 UTC

This package is not auto-updated.

Last update: 2024-04-27 15:25:51 UTC


README

About the bundle

MEisaRatingBundle embeds a rating stars into any part of your application using just one line of code. Installation:

run this command:
$ composer require mohammedeisa/rating-bundle
or add this line to your composer.json
"mohammedeisa/rating-bundle": "~2.0" Add the bundle to your registered bundles:

new Meisa\RatingBundle\MeisaRatingBundle() Include these files into your template

'<link href="{{ asset('css/bootstrap.min.css')}}" rel="stylesheet">'
<link href="{{asset('css/font-awesome.min.css')}}" rel="stylesheet">
<script src="{{ asset('js/jquery.js') }}"></script>
<script src="{{ asset('js/bootstrap.min.js') }}"></script>
<link rel="stylesheet" href="{{ asset('bundles/meisarating/css/rating.css') }}"/>
*<script type="text/javascript" src="{{ asset('bundles/meisarating/js/rating.js') }}"></script>
*<script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"  type="text/javascript" ></script>
*<script src="{{ path('fos_js_routing_js', {"callback": "fos.Router.setData"}) }}"  type="text/javascript" ></script>

Import bundle configurations:

- { resource: @MeisaRatingBundle/Resources/config/config.yml } Enable the bundle routing:

meisa_rating:
    resource: "@MeisaRatingBundle/Controller/"
    type:     annotation
    prefix:   /

Usage:

{{ "rating_1"|show_rating|raw }}
change "rating_1" so that it should be unique over your application.