diff --git a/app/AppKernel.php b/app/AppKernel.php
index e8160135e..515c79ecb 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -20,8 +20,7 @@ class AppKernel extends Kernel
new FOS\RestBundle\FOSRestBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
- new Wallabag\CoreBundle\WallabagCoreBundle(),
- new Wallabag\ApiBundle\WallabagApiBundle(),
+ 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 60fcb6f4b..8e04a0c81 100644
--- a/app/config/routing.yml
+++ b/app/config/routing.yml
@@ -10,7 +10,12 @@ doc-api:
resource: "@NelmioApiDocBundle/Resources/config/routing.yml"
prefix: /api/doc
-wallabag_api:
- resource: "@WallabagApiBundle/Controller/"
- type: annotation
- prefix: /api
\ No newline at end of file
+#wallabag_api:
+# resource: "@WallabagApiBundle/Controller/"
+# type: annotation
+# prefix: /api
+
+rest :
+ type : rest
+ resource : "routing_rest.yml"
+ prefix : /api
\ No newline at end of file
diff --git a/app/config/routing_rest.yml b/app/config/routing_rest.yml
new file mode 100644
index 000000000..82d9e6cce
--- /dev/null
+++ b/app/config/routing_rest.yml
@@ -0,0 +1,3 @@
+Rest_Wallabag:
+ type : rest
+ resource: "@WallabagCoreBundle/Resources/config/routing_rest.yml"
\ No newline at end of file
diff --git a/src/Wallabag/ApiBundle/Controller/EntryController.php b/src/Wallabag/ApiBundle/Controller/EntryController.php
deleted file mode 100644
index 9bf84501f..000000000
--- a/src/Wallabag/ApiBundle/Controller/EntryController.php
+++ /dev/null
@@ -1,63 +0,0 @@
-redirect($this->generateUrl('nelmio_api_doc_index'));
- }
}
diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
new file mode 100644
index 000000000..a2a9af389
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
@@ -0,0 +1,157 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Wallabag/CoreBundle/Resources/views/baggy/_menu.twig b/src/Wallabag/CoreBundle/Resources/views/baggy/_menu.twig
deleted file mode 100644
index 8b80f65d8..000000000
--- a/src/Wallabag/CoreBundle/Resources/views/baggy/_menu.twig
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
diff --git a/src/Wallabag/CoreBundle/Resources/views/baggy/_pocheit-form.twig b/src/Wallabag/CoreBundle/Resources/views/baggy/_pocheit-form.twig
deleted file mode 100755
index bf2ae9037..000000000
--- a/src/Wallabag/CoreBundle/Resources/views/baggy/_pocheit-form.twig
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/src/Wallabag/CoreBundle/Resources/views/baggy/_search-form.twig b/src/Wallabag/CoreBundle/Resources/views/baggy/_search-form.twig
deleted file mode 100644
index 73f7951f8..000000000
--- a/src/Wallabag/CoreBundle/Resources/views/baggy/_search-form.twig
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/src/Wallabag/CoreBundle/Resources/views/baggy/_top.twig b/src/Wallabag/CoreBundle/Resources/views/baggy/_top.twig
deleted file mode 100755
index a31c09259..000000000
--- a/src/Wallabag/CoreBundle/Resources/views/baggy/_top.twig
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
- {% if view == 'home' %}{% block logo %}
{% endblock %}
- {% else %}{{ block('logo') }}
- {% endif %}
-
-
diff --git a/src/Wallabag/CoreBundle/Resources/views/baggy/about.twig b/src/Wallabag/CoreBundle/Resources/views/baggy/about.twig
deleted file mode 100755
index d18fe1567..000000000
--- a/src/Wallabag/CoreBundle/Resources/views/baggy/about.twig
+++ /dev/null
@@ -1,84 +0,0 @@
-{% extends "layout.twig" %}
-
-{% block title %}{% trans "About" %}{% endblock %}
-{% block menu %}
-{% include '_menu.twig' %}
-{% endblock %}
-{% block content %}
- {% trans "About wallabag" %}
-
-
- - {% trans "Project website" %}
- - https://www.wallabag.org
-
- - {% trans "Main developer" %}
- - Nicolas Lœuillet — {% trans "website" %}
-
- - {% trans "Contributors:" %}
- - {% trans "on Github" %}
-
- - {% trans "Bug reports" %}
- - {% trans "On our support website" %} {% trans "or" %} {% trans "on Github" %}
-
- - {% trans "License" %}
- - MIT
-
- - {% trans "Version" %}
- - {{ constant('WALLABAG') }}
-
-
- {% trans "wallabag is a read-it-later application: you can save a web page by keeping only content. Elements like ads or menus are deleted." %}
-
- {% trans "Getting help" %}
-
-
- - {% trans "Documentation" %}
- - Offline documentation and online documentation (up to date)
-
- - {% trans "Support" %}
- - http://support.wallabag.org/
-
-
- {% trans "Helping wallabag" %}
-
- {% trans "wallabag is free and opensource. You can help us:" %}
-
-
- - {% trans "via Paypal" %}
-
- - {% trans "via Flattr" %}
-
-
- {% trans "Credits" %}
-
- - PHP Readability
- - https://bitbucket.org/fivefilters/php-readability
-
- - Full Text RSS
- - http://code.fivefilters.org/full-text-rss/src
-
- - logo by Maylis Agniel
- - https://github.com/wallabag/logo
-
- - icons
- - http://icomoon.io
-
- - PHP Simple HTML DOM Parser
- - http://simplehtmldom.sourceforge.net/
-
- - Session
- - https://github.com/tontof/kriss_feed/blob/master/src/class/Session.php
-
- - Twig
- - http://twig.sensiolabs.org
-
- - Flash messages
- - https://github.com/plasticbrain/PHP-Flash-Messages
-
- - Pagination
- - https://github.com/daveismyname/pagination
-
- - PHPePub
- - https://github.com/Grandt/PHPePub/
-
-{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/baggy/home.twig b/src/Wallabag/CoreBundle/Resources/views/baggy/home.twig
deleted file mode 100755
index 93515080d..000000000
--- a/src/Wallabag/CoreBundle/Resources/views/baggy/home.twig
+++ /dev/null
@@ -1,81 +0,0 @@
-{% extends "layout.twig" %}
-{% block title %}
-{% if view == 'fav' %}
-{% trans "favorites" %}
-{% elseif view == 'archive' %}
-{% trans "archive" %}
-{% else %}
-{% trans "unread" %}
-{% endif %}
-{% endblock %}
-{% block menu %}
-{% include '_menu.twig' %}
-{% endblock %}
-{% block content %}
- {% if tag %}
- {% trans "Tag" %}: {{ tag.value }}
- {% endif %}
- {% if entries is empty %}
- {% trans "No articles found." %}
- {% else %}
-
- {% include '_display-mode.twig' %}
- {% include '_sorting.twig' %}
-
- {% block pager %}
- {% if nb_results > 1 %}
-
-
{{ nb_results }} {% trans "results" %}{% if search_term is defined %} {% trans %}found for « {{ search_term }} »{% endtrans %}{% endif %}
- {{ page_links | raw }}
-
- {% elseif nb_results == 1 %}
- {% if search_term is defined %}
-
-
{% trans "Only one result found for " %} « {{ search_term }} »
-
- {% endif %}
- {% endif %}
- {% endblock %}
-
- {% for entry in entries %}
-
-
- {% if entry.content| getReadingTime > 0 %}
-
{% trans "estimated reading time :" %} {{ entry.content| getReadingTime }} min
- {% else %}
-
{% trans "estimated reading time :" %} < 1 min
- {% endif %}
-
-
{{ entry.content|striptags|slice(0, 300) }}...
-
-
- {% endfor %}
-
- {{ block('pager') }}
- {% if view == 'home' %}{% if nb_results > 1 %}{% trans "Mark all the entries as read" %}
{% endif %}{% endif %}
- {% if searchterm is defined %}{% trans "Tag these results as" %} {{ searchterm }}{% endif %}
-
- {% if searchterm is defined %}{% trans "Delete results matching" %} {{ searchterm }}{% endif %}
-
- {% if tag %}{% trans "Mark all articles from this tag as read" %}
{% endif %}
-
- {% if tag %}
- {% if constant('EPUB') == 1 %}{% trans "Download as ePub3" %}{% endif %}
- {% if constant('MOBI') == 1 %}{% trans "Download as Mobi" %}{% endif %}
- {% if constant('PDF') == 1 %}{% trans "Download as PDF" %}{% endif %}
- {% elseif searchterm is defined %}
- {% if constant('EPUB') == 1 %}{% trans "Download as ePub3" %}{% endif %}
- {% if constant('MOBI') == 1 %}{% trans "Download as Mobi" %}{% endif %}
- {% if constant('PDF') == 1 %}{% trans "Download as PDF" %}{% endif %}
- {% else %}
- {% if constant('EPUB') == 1 %}{% trans "Download as ePub3" %}{% endif %}
- {% if constant('MOBI') == 1 %}{% trans "Download as Mobi" %}{% endif %}
- {% if constant('PDF') == 1 %}{% trans "Download as PDF" %}{% endif %}
- {% endif %}
-{% endif %}
-{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/baggy/layout.twig b/src/Wallabag/CoreBundle/Resources/views/baggy/layout.twig
deleted file mode 100755
index 8de12749f..000000000
--- a/src/Wallabag/CoreBundle/Resources/views/baggy/layout.twig
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {% block title %}{% endblock %} - wallabag
-{% include '_head.twig' %}
-{% include '_bookmarklet.twig' %}
-
-
- {% include '_top.twig' %}
-
- {% block menu %}{% endblock %}
- {% block precontent %}{% endblock %}
- {% block messages %}
- {% include '_messages.twig' %}
- {% if includeImport %}
- {% include '_import.twig' %}
- {% endif %}
- {% endblock %}
-
- {% block content %}{% endblock %}
-
-
-{% include '_footer.twig' %}
-
-
\ No newline at end of file
diff --git a/src/Wallabag/CoreBundle/Resources/views/baggy/view.twig b/src/Wallabag/CoreBundle/Resources/views/baggy/view.twig
deleted file mode 100755
index 1afd9df6a..000000000
--- a/src/Wallabag/CoreBundle/Resources/views/baggy/view.twig
+++ /dev/null
@@ -1,102 +0,0 @@
-{% extends "layout.twig" %}
-{% block menu %}
-{% include '_menu.twig' %}
-{% endblock %}
-{% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %}
-{% block content %}
- {% include '_highlight.twig' %}
-
-
-
- {{ entry.title|raw }}
-
-
-
- {{ content | raw }}
-
-
-
-
-{% endblock %}