diff --git a/app/AppKernel.php b/app/AppKernel.php index 954fe08..9a7c2fb 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -24,6 +24,7 @@ class AppKernel extends Kernel new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(), new Io\TcpdfBundle\IoTcpdfBundle(), new FOS\JsRoutingBundle\FOSJsRoutingBundle(), + new Jmikola\JsAssetsHelperBundle\JmikolaJsAssetsHelperBundle(), // Own bundles new KekRozsak\FrontBundle\KekRozsakFrontBundle(), new KekRozsak\SecurityBundle\KekRozsakSecurityBundle(), diff --git a/app/Resources/TwigBundle/views/Exception/error404.html.twig b/app/Resources/TwigBundle/views/Exception/error404.html.twig new file mode 100644 index 0000000..6cdd7d9 --- /dev/null +++ b/app/Resources/TwigBundle/views/Exception/error404.html.twig @@ -0,0 +1,14 @@ +{% extends 'KekRozsakFrontBundle:Default:main_template.html.twig' %} + +{% block content %} +
+{% spaceless %} + A keresett oldal nem létezik. Válassz valamit a menüből +{% if app.user %} + vagy kattints a bal felső sarokban a nevedre a további lehetőségekért +{% endif %} + ! +{% endspaceless %} +
+{% endblock content %} diff --git a/app/config/config.yml b/app/config/config.yml index efd25ec..86cdcf9 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -8,6 +8,9 @@ jms_di_extra: bundles: [ KekRozsakFrontBundle, KekRozsakSecurityBundle ] directories: [ "%kernel.root_dir%/../src" ] +jmikola_js_assets_helper: + packages_to_expose: [ KekRozsakFrontBundle ] + framework: #esi: ~ #translator: { fallback: %locale% } @@ -17,7 +20,10 @@ framework: form: true csrf_protection: true validation: { enable_annotations: true } - templating: { engines: ['twig'] } #assets_version: SomeVersionScheme + templating: + engines: ['twig'] + packages: + KekRozsakFrontBundle: ~ default_locale: %locale% trust_proxy_headers: false # Should Request object should trust proxy headers (X_FORWARDED_FOR/HTTP_CLIENT_IP) session: ~ diff --git a/app/config/routing.yml b/app/config/routing.yml index 72fbf89..05c5cf2 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -1,6 +1,9 @@ fos_js_routing: resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml" +jmikola_js_assets_helper_routing: + resource: "@JmikolaJsAssetsHelperBundle/Resources/config/routing/routing.xml" + KekRozsakAdminBundle: resource: "@KekRozsakAdminBundle/Controller/" type: annotation diff --git a/composer.json b/composer.json index 5284ead..14b67e9 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,7 @@ "doctrine/doctrine-migrations-bundle": "dev-master", "egeloen/ckeditor-bundle": "dev-master", "friendsofsymfony/jsrouting-bundle": "dev-master", + "jmikola/js-assets-helper-bundle": "dev-master", "gergelypolonkai/tcpdfbundle": "dev-master" }, "scripts": { diff --git a/src/KekRozsak/FrontBundle/Resources/public/images/penta-blue-24.png b/src/KekRozsak/FrontBundle/Resources/public/images/penta-blue-24.png new file mode 100644 index 0000000..53c5a92 Binary files /dev/null and b/src/KekRozsak/FrontBundle/Resources/public/images/penta-blue-24.png differ diff --git a/src/KekRozsak/FrontBundle/Resources/public/images/penta-yellow-24.png b/src/KekRozsak/FrontBundle/Resources/public/images/penta-yellow-24.png new file mode 100644 index 0000000..542586a Binary files /dev/null and b/src/KekRozsak/FrontBundle/Resources/public/images/penta-yellow-24.png differ diff --git a/src/KekRozsak/FrontBundle/Resources/public/js/forum.js b/src/KekRozsak/FrontBundle/Resources/public/js/forum.js index e4b9a86..4c6118e 100644 --- a/src/KekRozsak/FrontBundle/Resources/public/js/forum.js +++ b/src/KekRozsak/FrontBundle/Resources/public/js/forum.js @@ -24,7 +24,8 @@ function favouriteOn() type: 'GET', url: url }).done(function() { - elem.html('[Kedvenc ikon]'); + elem.find('img').attr('alt', '[Kedvenc]'); + elem.find('img').attr('src', AssetsHelper.getURL('bundles/kekrozsakfront/images/penta-yellow-24.png')); elem.removeClass('favourite-topic-button'); elem.addClass('unfavourite-topic-button'); elem.attr('id', 'unfavourite-topic-button-' + topicSlug); @@ -58,7 +59,8 @@ function favouriteOff() type: 'GET', url: url }).done(function() { - elem.html('[Nem kedvenc ikon]'); + elem.find('img').attr('alt', '[Nem kedvenc]'); + elem.find('img').attr('src', AssetsHelper.getUrl('/bundles/kekrozsakfront/images/penta-blue-24.png')); elem.removeClass('unfavourite-topic-button'); elem.addClass('favourite-topic-button'); elem.attr('id', 'favourite-topic-button-' + topicSlug); diff --git a/src/KekRozsak/FrontBundle/Resources/views/Default/main_template.html.twig b/src/KekRozsak/FrontBundle/Resources/views/Default/main_template.html.twig index a7af022..370fa57 100644 --- a/src/KekRozsak/FrontBundle/Resources/views/Default/main_template.html.twig +++ b/src/KekRozsak/FrontBundle/Resources/views/Default/main_template.html.twig @@ -17,6 +17,8 @@ + + {% javascripts 'bundles/kekrozsakfront/js/*' output='js/kekrozsak.js' %} {% endjavascripts %} diff --git a/src/KekRozsak/FrontBundle/Resources/views/Forum/postList.html.twig b/src/KekRozsak/FrontBundle/Resources/views/Forum/postList.html.twig index 646e141..c215648 100644 --- a/src/KekRozsak/FrontBundle/Resources/views/Forum/postList.html.twig +++ b/src/KekRozsak/FrontBundle/Resources/views/Forum/postList.html.twig @@ -5,9 +5,9 @@ {% block content %}