aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Resources
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-09-21 17:47:47 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-09-25 12:29:18 +0200
commit59201088b4fc13fd361238396f630dabd9bd1990 (patch)
tree2d4d5c2fbe7f007214c41f0c4ccba2f8d3d7ec8b /src/Wallabag/ImportBundle/Resources
parentf7c55b38122cc593c2b58bb6425fca9d243b055e (diff)
downloadwallabag-59201088b4fc13fd361238396f630dabd9bd1990.tar.gz
wallabag-59201088b4fc13fd361238396f630dabd9bd1990.tar.zst
wallabag-59201088b4fc13fd361238396f630dabd9bd1990.zip
bring chrome and firefox as separate imports
Diffstat (limited to 'src/Wallabag/ImportBundle/Resources')
-rw-r--r--src/Wallabag/ImportBundle/Resources/config/rabbit.yml14
-rw-r--r--src/Wallabag/ImportBundle/Resources/config/redis.yml40
-rw-r--r--src/Wallabag/ImportBundle/Resources/config/services.yml15
-rw-r--r--src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig43
-rw-r--r--src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig (renamed from src/Wallabag/ImportBundle/Resources/views/Browser/index.html.twig)4
5 files changed, 111 insertions, 5 deletions
diff --git a/src/Wallabag/ImportBundle/Resources/config/rabbit.yml b/src/Wallabag/ImportBundle/Resources/config/rabbit.yml
index aa049749..6ada6302 100644
--- a/src/Wallabag/ImportBundle/Resources/config/rabbit.yml
+++ b/src/Wallabag/ImportBundle/Resources/config/rabbit.yml
@@ -28,3 +28,17 @@ services:
28 - "@wallabag_user.user_repository" 28 - "@wallabag_user.user_repository"
29 - "@wallabag_import.wallabag_v2.import" 29 - "@wallabag_import.wallabag_v2.import"
30 - "@logger" 30 - "@logger"
31 wallabag_import.consumer.amqp.firefox:
32 class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
33 arguments:
34 - "@doctrine.orm.entity_manager"
35 - "@wallabag_user.user_repository"
36 - "@wallabag_import.firefox.import"
37 - "@logger"
38 wallabag_import.consumer.amqp.chrome:
39 class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
40 arguments:
41 - "@doctrine.orm.entity_manager"
42 - "@wallabag_user.user_repository"
43 - "@wallabag_import.chrome.import"
44 - "@logger"
diff --git a/src/Wallabag/ImportBundle/Resources/config/redis.yml b/src/Wallabag/ImportBundle/Resources/config/redis.yml
index 7d3248e5..c47778b8 100644
--- a/src/Wallabag/ImportBundle/Resources/config/redis.yml
+++ b/src/Wallabag/ImportBundle/Resources/config/redis.yml
@@ -79,3 +79,43 @@ services:
79 - "@wallabag_user.user_repository" 79 - "@wallabag_user.user_repository"
80 - "@wallabag_import.wallabag_v2.import" 80 - "@wallabag_import.wallabag_v2.import"
81 - "@logger" 81 - "@logger"
82
83 # firefox
84 wallabag_import.queue.redis.firefox:
85 class: Simpleue\Queue\RedisQueue
86 arguments:
87 - "@wallabag_core.redis.client"
88 - "wallabag.import.firefox"
89
90 wallabag_import.producer.redis.firefox:
91 class: Wallabag\ImportBundle\Redis\Producer
92 arguments:
93 - "@wallabag_import.queue.redis.firefox"
94
95 wallabag_import.consumer.redis.firefox:
96 class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
97 arguments:
98 - "@doctrine.orm.entity_manager"
99 - "@wallabag_user.user_repository"
100 - "@wallabag_import.firefox.import"
101 - "@logger"
102
103 # chrome
104 wallabag_import.queue.redis.chrome:
105 class: Simpleue\Queue\RedisQueue
106 arguments:
107 - "@wallabag_core.redis.client"
108 - "wallabag.import.chrome"
109
110 wallabag_import.producer.redis.firefox:
111 class: Wallabag\ImportBundle\Redis\Producer
112 arguments:
113 - "@wallabag_import.queue.redis.chrome"
114
115 wallabag_import.consumer.redis.firefox:
116 class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
117 arguments:
118 - "@doctrine.orm.entity_manager"
119 - "@wallabag_user.user_repository"
120 - "@wallabag_import.chrome.import"
121 - "@logger"
diff --git a/src/Wallabag/ImportBundle/Resources/config/services.yml b/src/Wallabag/ImportBundle/Resources/config/services.yml
index d8be5c28..990f336d 100644
--- a/src/Wallabag/ImportBundle/Resources/config/services.yml
+++ b/src/Wallabag/ImportBundle/Resources/config/services.yml
@@ -57,12 +57,21 @@ services:
57 tags: 57 tags:
58 - { name: wallabag_import.import, alias: readability } 58 - { name: wallabag_import.import, alias: readability }
59 59
60 wallabag_import.browser.import: 60 wallabag_import.firefox.import:
61 class: Wallabag\ImportBundle\Import\BrowserImport 61 class: Wallabag\ImportBundle\Import\FirefoxImport
62 arguments: 62 arguments:
63 - "@doctrine.orm.entity_manager" 63 - "@doctrine.orm.entity_manager"
64 - "@wallabag_core.content_proxy" 64 - "@wallabag_core.content_proxy"
65 calls: 65 calls:
66 - [ setLogger, [ "@logger" ]] 66 - [ setLogger, [ "@logger" ]]
67 tags: 67 tags:
68 - { name: wallabag_import.import, alias: browser } 68 - { name: wallabag_import.import, alias: firefox }
69 wallabag_import.chrome.import:
70 class: Wallabag\ImportBundle\Import\ChromeImport
71 arguments:
72 - "@doctrine.orm.entity_manager"
73 - "@wallabag_core.content_proxy"
74 calls:
75 - [ setLogger, [ "@logger" ]]
76 tags:
77 - { name: wallabag_import.import, alias: chrome }
diff --git a/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig
new file mode 100644
index 00000000..ead828c6
--- /dev/null
+++ b/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig
@@ -0,0 +1,43 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'import.chrome.page_title'|trans }}{% endblock %}
4
5{% block content %}
6<div class="row">
7 <div class="col s12">
8 <div class="card-panel settings">
9 <div class="row">
10 <blockquote>{{ import.description|trans|raw }}</blockquote>
11 <p>{{ 'import.chrome.how_to'|trans }}</p>
12
13 <div class="col s12">
14 {{ form_start(form, {'method': 'POST'}) }}
15 {{ form_errors(form) }}
16 <div class="row">
17 <div class="file-field input-field col s12">
18 {{ form_errors(form.file) }}
19 <div class="btn">
20 <span>{{ form.file.vars.label|trans }}</span>
21 {{ form_widget(form.file) }}
22 </div>
23 <div class="file-path-wrapper">
24 <input class="file-path validate" type="text">
25 </div>
26 </div>
27 <div class="input-field col s6 with-checkbox">
28 <h6>{{ 'import.form.mark_as_read_title'|trans }}</h6>
29 {{ form_widget(form.mark_as_read) }}
30 {{ form_label(form.mark_as_read) }}
31 </div>
32 </div>
33
34 {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'} }) }}
35
36 {{ form_rest(form) }}
37 </form>
38 </div>
39 </div>
40 </div>
41 </div>
42</div>
43{% endblock %}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Browser/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig
index bfc74e9d..f975da3f 100644
--- a/src/Wallabag/ImportBundle/Resources/views/Browser/index.html.twig
+++ b/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig
@@ -1,6 +1,6 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %} 1{% extends "WallabagCoreBundle::layout.html.twig" %}
2 2
3{% block title %}{{ 'import.browser.page_title'|trans }}{% endblock %} 3{% block title %}{{ 'import.firefox.page_title'|trans }}{% endblock %}
4 4
5{% block content %} 5{% block content %}
6<div class="row"> 6<div class="row">
@@ -8,7 +8,7 @@
8 <div class="card-panel settings"> 8 <div class="card-panel settings">
9 <div class="row"> 9 <div class="row">
10 <blockquote>{{ import.description|trans|raw }}</blockquote> 10 <blockquote>{{ import.description|trans|raw }}</blockquote>
11 <p>{{ 'import.browser.how_to'|trans }}</p> 11 <p>{{ 'import.firefox.how_to'|trans }}</p>
12 12
13 <div class="col s12"> 13 <div class="col s12">
14 {{ form_start(form, {'method': 'POST'}) }} 14 {{ form_start(form, {'method': 'POST'}) }}