Rewrote Wallabag v1 import

This commit is contained in:
Jeremy Benoist
2015-12-30 13:26:30 +01:00
parent 252ebd6071
commit b1d05721cf
14 changed files with 405 additions and 94 deletions

View File

@ -18,3 +18,10 @@ services:
calls:
- [ setClient, [ "@wallabag_import.pocket.client" ] ]
- [ setLogger, [ "@logger" ]]
wallabag_import.wallabag_v1.import:
class: Wallabag\ImportBundle\Import\WallabagV1Import
arguments:
- "@doctrine.orm.entity_manager"
calls:
- [ setLogger, [ "@logger" ]]

View File

@ -9,6 +9,7 @@
{% trans %}Welcome on wallabag importer. Please select your previous service that you want to migrate.{% endtrans %}
<ul>
<li><a href="{{ path('import_pocket') }}">Pocket</a></li>
<li><a href="{{ path('import_wallabag_v1') }}">Wallabag v1</a></li>
</ul>
</div>
</div>

View File

@ -0,0 +1,30 @@
{% extends "WallabagCoreBundle::layout.html.twig" %}
{% block title %}{% trans %}import{% endtrans %}{% endblock %}
{% block content %}
<div class="row">
<div class="col s12">
<div class="card-panel settings">
<div class="row">
<div class="col s12">
{{ form_start(form, {'method': 'POST'}) }}
{{ form_errors(form) }}
<div class="row">
<div class="input-field col s12">
<p>{% trans %}Please select your wallabag export and click on the below button to upload and import it.{% endtrans %}</p>
{{ form_errors(form.file) }}
{{ form_widget(form.file) }}
</div>
</div>
<div class="hidden">{{ form_rest(form) }}</div>
<button class="btn waves-effect waves-light" type="submit" name="action">
{% trans %}Upload file{% endtrans %}
</button>
</form>
</div>
</div>
</div>
</div>
</div>
{% endblock %}