aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Resources
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-12-30 13:26:30 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-01-02 23:27:41 +0100
commitb1d05721cf37ab94ec1a6837fe79cf19474dd0ff (patch)
tree95cb2413a6044af6603a40339a1ceb2961206ae3 /src/Wallabag/ImportBundle/Resources
parent252ebd60719d32ec954d0519c9edf2b52b03310c (diff)
downloadwallabag-b1d05721cf37ab94ec1a6837fe79cf19474dd0ff.tar.gz
wallabag-b1d05721cf37ab94ec1a6837fe79cf19474dd0ff.tar.zst
wallabag-b1d05721cf37ab94ec1a6837fe79cf19474dd0ff.zip
Rewrote Wallabag v1 import
Diffstat (limited to 'src/Wallabag/ImportBundle/Resources')
-rw-r--r--src/Wallabag/ImportBundle/Resources/config/services.yml7
-rw-r--r--src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig1
-rw-r--r--src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig30
3 files changed, 38 insertions, 0 deletions
diff --git a/src/Wallabag/ImportBundle/Resources/config/services.yml b/src/Wallabag/ImportBundle/Resources/config/services.yml
index f421821c..e73ec0c8 100644
--- a/src/Wallabag/ImportBundle/Resources/config/services.yml
+++ b/src/Wallabag/ImportBundle/Resources/config/services.yml
@@ -18,3 +18,10 @@ services:
18 calls: 18 calls:
19 - [ setClient, [ "@wallabag_import.pocket.client" ] ] 19 - [ setClient, [ "@wallabag_import.pocket.client" ] ]
20 - [ setLogger, [ "@logger" ]] 20 - [ setLogger, [ "@logger" ]]
21
22 wallabag_import.wallabag_v1.import:
23 class: Wallabag\ImportBundle\Import\WallabagV1Import
24 arguments:
25 - "@doctrine.orm.entity_manager"
26 calls:
27 - [ setLogger, [ "@logger" ]]
diff --git a/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig
index b068283a..bd51f730 100644
--- a/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig
+++ b/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig
@@ -9,6 +9,7 @@
9 {% trans %}Welcome on wallabag importer. Please select your previous service that you want to migrate.{% endtrans %} 9 {% trans %}Welcome on wallabag importer. Please select your previous service that you want to migrate.{% endtrans %}
10 <ul> 10 <ul>
11 <li><a href="{{ path('import_pocket') }}">Pocket</a></li> 11 <li><a href="{{ path('import_pocket') }}">Pocket</a></li>
12 <li><a href="{{ path('import_wallabag_v1') }}">Wallabag v1</a></li>
12 </ul> 13 </ul>
13 </div> 14 </div>
14 </div> 15 </div>
diff --git a/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig
new file mode 100644
index 00000000..328ab473
--- /dev/null
+++ b/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig
@@ -0,0 +1,30 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2{% block title %}{% trans %}import{% endtrans %}{% endblock %}
3
4{% block content %}
5
6<div class="row">
7 <div class="col s12">
8 <div class="card-panel settings">
9 <div class="row">
10 <div class="col s12">
11 {{ form_start(form, {'method': 'POST'}) }}
12 {{ form_errors(form) }}
13 <div class="row">
14 <div class="input-field col s12">
15 <p>{% trans %}Please select your wallabag export and click on the below button to upload and import it.{% endtrans %}</p>
16 {{ form_errors(form.file) }}
17 {{ form_widget(form.file) }}
18 </div>
19 </div>
20 <div class="hidden">{{ form_rest(form) }}</div>
21 <button class="btn waves-effect waves-light" type="submit" name="action">
22 {% trans %}Upload file{% endtrans %}
23 </button>
24 </form>
25 </div>
26 </div>
27 </div>
28 </div>
29</div>
30{% endblock %}