From ad4d1caa9e744af57ca58a4e57576533eb682d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 23 Jan 2015 16:28:37 +0100 Subject: [PATCH] move WallabagBundle into Wallabag:CoreBundle --- app/AppKernel.php | 2 +- app/config/routing.yml | 4 ++-- .../Controller/EntryController.php | 22 +++++++++---------- .../Controller/StaticController.php | 4 ++-- .../WallabagCoreExtension.php} | 6 ++--- .../CoreBundle}/Entity/Config.php | 2 +- .../CoreBundle}/Entity/Config.php~ | 0 .../CoreBundle}/Entity/Entries.php | 4 ++-- .../CoreBundle}/Entity/Entries.php~ | 0 .../CoreBundle}/Entity/Entry.php~ | 0 .../CoreBundle}/Entity/Tags.php | 2 +- .../CoreBundle}/Entity/Tags.php~ | 0 .../CoreBundle}/Entity/TagsEntries.php | 2 +- .../CoreBundle}/Entity/TagsEntries.php~ | 0 .../CoreBundle}/Entity/Users.php | 2 +- .../CoreBundle}/Entity/Users.php~ | 0 .../CoreBundle}/Entity/UsersConfig.php | 2 +- .../CoreBundle}/Entity/UsersConfig.php~ | 0 .../Repository/EntriesRepository.php | 2 +- .../CoreBundle/Resources/config/routing.yml | 3 +++ .../CoreBundle}/Resources/config/services.xml | 7 +++++- .../Resources/views/Entry/entries.html.twig | 4 ++-- .../Resources/views/Entry/entry.html.twig | 10 ++++----- .../Resources/views/Entry/new.html.twig | 4 ++-- .../Resources/views/Static/about.html.twig | 4 ++-- .../Resources/views/_bookmarklet.html.twig | 0 .../Resources/views/_footer.html.twig | 0 .../Resources/views/_head.html.twig | 0 .../Resources/views/_menu.html.twig | 8 +++---- .../Resources/views/_messages.html.twig | 0 .../Resources/views/_save_form.html.twig | 0 .../Resources/views/_search_form.html.twig | 0 .../Resources/views/_top.html.twig | 0 .../Resources/views/layout.html.twig | 8 +++---- .../Controller/DefaultControllerTest.php | 2 +- .../Twig/Extension/WallabagExtension.php | 2 +- .../CoreBundle/WallabagCoreBundle.php | 9 ++++++++ src/Wallabag/Wallabag/Database.php | 2 +- .../Resources/config/routing.yml | 3 --- src/WallabagBundle/WallabagBundle.php | 9 -------- 40 files changed, 67 insertions(+), 62 deletions(-) rename src/{WallabagBundle => Wallabag/CoreBundle}/Controller/EntryController.php (90%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Controller/StaticController.php (77%) rename src/{WallabagBundle/DependencyInjection/WallabagExtension.php => Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php} (79%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Entity/Config.php (97%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Entity/Config.php~ (100%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Entity/Entries.php (96%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Entity/Entries.php~ (100%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Entity/Entry.php~ (100%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Entity/Tags.php (95%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Entity/Tags.php~ (100%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Entity/TagsEntries.php (97%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Entity/TagsEntries.php~ (100%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Entity/Users.php (98%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Entity/Users.php~ (100%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Entity/UsersConfig.php (97%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Entity/UsersConfig.php~ (100%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Repository/EntriesRepository.php (97%) create mode 100644 src/Wallabag/CoreBundle/Resources/config/routing.yml rename src/{WallabagBundle => Wallabag/CoreBundle}/Resources/config/services.xml (75%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Resources/views/Entry/entries.html.twig (96%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Resources/views/Entry/entry.html.twig (92%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Resources/views/Entry/new.html.twig (54%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Resources/views/Static/about.html.twig (95%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Resources/views/_bookmarklet.html.twig (100%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Resources/views/_footer.html.twig (100%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Resources/views/_head.html.twig (100%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Resources/views/_menu.html.twig (66%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Resources/views/_messages.html.twig (100%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Resources/views/_save_form.html.twig (100%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Resources/views/_search_form.html.twig (100%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Resources/views/_top.html.twig (100%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Resources/views/layout.html.twig (80%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Tests/Controller/DefaultControllerTest.php (89%) rename src/{WallabagBundle => Wallabag/CoreBundle}/Twig/Extension/WallabagExtension.php (94%) create mode 100644 src/Wallabag/CoreBundle/WallabagCoreBundle.php delete mode 100644 src/WallabagBundle/Resources/config/routing.yml delete mode 100644 src/WallabagBundle/WallabagBundle.php diff --git a/app/AppKernel.php b/app/AppKernel.php index 5d159df8c..b0a66dadd 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -17,7 +17,7 @@ class AppKernel extends Kernel new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new AppBundle\AppBundle(), - new WallabagBundle\WallabagBundle(), + new Wallabag\CoreBundle\WallabagCoreBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { diff --git a/app/config/routing.yml b/app/config/routing.yml index d0ece8e30..b3c5291a8 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -1,7 +1,7 @@ app: - resource: @WallabagBundle/Controller/ + resource: @WallabagCoreBundle/Controller/ type: annotation homepage: pattern: / - defaults: { _controller: WallabagBundle:Entry:showUnread } \ No newline at end of file + defaults: { _controller: CoreBundle:Entry:showUnread } \ No newline at end of file diff --git a/src/WallabagBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php similarity index 90% rename from src/WallabagBundle/Controller/EntryController.php rename to src/Wallabag/CoreBundle/Controller/EntryController.php index dc1876fac..2ebb416c6 100644 --- a/src/WallabagBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -1,12 +1,12 @@ redirect($this->generateUrl('homepage')); } - return $this->render('WallabagBundle:Entry:new.html.twig', array( + return $this->render('WallabagCoreBundle:Entry:new.html.twig', array( 'form' => $form->createView(), )); } @@ -60,11 +60,11 @@ class EntryController extends Controller */ public function showUnreadAction() { - $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries'); + $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entries'); $entries = $repository->findUnreadByUser(1, 0); return $this->render( - 'WallabagBundle:Entry:entries.html.twig', + 'WallabagCoreBundle:Entry:entries.html.twig', array('entries' => $entries) ); } @@ -77,11 +77,11 @@ class EntryController extends Controller */ public function showArchiveAction() { - $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries'); + $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entries'); $entries = $repository->findArchiveByUser(1, 0); return $this->render( - 'WallabagBundle:Entry:entries.html.twig', + 'WallabagCoreBundle:Entry:entries.html.twig', array('entries' => $entries) ); } @@ -94,11 +94,11 @@ class EntryController extends Controller */ public function showStarredAction() { - $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries'); + $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entries'); $entries = $repository->findStarredByUser(1, 0); return $this->render( - 'WallabagBundle:Entry:entries.html.twig', + 'WallabagCoreBundle:Entry:entries.html.twig', array('entries' => $entries) ); } @@ -113,7 +113,7 @@ class EntryController extends Controller public function viewAction(Entries $entry) { return $this->render( - 'WallabagBundle:Entry:entry.html.twig', + 'WallabagCoreBundle:Entry:entry.html.twig', array('entry' => $entry) ); } diff --git a/src/WallabagBundle/Controller/StaticController.php b/src/Wallabag/CoreBundle/Controller/StaticController.php similarity index 77% rename from src/WallabagBundle/Controller/StaticController.php rename to src/Wallabag/CoreBundle/Controller/StaticController.php index aee2bb7ea..0fd19d652 100644 --- a/src/WallabagBundle/Controller/StaticController.php +++ b/src/Wallabag/CoreBundle/Controller/StaticController.php @@ -1,6 +1,6 @@ render( - 'WallabagBundle:Static:about.html.twig', + 'WallabagCoreBundle:Static:about.html.twig', array() ); } diff --git a/src/WallabagBundle/DependencyInjection/WallabagExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php similarity index 79% rename from src/WallabagBundle/DependencyInjection/WallabagExtension.php rename to src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php index cfdb21fc8..7cc4165ef 100644 --- a/src/WallabagBundle/DependencyInjection/WallabagExtension.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php @@ -1,13 +1,13 @@ - + + + + + + diff --git a/src/WallabagBundle/Resources/views/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig similarity index 96% rename from src/WallabagBundle/Resources/views/Entry/entries.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig index de343aa22..2f8423d78 100644 --- a/src/WallabagBundle/Resources/views/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig @@ -1,9 +1,9 @@ -{% extends "WallabagBundle::layout.html.twig" %} +{% extends "WallabagCoreBundle::layout.html.twig" %} {% block title "Unread" %} {% block menu %} - {% include "WallabagBundle::_menu.html.twig" %} + {% include "WallabagCoreBundle::_menu.html.twig" %} {% endblock %} {% block content %} diff --git a/src/WallabagBundle/Resources/views/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/entry.html.twig similarity index 92% rename from src/WallabagBundle/Resources/views/Entry/entry.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Entry/entry.html.twig index 8c08b2ef0..78dfa7c0a 100644 --- a/src/WallabagBundle/Resources/views/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/entry.html.twig @@ -1,9 +1,9 @@ -{% extends "WallabagBundle::layout.html.twig" %} +{% extends "WallabagCoreBundle::layout.html.twig" %} {% block title %}{{ entry.title|raw }} ({{ entry.url | e | domainName }}){% endblock %} {% block menu %} - {% include "WallabagBundle::_menu.html.twig" %} + {% include "WallabagCoreBundle::_menu.html.twig" %} {% endblock %} {% block content %} @@ -21,9 +21,9 @@ {# {% if flattr %}{% if flattr.status == flattrable %}
  • {% trans %}flattr{% endtrans %}
  • {% elseif flattr.status == flattred %}
  • Carrot
  • {% endif %} {% if show_printlink %}
  • {% trans %}Print{% endtrans %}
  • {% endif %} - {% if export_epub %}
  • EPUB
  • {% endif %} - {% if export_mobi %}
  • MOBI
  • {% endif %} - {% if export_pdf %}
  • PDF
  • {% endif %} + {% if export_epub %}
  • EPUB
  • {% endif %} + {% if export_mobi %}
  • MOBI
  • {% endif %} + {% if export_pdf %}
  • PDF
  • {% endif %}
  • {% trans %}Does this article appear wrong?{% endtrans %}
  • diff --git a/src/WallabagBundle/Resources/views/Entry/new.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/new.html.twig similarity index 54% rename from src/WallabagBundle/Resources/views/Entry/new.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Entry/new.html.twig index 78da791f8..df6926a0f 100644 --- a/src/WallabagBundle/Resources/views/Entry/new.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/new.html.twig @@ -1,9 +1,9 @@ -{% extends "WallabagBundle::layout.html.twig" %} +{% extends "WallabagCoreBundle::layout.html.twig" %} {% block title %}{% trans %}Save new entry{% endtrans %}{% endblock %} {% block menu %} - {% include "WallabagBundle::_menu.html.twig" %} + {% include "WallabagCoreBundle::_menu.html.twig" %} {% endblock %} {% block content %} diff --git a/src/WallabagBundle/Resources/views/Static/about.html.twig b/src/Wallabag/CoreBundle/Resources/views/Static/about.html.twig similarity index 95% rename from src/WallabagBundle/Resources/views/Static/about.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Static/about.html.twig index 752526e11..0585eccab 100755 --- a/src/WallabagBundle/Resources/views/Static/about.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Static/about.html.twig @@ -1,8 +1,8 @@ -{% extends "WallabagBundle::layout.html.twig" %} +{% extends "WallabagCoreBundle::layout.html.twig" %} {% block title %}{% trans %}About{% endtrans %}{% endblock %} {% block menu %} -{% include "WallabagBundle::_menu.html.twig" %} +{% include "WallabagCoreBundle::_menu.html.twig" %} {% endblock %} {% block content %}

    {% trans %}About wallabag{% endtrans %}

    diff --git a/src/WallabagBundle/Resources/views/_bookmarklet.html.twig b/src/Wallabag/CoreBundle/Resources/views/_bookmarklet.html.twig similarity index 100% rename from src/WallabagBundle/Resources/views/_bookmarklet.html.twig rename to src/Wallabag/CoreBundle/Resources/views/_bookmarklet.html.twig diff --git a/src/WallabagBundle/Resources/views/_footer.html.twig b/src/Wallabag/CoreBundle/Resources/views/_footer.html.twig similarity index 100% rename from src/WallabagBundle/Resources/views/_footer.html.twig rename to src/Wallabag/CoreBundle/Resources/views/_footer.html.twig diff --git a/src/WallabagBundle/Resources/views/_head.html.twig b/src/Wallabag/CoreBundle/Resources/views/_head.html.twig similarity index 100% rename from src/WallabagBundle/Resources/views/_head.html.twig rename to src/Wallabag/CoreBundle/Resources/views/_head.html.twig diff --git a/src/WallabagBundle/Resources/views/_menu.html.twig b/src/Wallabag/CoreBundle/Resources/views/_menu.html.twig similarity index 66% rename from src/WallabagBundle/Resources/views/_menu.html.twig rename to src/Wallabag/CoreBundle/Resources/views/_menu.html.twig index 419a676b9..d4560e84b 100644 --- a/src/WallabagBundle/Resources/views/_menu.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/_menu.html.twig @@ -3,13 +3,13 @@
  • {% trans %}unread{% endtrans %}
  • {% trans %}favorites{% endtrans %}
  • {% trans %}archive{% endtrans %}
  • -
  • {% trans %}tags{% endtrans %}
  • +
  • {% trans %}tags{% endtrans %}
  • {% trans %}save a link{% endtrans %}
  • {% trans %}search{% endtrans %} - {% include "WallabagBundle::_search_form.html.twig" %} + {% include "WallabagCoreBundle::_search_form.html.twig" %}
  • -
  • {% trans %}config{% endtrans %}
  • +
  • {% trans %}config{% endtrans %}
  • {% trans %}about{% endtrans %}
  • -
  • {% trans %}logout{% endtrans %}
  • +
  • {% trans %}logout{% endtrans %}
  • diff --git a/src/WallabagBundle/Resources/views/_messages.html.twig b/src/Wallabag/CoreBundle/Resources/views/_messages.html.twig similarity index 100% rename from src/WallabagBundle/Resources/views/_messages.html.twig rename to src/Wallabag/CoreBundle/Resources/views/_messages.html.twig diff --git a/src/WallabagBundle/Resources/views/_save_form.html.twig b/src/Wallabag/CoreBundle/Resources/views/_save_form.html.twig similarity index 100% rename from src/WallabagBundle/Resources/views/_save_form.html.twig rename to src/Wallabag/CoreBundle/Resources/views/_save_form.html.twig diff --git a/src/WallabagBundle/Resources/views/_search_form.html.twig b/src/Wallabag/CoreBundle/Resources/views/_search_form.html.twig similarity index 100% rename from src/WallabagBundle/Resources/views/_search_form.html.twig rename to src/Wallabag/CoreBundle/Resources/views/_search_form.html.twig diff --git a/src/WallabagBundle/Resources/views/_top.html.twig b/src/Wallabag/CoreBundle/Resources/views/_top.html.twig similarity index 100% rename from src/WallabagBundle/Resources/views/_top.html.twig rename to src/Wallabag/CoreBundle/Resources/views/_top.html.twig diff --git a/src/WallabagBundle/Resources/views/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/layout.html.twig similarity index 80% rename from src/WallabagBundle/Resources/views/layout.html.twig rename to src/Wallabag/CoreBundle/Resources/views/layout.html.twig index 34d9b1b0c..83830a4ae 100644 --- a/src/WallabagBundle/Resources/views/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/layout.html.twig @@ -11,11 +11,11 @@ {% block title %}{% endblock %} - wallabag - {% include "WallabagBundle::_head.html.twig" %} - {% include "WallabagBundle::_bookmarklet.html.twig" %} + {% include "WallabagCoreBundle::_head.html.twig" %} + {% include "WallabagCoreBundle::_bookmarklet.html.twig" %} -{% include "WallabagBundle::_top.html.twig" %} +{% include "WallabagCoreBundle::_top.html.twig" %}
    {% block menu %}{% endblock %} {% block precontent %}{% endblock %} @@ -28,6 +28,6 @@ {% block content %}{% endblock %}
    -{% include "WallabagBundle::_footer.html.twig" %} +{% include "WallabagCoreBundle::_footer.html.twig" %} \ No newline at end of file diff --git a/src/WallabagBundle/Tests/Controller/DefaultControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/DefaultControllerTest.php similarity index 89% rename from src/WallabagBundle/Tests/Controller/DefaultControllerTest.php rename to src/Wallabag/CoreBundle/Tests/Controller/DefaultControllerTest.php index 64b389bbe..af20f31f1 100644 --- a/src/WallabagBundle/Tests/Controller/DefaultControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/DefaultControllerTest.php @@ -1,6 +1,6 @@