aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2020-04-26 15:39:57 +0200
committerGitHub <noreply@github.com>2020-04-26 15:39:57 +0200
commit0e8a0f77d0b643a884e6687bd9c463267852a970 (patch)
tree88c6761b4215637bba34b263015e87750c92a187 /src
parent8a8a78a64c116caf81aaa4339906298bdc0e32e0 (diff)
parent71f7e58fbd84e1d15c7a405a3c5872adb937dc37 (diff)
downloadwallabag-0e8a0f77d0b643a884e6687bd9c463267852a970.tar.gz
wallabag-0e8a0f77d0b643a884e6687bd9c463267852a970.tar.zst
wallabag-0e8a0f77d0b643a884e6687bd9c463267852a970.zip
Merge pull request #4026 from wallabag/3760-ignorelist-db
Move Ignore Origin rules to database
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php8
-rw-r--r--src/Wallabag/CoreBundle/Controller/ConfigController.php79
-rw-r--r--src/Wallabag/CoreBundle/Controller/IgnoreOriginInstanceRuleController.php138
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginInstanceRuleFixtures.php36
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginUserRuleFixtures.php36
-rw-r--r--src/Wallabag/CoreBundle/DependencyInjection/Configuration.php7
-rw-r--r--src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php1
-rw-r--r--src/Wallabag/CoreBundle/Entity/Config.php25
-rw-r--r--src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php70
-rw-r--r--src/Wallabag/CoreBundle/Entity/IgnoreOriginRuleInterface.php12
-rw-r--r--src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php97
-rw-r--r--src/Wallabag/CoreBundle/Entity/RuleInterface.php7
-rw-r--r--src/Wallabag/CoreBundle/Entity/TaggingRule.php2
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/IgnoreOriginInstanceRuleType.php37
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/IgnoreOriginUserRuleType.php37
-rw-r--r--src/Wallabag/CoreBundle/Helper/ContentProxy.php41
-rw-r--r--src/Wallabag/CoreBundle/Helper/RuleBasedIgnoreOriginProcessor.php50
-rw-r--r--src/Wallabag/CoreBundle/Operator/PHP/PatternMatches.php23
-rw-r--r--src/Wallabag/CoreBundle/Repository/IgnoreOriginInstanceRuleRepository.php9
-rw-r--r--src/Wallabag/CoreBundle/Repository/IgnoreOriginUserRuleRepository.php9
-rw-r--r--src/Wallabag/CoreBundle/Resources/config/services.yml19
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.da.yml27
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.de.yml27
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.en.yml45
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.es.yml27
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml27
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml22
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.it.yml27
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml27
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml27
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml25
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml27
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml27
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.th.yml27
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml27
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig70
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/edit.html.twig87
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/index.html.twig42
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/new.html.twig80
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig1
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig94
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/IgnoreOriginInstanceRule/edit.html.twig87
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/IgnoreOriginInstanceRule/index.html.twig42
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/IgnoreOriginInstanceRule/new.html.twig80
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig6
45 files changed, 1675 insertions, 46 deletions
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index 3aa332f1..8d08187a 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -12,6 +12,7 @@ use Symfony\Component\Console\Output\BufferedOutput;
12use Symfony\Component\Console\Output\OutputInterface; 12use Symfony\Component\Console\Output\OutputInterface;
13use Symfony\Component\Console\Question\Question; 13use Symfony\Component\Console\Question\Question;
14use Symfony\Component\Console\Style\SymfonyStyle; 14use Symfony\Component\Console\Style\SymfonyStyle;
15use Wallabag\CoreBundle\Entity\IgnoreOriginInstanceRule;
15use Wallabag\CoreBundle\Entity\InternalSetting; 16use Wallabag\CoreBundle\Entity\InternalSetting;
16 17
17class InstallCommand extends ContainerAwareCommand 18class InstallCommand extends ContainerAwareCommand
@@ -277,6 +278,7 @@ class InstallCommand extends ContainerAwareCommand
277 278
278 // cleanup before insert new stuff 279 // cleanup before insert new stuff
279 $em->createQuery('DELETE FROM WallabagCoreBundle:InternalSetting')->execute(); 280 $em->createQuery('DELETE FROM WallabagCoreBundle:InternalSetting')->execute();
281 $em->createQuery('DELETE FROM WallabagCoreBundle:IgnoreOriginInstanceRule')->execute();
280 282
281 foreach ($this->getContainer()->getParameter('wallabag_core.default_internal_settings') as $setting) { 283 foreach ($this->getContainer()->getParameter('wallabag_core.default_internal_settings') as $setting) {
282 $newSetting = new InternalSetting(); 284 $newSetting = new InternalSetting();
@@ -286,6 +288,12 @@ class InstallCommand extends ContainerAwareCommand
286 $em->persist($newSetting); 288 $em->persist($newSetting);
287 } 289 }
288 290
291 foreach ($this->getContainer()->getParameter('wallabag_core.default_ignore_origin_instance_rules') as $ignore_origin_instance_rule) {
292 $newIgnoreOriginInstanceRule = new IgnoreOriginInstanceRule();
293 $newIgnoreOriginInstanceRule->setRule($ignore_origin_instance_rule['rule']);
294 $em->persist($newIgnoreOriginInstanceRule);
295 }
296
289 $em->flush(); 297 $em->flush();
290 298
291 $this->io->text('<info>Config successfully setup.</info>'); 299 $this->io->text('<info>Config successfully setup.</info>');
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php
index 56efe82b..3efc7bb3 100644
--- a/src/Wallabag/CoreBundle/Controller/ConfigController.php
+++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php
@@ -14,10 +14,13 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
14use Symfony\Component\Routing\Annotation\Route; 14use Symfony\Component\Routing\Annotation\Route;
15use Symfony\Component\Validator\Constraints\Locale as LocaleConstraint; 15use Symfony\Component\Validator\Constraints\Locale as LocaleConstraint;
16use Wallabag\CoreBundle\Entity\Config; 16use Wallabag\CoreBundle\Entity\Config;
17use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule;
18use Wallabag\CoreBundle\Entity\RuleInterface;
17use Wallabag\CoreBundle\Entity\TaggingRule; 19use Wallabag\CoreBundle\Entity\TaggingRule;
18use Wallabag\CoreBundle\Form\Type\ChangePasswordType; 20use Wallabag\CoreBundle\Form\Type\ChangePasswordType;
19use Wallabag\CoreBundle\Form\Type\ConfigType; 21use Wallabag\CoreBundle\Form\Type\ConfigType;
20use Wallabag\CoreBundle\Form\Type\FeedType; 22use Wallabag\CoreBundle\Form\Type\FeedType;
23use Wallabag\CoreBundle\Form\Type\IgnoreOriginUserRuleType;
21use Wallabag\CoreBundle\Form\Type\TaggingRuleImportType; 24use Wallabag\CoreBundle\Form\Type\TaggingRuleImportType;
22use Wallabag\CoreBundle\Form\Type\TaggingRuleType; 25use Wallabag\CoreBundle\Form\Type\TaggingRuleType;
23use Wallabag\CoreBundle\Form\Type\UserInformationType; 26use Wallabag\CoreBundle\Form\Type\UserInformationType;
@@ -173,6 +176,40 @@ class ConfigController extends Controller
173 return $this->redirect($this->generateUrl('config') . '#set5'); 176 return $this->redirect($this->generateUrl('config') . '#set5');
174 } 177 }
175 178
179 // handle ignore origin rules
180 $ignoreOriginUserRule = new IgnoreOriginUserRule();
181 $action = $this->generateUrl('config') . '#set6';
182
183 if ($request->query->has('ignore-origin-user-rule')) {
184 $ignoreOriginUserRule = $this->getDoctrine()
185 ->getRepository('WallabagCoreBundle:IgnoreOriginUserRule')
186 ->find($request->query->get('ignore-origin-user-rule'));
187
188 if ($this->getUser()->getId() !== $ignoreOriginUserRule->getConfig()->getUser()->getId()) {
189 return $this->redirect($action);
190 }
191
192 $action = $this->generateUrl('config', [
193 'ignore-origin-user-rule' => $ignoreOriginUserRule->getId(),
194 ]) . '#set6';
195 }
196
197 $newIgnoreOriginUserRule = $this->createForm(IgnoreOriginUserRuleType::class, $ignoreOriginUserRule, ['action' => $action]);
198 $newIgnoreOriginUserRule->handleRequest($request);
199
200 if ($newIgnoreOriginUserRule->isSubmitted() && $newIgnoreOriginUserRule->isValid()) {
201 $ignoreOriginUserRule->setConfig($config);
202 $em->persist($ignoreOriginUserRule);
203 $em->flush();
204
205 $this->addFlash(
206 'notice',
207 'flashes.config.notice.ignore_origin_rules_updated'
208 );
209
210 return $this->redirect($this->generateUrl('config') . '#set6');
211 }
212
176 return $this->render('WallabagCoreBundle:Config:index.html.twig', [ 213 return $this->render('WallabagCoreBundle:Config:index.html.twig', [
177 'form' => [ 214 'form' => [
178 'config' => $configForm->createView(), 215 'config' => $configForm->createView(),
@@ -181,6 +218,7 @@ class ConfigController extends Controller
181 'user' => $userForm->createView(), 218 'user' => $userForm->createView(),
182 'new_tagging_rule' => $newTaggingRule->createView(), 219 'new_tagging_rule' => $newTaggingRule->createView(),
183 'import_tagging_rule' => $taggingRulesImportform->createView(), 220 'import_tagging_rule' => $taggingRulesImportform->createView(),
221 'new_ignore_origin_user_rule' => $newIgnoreOriginUserRule->createView(),
184 ], 222 ],
185 'feed' => [ 223 'feed' => [
186 'username' => $user->getUsername(), 224 'username' => $user->getUsername(),
@@ -448,6 +486,43 @@ class ConfigController extends Controller
448 } 486 }
449 487
450 /** 488 /**
489 * Deletes an ignore origin rule and redirect to the config homepage.
490 *
491 * @Route("/ignore-origin-user-rule/delete/{id}", requirements={"id" = "\d+"}, name="delete_ignore_origin_rule")
492 *
493 * @return RedirectResponse
494 */
495 public function deleteIgnoreOriginRuleAction(IgnoreOriginUserRule $rule)
496 {
497 $this->validateRuleAction($rule);
498
499 $em = $this->getDoctrine()->getManager();
500 $em->remove($rule);
501 $em->flush();
502
503 $this->addFlash(
504 'notice',
505 'flashes.config.notice.ignore_origin_rules_deleted'
506 );
507
508 return $this->redirect($this->generateUrl('config') . '#set6');
509 }
510
511 /**
512 * Edit an ignore origin rule.
513 *
514 * @Route("/ignore-origin-user-rule/edit/{id}", requirements={"id" = "\d+"}, name="edit_ignore_origin_rule")
515 *
516 * @return RedirectResponse
517 */
518 public function editIgnoreOriginRuleAction(IgnoreOriginUserRule $rule)
519 {
520 $this->validateRuleAction($rule);
521
522 return $this->redirect($this->generateUrl('config') . '?ignore-origin-user-rule=' . $rule->getId() . '#set6');
523 }
524
525 /**
451 * Remove all annotations OR tags OR entries for the current user. 526 * Remove all annotations OR tags OR entries for the current user.
452 * 527 *
453 * @Route("/reset/{type}", requirements={"id" = "annotations|tags|entries"}, name="config_reset") 528 * @Route("/reset/{type}", requirements={"id" = "annotations|tags|entries"}, name="config_reset")
@@ -659,10 +734,10 @@ class ConfigController extends Controller
659 /** 734 /**
660 * Validate that a rule can be edited/deleted by the current user. 735 * Validate that a rule can be edited/deleted by the current user.
661 */ 736 */
662 private function validateRuleAction(TaggingRule $rule) 737 private function validateRuleAction(RuleInterface $rule)
663 { 738 {
664 if ($this->getUser()->getId() !== $rule->getConfig()->getUser()->getId()) { 739 if ($this->getUser()->getId() !== $rule->getConfig()->getUser()->getId()) {
665 throw $this->createAccessDeniedException('You can not access this tagging rule.'); 740 throw $this->createAccessDeniedException('You can not access this rule.');
666 } 741 }
667 } 742 }
668 743
diff --git a/src/Wallabag/CoreBundle/Controller/IgnoreOriginInstanceRuleController.php b/src/Wallabag/CoreBundle/Controller/IgnoreOriginInstanceRuleController.php
new file mode 100644
index 00000000..ef1f0ed7
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Controller/IgnoreOriginInstanceRuleController.php
@@ -0,0 +1,138 @@
1<?php
2
3namespace Wallabag\CoreBundle\Controller;
4
5use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6use Symfony\Component\HttpFoundation\Request;
7use Symfony\Component\Routing\Annotation\Route;
8use Wallabag\CoreBundle\Entity\IgnoreOriginInstanceRule;
9
10/**
11 * IgnoreOriginInstanceRuleController controller.
12 *
13 * @Route("/ignore-origin-instance-rules")
14 */
15class IgnoreOriginInstanceRuleController extends Controller
16{
17 /**
18 * Lists all IgnoreOriginInstanceRule entities.
19 *
20 * @Route("/", name="ignore_origin_instance_rules_index", methods={"GET"})
21 */
22 public function indexAction()
23 {
24 $rules = $this->get('wallabag_core.ignore_origin_instance_rule_repository')->findAll();
25
26 return $this->render('WallabagCoreBundle:IgnoreOriginInstanceRule:index.html.twig', [
27 'rules' => $rules,
28 ]);
29 }
30
31 /**
32 * Creates a new ignore origin instance rule entity.
33 *
34 * @Route("/new", name="ignore_origin_instance_rules_new", methods={"GET", "POST"})
35 *
36 * @return \Symfony\Component\HttpFoundation\Response
37 */
38 public function newAction(Request $request)
39 {
40 $ignoreOriginInstanceRule = new IgnoreOriginInstanceRule();
41
42 $form = $this->createForm('Wallabag\CoreBundle\Form\Type\IgnoreOriginInstanceRuleType', $ignoreOriginInstanceRule);
43 $form->handleRequest($request);
44
45 if ($form->isSubmitted() && $form->isValid()) {
46 $em = $this->getDoctrine()->getManager();
47 $em->persist($ignoreOriginInstanceRule);
48 $em->flush();
49
50 $this->get('session')->getFlashBag()->add(
51 'notice',
52 $this->get('translator')->trans('flashes.ignore_origin_instance_rule.notice.added')
53 );
54
55 return $this->redirectToRoute('ignore_origin_instance_rules_index');
56 }
57
58 return $this->render('WallabagCoreBundle:IgnoreOriginInstanceRule:new.html.twig', [
59 'rule' => $ignoreOriginInstanceRule,
60 'form' => $form->createView(),
61 ]);
62 }
63
64 /**
65 * Displays a form to edit an existing ignore origin instance rule entity.
66 *
67 * @Route("/{id}/edit", name="ignore_origin_instance_rules_edit", methods={"GET", "POST"})
68 *
69 * @return \Symfony\Component\HttpFoundation\Response
70 */
71 public function editAction(Request $request, IgnoreOriginInstanceRule $ignoreOriginInstanceRule)
72 {
73 $deleteForm = $this->createDeleteForm($ignoreOriginInstanceRule);
74 $editForm = $this->createForm('Wallabag\CoreBundle\Form\Type\IgnoreOriginInstanceRuleType', $ignoreOriginInstanceRule);
75 $editForm->handleRequest($request);
76
77 if ($editForm->isSubmitted() && $editForm->isValid()) {
78 $em = $this->getDoctrine()->getManager();
79 $em->persist($ignoreOriginInstanceRule);
80 $em->flush();
81
82 $this->get('session')->getFlashBag()->add(
83 'notice',
84 $this->get('translator')->trans('flashes.ignore_origin_instance_rule.notice.updated')
85 );
86
87 return $this->redirectToRoute('ignore_origin_instance_rules_index');
88 }
89
90 return $this->render('WallabagCoreBundle:IgnoreOriginInstanceRule:edit.html.twig', [
91 'rule' => $ignoreOriginInstanceRule,
92 'edit_form' => $editForm->createView(),
93 'delete_form' => $deleteForm->createView(),
94 ]);
95 }
96
97 /**
98 * Deletes a site credential entity.
99 *
100 * @Route("/{id}", name="ignore_origin_instance_rules_delete", methods={"DELETE"})
101 *
102 * @return \Symfony\Component\HttpFoundation\RedirectResponse
103 */
104 public function deleteAction(Request $request, IgnoreOriginInstanceRule $ignoreOriginInstanceRule)
105 {
106 $form = $this->createDeleteForm($ignoreOriginInstanceRule);
107 $form->handleRequest($request);
108
109 if ($form->isSubmitted() && $form->isValid()) {
110 $this->get('session')->getFlashBag()->add(
111 'notice',
112 $this->get('translator')->trans('flashes.ignore_origin_instance_rule.notice.deleted')
113 );
114
115 $em = $this->getDoctrine()->getManager();
116 $em->remove($ignoreOriginInstanceRule);
117 $em->flush();
118 }
119
120 return $this->redirectToRoute('ignore_origin_instance_rules_index');
121 }
122
123 /**
124 * Creates a form to delete a ignore origin instance rule entity.
125 *
126 * @param IgnoreOriginInstanceRule $ignoreOriginInstanceRule The ignore origin instance rule entity
127 *
128 * @return \Symfony\Component\Form\Form The form
129 */
130 private function createDeleteForm(IgnoreOriginInstanceRule $ignoreOriginInstanceRule)
131 {
132 return $this->createFormBuilder()
133 ->setAction($this->generateUrl('ignore_origin_instance_rules_delete', ['id' => $ignoreOriginInstanceRule->getId()]))
134 ->setMethod('DELETE')
135 ->getForm()
136 ;
137 }
138}
diff --git a/src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginInstanceRuleFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginInstanceRuleFixtures.php
new file mode 100644
index 00000000..8a0a06ed
--- /dev/null
+++ b/src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginInstanceRuleFixtures.php
@@ -0,0 +1,36 @@
1<?php
2
3namespace Wallabag\CoreBundle\DataFixtures;
4
5use Doctrine\Bundle\FixturesBundle\Fixture;
6use Doctrine\Common\Persistence\ObjectManager;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9use Wallabag\CoreBundle\Entity\IgnoreOriginInstanceRule;
10
11class IgnoreOriginInstanceRuleFixtures extends Fixture implements ContainerAwareInterface
12{
13 /**
14 * @var ContainerInterface
15 */
16 private $container;
17
18 public function setContainer(ContainerInterface $container = null)
19 {
20 $this->container = $container;
21 }
22
23 /**
24 * {@inheritdoc}
25 */
26 public function load(ObjectManager $manager)
27 {
28 foreach ($this->container->getParameter('wallabag_core.default_ignore_origin_instance_rules') as $ignore_origin_instance_rule) {
29 $newIgnoreOriginInstanceRule = new IgnoreOriginInstanceRule();
30 $newIgnoreOriginInstanceRule->setRule($ignore_origin_instance_rule['rule']);
31 $manager->persist($newIgnoreOriginInstanceRule);
32 }
33
34 $manager->flush();
35 }
36}
diff --git a/src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginUserRuleFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginUserRuleFixtures.php
new file mode 100644
index 00000000..679eff7d
--- /dev/null
+++ b/src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginUserRuleFixtures.php
@@ -0,0 +1,36 @@
1<?php
2
3namespace Wallabag\CoreBundle\DataFixtures;
4
5use Doctrine\Bundle\FixturesBundle\Fixture;
6use Doctrine\Common\DataFixtures\DependentFixtureInterface;
7use Doctrine\Common\Persistence\ObjectManager;
8use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule;
9use Wallabag\UserBundle\DataFixtures\UserFixtures;
10
11class IgnoreOriginUserRuleFixtures extends Fixture implements DependentFixtureInterface
12{
13 /**
14 * {@inheritdoc}
15 */
16 public function load(ObjectManager $manager)
17 {
18 $rule = new IgnoreOriginUserRule();
19 $rule->setRule('host = "example.fr"');
20 $rule->setConfig($this->getReference('admin-user')->getConfig());
21
22 $manager->persist($rule);
23
24 $manager->flush();
25 }
26
27 /**
28 * {@inheritdoc}
29 */
30 public function getDependencies()
31 {
32 return [
33 UserFixtures::class,
34 ];
35 }
36}
diff --git a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php
index 7ae73371..85747256 100644
--- a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php
+++ b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php
@@ -65,6 +65,13 @@ class Configuration implements ConfigurationInterface
65 ->end() 65 ->end()
66 ->scalarNode('encryption_key_path') 66 ->scalarNode('encryption_key_path')
67 ->end() 67 ->end()
68 ->arrayNode('default_ignore_origin_instance_rules')
69 ->prototype('array')
70 ->children()
71 ->scalarNode('rule')->end()
72 ->end()
73 ->end()
74 ->end()
68 ->end() 75 ->end()
69 ; 76 ;
70 77
diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php
index e9a1e9e0..af91e588 100644
--- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php
+++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php
@@ -30,6 +30,7 @@ class WallabagCoreExtension extends Extension
30 $container->setParameter('wallabag_core.api_limit_mass_actions', $config['api_limit_mass_actions']); 30 $container->setParameter('wallabag_core.api_limit_mass_actions', $config['api_limit_mass_actions']);
31 $container->setParameter('wallabag_core.default_internal_settings', $config['default_internal_settings']); 31 $container->setParameter('wallabag_core.default_internal_settings', $config['default_internal_settings']);
32 $container->setParameter('wallabag_core.site_credentials.encryption_key_path', $config['encryption_key_path']); 32 $container->setParameter('wallabag_core.site_credentials.encryption_key_path', $config['encryption_key_path']);
33 $container->setParameter('wallabag_core.default_ignore_origin_instance_rules', $config['default_ignore_origin_instance_rules']);
33 34
34 $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); 35 $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
35 $loader->load('services.yml'); 36 $loader->load('services.yml');
diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php
index fe7942ee..1bed4513 100644
--- a/src/Wallabag/CoreBundle/Entity/Config.php
+++ b/src/Wallabag/CoreBundle/Entity/Config.php
@@ -119,6 +119,12 @@ class Config
119 */ 119 */
120 private $taggingRules; 120 private $taggingRules;
121 121
122 /**
123 * @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\IgnoreOriginUserRule", mappedBy="config", cascade={"remove"})
124 * @ORM\OrderBy({"id" = "ASC"})
125 */
126 private $ignoreOriginRules;
127
122 /* 128 /*
123 * @param User $user 129 * @param User $user
124 */ 130 */
@@ -126,6 +132,7 @@ class Config
126 { 132 {
127 $this->user = $user; 133 $this->user = $user;
128 $this->taggingRules = new ArrayCollection(); 134 $this->taggingRules = new ArrayCollection();
135 $this->ignoreOriginRules = new ArrayCollection();
129 } 136 }
130 137
131 /** 138 /**
@@ -387,4 +394,22 @@ class Config
387 { 394 {
388 return $this->taggingRules; 395 return $this->taggingRules;
389 } 396 }
397
398 /**
399 * @return Config
400 */
401 public function addIgnoreOriginRule(IgnoreOriginUserRule $rule)
402 {
403 $this->ignoreOriginRules[] = $rule;
404
405 return $this;
406 }
407
408 /**
409 * @return ArrayCollection<IgnoreOriginUserRule>
410 */
411 public function getIgnoreOriginRules()
412 {
413 return $this->ignoreOriginRules;
414 }
390} 415}
diff --git a/src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php b/src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php
new file mode 100644
index 00000000..ce3b6e7d
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php
@@ -0,0 +1,70 @@
1<?php
2
3namespace Wallabag\CoreBundle\Entity;
4
5use Doctrine\ORM\Mapping as ORM;
6use Symfony\Bridge\RulerZ\Validator\Constraints as RulerZAssert;
7use Symfony\Component\Validator\Constraints as Assert;
8
9/**
10 * Ignore Origin rule.
11 *
12 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository")
13 * @ORM\Table(name="`ignore_origin_instance_rule`")
14 */
15class IgnoreOriginInstanceRule implements IgnoreOriginRuleInterface, RuleInterface
16{
17 /**
18 * @var int
19 *
20 * @ORM\Column(name="id", type="integer")
21 * @ORM\Id
22 * @ORM\GeneratedValue(strategy="AUTO")
23 */
24 private $id;
25
26 /**
27 * @var string
28 *
29 * @Assert\NotBlank()
30 * @Assert\Length(max=255)
31 * @RulerZAssert\ValidRule(
32 * allowed_variables={"host","_all"},
33 * allowed_operators={"=","~"}
34 * )
35 * @ORM\Column(name="rule", type="string", nullable=false)
36 */
37 private $rule;
38
39 /**
40 * Get id.
41 *
42 * @return int
43 */
44 public function getId()
45 {
46 return $this->id;
47 }
48
49 /**
50 * Set rule.
51 *
52 * @return IgnoreOriginRuleInterface
53 */
54 public function setRule(string $rule)
55 {
56 $this->rule = $rule;
57
58 return $this;
59 }
60
61 /**
62 * Get rule.
63 *
64 * @return string
65 */
66 public function getRule()
67 {
68 return $this->rule;
69 }
70}
diff --git a/src/Wallabag/CoreBundle/Entity/IgnoreOriginRuleInterface.php b/src/Wallabag/CoreBundle/Entity/IgnoreOriginRuleInterface.php
new file mode 100644
index 00000000..eb865a3a
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Entity/IgnoreOriginRuleInterface.php
@@ -0,0 +1,12 @@
1<?php
2
3namespace Wallabag\CoreBundle\Entity;
4
5interface IgnoreOriginRuleInterface
6{
7 public function getId();
8
9 public function setRule(string $rule);
10
11 public function getRule();
12}
diff --git a/src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php b/src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php
new file mode 100644
index 00000000..0b6f318d
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php
@@ -0,0 +1,97 @@
1<?php
2
3namespace Wallabag\CoreBundle\Entity;
4
5use Doctrine\ORM\Mapping as ORM;
6use Symfony\Bridge\RulerZ\Validator\Constraints as RulerZAssert;
7use Symfony\Component\Validator\Constraints as Assert;
8
9/**
10 * Ignore Origin rule.
11 *
12 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\IgnoreOriginUserRuleRepository")
13 * @ORM\Table(name="`ignore_origin_user_rule`")
14 */
15class IgnoreOriginUserRule implements IgnoreOriginRuleInterface, RuleInterface
16{
17 /**
18 * @var int
19 *
20 * @ORM\Column(name="id", type="integer")
21 * @ORM\Id
22 * @ORM\GeneratedValue(strategy="AUTO")
23 */
24 private $id;
25
26 /**
27 * @var string
28 *
29 * @Assert\NotBlank()
30 * @Assert\Length(max=255)
31 * @RulerZAssert\ValidRule(
32 * allowed_variables={"host","_all"},
33 * allowed_operators={"=","~"}
34 * )
35 * @ORM\Column(name="rule", type="string", nullable=false)
36 */
37 private $rule;
38
39 /**
40 * @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Config", inversedBy="ignoreOriginRules")
41 */
42 private $config;
43
44 /**
45 * Get id.
46 *
47 * @return int
48 */
49 public function getId()
50 {
51 return $this->id;
52 }
53
54 /**
55 * Set rule.
56 *
57 * @return IgnoreOriginRuleInterface
58 */
59 public function setRule(string $rule)
60 {
61 $this->rule = $rule;
62
63 return $this;
64 }
65
66 /**
67 * Get rule.
68 *
69 * @return string
70 */
71 public function getRule()
72 {
73 return $this->rule;
74 }
75
76 /**
77 * Set config.
78 *
79 * @return IgnoreOriginUserRule
80 */
81 public function setConfig(Config $config)
82 {
83 $this->config = $config;
84
85 return $this;
86 }
87
88 /**
89 * Get config.
90 *
91 * @return Config
92 */
93 public function getConfig()
94 {
95 return $this->config;
96 }
97}
diff --git a/src/Wallabag/CoreBundle/Entity/RuleInterface.php b/src/Wallabag/CoreBundle/Entity/RuleInterface.php
new file mode 100644
index 00000000..8e9b5c45
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Entity/RuleInterface.php
@@ -0,0 +1,7 @@
1<?php
2
3namespace Wallabag\CoreBundle\Entity;
4
5interface RuleInterface
6{
7}
diff --git a/src/Wallabag/CoreBundle/Entity/TaggingRule.php b/src/Wallabag/CoreBundle/Entity/TaggingRule.php
index f7166087..7bed7a69 100644
--- a/src/Wallabag/CoreBundle/Entity/TaggingRule.php
+++ b/src/Wallabag/CoreBundle/Entity/TaggingRule.php
@@ -17,7 +17,7 @@ use Symfony\Component\Validator\Constraints as Assert;
17 * @ORM\Table(name="`tagging_rule`") 17 * @ORM\Table(name="`tagging_rule`")
18 * @ORM\Entity 18 * @ORM\Entity
19 */ 19 */
20class TaggingRule 20class TaggingRule implements RuleInterface
21{ 21{
22 /** 22 /**
23 * @var int 23 * @var int
diff --git a/src/Wallabag/CoreBundle/Form/Type/IgnoreOriginInstanceRuleType.php b/src/Wallabag/CoreBundle/Form/Type/IgnoreOriginInstanceRuleType.php
new file mode 100644
index 00000000..d2e414fb
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Form/Type/IgnoreOriginInstanceRuleType.php
@@ -0,0 +1,37 @@
1<?php
2
3namespace Wallabag\CoreBundle\Form\Type;
4
5use Symfony\Component\Form\AbstractType;
6use Symfony\Component\Form\Extension\Core\Type\SubmitType;
7use Symfony\Component\Form\Extension\Core\Type\TextType;
8use Symfony\Component\Form\FormBuilderInterface;
9use Symfony\Component\OptionsResolver\OptionsResolver;
10
11class IgnoreOriginInstanceRuleType extends AbstractType
12{
13 public function buildForm(FormBuilderInterface $builder, array $options)
14 {
15 $builder
16 ->add('rule', TextType::class, [
17 'required' => true,
18 'label' => 'config.form_rules.rule_label',
19 ])
20 ->add('save', SubmitType::class, [
21 'label' => 'config.form.save',
22 ])
23 ;
24 }
25
26 public function configureOptions(OptionsResolver $resolver)
27 {
28 $resolver->setDefaults([
29 'data_class' => 'Wallabag\CoreBundle\Entity\IgnoreOriginInstanceRule',
30 ]);
31 }
32
33 public function getBlockPrefix()
34 {
35 return 'ignore_origin_instance_rule';
36 }
37}
diff --git a/src/Wallabag/CoreBundle/Form/Type/IgnoreOriginUserRuleType.php b/src/Wallabag/CoreBundle/Form/Type/IgnoreOriginUserRuleType.php
new file mode 100644
index 00000000..b9110f17
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Form/Type/IgnoreOriginUserRuleType.php
@@ -0,0 +1,37 @@
1<?php
2
3namespace Wallabag\CoreBundle\Form\Type;
4
5use Symfony\Component\Form\AbstractType;
6use Symfony\Component\Form\Extension\Core\Type\SubmitType;
7use Symfony\Component\Form\Extension\Core\Type\TextType;
8use Symfony\Component\Form\FormBuilderInterface;
9use Symfony\Component\OptionsResolver\OptionsResolver;
10
11class IgnoreOriginUserRuleType extends AbstractType
12{
13 public function buildForm(FormBuilderInterface $builder, array $options)
14 {
15 $builder
16 ->add('rule', TextType::class, [
17 'required' => true,
18 'label' => 'config.form_rules.rule_label',
19 ])
20 ->add('save', SubmitType::class, [
21 'label' => 'config.form.save',
22 ])
23 ;
24 }
25
26 public function configureOptions(OptionsResolver $resolver)
27 {
28 $resolver->setDefaults([
29 'data_class' => 'Wallabag\CoreBundle\Entity\IgnoreOriginUserRule',
30 ]);
31 }
32
33 public function getBlockPrefix()
34 {
35 return 'ignore_origin_user_rule';
36 }
37}
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
index 9c6fa8db..7e93249d 100644
--- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php
+++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
@@ -19,6 +19,7 @@ class ContentProxy
19{ 19{
20 protected $graby; 20 protected $graby;
21 protected $tagger; 21 protected $tagger;
22 protected $ignoreOriginProcessor;
22 protected $validator; 23 protected $validator;
23 protected $logger; 24 protected $logger;
24 protected $mimeGuesser; 25 protected $mimeGuesser;
@@ -26,10 +27,11 @@ class ContentProxy
26 protected $eventDispatcher; 27 protected $eventDispatcher;
27 protected $storeArticleHeaders; 28 protected $storeArticleHeaders;
28 29
29 public function __construct(Graby $graby, RuleBasedTagger $tagger, ValidatorInterface $validator, LoggerInterface $logger, $fetchingErrorMessage, $storeArticleHeaders = false) 30 public function __construct(Graby $graby, RuleBasedTagger $tagger, RuleBasedIgnoreOriginProcessor $ignoreOriginProcessor, ValidatorInterface $validator, LoggerInterface $logger, $fetchingErrorMessage, $storeArticleHeaders = false)
30 { 31 {
31 $this->graby = $graby; 32 $this->graby = $graby;
32 $this->tagger = $tagger; 33 $this->tagger = $tagger;
34 $this->ignoreOriginProcessor = $ignoreOriginProcessor;
33 $this->validator = $validator; 35 $this->validator = $validator;
34 $this->logger = $logger; 36 $this->logger = $logger;
35 $this->mimeGuesser = new MimeTypeExtensionGuesser(); 37 $this->mimeGuesser = new MimeTypeExtensionGuesser();
@@ -356,7 +358,7 @@ class ContentProxy
356 $diff_keys = array_keys($diff); 358 $diff_keys = array_keys($diff);
357 sort($diff_keys); 359 sort($diff_keys);
358 360
359 if ($this->ignoreUrl($entry->getUrl())) { 361 if ($this->ignoreOriginProcessor->process($entry)) {
360 $entry->setUrl($url); 362 $entry->setUrl($url);
361 363
362 return false; 364 return false;
@@ -396,41 +398,6 @@ class ContentProxy
396 } 398 }
397 399
398 /** 400 /**
399 * Check entry url against an ignore list to replace with content url.
400 *
401 * XXX: move the ignore list in the database to let users handle it
402 *
403 * @param string $url url to test
404 *
405 * @return bool true if url matches ignore list otherwise false
406 */
407 private function ignoreUrl($url)
408 {
409 $ignored_hosts = ['feedproxy.google.com', 'feeds.reuters.com'];
410 $ignored_patterns = ['https?://www\.lemonde\.fr/tiny.*'];
411
412 $parsed_url = parse_url($url);
413
414 $filtered = array_filter($ignored_hosts, function ($var) use ($parsed_url) {
415 return $var === $parsed_url['host'];
416 });
417
418 if ([] !== $filtered) {
419 return true;
420 }
421
422 $filtered = array_filter($ignored_patterns, function ($var) use ($url) {
423 return preg_match("`$var`i", $url);
424 });
425
426 if ([] !== $filtered) {
427 return true;
428 }
429
430 return false;
431 }
432
433 /**
434 * Validate that the given content has at least a title, an html and a url. 401 * Validate that the given content has at least a title, an html and a url.
435 * 402 *
436 * @return bool true if valid otherwise false 403 * @return bool true if valid otherwise false
diff --git a/src/Wallabag/CoreBundle/Helper/RuleBasedIgnoreOriginProcessor.php b/src/Wallabag/CoreBundle/Helper/RuleBasedIgnoreOriginProcessor.php
new file mode 100644
index 00000000..333e5b0a
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Helper/RuleBasedIgnoreOriginProcessor.php
@@ -0,0 +1,50 @@
1<?php
2
3namespace Wallabag\CoreBundle\Helper;
4
5use Psr\Log\LoggerInterface;
6use RulerZ\RulerZ;
7use Wallabag\CoreBundle\Entity\Entry;
8use Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository;
9
10class RuleBasedIgnoreOriginProcessor
11{
12 protected $rulerz;
13 protected $logger;
14 protected $ignoreOriginInstanceRuleRepository;
15
16 public function __construct(RulerZ $rulerz, LoggerInterface $logger, IgnoreOriginInstanceRuleRepository $ignoreOriginInstanceRuleRepository)
17 {
18 $this->rulerz = $rulerz;
19 $this->logger = $logger;
20 $this->ignoreOriginInstanceRuleRepository = $ignoreOriginInstanceRuleRepository;
21 }
22
23 /**
24 * @param Entry $entry Entry to process
25 *
26 * @return bool
27 */
28 public function process(Entry $entry)
29 {
30 $url = $entry->getUrl();
31 $userRules = $entry->getUser()->getConfig()->getIgnoreOriginRules()->toArray();
32 $rules = array_merge($this->ignoreOriginInstanceRuleRepository->findAll(), $userRules);
33
34 $parsed_url = parse_url($url);
35 // We add the former url as a new key _all for pattern matching
36 $parsed_url['_all'] = $url;
37
38 foreach ($rules as $rule) {
39 if ($this->rulerz->satisfies($parsed_url, $rule->getRule())) {
40 $this->logger->info('Origin url matching ignore rule.', [
41 'rule' => $rule->getRule(),
42 ]);
43
44 return true;
45 }
46 }
47
48 return false;
49 }
50}
diff --git a/src/Wallabag/CoreBundle/Operator/PHP/PatternMatches.php b/src/Wallabag/CoreBundle/Operator/PHP/PatternMatches.php
new file mode 100644
index 00000000..532e2bb3
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Operator/PHP/PatternMatches.php
@@ -0,0 +1,23 @@
1<?php
2
3namespace Wallabag\CoreBundle\Operator\PHP;
4
5/**
6 * Provides a "~" operator used for ignore origin rules.
7 *
8 * It asserts that a subject matches a given regexp pattern, in a
9 * case-insensitive way.
10 *
11 * This operator will be used to compile ignore origin rules in PHP, usable
12 * directly on Entry objects for instance.
13 * It's registered in RulerZ using a service (wallabag.operator.array.pattern_matches);
14 */
15class PatternMatches
16{
17 public function __invoke($subject, $pattern)
18 {
19 $count = preg_match("`$pattern`i", $subject);
20
21 return \is_int($count) && $count > 0;
22 }
23}
diff --git a/src/Wallabag/CoreBundle/Repository/IgnoreOriginInstanceRuleRepository.php b/src/Wallabag/CoreBundle/Repository/IgnoreOriginInstanceRuleRepository.php
new file mode 100644
index 00000000..708a0ede
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Repository/IgnoreOriginInstanceRuleRepository.php
@@ -0,0 +1,9 @@
1<?php
2
3namespace Wallabag\CoreBundle\Repository;
4
5use Doctrine\ORM\EntityRepository;
6
7class IgnoreOriginInstanceRuleRepository extends EntityRepository
8{
9}
diff --git a/src/Wallabag/CoreBundle/Repository/IgnoreOriginUserRuleRepository.php b/src/Wallabag/CoreBundle/Repository/IgnoreOriginUserRuleRepository.php
new file mode 100644
index 00000000..8aa4c265
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Repository/IgnoreOriginUserRuleRepository.php
@@ -0,0 +1,9 @@
1<?php
2
3namespace Wallabag\CoreBundle\Repository;
4
5use Doctrine\ORM\EntityRepository;
6
7class IgnoreOriginUserRuleRepository extends EntityRepository
8{
9}
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml
index 3f3d4de7..8417ac35 100644
--- a/src/Wallabag/CoreBundle/Resources/config/services.yml
+++ b/src/Wallabag/CoreBundle/Resources/config/services.yml
@@ -92,6 +92,7 @@ services:
92 arguments: 92 arguments:
93 - "@wallabag_core.graby" 93 - "@wallabag_core.graby"
94 - "@wallabag_core.rule_based_tagger" 94 - "@wallabag_core.rule_based_tagger"
95 - "@wallabag_core.rule_based_ignore_origin_processor"
95 - "@validator" 96 - "@validator"
96 - "@logger" 97 - "@logger"
97 - '%wallabag_core.fetching_error_message%' 98 - '%wallabag_core.fetching_error_message%'
@@ -110,6 +111,13 @@ services:
110 - "@wallabag_core.entry_repository" 111 - "@wallabag_core.entry_repository"
111 - "@logger" 112 - "@logger"
112 113
114 wallabag_core.rule_based_ignore_origin_processor:
115 class: Wallabag\CoreBundle\Helper\RuleBasedIgnoreOriginProcessor
116 arguments:
117 - "@rulerz"
118 - "@logger"
119 - "@wallabag_core.ignore_origin_instance_rule_repository"
120
113 # repository as a service 121 # repository as a service
114 wallabag_core.entry_repository: 122 wallabag_core.entry_repository:
115 class: Wallabag\CoreBundle\Repository\EntryRepository 123 class: Wallabag\CoreBundle\Repository\EntryRepository
@@ -131,6 +139,12 @@ services:
131 calls: 139 calls:
132 - [ setCrypto, [ "@wallabag_core.helper.crypto_proxy" ] ] 140 - [ setCrypto, [ "@wallabag_core.helper.crypto_proxy" ] ]
133 141
142 wallabag_core.ignore_origin_instance_rule_repository:
143 class: Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository
144 factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
145 arguments:
146 - WallabagCoreBundle:IgnoreOriginInstanceRule
147
134 wallabag_core.helper.entries_export: 148 wallabag_core.helper.entries_export:
135 class: Wallabag\CoreBundle\Helper\EntriesExport 149 class: Wallabag\CoreBundle\Helper\EntriesExport
136 arguments: 150 arguments:
@@ -158,6 +172,11 @@ services:
158 tags: 172 tags:
159 - { name: rulerz.operator, target: doctrine, operator: notmatches, inline: true } 173 - { name: rulerz.operator, target: doctrine, operator: notmatches, inline: true }
160 174
175 wallabag.operator.array.pattern_matches:
176 class: Wallabag\CoreBundle\Operator\PHP\PatternMatches
177 tags:
178 - { name: rulerz.operator, target: native, operator: "~" }
179
161 wallabag_core.helper.redirect: 180 wallabag_core.helper.redirect:
162 class: Wallabag\CoreBundle\Helper\Redirect 181 class: Wallabag\CoreBundle\Helper\Redirect
163 arguments: 182 arguments:
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
index 4d525979..54df2e64 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
@@ -33,6 +33,7 @@ menu:
33 back_to_unread: 'Tilbage til de ulæste artikler' 33 back_to_unread: 'Tilbage til de ulæste artikler'
34 # users_management: 'Users management' 34 # users_management: 'Users management'
35 # site_credentials: 'Site credentials' 35 # site_credentials: 'Site credentials'
36 # ignore_origin_instance_rules: 'Global ignore origin rules'
36 # quickstart: "Quickstart" 37 # quickstart: "Quickstart"
37 top: 38 top:
38 add_new_entry: 'Tilføj ny artikel' 39 add_new_entry: 'Tilføj ny artikel'
@@ -59,6 +60,7 @@ config:
59 user_info: 'Brugeroplysninger' 60 user_info: 'Brugeroplysninger'
60 password: 'Adgangskode' 61 password: 'Adgangskode'
61 # rules: 'Tagging rules' 62 # rules: 'Tagging rules'
63 # ignore_origin: 'Ignore origin rules'
62 new_user: 'Tilføj bruger' 64 new_user: 'Tilføj bruger'
63 # reset: 'Reset area' 65 # reset: 'Reset area'
64 form: 66 form:
@@ -177,6 +179,24 @@ config:
177 # and: 'One rule AND another' 179 # and: 'One rule AND another'
178 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' 180 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>'
179 # notmatches: 'Tests that a <i>subject</i> doesn''t match match a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' 181 # notmatches: 'Tests that a <i>subject</i> doesn''t match match a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
182 form_ignore_origin_rules:
183 # faq:
184 # title: 'FAQ'
185 # ignore_origin_rules_definition_title: 'What does « ignore origin rules » mean?'
186 # ignore_origin_rules_definition_description: 'They are used by wallabag to automatically ignore an origin address after a redirect.<br />If a redirect occurs while fetching a new entry, all the ignore origin rules (<i>user defined and instance defined</i>) will be used to ignore the origin address.'
187 # how_to_use_them_title: 'How do I use them?'
188 # how_to_use_them_description: 'Let us assume you want to ignore the origin of an entry coming from « <i>rss.example.com</i> » (<i>knowing that after a redirect, the actual address is example.com</i>).<br />In that case, you should put « host = "rss.example.com" » in the <i>Rule</i> field.'
189 # variables_available_title: 'Which variables and operators can I use to write rules?'
190 # variables_available_description: 'The following variables and operators can be used to create ignore origin rules:'
191 # meaning: 'Meaning'
192 # variable_description:
193 # label: 'Variable'
194 # host: 'Host of the address'
195 # _all: 'Full address, mainly for pattern matching'
196 # operator_description:
197 # label: 'Operator'
198 # equal_to: 'Equal to…'
199 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>_all ~ "https?://rss.example.com/foobar/.*"</code>'
180 otp: 200 otp:
181 # page_title: Two-factor authentication 201 # page_title: Two-factor authentication
182 # app: 202 # app:
@@ -617,6 +637,8 @@ flashes:
617 # otp_disabled: Two-factor authentication disabled 637 # otp_disabled: Two-factor authentication disabled
618 # tagging_rules_imported: Tagging rules imported 638 # tagging_rules_imported: Tagging rules imported
619 # tagging_rules_not_imported: Error while importing tagging rules 639 # tagging_rules_not_imported: Error while importing tagging rules
640 # ignore_origin_rules_deleted: 'Ignore origin rule deleted'
641 # ignore_origin_rules_updated: 'Ignore origin rule updated'
620 entry: 642 entry:
621 notice: 643 notice:
622 # entry_already_saved: 'Entry already saved on %date%' 644 # entry_already_saved: 'Entry already saved on %date%'
@@ -658,3 +680,8 @@ flashes:
658 # added: 'Site credential for "%host%" added' 680 # added: 'Site credential for "%host%" added'
659 # updated: 'Site credential for "%host%" updated' 681 # updated: 'Site credential for "%host%" updated'
660 # deleted: 'Site credential for "%host%" deleted' 682 # deleted: 'Site credential for "%host%" deleted'
683 ignore_origin_instance_rule:
684 notice:
685 # added: 'Global ignore origin rule added'
686 # updated: 'Global ignore origin rule updated'
687 # deleted: 'Global ignore origin rule deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
index cd70c99f..549704d0 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
@@ -33,6 +33,7 @@ menu:
33 back_to_unread: 'Zurück zu ungelesenen Artikeln' 33 back_to_unread: 'Zurück zu ungelesenen Artikeln'
34 users_management: 'Benutzerverwaltung' 34 users_management: 'Benutzerverwaltung'
35 site_credentials: 'Zugangsdaten' 35 site_credentials: 'Zugangsdaten'
36 # ignore_origin_instance_rules: 'Global ignore origin rules'
36 quickstart: "Schnelleinstieg" 37 quickstart: "Schnelleinstieg"
37 top: 38 top:
38 add_new_entry: 'Neuen Artikel hinzufügen' 39 add_new_entry: 'Neuen Artikel hinzufügen'
@@ -59,6 +60,7 @@ config:
59 user_info: 'Benutzerinformation' 60 user_info: 'Benutzerinformation'
60 password: 'Kennwort' 61 password: 'Kennwort'
61 rules: 'Tagging-Regeln' 62 rules: 'Tagging-Regeln'
63 # ignore_origin: 'Ignore origin rules'
62 new_user: 'Benutzer hinzufügen' 64 new_user: 'Benutzer hinzufügen'
63 reset: 'Zurücksetzen' 65 reset: 'Zurücksetzen'
64 form: 66 form:
@@ -177,6 +179,24 @@ config:
177 and: 'Eine Regel UND eine andere' 179 and: 'Eine Regel UND eine andere'
178 matches: 'Testet, ob eine <i>Variable</i> auf eine <i>Suche</i> zutrifft (Groß- und Kleinschreibung wird nicht berücksichtigt).<br />Beispiel: <code>title matches "Fußball"</code>' 180 matches: 'Testet, ob eine <i>Variable</i> auf eine <i>Suche</i> zutrifft (Groß- und Kleinschreibung wird nicht berücksichtigt).<br />Beispiel: <code>title matches "Fußball"</code>'
179 notmatches: 'Testet, ob ein <i>Titel</i> nicht auf eine <i>Suche</i> zutrifft (Groß- und Kleinschreibung wird nicht berücksichtigt).<br />Beispiel: <code>title notmatches "Fußball"</code>' 181 notmatches: 'Testet, ob ein <i>Titel</i> nicht auf eine <i>Suche</i> zutrifft (Groß- und Kleinschreibung wird nicht berücksichtigt).<br />Beispiel: <code>title notmatches "Fußball"</code>'
182 form_ignore_origin_rules:
183 # faq:
184 # title: 'FAQ'
185 # ignore_origin_rules_definition_title: 'What does « ignore origin rules » mean?'
186 # ignore_origin_rules_definition_description: 'They are used by wallabag to automatically ignore an origin address after a redirect.<br />If a redirect occurs while fetching a new entry, all the ignore origin rules (<i>user defined and instance defined</i>) will be used to ignore the origin address.'
187 # how_to_use_them_title: 'How do I use them?'
188 # how_to_use_them_description: 'Let us assume you want to ignore the origin of an entry coming from « <i>rss.example.com</i> » (<i>knowing that after a redirect, the actual address is example.com</i>).<br />In that case, you should put « host = "rss.example.com" » in the <i>Rule</i> field.'
189 # variables_available_title: 'Which variables and operators can I use to write rules?'
190 # variables_available_description: 'The following variables and operators can be used to create ignore origin rules:'
191 # meaning: 'Meaning'
192 # variable_description:
193 # label: 'Variable'
194 # host: 'Host of the address'
195 # _all: 'Full address, mainly for pattern matching'
196 # operator_description:
197 # label: 'Operator'
198 # equal_to: 'Equal to…'
199 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>_all ~ "https?://rss.example.com/foobar/.*"</code>'
180 otp: 200 otp:
181 # page_title: Two-factor authentication 201 # page_title: Two-factor authentication
182 # app: 202 # app:
@@ -617,6 +637,8 @@ flashes:
617 # otp_disabled: Two-factor authentication disabled 637 # otp_disabled: Two-factor authentication disabled
618 # tagging_rules_imported: Tagging rules imported 638 # tagging_rules_imported: Tagging rules imported
619 # tagging_rules_not_imported: Error while importing tagging rules 639 # tagging_rules_not_imported: Error while importing tagging rules
640 # ignore_origin_rules_deleted: 'Ignore origin rule deleted'
641 # ignore_origin_rules_updated: 'Ignore origin rule updated'
620 entry: 642 entry:
621 notice: 643 notice:
622 entry_already_saved: 'Eintrag bereits am %date% gespeichert' 644 entry_already_saved: 'Eintrag bereits am %date% gespeichert'
@@ -658,3 +680,8 @@ flashes:
658 added: 'Zugangsdaten für "%host%" hinzugefügt' 680 added: 'Zugangsdaten für "%host%" hinzugefügt'
659 updated: 'Zugangsdaten für "%host%" aktualisiert' 681 updated: 'Zugangsdaten für "%host%" aktualisiert'
660 deleted: 'Zugangsdaten für "%host%" gelöscht' 682 deleted: 'Zugangsdaten für "%host%" gelöscht'
683 ignore_origin_instance_rule:
684 notice:
685 # added: 'Global ignore origin rule added'
686 # updated: 'Global ignore origin rule updated'
687 # deleted: 'Global ignore origin rule deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
index 1bc32423..a68a7d7d 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
@@ -33,6 +33,7 @@ menu:
33 back_to_unread: 'Back to unread articles' 33 back_to_unread: 'Back to unread articles'
34 users_management: 'Users management' 34 users_management: 'Users management'
35 site_credentials: 'Site credentials' 35 site_credentials: 'Site credentials'
36 ignore_origin_instance_rules: 'Global ignore origin rules'
36 quickstart: "Quickstart" 37 quickstart: "Quickstart"
37 top: 38 top:
38 add_new_entry: 'Add a new entry' 39 add_new_entry: 'Add a new entry'
@@ -59,6 +60,7 @@ config:
59 user_info: 'User information' 60 user_info: 'User information'
60 password: 'Password' 61 password: 'Password'
61 rules: 'Tagging rules' 62 rules: 'Tagging rules'
63 ignore_origin: 'Ignore origin rules'
62 new_user: 'Add a user' 64 new_user: 'Add a user'
63 reset: 'Reset area' 65 reset: 'Reset area'
64 form: 66 form:
@@ -177,6 +179,24 @@ config:
177 and: 'One rule AND another' 179 and: 'One rule AND another'
178 matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' 180 matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>'
179 notmatches: 'Tests that a <i>subject</i> doesn''t match match a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' 181 notmatches: 'Tests that a <i>subject</i> doesn''t match match a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
182 form_ignore_origin_rules:
183 faq:
184 title: 'FAQ'
185 ignore_origin_rules_definition_title: 'What does « ignore origin rules » mean?'
186 ignore_origin_rules_definition_description: 'They are used by wallabag to automatically ignore an origin address after a redirect.<br />If a redirect occurs while fetching a new entry, all the ignore origin rules (<i>user defined and instance defined</i>) will be used to ignore the origin address.'
187 how_to_use_them_title: 'How do I use them?'
188 how_to_use_them_description: 'Let us assume you want to ignore the origin of an entry coming from « <i>rss.example.com</i> » (<i>knowing that after a redirect, the actual address is example.com</i>).<br />In that case, you should put « host = "rss.example.com" » in the <i>Rule</i> field.'
189 variables_available_title: 'Which variables and operators can I use to write rules?'
190 variables_available_description: 'The following variables and operators can be used to create ignore origin rules:'
191 meaning: 'Meaning'
192 variable_description:
193 label: 'Variable'
194 host: 'Host of the address'
195 _all: 'Full address, mainly for pattern matching'
196 operator_description:
197 label: 'Operator'
198 equal_to: 'Equal to…'
199 matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>_all ~ "https?://rss.example.com/foobar/.*"</code>'
180 otp: 200 otp:
181 page_title: Two-factor authentication 201 page_title: Two-factor authentication
182 app: 202 app:
@@ -594,6 +614,24 @@ site_credential:
594 delete_confirm: Are you sure? 614 delete_confirm: Are you sure?
595 back_to_list: Back to list 615 back_to_list: Back to list
596 616
617ignore_origin_instance_rule:
618 page_title: Global ignore origin rules
619 new_ignore_origin_instance_rule: Create a global ignore origin rule
620 edit_ignore_origin_instance_rule: Edit an existing ignore origin rule
621 description: "Here you can manage the global ignore origin rules used to ignore some patterns of origin url."
622 list:
623 actions: Actions
624 edit_action: Edit
625 yes: Yes
626 no: No
627 create_new_one: Create a new global ignore origin rule
628 form:
629 rule_label: Rule
630 save: Save
631 delete: Delete
632 delete_confirm: Are you sure?
633 back_to_list: Back to list
634
597error: 635error:
598 page_title: An error occurred 636 page_title: An error occurred
599 637
@@ -617,6 +655,8 @@ flashes:
617 otp_disabled: Two-factor authentication disabled 655 otp_disabled: Two-factor authentication disabled
618 tagging_rules_imported: Tagging rules imported 656 tagging_rules_imported: Tagging rules imported
619 tagging_rules_not_imported: Error while importing tagging rules 657 tagging_rules_not_imported: Error while importing tagging rules
658 ignore_origin_rules_deleted: 'Ignore origin rule deleted'
659 ignore_origin_rules_updated: 'Ignore origin rule updated'
620 entry: 660 entry:
621 notice: 661 notice:
622 entry_already_saved: 'Entry already saved on %date%' 662 entry_already_saved: 'Entry already saved on %date%'
@@ -658,3 +698,8 @@ flashes:
658 added: 'Site credential for "%host%" added' 698 added: 'Site credential for "%host%" added'
659 updated: 'Site credential for "%host%" updated' 699 updated: 'Site credential for "%host%" updated'
660 deleted: 'Site credential for "%host%" deleted' 700 deleted: 'Site credential for "%host%" deleted'
701 ignore_origin_instance_rule:
702 notice:
703 added: 'Global ignore origin rule added'
704 updated: 'Global ignore origin rule updated'
705 deleted: 'Global ignore origin rule deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
index bced72e9..c3e3ba81 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
@@ -33,6 +33,7 @@ menu:
33 back_to_unread: 'Volver a los artículos sin leer' 33 back_to_unread: 'Volver a los artículos sin leer'
34 users_management: 'Configuración de usuarios' 34 users_management: 'Configuración de usuarios'
35 site_credentials: 'Credenciales del sitio' 35 site_credentials: 'Credenciales del sitio'
36 # ignore_origin_instance_rules: 'Global ignore origin rules'
36 quickstart: "Inicio rápido" 37 quickstart: "Inicio rápido"
37 top: 38 top:
38 add_new_entry: 'Añadir un nuevo artículo' 39 add_new_entry: 'Añadir un nuevo artículo'
@@ -59,6 +60,7 @@ config:
59 user_info: 'Información de usuario' 60 user_info: 'Información de usuario'
60 password: 'Contraseña' 61 password: 'Contraseña'
61 rules: 'Reglas de etiquetado automáticas' 62 rules: 'Reglas de etiquetado automáticas'
63 # ignore_origin: 'Ignore origin rules'
62 new_user: 'Añadir un usuario' 64 new_user: 'Añadir un usuario'
63 reset: 'Reiniciar mi cuenta' 65 reset: 'Reiniciar mi cuenta'
64 form: 66 form:
@@ -177,6 +179,24 @@ config:
177 and: 'Una regla Y la otra' 179 and: 'Una regla Y la otra'
178 matches: 'Prueba si un <i>sujeto</i> corresponde a una <i>búsqueda</i> (insensible a mayúsculas).<br />Ejemplo : <code>title matches "fútbol"</code>' 180 matches: 'Prueba si un <i>sujeto</i> corresponde a una <i>búsqueda</i> (insensible a mayúsculas).<br />Ejemplo : <code>title matches "fútbol"</code>'
179 notmatches: 'Prueba si <i>subject</i> no corresponde a una <i>búsqueda</i> (insensible a mayúsculas).<br />Example: <code>title notmatches "fútbol"</code>' 181 notmatches: 'Prueba si <i>subject</i> no corresponde a una <i>búsqueda</i> (insensible a mayúsculas).<br />Example: <code>title notmatches "fútbol"</code>'
182 form_ignore_origin_rules:
183 # faq:
184 # title: 'FAQ'
185 # ignore_origin_rules_definition_title: 'What does « ignore origin rules » mean?'
186 # ignore_origin_rules_definition_description: 'They are used by wallabag to automatically ignore an origin address after a redirect.<br />If a redirect occurs while fetching a new entry, all the ignore origin rules (<i>user defined and instance defined</i>) will be used to ignore the origin address.'
187 # how_to_use_them_title: 'How do I use them?'
188 # how_to_use_them_description: 'Let us assume you want to ignore the origin of an entry coming from « <i>rss.example.com</i> » (<i>knowing that after a redirect, the actual address is example.com</i>).<br />In that case, you should put « host = "rss.example.com" » in the <i>Rule</i> field.'
189 # variables_available_title: 'Which variables and operators can I use to write rules?'
190 # variables_available_description: 'The following variables and operators can be used to create ignore origin rules:'
191 # meaning: 'Meaning'
192 # variable_description:
193 # label: 'Variable'
194 # host: 'Host of the address'
195 # _all: 'Full address, mainly for pattern matching'
196 # operator_description:
197 # label: 'Operator'
198 # equal_to: 'Equal to…'
199 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>_all ~ "https?://rss.example.com/foobar/.*"</code>'
180 otp: 200 otp:
181 page_title: Autenticación de dos pasos 201 page_title: Autenticación de dos pasos
182 app: 202 app:
@@ -617,6 +637,8 @@ flashes:
617 # otp_disabled: Two-factor authentication disabled 637 # otp_disabled: Two-factor authentication disabled
618 tagging_rules_imported: Reglas de etiquetado importadas 638 tagging_rules_imported: Reglas de etiquetado importadas
619 tagging_rules_not_imported: Un error se ha producico en la importación de las reglas de etiquetado 639 tagging_rules_not_imported: Un error se ha producico en la importación de las reglas de etiquetado
640 # ignore_origin_rules_deleted: 'Ignore origin rule deleted'
641 # ignore_origin_rules_updated: 'Ignore origin rule updated'
620 entry: 642 entry:
621 notice: 643 notice:
622 entry_already_saved: 'Artículo ya guardado el %fecha%' 644 entry_already_saved: 'Artículo ya guardado el %fecha%'
@@ -658,3 +680,8 @@ flashes:
658 added: 'Credenciales del sitio añadidas para "%host%"' 680 added: 'Credenciales del sitio añadidas para "%host%"'
659 updated: 'Credenciales del sitio actualizadas para "%host%"' 681 updated: 'Credenciales del sitio actualizadas para "%host%"'
660 deleted: 'Credenciales del sitio eliminadas para "%host%"' 682 deleted: 'Credenciales del sitio eliminadas para "%host%"'
683 ignore_origin_instance_rule:
684 notice:
685 # added: 'Global ignore origin rule added'
686 # updated: 'Global ignore origin rule updated'
687 # deleted: 'Global ignore origin rule deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
index 0704204a..4a52a208 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
@@ -33,6 +33,7 @@ menu:
33 back_to_unread: 'بازگشت به خوانده‌نشده‌ها' 33 back_to_unread: 'بازگشت به خوانده‌نشده‌ها'
34 # users_management: 'Users management' 34 # users_management: 'Users management'
35 # site_credentials: 'Site credentials' 35 # site_credentials: 'Site credentials'
36 # ignore_origin_instance_rules: 'Global ignore origin rules'
36 quickstart: "Quickstart" 37 quickstart: "Quickstart"
37 top: 38 top:
38 add_new_entry: 'افزودن مقالهٔ تازه' 39 add_new_entry: 'افزودن مقالهٔ تازه'
@@ -59,6 +60,7 @@ config:
59 user_info: 'اطلاعات کاربر' 60 user_info: 'اطلاعات کاربر'
60 password: 'رمز' 61 password: 'رمز'
61 rules: 'برچسب‌گذاری خودکار' 62 rules: 'برچسب‌گذاری خودکار'
63 # ignore_origin: 'Ignore origin rules'
62 new_user: 'افزودن کاربر' 64 new_user: 'افزودن کاربر'
63 # reset: 'Reset area' 65 # reset: 'Reset area'
64 form: 66 form:
@@ -177,6 +179,24 @@ config:
177 # and: 'One rule AND another' 179 # and: 'One rule AND another'
178 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' 180 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>'
179 # notmatches: 'Tests that a <i>subject</i> doesn''t match match a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' 181 # notmatches: 'Tests that a <i>subject</i> doesn''t match match a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
182 form_ignore_origin_rules:
183 # faq:
184 # title: 'FAQ'
185 # ignore_origin_rules_definition_title: 'What does « ignore origin rules » mean?'
186 # ignore_origin_rules_definition_description: 'They are used by wallabag to automatically ignore an origin address after a redirect.<br />If a redirect occurs while fetching a new entry, all the ignore origin rules (<i>user defined and instance defined</i>) will be used to ignore the origin address.'
187 # how_to_use_them_title: 'How do I use them?'
188 # how_to_use_them_description: 'Let us assume you want to ignore the origin of an entry coming from « <i>rss.example.com</i> » (<i>knowing that after a redirect, the actual address is example.com</i>).<br />In that case, you should put « host = "rss.example.com" » in the <i>Rule</i> field.'
189 # variables_available_title: 'Which variables and operators can I use to write rules?'
190 # variables_available_description: 'The following variables and operators can be used to create ignore origin rules:'
191 # meaning: 'Meaning'
192 # variable_description:
193 # label: 'Variable'
194 # host: 'Host of the address'
195 # _all: 'Full address, mainly for pattern matching'
196 # operator_description:
197 # label: 'Operator'
198 # equal_to: 'Equal to…'
199 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>_all ~ "https?://rss.example.com/foobar/.*"</code>'
180 otp: 200 otp:
181 # page_title: Two-factor authentication 201 # page_title: Two-factor authentication
182 # app: 202 # app:
@@ -617,6 +637,8 @@ flashes:
617 # otp_disabled: Two-factor authentication disabled 637 # otp_disabled: Two-factor authentication disabled
618 # tagging_rules_imported: Tagging rules imported 638 # tagging_rules_imported: Tagging rules imported
619 # tagging_rules_not_imported: Error while importing tagging rules 639 # tagging_rules_not_imported: Error while importing tagging rules
640 # ignore_origin_rules_deleted: 'Ignore origin rule deleted'
641 # ignore_origin_rules_updated: 'Ignore origin rule updated'
620 entry: 642 entry:
621 notice: 643 notice:
622 entry_already_saved: 'این مقاله در تاریخ %date% ذخیره شده بود' 644 entry_already_saved: 'این مقاله در تاریخ %date% ذخیره شده بود'
@@ -658,3 +680,8 @@ flashes:
658 # added: 'Site credential for "%host%" added' 680 # added: 'Site credential for "%host%" added'
659 # updated: 'Site credential for "%host%" updated' 681 # updated: 'Site credential for "%host%" updated'
660 # deleted: 'Site credential for "%host%" deleted' 682 # deleted: 'Site credential for "%host%" deleted'
683 ignore_origin_instance_rule:
684 notice:
685 # added: 'Global ignore origin rule added'
686 # updated: 'Global ignore origin rule updated'
687 # deleted: 'Global ignore origin rule deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index 5d5878eb..2cfab8cf 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -33,6 +33,7 @@ menu:
33 back_to_unread: "Retour aux articles non lus" 33 back_to_unread: "Retour aux articles non lus"
34 users_management: "Gestion des utilisateurs" 34 users_management: "Gestion des utilisateurs"
35 site_credentials: 'Accès aux sites' 35 site_credentials: 'Accès aux sites'
36 ignore_origin_instance_rules: "Règles globales d'omission d'origine"
36 quickstart: "Pour bien débuter" 37 quickstart: "Pour bien débuter"
37 top: 38 top:
38 add_new_entry: "Sauvegarder un nouvel article" 39 add_new_entry: "Sauvegarder un nouvel article"
@@ -59,6 +60,7 @@ config:
59 user_info: "Mon compte" 60 user_info: "Mon compte"
60 password: "Mot de passe" 61 password: "Mot de passe"
61 rules: "Règles de tag automatiques" 62 rules: "Règles de tag automatiques"
63 ignore_origin: "Règles d'omission d'origine"
62 new_user: "Créer un compte" 64 new_user: "Créer un compte"
63 reset: "Réinitialisation" 65 reset: "Réinitialisation"
64 form: 66 form:
@@ -177,6 +179,24 @@ config:
177 and: "Une règle ET l’autre" 179 and: "Une règle ET l’autre"
178 matches: "Teste si un <i>sujet</i> correspond à une <i>recherche</i> (non sensible à la casse).<br />Exemple : <code>title matches \"football\"</code>" 180 matches: "Teste si un <i>sujet</i> correspond à une <i>recherche</i> (non sensible à la casse).<br />Exemple : <code>title matches \"football\"</code>"
179 notmatches: "Teste si un <i>sujet</i> ne correspond pas à une <i>recherche</i> (non sensible à la casse).<br />Exemple : <code>title notmatches \"football\"</code>" 181 notmatches: "Teste si un <i>sujet</i> ne correspond pas à une <i>recherche</i> (non sensible à la casse).<br />Exemple : <code>title notmatches \"football\"</code>"
182 form_ignore_origin_rules:
183 faq:
184 title: "FAQ"
185 ignore_origin_rules_definition_title: "Que signifient les règles d'omission d'origine ?"
186 ignore_origin_rules_definition_description: "Ce sont des règles utilisées par wallabag pour omettre automatiquement l'adresse d'origine après une redirection.<br />Si une redirection intervient pendant la récupération d'un nouvel article, toutes les règles d'omission (<i>règles utilisateur et instance</i>) seront utilisées afin d'ignorer ou non l'adresse d'origine."
187 how_to_use_them_title: "Comment les utiliser ?"
188 how_to_use_them_description: "Imaginons que vous vouliez omettre l'origine d'un article provenant de « <i>rss.example.com</i> » (<i>sachant qu'après la redirection, l'adresse réelle est example.com</i>).<br />Dans ce cas, vous devriez mettre « host = \"rss.example.com\" » dans le champ <i>Règle</i>."
189 variables_available_title: "Quelles variables et opérateurs puis-je utiliser pour écrire des règles ?"
190 variables_available_description: "Les variables et opérateurs suivants peuvent être utilisés pour écrire des règles d'omission d'origine :"
191 meaning: "Signification"
192 variable_description:
193 label: "Variable"
194 host: "Hôte"
195 _all: "Adresse complète, utile pour les expressions régulières"
196 operator_description:
197 label: "Opérateur"
198 equal_to: "Égal à…"
199 matches: "Teste si un <i>sujet</i> correspond à une <i>recherche</i> (non sensible à la casse).<br />Exemple : <code>_all ~ \"https?://rss.example.com/foobar/.*\"</code>"
180 otp: 200 otp:
181 page_title: Authentification double-facteur 201 page_title: Authentification double-facteur
182 app: 202 app:
@@ -618,6 +638,8 @@ flashes:
618 otp_disabled: "Authentification à double-facteur désactivée" 638 otp_disabled: "Authentification à double-facteur désactivée"
619 tagging_rules_imported: Règles bien importées 639 tagging_rules_imported: Règles bien importées
620 tagging_rules_not_imported: Impossible d'importer les règles 640 tagging_rules_not_imported: Impossible d'importer les règles
641 ignore_origin_rules_deleted: "Règle d'omission d'origine supprimée"
642 ignore_origin_rules_updated: "Règle d'omission d'origine mise à jour"
621 entry: 643 entry:
622 notice: 644 notice:
623 entry_already_saved: "Article déjà sauvegardé le %date%" 645 entry_already_saved: "Article déjà sauvegardé le %date%"
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
index 23e72f20..af1c1fe7 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
@@ -33,6 +33,7 @@ menu:
33 back_to_unread: 'Torna ai contenuti non letti' 33 back_to_unread: 'Torna ai contenuti non letti'
34 users_management: 'Gestione utenti' 34 users_management: 'Gestione utenti'
35 site_credentials: 'Credenziali sito' 35 site_credentials: 'Credenziali sito'
36 # ignore_origin_instance_rules: 'Global ignore origin rules'
36 quickstart: "Introduzione" 37 quickstart: "Introduzione"
37 top: 38 top:
38 add_new_entry: 'Aggiungi un nuovo contenuto' 39 add_new_entry: 'Aggiungi un nuovo contenuto'
@@ -59,6 +60,7 @@ config:
59 user_info: 'Informazioni utente' 60 user_info: 'Informazioni utente'
60 password: 'Password' 61 password: 'Password'
61 rules: 'Regole di etichettatura' 62 rules: 'Regole di etichettatura'
63 # ignore_origin: 'Ignore origin rules'
62 new_user: 'Aggiungi utente' 64 new_user: 'Aggiungi utente'
63 reset: 'Area di reset' 65 reset: 'Area di reset'
64 form: 66 form:
@@ -177,6 +179,24 @@ config:
177 and: "Una regola E un'altra" 179 and: "Una regola E un'altra"
178 matches: 'Verifica che un <i>oggetto</i> risulti in una <i>ricerca</i> (case-insensitive).<br />Esempio: <code>titolo contiene "football"</code>' 180 matches: 'Verifica che un <i>oggetto</i> risulti in una <i>ricerca</i> (case-insensitive).<br />Esempio: <code>titolo contiene "football"</code>'
179 # notmatches: 'Tests that a <i>subject</i> doesn''t match match a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' 181 # notmatches: 'Tests that a <i>subject</i> doesn''t match match a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
182 form_ignore_origin_rules:
183 # faq:
184 # title: 'FAQ'
185 # ignore_origin_rules_definition_title: 'What does « ignore origin rules » mean?'
186 # ignore_origin_rules_definition_description: 'They are used by wallabag to automatically ignore an origin address after a redirect.<br />If a redirect occurs while fetching a new entry, all the ignore origin rules (<i>user defined and instance defined</i>) will be used to ignore the origin address.'
187 # how_to_use_them_title: 'How do I use them?'
188 # how_to_use_them_description: 'Let us assume you want to ignore the origin of an entry coming from « <i>rss.example.com</i> » (<i>knowing that after a redirect, the actual address is example.com</i>).<br />In that case, you should put « host = "rss.example.com" » in the <i>Rule</i> field.'
189 # variables_available_title: 'Which variables and operators can I use to write rules?'
190 # variables_available_description: 'The following variables and operators can be used to create ignore origin rules:'
191 # meaning: 'Meaning'
192 # variable_description:
193 # label: 'Variable'
194 # host: 'Host of the address'
195 # _all: 'Full address, mainly for pattern matching'
196 # operator_description:
197 # label: 'Operator'
198 # equal_to: 'Equal to…'
199 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>_all ~ "https?://rss.example.com/foobar/.*"</code>'
180 otp: 200 otp:
181 # page_title: Two-factor authentication 201 # page_title: Two-factor authentication
182 # app: 202 # app:
@@ -617,6 +637,8 @@ flashes:
617 # otp_disabled: Two-factor authentication disabled 637 # otp_disabled: Two-factor authentication disabled
618 # tagging_rules_imported: Tagging rules imported 638 # tagging_rules_imported: Tagging rules imported
619 # tagging_rules_not_imported: Error while importing tagging rules 639 # tagging_rules_not_imported: Error while importing tagging rules
640 # ignore_origin_rules_deleted: 'Ignore origin rule deleted'
641 # ignore_origin_rules_updated: 'Ignore origin rule updated'
620 entry: 642 entry:
621 notice: 643 notice:
622 entry_already_saved: 'Contenuto già salvato in data %date%' 644 entry_already_saved: 'Contenuto già salvato in data %date%'
@@ -658,3 +680,8 @@ flashes:
658 # added: 'Site credential for "%host%" added' 680 # added: 'Site credential for "%host%" added'
659 # updated: 'Site credential for "%host%" updated' 681 # updated: 'Site credential for "%host%" updated'
660 # deleted: 'Site credential for "%host%" deleted' 682 # deleted: 'Site credential for "%host%" deleted'
683 ignore_origin_instance_rule:
684 notice:
685 # added: 'Global ignore origin rule added'
686 # updated: 'Global ignore origin rule updated'
687 # deleted: 'Global ignore origin rule deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
index 6ddff6ea..59dd9b22 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
@@ -33,6 +33,7 @@ menu:
33 back_to_unread: 'Tornar als articles pas legits' 33 back_to_unread: 'Tornar als articles pas legits'
34 users_management: 'Gestion dels utilizaires' 34 users_management: 'Gestion dels utilizaires'
35 site_credentials: 'Identificants del site' 35 site_credentials: 'Identificants del site'
36 # ignore_origin_instance_rules: 'Global ignore origin rules'
36 quickstart: "Per ben començar" 37 quickstart: "Per ben començar"
37 top: 38 top:
38 add_new_entry: 'Enregistrar un novèl article' 39 add_new_entry: 'Enregistrar un novèl article'
@@ -59,6 +60,7 @@ config:
59 user_info: 'Mon compte' 60 user_info: 'Mon compte'
60 password: 'Senhal' 61 password: 'Senhal'
61 rules: "Règlas d'etiquetas automaticas" 62 rules: "Règlas d'etiquetas automaticas"
63 # ignore_origin: 'Ignore origin rules'
62 new_user: 'Crear un compte' 64 new_user: 'Crear un compte'
63 reset: 'Zòna de reïnicializacion' 65 reset: 'Zòna de reïnicializacion'
64 form: 66 form:
@@ -177,6 +179,24 @@ config:
177 and: "Una règla E l'autra" 179 and: "Una règla E l'autra"
178 matches: 'Teste se un <i>subjècte</i> correspond a una <i>recèrca</i> (non sensibla a la cassa).<br />Exemple : <code>title matches \"football\"</code>' 180 matches: 'Teste se un <i>subjècte</i> correspond a una <i>recèrca</i> (non sensibla a la cassa).<br />Exemple : <code>title matches \"football\"</code>'
179 notmatches: 'Teste se <i>subjècte</i> correspond pas a una <i>recèrca</i> (sensibla a la cassa).<br />Example : <code>title notmatches "football"</code>' 181 notmatches: 'Teste se <i>subjècte</i> correspond pas a una <i>recèrca</i> (sensibla a la cassa).<br />Example : <code>title notmatches "football"</code>'
182 form_ignore_origin_rules:
183 # faq:
184 # title: 'FAQ'
185 # ignore_origin_rules_definition_title: 'What does « ignore origin rules » mean?'
186 # ignore_origin_rules_definition_description: 'They are used by wallabag to automatically ignore an origin address after a redirect.<br />If a redirect occurs while fetching a new entry, all the ignore origin rules (<i>user defined and instance defined</i>) will be used to ignore the origin address.'
187 # how_to_use_them_title: 'How do I use them?'
188 # how_to_use_them_description: 'Let us assume you want to ignore the origin of an entry coming from « <i>rss.example.com</i> » (<i>knowing that after a redirect, the actual address is example.com</i>).<br />In that case, you should put « host = "rss.example.com" » in the <i>Rule</i> field.'
189 # variables_available_title: 'Which variables and operators can I use to write rules?'
190 # variables_available_description: 'The following variables and operators can be used to create ignore origin rules:'
191 # meaning: 'Meaning'
192 # variable_description:
193 # label: 'Variable'
194 # host: 'Host of the address'
195 # _all: 'Full address, mainly for pattern matching'
196 # operator_description:
197 # label: 'Operator'
198 # equal_to: 'Equal to…'
199 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>_all ~ "https?://rss.example.com/foobar/.*"</code>'
180 otp: 200 otp:
181 page_title: Autentificacion en dos temps 201 page_title: Autentificacion en dos temps
182 app: 202 app:
@@ -617,6 +637,8 @@ flashes:
617 # otp_disabled: Two-factor authentication disabled 637 # otp_disabled: Two-factor authentication disabled
618 tagging_rules_imported: Règlas d’etiquetatge importadas 638 tagging_rules_imported: Règlas d’etiquetatge importadas
619 tagging_rules_not_imported: Error en important las règlas d’etiquetatge 639 tagging_rules_not_imported: Error en important las règlas d’etiquetatge
640 # ignore_origin_rules_deleted: 'Ignore origin rule deleted'
641 # ignore_origin_rules_updated: 'Ignore origin rule updated'
620 entry: 642 entry:
621 notice: 643 notice:
622 entry_already_saved: 'Article ja salvagardat lo %date%' 644 entry_already_saved: 'Article ja salvagardat lo %date%'
@@ -658,3 +680,8 @@ flashes:
658 added: 'Identificant per "%host%" ajustat' 680 added: 'Identificant per "%host%" ajustat'
659 updated: 'Identificant per "%host%" mes a jorn' 681 updated: 'Identificant per "%host%" mes a jorn'
660 deleted: 'Identificant per "%host%" suprimit' 682 deleted: 'Identificant per "%host%" suprimit'
683 ignore_origin_instance_rule:
684 notice:
685 # added: 'Global ignore origin rule added'
686 # updated: 'Global ignore origin rule updated'
687 # deleted: 'Global ignore origin rule deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
index 770477c9..c09ef47a 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
@@ -33,6 +33,7 @@ menu:
33 back_to_unread: 'Powrót do nieprzeczytanych artykułów' 33 back_to_unread: 'Powrót do nieprzeczytanych artykułów'
34 users_management: 'Zarządzanie użytkownikami' 34 users_management: 'Zarządzanie użytkownikami'
35 site_credentials: 'Poświadczenia strony' 35 site_credentials: 'Poświadczenia strony'
36 # ignore_origin_instance_rules: 'Global ignore origin rules'
36 quickstart: "Szybki start" 37 quickstart: "Szybki start"
37 top: 38 top:
38 add_new_entry: 'Dodaj nowy wpis' 39 add_new_entry: 'Dodaj nowy wpis'
@@ -59,6 +60,7 @@ config:
59 user_info: 'Informacje o użytkowniku' 60 user_info: 'Informacje o użytkowniku'
60 password: 'Hasło' 61 password: 'Hasło'
61 rules: 'Zasady tagowania' 62 rules: 'Zasady tagowania'
63 # ignore_origin: 'Ignore origin rules'
62 new_user: 'Dodaj użytkownika' 64 new_user: 'Dodaj użytkownika'
63 reset: 'Reset' 65 reset: 'Reset'
64 form: 66 form:
@@ -177,6 +179,24 @@ config:
177 and: 'Jedna reguła I inna' 179 and: 'Jedna reguła I inna'
178 matches: 'Sprawdź czy <i>temat</i> pasuje <i>szukaj</i> (duże lub małe litery).<br />Przykład: <code>tytuł zawiera "piłka nożna"</code>' 180 matches: 'Sprawdź czy <i>temat</i> pasuje <i>szukaj</i> (duże lub małe litery).<br />Przykład: <code>tytuł zawiera "piłka nożna"</code>'
179 notmatches: 'Sprawdź czy <i>temat</i> nie zawiera <i>szukaj</i> (duże lub małe litery).<br />Przykład: <code>tytuł nie zawiera "piłka nożna"</code>' 181 notmatches: 'Sprawdź czy <i>temat</i> nie zawiera <i>szukaj</i> (duże lub małe litery).<br />Przykład: <code>tytuł nie zawiera "piłka nożna"</code>'
182 form_ignore_origin_rules:
183 # faq:
184 # title: 'FAQ'
185 # ignore_origin_rules_definition_title: 'What does « ignore origin rules » mean?'
186 # ignore_origin_rules_definition_description: 'They are used by wallabag to automatically ignore an origin address after a redirect.<br />If a redirect occurs while fetching a new entry, all the ignore origin rules (<i>user defined and instance defined</i>) will be used to ignore the origin address.'
187 # how_to_use_them_title: 'How do I use them?'
188 # how_to_use_them_description: 'Let us assume you want to ignore the origin of an entry coming from « <i>rss.example.com</i> » (<i>knowing that after a redirect, the actual address is example.com</i>).<br />In that case, you should put « host = "rss.example.com" » in the <i>Rule</i> field.'
189 # variables_available_title: 'Which variables and operators can I use to write rules?'
190 # variables_available_description: 'The following variables and operators can be used to create ignore origin rules:'
191 # meaning: 'Meaning'
192 # variable_description:
193 # label: 'Variable'
194 # host: 'Host of the address'
195 # _all: 'Full address, mainly for pattern matching'
196 # operator_description:
197 # label: 'Operator'
198 # equal_to: 'Equal to…'
199 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>_all ~ "https?://rss.example.com/foobar/.*"</code>'
180 otp: 200 otp:
181 # page_title: Two-factor authentication 201 # page_title: Two-factor authentication
182 # app: 202 # app:
@@ -617,6 +637,8 @@ flashes:
617 # otp_disabled: Two-factor authentication disabled 637 # otp_disabled: Two-factor authentication disabled
618 # tagging_rules_imported: Tagging rules imported 638 # tagging_rules_imported: Tagging rules imported
619 # tagging_rules_not_imported: Error while importing tagging rules 639 # tagging_rules_not_imported: Error while importing tagging rules
640 # ignore_origin_rules_deleted: 'Ignore origin rule deleted'
641 # ignore_origin_rules_updated: 'Ignore origin rule updated'
620 entry: 642 entry:
621 notice: 643 notice:
622 entry_already_saved: 'Wpis już został dodany %date%' 644 entry_already_saved: 'Wpis już został dodany %date%'
@@ -658,3 +680,8 @@ flashes:
658 added: 'Poświadczenie dla "%host%" dodane' 680 added: 'Poświadczenie dla "%host%" dodane'
659 updated: 'Poświadczenie dla "%host%" zaktualizowane' 681 updated: 'Poświadczenie dla "%host%" zaktualizowane'
660 deleted: 'Poświadczenie dla "%host%" usuniętę' 682 deleted: 'Poświadczenie dla "%host%" usuniętę'
683 ignore_origin_instance_rule:
684 notice:
685 # added: 'Global ignore origin rule added'
686 # updated: 'Global ignore origin rule updated'
687 # deleted: 'Global ignore origin rule deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
index d993cb05..293a4e44 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
@@ -33,6 +33,7 @@ menu:
33 back_to_unread: 'Voltar para os artigos não lidos' 33 back_to_unread: 'Voltar para os artigos não lidos'
34 users_management: 'Gestão de Usuários' 34 users_management: 'Gestão de Usuários'
35 site_credentials: 'Credenciais do site' 35 site_credentials: 'Credenciais do site'
36 # ignore_origin_instance_rules: 'Global ignore origin rules'
36 quickstart: "Começo Rápido" 37 quickstart: "Começo Rápido"
37 top: 38 top:
38 add_new_entry: 'Adicionar um novo artigo' 39 add_new_entry: 'Adicionar um novo artigo'
@@ -59,6 +60,7 @@ config:
59 user_info: 'Informação do Usuário' 60 user_info: 'Informação do Usuário'
60 password: 'Senha' 61 password: 'Senha'
61 rules: 'Regras de tags' 62 rules: 'Regras de tags'
63 # ignore_origin: 'Ignore origin rules'
62 new_user: 'Adicionar um usuário' 64 new_user: 'Adicionar um usuário'
63 reset: 'Reiniciar minha conta' 65 reset: 'Reiniciar minha conta'
64 form: 66 form:
@@ -177,6 +179,24 @@ config:
177 and: 'Uma regra E outra' 179 and: 'Uma regra E outra'
178 matches: 'Testa que um <i>assunto</i> corresponde a uma <i>pesquisa</i> (maiúscula ou minúscula).<br />Exemplo: <code>title matches "futebol"</code>' 180 matches: 'Testa que um <i>assunto</i> corresponde a uma <i>pesquisa</i> (maiúscula ou minúscula).<br />Exemplo: <code>title matches "futebol"</code>'
179 notmatches: 'Testa que um <i>assunto</i> não corresponde a uma <i>search</i> (maiúscula ou minúscula).<br />Exemplo: <code>title notmatches "futebol"</code>' 181 notmatches: 'Testa que um <i>assunto</i> não corresponde a uma <i>search</i> (maiúscula ou minúscula).<br />Exemplo: <code>title notmatches "futebol"</code>'
182 form_ignore_origin_rules:
183 # faq:
184 # title: 'FAQ'
185 # ignore_origin_rules_definition_title: 'What does « ignore origin rules » mean?'
186 # ignore_origin_rules_definition_description: 'They are used by wallabag to automatically ignore an origin address after a redirect.<br />If a redirect occurs while fetching a new entry, all the ignore origin rules (<i>user defined and instance defined</i>) will be used to ignore the origin address.'
187 # how_to_use_them_title: 'How do I use them?'
188 # how_to_use_them_description: 'Let us assume you want to ignore the origin of an entry coming from « <i>rss.example.com</i> » (<i>knowing that after a redirect, the actual address is example.com</i>).<br />In that case, you should put « host = "rss.example.com" » in the <i>Rule</i> field.'
189 # variables_available_title: 'Which variables and operators can I use to write rules?'
190 # variables_available_description: 'The following variables and operators can be used to create ignore origin rules:'
191 # meaning: 'Meaning'
192 # variable_description:
193 # label: 'Variable'
194 # host: 'Host of the address'
195 # _all: 'Full address, mainly for pattern matching'
196 # operator_description:
197 # label: 'Operator'
198 # equal_to: 'Equal to…'
199 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>_all ~ "https?://rss.example.com/foobar/.*"</code>'
180 otp: 200 otp:
181 page_title: Autenticação de dois fatores 201 page_title: Autenticação de dois fatores
182 app: 202 app:
@@ -657,3 +677,8 @@ flashes:
657 added: 'Credencial do site para "%host%" foi adicionada' 677 added: 'Credencial do site para "%host%" foi adicionada'
658 updated: 'Credencial do site pa "%host%" atualizada' 678 updated: 'Credencial do site pa "%host%" atualizada'
659 deleted: 'Credencial do site pa "%host%" removida' 679 deleted: 'Credencial do site pa "%host%" removida'
680 ignore_origin_instance_rule:
681 notice:
682 # added: 'Global ignore origin rule added'
683 # updated: 'Global ignore origin rule updated'
684 # deleted: 'Global ignore origin rule deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
index bc8b72e0..3c605709 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
@@ -33,6 +33,7 @@ menu:
33 back_to_unread: 'Înapoi la articolele necitite' 33 back_to_unread: 'Înapoi la articolele necitite'
34 # users_management: 'Users management' 34 # users_management: 'Users management'
35 # site_credentials: 'Site credentials' 35 # site_credentials: 'Site credentials'
36 # ignore_origin_instance_rules: 'Global ignore origin rules'
36 # quickstart: "Quickstart" 37 # quickstart: "Quickstart"
37 top: 38 top:
38 add_new_entry: 'Introdu un nou articol' 39 add_new_entry: 'Introdu un nou articol'
@@ -59,6 +60,7 @@ config:
59 user_info: 'Informații despre utilizator' 60 user_info: 'Informații despre utilizator'
60 password: 'Parolă' 61 password: 'Parolă'
61 # rules: 'Tagging rules' 62 # rules: 'Tagging rules'
63 # ignore_origin: 'Ignore origin rules'
62 new_user: 'Crează un utilizator' 64 new_user: 'Crează un utilizator'
63 # reset: 'Reset area' 65 # reset: 'Reset area'
64 form: 66 form:
@@ -177,6 +179,24 @@ config:
177 # and: 'One rule AND another' 179 # and: 'One rule AND another'
178 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' 180 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>'
179 # notmatches: 'Tests that a <i>subject</i> doesn''t match match a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' 181 # notmatches: 'Tests that a <i>subject</i> doesn''t match match a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
182 form_ignore_origin_rules:
183 # faq:
184 # title: 'FAQ'
185 # ignore_origin_rules_definition_title: 'What does « ignore origin rules » mean?'
186 # ignore_origin_rules_definition_description: 'They are used by wallabag to automatically ignore an origin address after a redirect.<br />If a redirect occurs while fetching a new entry, all the ignore origin rules (<i>user defined and instance defined</i>) will be used to ignore the origin address.'
187 # how_to_use_them_title: 'How do I use them?'
188 # how_to_use_them_description: 'Let us assume you want to ignore the origin of an entry coming from « <i>rss.example.com</i> » (<i>knowing that after a redirect, the actual address is example.com</i>).<br />In that case, you should put « host = "rss.example.com" » in the <i>Rule</i> field.'
189 # variables_available_title: 'Which variables and operators can I use to write rules?'
190 # variables_available_description: 'The following variables and operators can be used to create ignore origin rules:'
191 # meaning: 'Meaning'
192 # variable_description:
193 # label: 'Variable'
194 # host: 'Host of the address'
195 # _all: 'Full address, mainly for pattern matching'
196 # operator_description:
197 # label: 'Operator'
198 # equal_to: 'Equal to…'
199 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>_all ~ "https?://rss.example.com/foobar/.*"</code>'
180 otp: 200 otp:
181 # page_title: Two-factor authentication 201 # page_title: Two-factor authentication
182 # app: 202 # app:
@@ -616,6 +636,8 @@ flashes:
616 # otp_disabled: Two-factor authentication disabled 636 # otp_disabled: Two-factor authentication disabled
617 # tagging_rules_imported: Tagging rules imported 637 # tagging_rules_imported: Tagging rules imported
618 # tagging_rules_not_imported: Error while importing tagging rules 638 # tagging_rules_not_imported: Error while importing tagging rules
639 # ignore_origin_rules_deleted: 'Ignore origin rule deleted'
640 # ignore_origin_rules_updated: 'Ignore origin rule updated'
619 entry: 641 entry:
620 notice: 642 notice:
621 # entry_already_saved: 'Entry already saved on %date%' 643 # entry_already_saved: 'Entry already saved on %date%'
@@ -657,3 +679,8 @@ flashes:
657 # added: 'Site credential for "%host%" added' 679 # added: 'Site credential for "%host%" added'
658 # updated: 'Site credential for "%host%" updated' 680 # updated: 'Site credential for "%host%" updated'
659 # deleted: 'Site credential for "%host%" deleted' 681 # deleted: 'Site credential for "%host%" deleted'
682 ignore_origin_instance_rule:
683 notice:
684 # added: 'Global ignore origin rule added'
685 # updated: 'Global ignore origin rule updated'
686 # deleted: 'Global ignore origin rule deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml
index 2f7f55e5..eead4ec6 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml
@@ -33,6 +33,7 @@ menu:
33 back_to_unread: 'Назад к непрочитанным записям' 33 back_to_unread: 'Назад к непрочитанным записям'
34 users_management: 'Управление пользователями' 34 users_management: 'Управление пользователями'
35 site_credentials: 'Site credentials' 35 site_credentials: 'Site credentials'
36 # ignore_origin_instance_rules: 'Global ignore origin rules'
36 quickstart: "Быстрый старт" 37 quickstart: "Быстрый старт"
37 top: 38 top:
38 add_new_entry: 'Добавить новую запись' 39 add_new_entry: 'Добавить новую запись'
@@ -59,6 +60,7 @@ config:
59 user_info: 'Информация о пользователе' 60 user_info: 'Информация о пользователе'
60 password: 'Пароль' 61 password: 'Пароль'
61 rules: 'Правила настройки простановки тегов' 62 rules: 'Правила настройки простановки тегов'
63 # ignore_origin: 'Ignore origin rules'
62 new_user: 'Добавить пользователя' 64 new_user: 'Добавить пользователя'
63 reset: 'Сброс данных' 65 reset: 'Сброс данных'
64 form: 66 form:
@@ -177,6 +179,24 @@ config:
177 and: 'Одно правило И другое' 179 and: 'Одно правило И другое'
178 matches: 'Тесты, в которых <i> тема </i> соответствует <i> поиску </i> (без учета регистра). Пример: <code> title matches "футбол" </code>' 180 matches: 'Тесты, в которых <i> тема </i> соответствует <i> поиску </i> (без учета регистра). Пример: <code> title matches "футбол" </code>'
179 # notmatches: 'Tests that a <i>subject</i> doesn''t match match a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' 181 # notmatches: 'Tests that a <i>subject</i> doesn''t match match a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
182 form_ignore_origin_rules:
183 # faq:
184 # title: 'FAQ'
185 # ignore_origin_rules_definition_title: 'What does « ignore origin rules » mean?'
186 # ignore_origin_rules_definition_description: 'They are used by wallabag to automatically ignore an origin address after a redirect.<br />If a redirect occurs while fetching a new entry, all the ignore origin rules (<i>user defined and instance defined</i>) will be used to ignore the origin address.'
187 # how_to_use_them_title: 'How do I use them?'
188 # how_to_use_them_description: 'Let us assume you want to ignore the origin of an entry coming from « <i>rss.example.com</i> » (<i>knowing that after a redirect, the actual address is example.com</i>).<br />In that case, you should put « host = "rss.example.com" » in the <i>Rule</i> field.'
189 # variables_available_title: 'Which variables and operators can I use to write rules?'
190 # variables_available_description: 'The following variables and operators can be used to create ignore origin rules:'
191 # meaning: 'Meaning'
192 # variable_description:
193 # label: 'Variable'
194 # host: 'Host of the address'
195 # _all: 'Full address, mainly for pattern matching'
196 # operator_description:
197 # label: 'Operator'
198 # equal_to: 'Equal to…'
199 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>_all ~ "https?://rss.example.com/foobar/.*"</code>'
180 otp: 200 otp:
181 # page_title: Two-factor authentication 201 # page_title: Two-factor authentication
182 # app: 202 # app:
@@ -616,6 +636,8 @@ flashes:
616 # otp_disabled: Two-factor authentication disabled 636 # otp_disabled: Two-factor authentication disabled
617 # tagging_rules_imported: Tagging rules imported 637 # tagging_rules_imported: Tagging rules imported
618 # tagging_rules_not_imported: Error while importing tagging rules 638 # tagging_rules_not_imported: Error while importing tagging rules
639 # ignore_origin_rules_deleted: 'Ignore origin rule deleted'
640 # ignore_origin_rules_updated: 'Ignore origin rule updated'
619 entry: 641 entry:
620 notice: 642 notice:
621 entry_already_saved: 'Запись была сохранена ранее %date%' 643 entry_already_saved: 'Запись была сохранена ранее %date%'
@@ -657,3 +679,8 @@ flashes:
657 # added: 'Site credential for "%host%" added' 679 # added: 'Site credential for "%host%" added'
658 # updated: 'Site credential for "%host%" updated' 680 # updated: 'Site credential for "%host%" updated'
659 # deleted: 'Site credential for "%host%" deleted' 681 # deleted: 'Site credential for "%host%" deleted'
682 ignore_origin_instance_rule:
683 notice:
684 # added: 'Global ignore origin rule added'
685 # updated: 'Global ignore origin rule updated'
686 # deleted: 'Global ignore origin rule deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml
index 48e1c34a..8d2b05f3 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml
@@ -33,6 +33,7 @@ menu:
33 back_to_unread: 'กลับไปยังรายการที่ไม่ได้อ่าน' 33 back_to_unread: 'กลับไปยังรายการที่ไม่ได้อ่าน'
34 users_management: 'การจัดการผู้ใช้' 34 users_management: 'การจัดการผู้ใช้'
35 site_credentials: 'การรับรองไซต์' 35 site_credentials: 'การรับรองไซต์'
36 # ignore_origin_instance_rules: 'Global ignore origin rules'
36 quickstart: "เริ่มแบบด่วน" 37 quickstart: "เริ่มแบบด่วน"
37 top: 38 top:
38 add_new_entry: 'เพิ่มรายการใหม่' 39 add_new_entry: 'เพิ่มรายการใหม่'
@@ -59,6 +60,7 @@ config:
59 user_info: 'ข้อมูลผู้ใช้' 60 user_info: 'ข้อมูลผู้ใช้'
60 password: 'รหัสผ่าน' 61 password: 'รหัสผ่าน'
61 rules: 'การแท็กข้อบังคับ' 62 rules: 'การแท็กข้อบังคับ'
63 # ignore_origin: 'Ignore origin rules'
62 new_user: 'เพิ่มผู้ใช้' 64 new_user: 'เพิ่มผู้ใช้'
63 reset: 'รีเซ็ตพื้นที่ ' 65 reset: 'รีเซ็ตพื้นที่ '
64 form: 66 form:
@@ -177,6 +179,24 @@ config:
177 and: 'หนึ่งข้อบังคับและอื่นๆ' 179 and: 'หนึ่งข้อบังคับและอื่นๆ'
178 matches: 'ทดสอบว่า <i>เรื่อง</i> นี้ตรงกับ <i>การต้นหา</i> (กรณีไม่ทราบ).<br />ตัวอย่าง: <code>หัวข้อที่ตรงกับ "football"</code>' 180 matches: 'ทดสอบว่า <i>เรื่อง</i> นี้ตรงกับ <i>การต้นหา</i> (กรณีไม่ทราบ).<br />ตัวอย่าง: <code>หัวข้อที่ตรงกับ "football"</code>'
179 notmatches: 'ทดสอบว่า <i>เรื่อง</i> นี้ไม่ตรงกับ <i>การต้นหา</i> (กรณีไม่ทราบ).<br />ตัวอย่าง: <code>หัวข้อทีไม่ตรงกับ "football"</code>' 181 notmatches: 'ทดสอบว่า <i>เรื่อง</i> นี้ไม่ตรงกับ <i>การต้นหา</i> (กรณีไม่ทราบ).<br />ตัวอย่าง: <code>หัวข้อทีไม่ตรงกับ "football"</code>'
182 form_ignore_origin_rules:
183 # faq:
184 # title: 'FAQ'
185 # ignore_origin_rules_definition_title: 'What does « ignore origin rules » mean?'
186 # ignore_origin_rules_definition_description: 'They are used by wallabag to automatically ignore an origin address after a redirect.<br />If a redirect occurs while fetching a new entry, all the ignore origin rules (<i>user defined and instance defined</i>) will be used to ignore the origin address.'
187 # how_to_use_them_title: 'How do I use them?'
188 # how_to_use_them_description: 'Let us assume you want to ignore the origin of an entry coming from « <i>rss.example.com</i> » (<i>knowing that after a redirect, the actual address is example.com</i>).<br />In that case, you should put « host = "rss.example.com" » in the <i>Rule</i> field.'
189 # variables_available_title: 'Which variables and operators can I use to write rules?'
190 # variables_available_description: 'The following variables and operators can be used to create ignore origin rules:'
191 # meaning: 'Meaning'
192 # variable_description:
193 # label: 'Variable'
194 # host: 'Host of the address'
195 # _all: 'Full address, mainly for pattern matching'
196 # operator_description:
197 # label: 'Operator'
198 # equal_to: 'Equal to…'
199 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>_all ~ "https?://rss.example.com/foobar/.*"</code>'
180 otp: 200 otp:
181 # page_title: Two-factor authentication 201 # page_title: Two-factor authentication
182 # app: 202 # app:
@@ -616,6 +636,8 @@ flashes:
616 # otp_disabled: Two-factor authentication disabled 636 # otp_disabled: Two-factor authentication disabled
617 # tagging_rules_imported: Tagging rules imported 637 # tagging_rules_imported: Tagging rules imported
618 # tagging_rules_not_imported: Error while importing tagging rules 638 # tagging_rules_not_imported: Error while importing tagging rules
639 # ignore_origin_rules_deleted: 'Ignore origin rule deleted'
640 # ignore_origin_rules_updated: 'Ignore origin rule updated'
619 entry: 641 entry:
620 notice: 642 notice:
621 entry_already_saved: 'รายการพร้อมบันทึกที่ %date%' 643 entry_already_saved: 'รายการพร้อมบันทึกที่ %date%'
@@ -657,3 +679,8 @@ flashes:
657 added: 'ไซต์ข้อมูลประจำตัวสำหรับ "%host%" ที่ทำการเพิ่ม' 679 added: 'ไซต์ข้อมูลประจำตัวสำหรับ "%host%" ที่ทำการเพิ่ม'
658 updated: 'ไซต์ข้อมูลประจำตัวสำหรับ "%host%" ที่ทำการอัปเดต' 680 updated: 'ไซต์ข้อมูลประจำตัวสำหรับ "%host%" ที่ทำการอัปเดต'
659 deleted: 'ไซต์ข้อมูลประจำตัวสำหรับ "%host%" ที่ทำการลบ' 681 deleted: 'ไซต์ข้อมูลประจำตัวสำหรับ "%host%" ที่ทำการลบ'
682 ignore_origin_instance_rule:
683 notice:
684 # added: 'Global ignore origin rule added'
685 # updated: 'Global ignore origin rule updated'
686 # deleted: 'Global ignore origin rule deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
index 19029c0b..dfbc3010 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
@@ -33,6 +33,7 @@ menu:
33 back_to_unread: 'Okunmayan makalelere geri dön' 33 back_to_unread: 'Okunmayan makalelere geri dön'
34 # users_management: 'Users management' 34 # users_management: 'Users management'
35 # site_credentials: 'Site credentials' 35 # site_credentials: 'Site credentials'
36 # ignore_origin_instance_rules: 'Global ignore origin rules'
36 quickstart: "Hızlı başlangıç" 37 quickstart: "Hızlı başlangıç"
37 top: 38 top:
38 add_new_entry: 'Yeni bir makale ekle' 39 add_new_entry: 'Yeni bir makale ekle'
@@ -59,6 +60,7 @@ config:
59 user_info: 'Kullanıcı bilgileri' 60 user_info: 'Kullanıcı bilgileri'
60 password: 'Şifre' 61 password: 'Şifre'
61 rules: 'Etiketleme kuralları' 62 rules: 'Etiketleme kuralları'
63 # ignore_origin: 'Ignore origin rules'
62 new_user: 'Bir kullanıcı ekle' 64 new_user: 'Bir kullanıcı ekle'
63 # reset: 'Reset area' 65 # reset: 'Reset area'
64 form: 66 form:
@@ -177,6 +179,24 @@ config:
177 and: 'Bir kural ve diğeri' 179 and: 'Bir kural ve diğeri'
178 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' 180 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>'
179 # notmatches: 'Tests that a <i>subject</i> doesn''t match match a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' 181 # notmatches: 'Tests that a <i>subject</i> doesn''t match match a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
182 form_ignore_origin_rules:
183 # faq:
184 # title: 'FAQ'
185 # ignore_origin_rules_definition_title: 'What does « ignore origin rules » mean?'
186 # ignore_origin_rules_definition_description: 'They are used by wallabag to automatically ignore an origin address after a redirect.<br />If a redirect occurs while fetching a new entry, all the ignore origin rules (<i>user defined and instance defined</i>) will be used to ignore the origin address.'
187 # how_to_use_them_title: 'How do I use them?'
188 # how_to_use_them_description: 'Let us assume you want to ignore the origin of an entry coming from « <i>rss.example.com</i> » (<i>knowing that after a redirect, the actual address is example.com</i>).<br />In that case, you should put « host = "rss.example.com" » in the <i>Rule</i> field.'
189 # variables_available_title: 'Which variables and operators can I use to write rules?'
190 # variables_available_description: 'The following variables and operators can be used to create ignore origin rules:'
191 # meaning: 'Meaning'
192 # variable_description:
193 # label: 'Variable'
194 # host: 'Host of the address'
195 # _all: 'Full address, mainly for pattern matching'
196 # operator_description:
197 # label: 'Operator'
198 # equal_to: 'Equal to…'
199 # matches: 'Tests that a <i>subject</i> matches a <i>search</i> (case-insensitive).<br />Example: <code>_all ~ "https?://rss.example.com/foobar/.*"</code>'
180 otp: 200 otp:
181 # page_title: Two-factor authentication 201 # page_title: Two-factor authentication
182 # app: 202 # app:
@@ -616,6 +636,8 @@ flashes:
616 # otp_disabled: Two-factor authentication disabled 636 # otp_disabled: Two-factor authentication disabled
617 # tagging_rules_imported: Tagging rules imported 637 # tagging_rules_imported: Tagging rules imported
618 # tagging_rules_not_imported: Error while importing tagging rules 638 # tagging_rules_not_imported: Error while importing tagging rules
639 # ignore_origin_rules_deleted: 'Ignore origin rule deleted'
640 # ignore_origin_rules_updated: 'Ignore origin rule updated'
619 entry: 641 entry:
620 notice: 642 notice:
621 entry_already_saved: 'Entry already saved on %date%' 643 entry_already_saved: 'Entry already saved on %date%'
@@ -657,3 +679,8 @@ flashes:
657 # added: 'Site credential for "%host%" added' 679 # added: 'Site credential for "%host%" added'
658 # updated: 'Site credential for "%host%" updated' 680 # updated: 'Site credential for "%host%" updated'
659 # deleted: 'Site credential for "%host%" deleted' 681 # deleted: 'Site credential for "%host%" deleted'
682 ignore_origin_instance_rule:
683 notice:
684 # added: 'Global ignore origin rule added'
685 # updated: 'Global ignore origin rule updated'
686 # deleted: 'Global ignore origin rule deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
index eb395eac..b6edce39 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
@@ -404,6 +404,76 @@
404 </div> 404 </div>
405 </div> 405 </div>
406 406
407 <h2>{{ 'config.tab_menu.ignore_origin'|trans }}</h2>
408
409 <ul>
410 {% for ignore_origin_rule in app.user.config.ignoreOriginRules %}
411 <li>
412 {{ 'config.form_rules.if_label'|trans }}
413 « {{ ignore_origin_rule.rule }} »
414 <a href="{{ path('edit_ignore_origin_rule', {id: ignore_origin_rule.id}) }}" title="{{ 'config.form_rules.edit_rule_label'|trans }}" class="tool mode_edit">✎</a>
415 <a href="{{ path('delete_ignore_origin_rule', {id: ignore_origin_rule.id}) }}" title="{{ 'config.form_rules.delete_rule_label'|trans }}" class="tool delete icon-trash icon"></a>
416 </li>
417 {% endfor %}
418 </ul>
419
420 {{ form_start(form.new_ignore_origin_user_rule) }}
421 {{ form_errors(form.new_ignore_origin_user_rule) }}
422
423 <fieldset class="w500p inline">
424 <div class="row">
425 {{ form_label(form.new_ignore_origin_user_rule.rule) }}
426 {{ form_errors(form.new_ignore_origin_user_rule.rule) }}
427 {{ form_widget(form.new_ignore_origin_user_rule.rule) }}
428 </div>
429 </fieldset>
430
431 {{ form_rest(form.new_ignore_origin_user_rule) }}
432 </form>
433
434 <div class="row">
435 <div class="input-field col s12">
436 <h4>{{ 'config.form_ignore_origin_rules.faq.title'|trans }}</h4>
437
438 <h5>{{ 'config.form_ignore_origin_rules.faq.ignore_origin_rules_definition_title'|trans }}</h5>
439 <p class="help">{{ 'config.form_ignore_origin_rules.faq.ignore_origin_rules_definition_description'|trans|raw }}</p>
440
441 <h5>{{ 'config.form_ignore_origin_rules.faq.how_to_use_them_title'|trans }}</h5>
442 <p class="help">{{ 'config.form_ignore_origin_rules.faq.how_to_use_them_description'|trans|raw }}</p>
443
444 <h5>{{ 'config.form_ignore_origin_rules.faq.variables_available_title'|trans }}</h5>
445 <p class="help">
446 {{ 'config.form_ignore_origin_rules.faq.variables_available_description'|trans }}
447 </p>
448
449 <table class="bordered">
450 <thead>
451 <tr>
452 <th>{{ 'config.form_ignore_origin_rules.faq.variable_description.label'|trans }}</th>
453 <th>{{ 'config.form_ignore_origin_rules.faq.meaning'|trans }}</th>
454 <th>{{ 'config.form_ignore_origin_rules.faq.operator_description.label'|trans }}</th>
455 <th>{{ 'config.form_ignore_origin_rules.faq.meaning'|trans }}</th>
456 </tr>
457 </thead>
458
459 <tbody>
460 <tr>
461 <td>host</td>
462 <td>{{ 'config.form_ignore_origin_rules.faq.variable_description.host'|trans }}</td>
463 <td>=</td>
464 <td>{{ 'config.form_ignore_origin_rules.faq.operator_description.equal_to'|trans }}</td>
465 </tr>
466 <tr>
467 <td>_all</td>
468 <td>{{ 'config.form_ignore_origin_rules.faq.variable_description._all'|trans }}</td>
469 <td>~</td>
470 <td>{{ 'config.form_ignore_origin_rules.faq.operator_description.matches'|trans|raw }}</td>
471 </tr>
472 </tbody>
473 </table>
474 </div>
475 </div>
476
407 <h2>{{ 'config.reset.title'|trans }}</h2> 477 <h2>{{ 'config.reset.title'|trans }}</h2>
408 <fieldset class="w500p inline"> 478 <fieldset class="w500p inline">
409 <p>{{ 'config.reset.description'|trans }}</p> 479 <p>{{ 'config.reset.description'|trans }}</p>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/edit.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/edit.html.twig
new file mode 100644
index 00000000..30c2a520
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/edit.html.twig
@@ -0,0 +1,87 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'ignore_origin_instance_rule.page_title'|trans }}{% endblock %}
4
5{% block content %}
6
7 <div class="row">
8 <div class="col s12">
9 <div class="card-panel">
10 <div class="row">
11 <div class="input-field col s12">
12 <h4>{{ 'ignore_origin_instance_rule.edit_ignore_origin_instance_rule'|trans }}</h4>
13
14 <div id="set6" class="col s12">
15 {{ form_start(edit_form) }}
16 {{ form_errors(edit_form) }}
17
18 <div class="row">
19 <div class="input-field col s12">
20 {{ form_label(edit_form.rule) }}
21 {{ form_errors(edit_form.rule) }}
22 {{ form_widget(edit_form.rule) }}
23 </div>
24 </div>
25
26 <br/>
27
28 {{ form_widget(edit_form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
29 {{ form_widget(edit_form._token) }}
30 </form>
31 <p>
32 {{ form_start(delete_form) }}
33 <button onclick="return confirm('{{ 'ignore_origin_instance_rule.form.delete_confirm'|trans|escape('js') }}')" type="submit" class="btn waves-effect waves-light red">{{ 'ignore_origin_instance_rule.form.delete'|trans }}</button>
34 {{ form_end(delete_form) }}
35 </p>
36 <p><a class="waves-effect waves-light btn blue-grey" href="{{ path('ignore_origin_instance_rules_index') }}">{{ 'ignore_origin_instance_rule.form.back_to_list'|trans }}</a></p>
37 </div>
38 </div>
39 </div>
40
41 <div class="row">
42 <div class="input-field col s12">
43 <h4>{{ 'config.form_ignore_origin_rules.faq.title'|trans }}</h4>
44
45 <h5>{{ 'config.form_ignore_origin_rules.faq.ignore_origin_rules_definition_title'|trans }}</h5>
46 <p class="help">{{ 'config.form_ignore_origin_rules.faq.ignore_origin_rules_definition_description'|trans|raw }}</p>
47
48 <h5>{{ 'config.form_ignore_origin_rules.faq.how_to_use_them_title'|trans }}</h5>
49 <p class="help">{{ 'config.form_ignore_origin_rules.faq.how_to_use_them_description'|trans|raw }}</p>
50
51 <h5>{{ 'config.form_ignore_origin_rules.faq.variables_available_title'|trans }}</h5>
52 <p class="help">
53 {{ 'config.form_ignore_origin_rules.faq.variables_available_description'|trans }}
54 </p>
55
56 <table class="bordered">
57 <thead>
58 <tr>
59 <th>{{ 'config.form_ignore_origin_rules.faq.variable_description.label'|trans }}</th>
60 <th>{{ 'config.form_ignore_origin_rules.faq.meaning'|trans }}</th>
61 <th>{{ 'config.form_ignore_origin_rules.faq.operator_description.label'|trans }}</th>
62 <th>{{ 'config.form_ignore_origin_rules.faq.meaning'|trans }}</th>
63 </tr>
64 </thead>
65
66 <tbody>
67 <tr>
68 <td>host</td>
69 <td>{{ 'config.form_ignore_origin_rules.faq.variable_description.host'|trans }}</td>
70 <td>=</td>
71 <td>{{ 'config.form_ignore_origin_rules.faq.operator_description.equal_to'|trans }}</td>
72 </tr>
73 <tr>
74 <td>_all</td>
75 <td>{{ 'config.form_ignore_origin_rules.faq.variable_description._all'|trans }}</td>
76 <td>~</td>
77 <td>{{ 'config.form_ignore_origin_rules.faq.operator_description.matches'|trans|raw }}</td>
78 </tr>
79 </tbody>
80 </table>
81 </div>
82 </div>
83 </div>
84 </div>
85 </div>
86
87{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/index.html.twig
new file mode 100644
index 00000000..2de7cf0a
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/index.html.twig
@@ -0,0 +1,42 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'ignore_origin_instance_rule.page_title'|trans }}{% endblock %}
4
5{% block content %}
6
7 <div class="row">
8 <div class="col s12">
9 <div class="card-panel">
10 <div class="row">
11 <div class="input-field col s12">
12 <p class="help">{{ 'ignore_origin_instance_rule.description'|trans|raw }}</p>
13
14 <table class="bordered">
15 <thead>
16 <tr>
17 <th>{{ 'ignore_origin_instance_rule.form.rule_label'|trans }}</th>
18 <th>{{ 'ignore_origin_instance_rule.list.actions'|trans }}</th>
19 </tr>
20 </thead>
21 <tbody>
22 {% for rule in rules %}
23 <tr>
24 <td>{{ rule.rule }}</td>
25 <td>
26 <a href="{{ path('ignore_origin_instance_rules_edit', { 'id': rule.id }) }}">{{ 'ignore_origin_instance_rule.list.edit_action'|trans }}</a>
27 </td>
28 </tr>
29 {% endfor %}
30 </tbody>
31 </table>
32 <br />
33 <p>
34 <a href="{{ path('ignore_origin_instance_rules_new') }}" class="waves-effect waves-light btn">{{ 'ignore_origin_instance_rule.list.create_new_one'|trans }}</a>
35 </p>
36 </div>
37 </div>
38 </div>
39 </div>
40 </div>
41
42{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/new.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/new.html.twig
new file mode 100644
index 00000000..cb052ff0
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/new.html.twig
@@ -0,0 +1,80 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'ignore_origin_instance_rule.page_title'|trans }}{% endblock %}
4
5{% block content %}
6
7 <div class="row">
8 <div class="col s12">
9 <div class="card-panel">
10 <div class="row">
11 <div class="input-field col s12">
12 <h4>{{ 'ignore_origin_instance_rule.new_ignore_origin_instance_rule'|trans }}</h4>
13
14 <div id="set6" class="col s12">
15 {{ form_start(form) }}
16 {{ form_errors(form) }}
17
18 <div class="row">
19 <div class="input-field col s12">
20 {{ form_label(form.rule) }}
21 {{ form_errors(form.rule) }}
22 {{ form_widget(form.rule) }}
23 </div>
24 </div>
25
26 {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
27 {{ form_rest(form) }}
28 </form>
29 <p><a class="waves-effect waves-light btn blue-grey" href="{{ path('ignore_origin_instance_rules_index') }}">{{ 'ignore_origin_instance_rule.form.back_to_list'|trans }}</a></p>
30 </div>
31 </div>
32 </div>
33
34 <div class="row">
35 <div class="input-field col s12">
36 <h4>{{ 'config.form_ignore_origin_rules.faq.title'|trans }}</h4>
37
38 <h5>{{ 'config.form_ignore_origin_rules.faq.ignore_origin_rules_definition_title'|trans }}</h5>
39 <p class="help">{{ 'config.form_ignore_origin_rules.faq.ignore_origin_rules_definition_description'|trans|raw }}</p>
40
41 <h5>{{ 'config.form_ignore_origin_rules.faq.how_to_use_them_title'|trans }}</h5>
42 <p class="help">{{ 'config.form_ignore_origin_rules.faq.how_to_use_them_description'|trans|raw }}</p>
43
44 <h5>{{ 'config.form_ignore_origin_rules.faq.variables_available_title'|trans }}</h5>
45 <p class="help">
46 {{ 'config.form_ignore_origin_rules.faq.variables_available_description'|trans }}
47 </p>
48
49 <table class="bordered">
50 <thead>
51 <tr>
52 <th>{{ 'config.form_ignore_origin_rules.faq.variable_description.label'|trans }}</th>
53 <th>{{ 'config.form_ignore_origin_rules.faq.meaning'|trans }}</th>
54 <th>{{ 'config.form_ignore_origin_rules.faq.operator_description.label'|trans }}</th>
55 <th>{{ 'config.form_ignore_origin_rules.faq.meaning'|trans }}</th>
56 </tr>
57 </thead>
58
59 <tbody>
60 <tr>
61 <td>host</td>
62 <td>{{ 'config.form_ignore_origin_rules.faq.variable_description.host'|trans }}</td>
63 <td>=</td>
64 <td>{{ 'config.form_ignore_origin_rules.faq.operator_description.equal_to'|trans }}</td>
65 </tr>
66 <tr>
67 <td>_all</td>
68 <td>{{ 'config.form_ignore_origin_rules.faq.variable_description._all'|trans }}</td>
69 <td>~</td>
70 <td>{{ 'config.form_ignore_origin_rules.faq.operator_description.matches'|trans|raw }}</td>
71 </tr>
72 </tbody>
73 </table>
74 </div>
75 </div>
76 </div>
77 </div>
78 </div>
79
80{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig
index 6b1e2bd7..e1446ff7 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig
@@ -45,6 +45,7 @@
45 {% if is_granted('ROLE_SUPER_ADMIN') %} 45 {% if is_granted('ROLE_SUPER_ADMIN') %}
46 <li class="menu users"><a href="{{ path('user_index') }}">{{ 'menu.left.users_management'|trans }}</a></li> 46 <li class="menu users"><a href="{{ path('user_index') }}">{{ 'menu.left.users_management'|trans }}</a></li>
47 <li class="menu internal"><a href="{{ path('craue_config_settings_modify') }}">{{ 'menu.left.internal_settings'|trans }}</a></li> 47 <li class="menu internal"><a href="{{ path('craue_config_settings_modify') }}">{{ 'menu.left.internal_settings'|trans }}</a></li>
48 <li class="menu ignore"><a href="{{ path('ignore_origin_instance_rules_index') }}">{{ 'menu.left.ignore_origin_instance_rules'|trans }}</a></li>
48 {% endif %} 49 {% endif %}
49 <li class="menu import"><a href="{{ path('import') }}">{{ 'menu.left.import'|trans }}</a></li> 50 <li class="menu import"><a href="{{ path('import') }}">{{ 'menu.left.import'|trans }}</a></li>
50 <li class="menu howto"><a href="{{ path('howto') }}">{{ 'menu.left.howto'|trans }}</a></li> 51 <li class="menu howto"><a href="{{ path('howto') }}">{{ 'menu.left.howto'|trans }}</a></li>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
index c2e92ad1..22b38a1b 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
@@ -16,7 +16,8 @@
16 <li class="tab col s12 m6 l3"><a href="#set3">{{ 'config.tab_menu.user_info'|trans }}</a></li> 16 <li class="tab col s12 m6 l3"><a href="#set3">{{ 'config.tab_menu.user_info'|trans }}</a></li>
17 <li class="tab col s12 m6 l3"><a href="#set4">{{ 'config.tab_menu.password'|trans }}</a></li> 17 <li class="tab col s12 m6 l3"><a href="#set4">{{ 'config.tab_menu.password'|trans }}</a></li>
18 <li class="tab col s12 m6 l3"><a href="#set5">{{ 'config.tab_menu.rules'|trans }}</a></li> 18 <li class="tab col s12 m6 l3"><a href="#set5">{{ 'config.tab_menu.rules'|trans }}</a></li>
19 <li class="tab col s12 m6 l3"><a href="#set6">{{ 'config.tab_menu.reset'|trans }}</a></li> 19 <li class="tab col s12 m6 l3"><a href="#set6">{{ 'config.tab_menu.ignore_origin'|trans }}</a></li>
20 <li class="tab col s12 m6 l3"><a href="#set7">{{ 'config.tab_menu.reset'|trans }}</a></li>
20 </ul> 21 </ul>
21 </div> 22 </div>
22 23
@@ -294,11 +295,11 @@
294 « {{ tagging_rule.rule }} » 295 « {{ tagging_rule.rule }} »
295 {{ 'config.form_rules.then_tag_as_label'|trans }} 296 {{ 'config.form_rules.then_tag_as_label'|trans }}
296 « {{ tagging_rule.tags|join(', ') }} » 297 « {{ tagging_rule.tags|join(', ') }} »
297 <a href="{{ path('edit_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.edit_rule_label'|trans }}"> 298 <a href="{{ path('edit_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.edit_rule_label'|trans }}" class="mode_edit">
298 <i class="tool grey-text mode_edit material-icons">mode_edit</i> 299 <i class="tool grey-text material-icons">mode_edit</i>
299 </a> 300 </a>
300 <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.delete_rule_label'|trans }}"> 301 <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.delete_rule_label'|trans }}" class="delete">
301 <i class="tool grey-text delete material-icons">delete</i> 302 <i class="tool grey-text material-icons">delete</i>
302 </a> 303 </a>
303 </li> 304 </li>
304 {% endfor %} 305 {% endfor %}
@@ -466,6 +467,89 @@
466 </div> 467 </div>
467 468
468 <div id="set6" class="col s12"> 469 <div id="set6" class="col s12">
470 {% if app.user.config.ignoreOriginRules is not empty %}
471 <div class="row">
472 <div class="input-field col s12">
473 <ul>
474 {% for ignore_origin_rule in app.user.config.ignoreOriginRules %}
475 <li>
476 {{ 'config.form_rules.if_label'|trans }}
477 « {{ ignore_origin_rule.rule }} »
478 <a href="{{ path('edit_ignore_origin_rule', {id: ignore_origin_rule.id}) }}" title="{{ 'config.form_rules.edit_rule_label'|trans }}" class="mode_edit">
479 <i class="tool grey-text material-icons">mode_edit</i>
480 </a>
481 <a href="{{ path('delete_ignore_origin_rule', {id: ignore_origin_rule.id}) }}" title="{{ 'config.form_rules.delete_rule_label'|trans }}" class="delete">
482 <i class="tool grey-text material-icons">delete</i>
483 </a>
484 </li>
485 {% endfor %}
486 </ul>
487 </div>
488 </div>
489 {% endif %}
490
491 {{ form_start(form.new_ignore_origin_user_rule) }}
492 {{ form_errors(form.new_ignore_origin_user_rule) }}
493
494 <div class="row">
495 <div class="input-field col s12">
496 {{ form_label(form.new_ignore_origin_user_rule.rule) }}
497 {{ form_errors(form.new_ignore_origin_user_rule.rule) }}
498 {{ form_widget(form.new_ignore_origin_user_rule.rule) }}
499 </div>
500 </div>
501
502 {{ form_widget(form.new_ignore_origin_user_rule.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
503 {{ form_rest(form.new_ignore_origin_user_rule) }}
504 </form>
505
506
507
508 <div class="row">
509 <div class="input-field col s12">
510 <h4>{{ 'config.form_ignore_origin_rules.faq.title'|trans }}</h4>
511
512 <h5>{{ 'config.form_ignore_origin_rules.faq.ignore_origin_rules_definition_title'|trans }}</h5>
513 <p class="help">{{ 'config.form_ignore_origin_rules.faq.ignore_origin_rules_definition_description'|trans|raw }}</p>
514
515 <h5>{{ 'config.form_ignore_origin_rules.faq.how_to_use_them_title'|trans }}</h5>
516 <p class="help">{{ 'config.form_ignore_origin_rules.faq.how_to_use_them_description'|trans|raw }}</p>
517
518 <h5>{{ 'config.form_ignore_origin_rules.faq.variables_available_title'|trans }}</h5>
519 <p class="help">
520 {{ 'config.form_ignore_origin_rules.faq.variables_available_description'|trans }}
521 </p>
522
523 <table class="bordered">
524 <thead>
525 <tr>
526 <th>{{ 'config.form_ignore_origin_rules.faq.variable_description.label'|trans }}</th>
527 <th>{{ 'config.form_ignore_origin_rules.faq.meaning'|trans }}</th>
528 <th>{{ 'config.form_ignore_origin_rules.faq.operator_description.label'|trans }}</th>
529 <th>{{ 'config.form_ignore_origin_rules.faq.meaning'|trans }}</th>
530 </tr>
531 </thead>
532
533 <tbody>
534 <tr>
535 <td>host</td>
536 <td>{{ 'config.form_ignore_origin_rules.faq.variable_description.host'|trans }}</td>
537 <td>=</td>
538 <td>{{ 'config.form_ignore_origin_rules.faq.operator_description.equal_to'|trans }}</td>
539 </tr>
540 <tr>
541 <td>_all</td>
542 <td>{{ 'config.form_ignore_origin_rules.faq.variable_description._all'|trans }}</td>
543 <td>~</td>
544 <td>{{ 'config.form_ignore_origin_rules.faq.operator_description.matches'|trans|raw }}</td>
545 </tr>
546 </tbody>
547 </table>
548 </div>
549 </div>
550 </div>
551
552 <div id="set7" class="col s12">
469 <div class="row"> 553 <div class="row">
470 <h5>{{ 'config.reset.title'|trans }}</h5> 554 <h5>{{ 'config.reset.title'|trans }}</h5>
471 <p>{{ 'config.reset.description'|trans }}</p> 555 <p>{{ 'config.reset.description'|trans }}</p>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/IgnoreOriginInstanceRule/edit.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/IgnoreOriginInstanceRule/edit.html.twig
new file mode 100644
index 00000000..30c2a520
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/IgnoreOriginInstanceRule/edit.html.twig
@@ -0,0 +1,87 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'ignore_origin_instance_rule.page_title'|trans }}{% endblock %}
4
5{% block content %}
6
7 <div class="row">
8 <div class="col s12">
9 <div class="card-panel">
10 <div class="row">
11 <div class="input-field col s12">
12 <h4>{{ 'ignore_origin_instance_rule.edit_ignore_origin_instance_rule'|trans }}</h4>
13
14 <div id="set6" class="col s12">
15 {{ form_start(edit_form) }}
16 {{ form_errors(edit_form) }}
17
18 <div class="row">
19 <div class="input-field col s12">
20 {{ form_label(edit_form.rule) }}
21 {{ form_errors(edit_form.rule) }}
22 {{ form_widget(edit_form.rule) }}
23 </div>
24 </div>
25
26 <br/>
27
28 {{ form_widget(edit_form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
29 {{ form_widget(edit_form._token) }}
30 </form>
31 <p>
32 {{ form_start(delete_form) }}
33 <button onclick="return confirm('{{ 'ignore_origin_instance_rule.form.delete_confirm'|trans|escape('js') }}')" type="submit" class="btn waves-effect waves-light red">{{ 'ignore_origin_instance_rule.form.delete'|trans }}</button>
34 {{ form_end(delete_form) }}
35 </p>
36 <p><a class="waves-effect waves-light btn blue-grey" href="{{ path('ignore_origin_instance_rules_index') }}">{{ 'ignore_origin_instance_rule.form.back_to_list'|trans }}</a></p>
37 </div>
38 </div>
39 </div>
40
41 <div class="row">
42 <div class="input-field col s12">
43 <h4>{{ 'config.form_ignore_origin_rules.faq.title'|trans }}</h4>
44
45 <h5>{{ 'config.form_ignore_origin_rules.faq.ignore_origin_rules_definition_title'|trans }}</h5>
46 <p class="help">{{ 'config.form_ignore_origin_rules.faq.ignore_origin_rules_definition_description'|trans|raw }}</p>
47
48 <h5>{{ 'config.form_ignore_origin_rules.faq.how_to_use_them_title'|trans }}</h5>
49 <p class="help">{{ 'config.form_ignore_origin_rules.faq.how_to_use_them_description'|trans|raw }}</p>
50
51 <h5>{{ 'config.form_ignore_origin_rules.faq.variables_available_title'|trans }}</h5>
52 <p class="help">
53 {{ 'config.form_ignore_origin_rules.faq.variables_available_description'|trans }}
54 </p>
55
56 <table class="bordered">
57 <thead>
58 <tr>
59 <th>{{ 'config.form_ignore_origin_rules.faq.variable_description.label'|trans }}</th>
60 <th>{{ 'config.form_ignore_origin_rules.faq.meaning'|trans }}</th>
61 <th>{{ 'config.form_ignore_origin_rules.faq.operator_description.label'|trans }}</th>
62 <th>{{ 'config.form_ignore_origin_rules.faq.meaning'|trans }}</th>
63 </tr>
64 </thead>
65
66 <tbody>
67 <tr>
68 <td>host</td>
69 <td>{{ 'config.form_ignore_origin_rules.faq.variable_description.host'|trans }}</td>
70 <td>=</td>
71 <td>{{ 'config.form_ignore_origin_rules.faq.operator_description.equal_to'|trans }}</td>
72 </tr>
73 <tr>
74 <td>_all</td>
75 <td>{{ 'config.form_ignore_origin_rules.faq.variable_description._all'|trans }}</td>
76 <td>~</td>
77 <td>{{ 'config.form_ignore_origin_rules.faq.operator_description.matches'|trans|raw }}</td>
78 </tr>
79 </tbody>
80 </table>
81 </div>
82 </div>
83 </div>
84 </div>
85 </div>
86
87{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/IgnoreOriginInstanceRule/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/IgnoreOriginInstanceRule/index.html.twig
new file mode 100644
index 00000000..2de7cf0a
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/IgnoreOriginInstanceRule/index.html.twig
@@ -0,0 +1,42 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'ignore_origin_instance_rule.page_title'|trans }}{% endblock %}
4
5{% block content %}
6
7 <div class="row">
8 <div class="col s12">
9 <div class="card-panel">
10 <div class="row">
11 <div class="input-field col s12">
12 <p class="help">{{ 'ignore_origin_instance_rule.description'|trans|raw }}</p>
13
14 <table class="bordered">
15 <thead>
16 <tr>
17 <th>{{ 'ignore_origin_instance_rule.form.rule_label'|trans }}</th>
18 <th>{{ 'ignore_origin_instance_rule.list.actions'|trans }}</th>
19 </tr>
20 </thead>
21 <tbody>
22 {% for rule in rules %}
23 <tr>
24 <td>{{ rule.rule }}</td>
25 <td>
26 <a href="{{ path('ignore_origin_instance_rules_edit', { 'id': rule.id }) }}">{{ 'ignore_origin_instance_rule.list.edit_action'|trans }}</a>
27 </td>
28 </tr>
29 {% endfor %}
30 </tbody>
31 </table>
32 <br />
33 <p>
34 <a href="{{ path('ignore_origin_instance_rules_new') }}" class="waves-effect waves-light btn">{{ 'ignore_origin_instance_rule.list.create_new_one'|trans }}</a>
35 </p>
36 </div>
37 </div>
38 </div>
39 </div>
40 </div>
41
42{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/IgnoreOriginInstanceRule/new.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/IgnoreOriginInstanceRule/new.html.twig
new file mode 100644
index 00000000..cb052ff0
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/IgnoreOriginInstanceRule/new.html.twig
@@ -0,0 +1,80 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'ignore_origin_instance_rule.page_title'|trans }}{% endblock %}
4
5{% block content %}
6
7 <div class="row">
8 <div class="col s12">
9 <div class="card-panel">
10 <div class="row">
11 <div class="input-field col s12">
12 <h4>{{ 'ignore_origin_instance_rule.new_ignore_origin_instance_rule'|trans }}</h4>
13
14 <div id="set6" class="col s12">
15 {{ form_start(form) }}
16 {{ form_errors(form) }}
17
18 <div class="row">
19 <div class="input-field col s12">
20 {{ form_label(form.rule) }}
21 {{ form_errors(form.rule) }}
22 {{ form_widget(form.rule) }}
23 </div>
24 </div>
25
26 {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
27 {{ form_rest(form) }}
28 </form>
29 <p><a class="waves-effect waves-light btn blue-grey" href="{{ path('ignore_origin_instance_rules_index') }}">{{ 'ignore_origin_instance_rule.form.back_to_list'|trans }}</a></p>
30 </div>
31 </div>
32 </div>
33
34 <div class="row">
35 <div class="input-field col s12">
36 <h4>{{ 'config.form_ignore_origin_rules.faq.title'|trans }}</h4>
37
38 <h5>{{ 'config.form_ignore_origin_rules.faq.ignore_origin_rules_definition_title'|trans }}</h5>
39 <p class="help">{{ 'config.form_ignore_origin_rules.faq.ignore_origin_rules_definition_description'|trans|raw }}</p>
40
41 <h5>{{ 'config.form_ignore_origin_rules.faq.how_to_use_them_title'|trans }}</h5>
42 <p class="help">{{ 'config.form_ignore_origin_rules.faq.how_to_use_them_description'|trans|raw }}</p>
43
44 <h5>{{ 'config.form_ignore_origin_rules.faq.variables_available_title'|trans }}</h5>
45 <p class="help">
46 {{ 'config.form_ignore_origin_rules.faq.variables_available_description'|trans }}
47 </p>
48
49 <table class="bordered">
50 <thead>
51 <tr>
52 <th>{{ 'config.form_ignore_origin_rules.faq.variable_description.label'|trans }}</th>
53 <th>{{ 'config.form_ignore_origin_rules.faq.meaning'|trans }}</th>
54 <th>{{ 'config.form_ignore_origin_rules.faq.operator_description.label'|trans }}</th>
55 <th>{{ 'config.form_ignore_origin_rules.faq.meaning'|trans }}</th>
56 </tr>
57 </thead>
58
59 <tbody>
60 <tr>
61 <td>host</td>
62 <td>{{ 'config.form_ignore_origin_rules.faq.variable_description.host'|trans }}</td>
63 <td>=</td>
64 <td>{{ 'config.form_ignore_origin_rules.faq.operator_description.equal_to'|trans }}</td>
65 </tr>
66 <tr>
67 <td>_all</td>
68 <td>{{ 'config.form_ignore_origin_rules.faq.variable_description._all'|trans }}</td>
69 <td>~</td>
70 <td>{{ 'config.form_ignore_origin_rules.faq.operator_description.matches'|trans|raw }}</td>
71 </tr>
72 </tbody>
73 </table>
74 </div>
75 </div>
76 </div>
77 </div>
78 </div>
79
80{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
index c51d07fc..d9b6d190 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
@@ -78,9 +78,13 @@
78 <a class="waves-effect" href="{{ path('user_index') }}">{{ 'menu.left.users_management'|trans }}</a> 78 <a class="waves-effect" href="{{ path('user_index') }}">{{ 'menu.left.users_management'|trans }}</a>
79 </li> 79 </li>
80 80
81 <li class="bold border-bottom {% if currentRoute == 'craue_config_settings_modify' %}active{% endif %}"> 81 <li class="bold {% if currentRoute == 'craue_config_settings_modify' %}active{% endif %}">
82 <a class="waves-effect" href="{{ path('craue_config_settings_modify') }}">{{ 'menu.left.internal_settings'|trans }}</a> 82 <a class="waves-effect" href="{{ path('craue_config_settings_modify') }}">{{ 'menu.left.internal_settings'|trans }}</a>
83 </li> 83 </li>
84
85 <li class="bold border-bottom {% if currentRoute == 'ignore_origin_instance_rules_index' %}active{% endif %}">
86 <a class="waves-effect" href="{{ path('ignore_origin_instance_rules_index') }}">{{ 'menu.left.ignore_origin_instance_rules'|trans }}</a>
87 </li>
84 {% endif %} 88 {% endif %}
85 <li class="bold {% if currentRoute == 'import' %}active{% endif %}"> 89 <li class="bold {% if currentRoute == 'import' %}active{% endif %}">
86 <a class="waves-effect" href="{{ path('import') }}">{{ 'menu.left.import'|trans }}</a> 90 <a class="waves-effect" href="{{ path('import') }}">{{ 'menu.left.import'|trans }}</a>