aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/ApiBundle/Controller/DeveloperController.php (renamed from src/Wallabag/CoreBundle/Controller/DeveloperController.php)4
-rw-r--r--src/Wallabag/ApiBundle/Controller/WallabagRestController.php52
-rw-r--r--src/Wallabag/ApiBundle/Entity/AccessToken.php2
-rw-r--r--src/Wallabag/ApiBundle/Entity/Client.php10
-rw-r--r--src/Wallabag/ApiBundle/Entity/RefreshToken.php2
-rw-r--r--src/Wallabag/ApiBundle/Form/Type/ClientType.php (renamed from src/Wallabag/CoreBundle/Form/Type/ClientType.php)2
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php21
-rw-r--r--src/Wallabag/CoreBundle/Command/TagAllCommand.php5
-rw-r--r--src/Wallabag/CoreBundle/Controller/ConfigController.php37
-rw-r--r--src/Wallabag/CoreBundle/Controller/TagController.php25
-rw-r--r--src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php8
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php20
-rw-r--r--src/Wallabag/CoreBundle/Repository/TagRepository.php10
-rw-r--r--src/Wallabag/CoreBundle/Resources/config/services.yml2
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.da.yml7
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.de.yml7
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.en.yml7
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.es.yml7
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml5
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml7
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.it.yml7
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml85
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml7
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml7
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml7
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig9
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig1
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig11
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/common/Static/_bookmarklet.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig12
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig17
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig2
-rw-r--r--src/Wallabag/UserBundle/Repository/UserRepository.php14
36 files changed, 338 insertions, 89 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/DeveloperController.php b/src/Wallabag/ApiBundle/Controller/DeveloperController.php
index f3492b74..5a36a260 100644
--- a/src/Wallabag/CoreBundle/Controller/DeveloperController.php
+++ b/src/Wallabag/ApiBundle/Controller/DeveloperController.php
@@ -1,12 +1,12 @@
1<?php 1<?php
2 2
3namespace Wallabag\CoreBundle\Controller; 3namespace Wallabag\ApiBundle\Controller;
4 4
5use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; 5use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6use Symfony\Component\HttpFoundation\Request; 6use Symfony\Component\HttpFoundation\Request;
7use Symfony\Bundle\FrameworkBundle\Controller\Controller; 7use Symfony\Bundle\FrameworkBundle\Controller\Controller;
8use Wallabag\ApiBundle\Entity\Client; 8use Wallabag\ApiBundle\Entity\Client;
9use Wallabag\CoreBundle\Form\Type\ClientType; 9use Wallabag\ApiBundle\Form\Type\ClientType;
10 10
11class DeveloperController extends Controller 11class DeveloperController extends Controller
12{ 12{
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
index 85875589..fa573988 100644
--- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
@@ -28,7 +28,8 @@ class WallabagRestController extends FOSRestController
28 * 28 *
29 * @ApiDoc( 29 * @ApiDoc(
30 * parameters={ 30 * parameters={
31 * {"name"="url", "dataType"="string", "required"=true, "format"="An url", "description"="Url to check if it exists"} 31 * {"name"="url", "dataType"="string", "required"=true, "format"="An url", "description"="Url to check if it exists"},
32 * {"name"="urls", "dataType"="string", "required"=false, "format"="An array of urls (?urls[]=http...&urls[]=http...)", "description"="Urls (as an array) to check if it exists"}
32 * } 33 * }
33 * ) 34 * )
34 * 35 *
@@ -38,6 +39,25 @@ class WallabagRestController extends FOSRestController
38 { 39 {
39 $this->validateAuthentication(); 40 $this->validateAuthentication();
40 41
42 $urls = $request->query->get('urls', []);
43
44 // handle multiple urls first
45 if (!empty($urls)) {
46 $results = [];
47 foreach ($urls as $url) {
48 $res = $this->getDoctrine()
49 ->getRepository('WallabagCoreBundle:Entry')
50 ->findByUrlAndUserId($url, $this->getUser()->getId());
51
52 $results[$url] = false === $res ? false : true;
53 }
54
55 $json = $this->get('serializer')->serialize($results, 'json');
56
57 return (new JsonResponse())->setJson($json);
58 }
59
60 // let's see if it is a simple url?
41 $url = $request->query->get('url', ''); 61 $url = $request->query->get('url', '');
42 62
43 if (empty($url)) { 63 if (empty($url)) {
@@ -392,7 +412,7 @@ class WallabagRestController extends FOSRestController
392 412
393 $tags = $this->getDoctrine() 413 $tags = $this->getDoctrine()
394 ->getRepository('WallabagCoreBundle:Tag') 414 ->getRepository('WallabagCoreBundle:Tag')
395 ->findAllTagsWithEntries($this->getUser()->getId()); 415 ->findAllTags($this->getUser()->getId());
396 416
397 $json = $this->get('serializer')->serialize($tags, 'json'); 417 $json = $this->get('serializer')->serialize($tags, 'json');
398 418
@@ -425,6 +445,8 @@ class WallabagRestController extends FOSRestController
425 ->getRepository('WallabagCoreBundle:Entry') 445 ->getRepository('WallabagCoreBundle:Entry')
426 ->removeTag($this->getUser()->getId(), $tag); 446 ->removeTag($this->getUser()->getId(), $tag);
427 447
448 $this->cleanOrphanTag($tag);
449
428 $json = $this->get('serializer')->serialize($tag, 'json'); 450 $json = $this->get('serializer')->serialize($tag, 'json');
429 451
430 return (new JsonResponse())->setJson($json); 452 return (new JsonResponse())->setJson($json);
@@ -465,6 +487,8 @@ class WallabagRestController extends FOSRestController
465 ->getRepository('WallabagCoreBundle:Entry') 487 ->getRepository('WallabagCoreBundle:Entry')
466 ->removeTags($this->getUser()->getId(), $tags); 488 ->removeTags($this->getUser()->getId(), $tags);
467 489
490 $this->cleanOrphanTag($tags);
491
468 $json = $this->get('serializer')->serialize($tags, 'json'); 492 $json = $this->get('serializer')->serialize($tags, 'json');
469 493
470 return (new JsonResponse())->setJson($json); 494 return (new JsonResponse())->setJson($json);
@@ -489,6 +513,8 @@ class WallabagRestController extends FOSRestController
489 ->getRepository('WallabagCoreBundle:Entry') 513 ->getRepository('WallabagCoreBundle:Entry')
490 ->removeTag($this->getUser()->getId(), $tag); 514 ->removeTag($this->getUser()->getId(), $tag);
491 515
516 $this->cleanOrphanTag($tag);
517
492 $json = $this->get('serializer')->serialize($tag, 'json'); 518 $json = $this->get('serializer')->serialize($tag, 'json');
493 519
494 return (new JsonResponse())->setJson($json); 520 return (new JsonResponse())->setJson($json);
@@ -511,6 +537,28 @@ class WallabagRestController extends FOSRestController
511 } 537 }
512 538
513 /** 539 /**
540 * Remove orphan tag in case no entries are associated to it.
541 *
542 * @param Tag|array $tags
543 */
544 private function cleanOrphanTag($tags)
545 {
546 if (!is_array($tags)) {
547 $tags = [$tags];
548 }
549
550 $em = $this->getDoctrine()->getManager();
551
552 foreach ($tags as $tag) {
553 if (count($tag->getEntries()) === 0) {
554 $em->remove($tag);
555 }
556 }
557
558 $em->flush();
559 }
560
561 /**
514 * Validate that the first id is equal to the second one. 562 * Validate that the first id is equal to the second one.
515 * If not, throw exception. It means a user try to access information from an other user. 563 * If not, throw exception. It means a user try to access information from an other user.
516 * 564 *
diff --git a/src/Wallabag/ApiBundle/Entity/AccessToken.php b/src/Wallabag/ApiBundle/Entity/AccessToken.php
index 2ff63a83..c09a0c80 100644
--- a/src/Wallabag/ApiBundle/Entity/AccessToken.php
+++ b/src/Wallabag/ApiBundle/Entity/AccessToken.php
@@ -19,7 +19,7 @@ class AccessToken extends BaseAccessToken
19 protected $id; 19 protected $id;
20 20
21 /** 21 /**
22 * @ORM\ManyToOne(targetEntity="Client") 22 * @ORM\ManyToOne(targetEntity="Client", inversedBy="accessTokens")
23 * @ORM\JoinColumn(nullable=false) 23 * @ORM\JoinColumn(nullable=false)
24 */ 24 */
25 protected $client; 25 protected $client;
diff --git a/src/Wallabag/ApiBundle/Entity/Client.php b/src/Wallabag/ApiBundle/Entity/Client.php
index 3e2f491c..f7898ac8 100644
--- a/src/Wallabag/ApiBundle/Entity/Client.php
+++ b/src/Wallabag/ApiBundle/Entity/Client.php
@@ -25,6 +25,16 @@ class Client extends BaseClient
25 */ 25 */
26 protected $name; 26 protected $name;
27 27
28 /**
29 * @ORM\OneToMany(targetEntity="RefreshToken", mappedBy="client", cascade={"remove"})
30 */
31 protected $refreshTokens;
32
33 /**
34 * @ORM\OneToMany(targetEntity="AccessToken", mappedBy="client", cascade={"remove"})
35 */
36 protected $accessTokens;
37
28 public function __construct() 38 public function __construct()
29 { 39 {
30 parent::__construct(); 40 parent::__construct();
diff --git a/src/Wallabag/ApiBundle/Entity/RefreshToken.php b/src/Wallabag/ApiBundle/Entity/RefreshToken.php
index 6d0cab68..822a02d8 100644
--- a/src/Wallabag/ApiBundle/Entity/RefreshToken.php
+++ b/src/Wallabag/ApiBundle/Entity/RefreshToken.php
@@ -19,7 +19,7 @@ class RefreshToken extends BaseRefreshToken
19 protected $id; 19 protected $id;
20 20
21 /** 21 /**
22 * @ORM\ManyToOne(targetEntity="Client") 22 * @ORM\ManyToOne(targetEntity="Client", inversedBy="refreshTokens")
23 * @ORM\JoinColumn(nullable=false) 23 * @ORM\JoinColumn(nullable=false)
24 */ 24 */
25 protected $client; 25 protected $client;
diff --git a/src/Wallabag/CoreBundle/Form/Type/ClientType.php b/src/Wallabag/ApiBundle/Form/Type/ClientType.php
index d1fa94e6..0ea1a9c5 100644
--- a/src/Wallabag/CoreBundle/Form/Type/ClientType.php
+++ b/src/Wallabag/ApiBundle/Form/Type/ClientType.php
@@ -1,6 +1,6 @@
1<?php 1<?php
2 2
3namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\ApiBundle\Form\Type;
4 4
5use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
6use Symfony\Component\Form\CallbackTransformer; 6use Symfony\Component\Form\CallbackTransformer;
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index cc7c2c94..59110782 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -9,7 +9,7 @@ use Symfony\Component\Console\Helper\Table;
9use Symfony\Component\Console\Input\ArrayInput; 9use Symfony\Component\Console\Input\ArrayInput;
10use Symfony\Component\Console\Input\InputInterface; 10use Symfony\Component\Console\Input\InputInterface;
11use Symfony\Component\Console\Input\InputOption; 11use Symfony\Component\Console\Input\InputOption;
12use Symfony\Component\Console\Output\NullOutput; 12use Symfony\Component\Console\Output\BufferedOutput;
13use Symfony\Component\Console\Output\OutputInterface; 13use Symfony\Component\Console\Output\OutputInterface;
14use Symfony\Component\Console\Question\ConfirmationQuestion; 14use Symfony\Component\Console\Question\ConfirmationQuestion;
15use Symfony\Component\Console\Question\Question; 15use Symfony\Component\Console\Question\Question;
@@ -77,7 +77,7 @@ class InstallCommand extends ContainerAwareCommand
77 77
78 // testing if database driver exists 78 // testing if database driver exists
79 $fulfilled = true; 79 $fulfilled = true;
80 $label = '<comment>PDO Driver</comment>'; 80 $label = '<comment>PDO Driver (%s)</comment>';
81 $status = '<info>OK!</info>'; 81 $status = '<info>OK!</info>';
82 $help = ''; 82 $help = '';
83 83
@@ -87,7 +87,7 @@ class InstallCommand extends ContainerAwareCommand
87 $help = 'Database driver "'.$this->getContainer()->getParameter('database_driver').'" is not installed.'; 87 $help = 'Database driver "'.$this->getContainer()->getParameter('database_driver').'" is not installed.';
88 } 88 }
89 89
90 $rows[] = [$label, $status, $help]; 90 $rows[] = [sprintf($label, $this->getContainer()->getParameter('database_driver')), $status, $help];
91 91
92 // testing if connection to the database can be etablished 92 // testing if connection to the database can be etablished
93 $label = '<comment>Database connection</comment>'; 93 $label = '<comment>Database connection</comment>';
@@ -97,7 +97,8 @@ class InstallCommand extends ContainerAwareCommand
97 try { 97 try {
98 $this->getContainer()->get('doctrine')->getManager()->getConnection()->connect(); 98 $this->getContainer()->get('doctrine')->getManager()->getConnection()->connect();
99 } catch (\Exception $e) { 99 } catch (\Exception $e) {
100 if (false === strpos($e->getMessage(), 'Unknown database')) { 100 if (false === strpos($e->getMessage(), 'Unknown database')
101 && false === strpos($e->getMessage(), 'database "'.$this->getContainer()->getParameter('database_name').'" does not exist')) {
101 $fulfilled = false; 102 $fulfilled = false;
102 $status = '<error>ERROR!</error>'; 103 $status = '<error>ERROR!</error>';
103 $help = 'Can\'t connect to the database: '.$e->getMessage(); 104 $help = 'Can\'t connect to the database: '.$e->getMessage();
@@ -420,16 +421,18 @@ class InstallCommand extends ContainerAwareCommand
420 } 421 }
421 422
422 $this->getApplication()->setAutoExit(false); 423 $this->getApplication()->setAutoExit(false);
423 $exitCode = $this->getApplication()->run(new ArrayInput($parameters), new NullOutput()); 424
425 $output = new BufferedOutput();
426 $exitCode = $this->getApplication()->run(new ArrayInput($parameters), $output);
424 427
425 if (0 !== $exitCode) { 428 if (0 !== $exitCode) {
426 $this->getApplication()->setAutoExit(true); 429 $this->getApplication()->setAutoExit(true);
427 430
428 $errorMessage = sprintf('The command "%s" terminated with an error code: %u.', $command, $exitCode); 431 $this->defaultOutput->writeln('');
429 $this->defaultOutput->writeln("<error>$errorMessage</error>"); 432 $this->defaultOutput->writeln('<error>The command "'.$command.'" generates some errors: </error>');
430 $exception = new \Exception($errorMessage, $exitCode); 433 $this->defaultOutput->writeln($output->fetch());
431 434
432 throw $exception; 435 die();
433 } 436 }
434 437
435 // PDO does not always close the connection after Doctrine commands. 438 // PDO does not always close the connection after Doctrine commands.
diff --git a/src/Wallabag/CoreBundle/Command/TagAllCommand.php b/src/Wallabag/CoreBundle/Command/TagAllCommand.php
index db1a9ab7..3f9bb04d 100644
--- a/src/Wallabag/CoreBundle/Command/TagAllCommand.php
+++ b/src/Wallabag/CoreBundle/Command/TagAllCommand.php
@@ -34,10 +34,13 @@ class TagAllCommand extends ContainerAwareCommand
34 } 34 }
35 $tagger = $this->getContainer()->get('wallabag_core.rule_based_tagger'); 35 $tagger = $this->getContainer()->get('wallabag_core.rule_based_tagger');
36 36
37 $output->write(sprintf('Tagging entries for user « <info>%s</info> »... ', $user->getUserName())); 37 $output->write(sprintf('Tagging entries for user « <comment>%s</comment> »... ', $user->getUserName()));
38 38
39 $entries = $tagger->tagAllForUser($user); 39 $entries = $tagger->tagAllForUser($user);
40 40
41 $output->writeln('<info>Done.</info>');
42 $output->write(sprintf('Persist entries ... ', $user->getUserName()));
43
41 $em = $this->getDoctrine()->getManager(); 44 $em = $this->getDoctrine()->getManager();
42 foreach ($entries as $entry) { 45 foreach ($entries as $entry) {
43 $em->persist($entry); 46 $em->persist($entry);
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php
index 91cdcae5..abd35c02 100644
--- a/src/Wallabag/CoreBundle/Controller/ConfigController.php
+++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php
@@ -7,6 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7use Symfony\Component\HttpFoundation\JsonResponse; 7use Symfony\Component\HttpFoundation\JsonResponse;
8use Symfony\Component\HttpFoundation\RedirectResponse; 8use Symfony\Component\HttpFoundation\RedirectResponse;
9use Symfony\Component\HttpFoundation\Request; 9use Symfony\Component\HttpFoundation\Request;
10use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
10use Wallabag\CoreBundle\Entity\Config; 11use Wallabag\CoreBundle\Entity\Config;
11use Wallabag\CoreBundle\Entity\TaggingRule; 12use Wallabag\CoreBundle\Entity\TaggingRule;
12use Wallabag\CoreBundle\Form\Type\ConfigType; 13use Wallabag\CoreBundle\Form\Type\ConfigType;
@@ -148,6 +149,9 @@ class ConfigController extends Controller
148 'token' => $config->getRssToken(), 149 'token' => $config->getRssToken(),
149 ], 150 ],
150 'twofactor_auth' => $this->getParameter('twofactor_auth'), 151 'twofactor_auth' => $this->getParameter('twofactor_auth'),
152 'enabled_users' => $this->getDoctrine()
153 ->getRepository('WallabagUserBundle:User')
154 ->getSumEnabledUsers(),
151 ]); 155 ]);
152 } 156 }
153 157
@@ -251,4 +255,37 @@ class ConfigController extends Controller
251 255
252 return $config; 256 return $config;
253 } 257 }
258
259 /**
260 * Delete account for current user.
261 *
262 * @Route("/account/delete", name="delete_account")
263 *
264 * @param Request $request
265 *
266 * @throws AccessDeniedHttpException
267 *
268 * @return \Symfony\Component\HttpFoundation\RedirectResponse
269 */
270 public function deleteAccountAction(Request $request)
271 {
272 $enabledUsers = $this->getDoctrine()
273 ->getRepository('WallabagUserBundle:User')
274 ->getSumEnabledUsers();
275
276 if ($enabledUsers <= 1) {
277 throw new AccessDeniedHttpException();
278 }
279
280 $user = $this->getUser();
281
282 // logout current user
283 $this->get('security.token_storage')->setToken(null);
284 $request->getSession()->invalidate();
285
286 $em = $this->get('fos_user.user_manager');
287 $em->deleteUser($user);
288
289 return $this->redirect($this->generateUrl('fos_user_security_login'));
290 }
254} 291}
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php
index 623a6146..5acc6852 100644
--- a/src/Wallabag/CoreBundle/Controller/TagController.php
+++ b/src/Wallabag/CoreBundle/Controller/TagController.php
@@ -63,10 +63,12 @@ class TagController extends Controller
63 $entry->removeTag($tag); 63 $entry->removeTag($tag);
64 $em = $this->getDoctrine()->getManager(); 64 $em = $this->getDoctrine()->getManager();
65 $em->flush(); 65 $em->flush();
66 if (count($tag->getEntries()) == 0) { 66
67 // remove orphan tag in case no entries are associated to it
68 if (count($tag->getEntries()) === 0) {
67 $em->remove($tag); 69 $em->remove($tag);
70 $em->flush();
68 } 71 }
69 $em->flush();
70 72
71 $redirectUrl = $this->get('wallabag_core.helper.redirect')->to($request->headers->get('referer')); 73 $redirectUrl = $this->get('wallabag_core.helper.redirect')->to($request->headers->get('referer'));
72 74
@@ -84,10 +86,25 @@ class TagController extends Controller
84 { 86 {
85 $tags = $this->getDoctrine() 87 $tags = $this->getDoctrine()
86 ->getRepository('WallabagCoreBundle:Tag') 88 ->getRepository('WallabagCoreBundle:Tag')
87 ->findAllTagsWithEntries($this->getUser()->getId()); 89 ->findAllTags($this->getUser()->getId());
90
91 $flatTags = [];
92
93 foreach ($tags as $key => $tag) {
94 $nbEntries = $this->getDoctrine()
95 ->getRepository('WallabagCoreBundle:Entry')
96 ->countAllEntriesByUserIdAndTagId($this->getUser()->getId(), $tag['id']);
97
98 $flatTags[] = [
99 'id' => $tag['id'],
100 'label' => $tag['label'],
101 'slug' => $tag['slug'],
102 'nbEntries' => $nbEntries,
103 ];
104 }
88 105
89 return $this->render('WallabagCoreBundle:Tag:tags.html.twig', [ 106 return $this->render('WallabagCoreBundle:Tag:tags.html.twig', [
90 'tags' => $tags, 107 'tags' => $flatTags,
91 ]); 108 ]);
92 } 109 }
93 110
diff --git a/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php b/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php
index 239d09ae..b490e209 100644
--- a/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php
+++ b/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php
@@ -55,6 +55,7 @@ class RuleBasedTagger
55 { 55 {
56 $rules = $this->getRulesForUser($user); 56 $rules = $this->getRulesForUser($user);
57 $entries = []; 57 $entries = [];
58 $tagsCache = [];
58 59
59 foreach ($rules as $rule) { 60 foreach ($rules as $rule) {
60 $qb = $this->entryRepository->getBuilderForAllByUser($user->getId()); 61 $qb = $this->entryRepository->getBuilderForAllByUser($user->getId());
@@ -62,7 +63,12 @@ class RuleBasedTagger
62 63
63 foreach ($entries as $entry) { 64 foreach ($entries as $entry) {
64 foreach ($rule->getTags() as $label) { 65 foreach ($rule->getTags() as $label) {
65 $tag = $this->getTag($label); 66 // avoid new tag duplicate by manually caching them
67 if (!isset($tagsCache[$label])) {
68 $tagsCache[$label] = $this->getTag($label);
69 }
70
71 $tag = $tagsCache[$label];
66 72
67 $entry->addTag($tag); 73 $entry->addTag($tag);
68 } 74 }
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index 75127b7d..cd2b47b9 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -309,4 +309,24 @@ class EntryRepository extends EntityRepository
309 309
310 return $qb->getQuery()->getSingleScalarResult(); 310 return $qb->getQuery()->getSingleScalarResult();
311 } 311 }
312
313 /**
314 * Count all entries for a tag and a user.
315 *
316 * @param int $userId
317 * @param int $tagId
318 *
319 * @return int
320 */
321 public function countAllEntriesByUserIdAndTagId($userId, $tagId)
322 {
323 $qb = $this->createQueryBuilder('e')
324 ->select('count(e.id)')
325 ->leftJoin('e.tags', 't')
326 ->where('e.user=:userId')->setParameter('userId', $userId)
327 ->andWhere('t.id=:tagId')->setParameter('tagId', $tagId)
328 ;
329
330 return $qb->getQuery()->getSingleScalarResult();
331 }
312} 332}
diff --git a/src/Wallabag/CoreBundle/Repository/TagRepository.php b/src/Wallabag/CoreBundle/Repository/TagRepository.php
index 9d127da7..e76878d4 100644
--- a/src/Wallabag/CoreBundle/Repository/TagRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/TagRepository.php
@@ -33,19 +33,23 @@ class TagRepository extends EntityRepository
33 } 33 }
34 34
35 /** 35 /**
36 * Find all tags with associated entries per user. 36 * Find all tags per user.
37 * 37 *
38 * @param int $userId 38 * @param int $userId
39 * 39 *
40 * @return array 40 * @return array
41 */ 41 */
42 public function findAllTagsWithEntries($userId) 42 public function findAllTags($userId)
43 { 43 {
44 return $this->createQueryBuilder('t') 44 return $this->createQueryBuilder('t')
45 ->select('t.slug', 't.label', 't.id')
45 ->leftJoin('t.entries', 'e') 46 ->leftJoin('t.entries', 'e')
46 ->where('e.user = :userId')->setParameter('userId', $userId) 47 ->where('e.user = :userId')->setParameter('userId', $userId)
48 ->groupBy('t.slug')
49 ->addGroupBy('t.label')
50 ->addGroupBy('t.id')
47 ->getQuery() 51 ->getQuery()
48 ->getResult(); 52 ->getArrayResult();
49 } 53 }
50 54
51 /** 55 /**
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml
index fb97454e..a4b727f4 100644
--- a/src/Wallabag/CoreBundle/Resources/config/services.yml
+++ b/src/Wallabag/CoreBundle/Resources/config/services.yml
@@ -29,7 +29,7 @@ services:
29 arguments: 29 arguments:
30 - "@doctrine" 30 - "@doctrine"
31 31
32 wallabag_core.table_prefix_subscriber: 32 wallabag_core.subscriber.table_prefix:
33 class: Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber 33 class: Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber
34 arguments: 34 arguments:
35 - "%database_table_prefix%" 35 - "%database_table_prefix%"
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
index 2652a102..f5548a21 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
@@ -88,6 +88,11 @@ config:
88 name_label: 'Navn' 88 name_label: 'Navn'
89 email_label: 'Emailadresse' 89 email_label: 'Emailadresse'
90 # twoFactorAuthentication_label: 'Two factor authentication' 90 # twoFactorAuthentication_label: 'Two factor authentication'
91 delete:
92 # title: Delete my account (danger zone !)
93 # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
94 # confirm: Are you really sure? (it can't be UNDONE)
95 # button: Delete my account
91 form_password: 96 form_password:
92 old_password_label: 'Gammel adgangskode' 97 old_password_label: 'Gammel adgangskode'
93 new_password_label: 'Ny adgangskode' 98 new_password_label: 'Ny adgangskode'
@@ -195,7 +200,7 @@ entry:
195 description: 'Vises artiklen forkert?' 200 description: 'Vises artiklen forkert?'
196 edit_title: 'Rediger titel' 201 edit_title: 'Rediger titel'
197 original_article: 'original' 202 original_article: 'original'
198 # annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations' 203 # annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %count% annotations'
199 created_at: 'Oprettelsesdato' 204 created_at: 'Oprettelsesdato'
200 new: 205 new:
201 page_title: 'Gem ny artikel' 206 page_title: 'Gem ny artikel'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
index e0f29b61..9edd7fb7 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
@@ -88,6 +88,11 @@ config:
88 name_label: 'Name' 88 name_label: 'Name'
89 email_label: 'E-Mail-Adresse' 89 email_label: 'E-Mail-Adresse'
90 twoFactorAuthentication_label: 'Zwei-Faktor-Authentifizierung' 90 twoFactorAuthentication_label: 'Zwei-Faktor-Authentifizierung'
91 delete:
92 # title: Delete my account (danger zone !)
93 # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
94 # confirm: Are you really sure? (it can't be UNDONE)
95 # button: Delete my account
91 form_password: 96 form_password:
92 old_password_label: 'Altes Kennwort' 97 old_password_label: 'Altes Kennwort'
93 new_password_label: 'Neues Kennwort' 98 new_password_label: 'Neues Kennwort'
@@ -195,7 +200,7 @@ entry:
195 description: 'Erscheint dieser Artikel falsch?' 200 description: 'Erscheint dieser Artikel falsch?'
196 edit_title: 'Titel ändern' 201 edit_title: 'Titel ändern'
197 original_article: 'original' 202 original_article: 'original'
198 annotations_on_the_entry: '{0} Keine Anmerkungen|{1} Eine Anmerkung|]1,Inf[ %nbAnnotations% Anmerkungen' 203 annotations_on_the_entry: '{0} Keine Anmerkungen|{1} Eine Anmerkung|]1,Inf[ %count% Anmerkungen'
199 created_at: 'Erstellungsdatum' 204 created_at: 'Erstellungsdatum'
200 new: 205 new:
201 page_title: 'Neuen Artikel speichern' 206 page_title: 'Neuen Artikel speichern'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
index b8e98112..b86145a0 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
@@ -88,6 +88,11 @@ config:
88 name_label: 'Name' 88 name_label: 'Name'
89 email_label: 'Email' 89 email_label: 'Email'
90 twoFactorAuthentication_label: 'Two factor authentication' 90 twoFactorAuthentication_label: 'Two factor authentication'
91 delete:
92 title: Delete my account (danger zone !)
93 description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
94 confirm: Are you really sure? (it can't be UNDONE)
95 button: Delete my account
91 form_password: 96 form_password:
92 old_password_label: 'Current password' 97 old_password_label: 'Current password'
93 new_password_label: 'New password' 98 new_password_label: 'New password'
@@ -195,7 +200,7 @@ entry:
195 description: 'Does this article appear wrong?' 200 description: 'Does this article appear wrong?'
196 edit_title: 'Edit title' 201 edit_title: 'Edit title'
197 original_article: 'original' 202 original_article: 'original'
198 annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations' 203 annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %count% annotations'
199 created_at: 'Creation date' 204 created_at: 'Creation date'
200 new: 205 new:
201 page_title: 'Save new entry' 206 page_title: 'Save new entry'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
index 70633bd7..b7187f50 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
@@ -88,6 +88,11 @@ config:
88 name_label: 'Nombre' 88 name_label: 'Nombre'
89 email_label: 'Direccion e-mail' 89 email_label: 'Direccion e-mail'
90 twoFactorAuthentication_label: 'Autentificación de dos factores' 90 twoFactorAuthentication_label: 'Autentificación de dos factores'
91 delete:
92 # title: Delete my account (danger zone !)
93 # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
94 # confirm: Are you really sure? (it can't be UNDONE)
95 # button: Delete my account
91 form_password: 96 form_password:
92 old_password_label: 'Contraseña actual' 97 old_password_label: 'Contraseña actual'
93 new_password_label: 'Nueva contraseña' 98 new_password_label: 'Nueva contraseña'
@@ -195,7 +200,7 @@ entry:
195 description: '¿Este artículo no se muestra bien?' 200 description: '¿Este artículo no se muestra bien?'
196 edit_title: 'Modificar el título' 201 edit_title: 'Modificar el título'
197 original_article: 'original' 202 original_article: 'original'
198 annotations_on_the_entry: '{0} Sin anotaciones|{1} Una anotación|]1,Inf[ %nbAnnotations% anotaciones' 203 annotations_on_the_entry: '{0} Sin anotaciones|{1} Una anotación|]1,Inf[ %count% anotaciones'
199 created_at: 'Fecha de creación' 204 created_at: 'Fecha de creación'
200 new: 205 new:
201 page_title: 'Guardar un nuevo artículo' 206 page_title: 'Guardar un nuevo artículo'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
index 074ab7a8..0751752b 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
@@ -88,6 +88,11 @@ config:
88 name_label: 'نام' 88 name_label: 'نام'
89 email_label: 'نشانی ایمیل' 89 email_label: 'نشانی ایمیل'
90 twoFactorAuthentication_label: 'تأیید ۲مرحله‌ای' 90 twoFactorAuthentication_label: 'تأیید ۲مرحله‌ای'
91 delete:
92 # title: Delete my account (danger zone !)
93 # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
94 # confirm: Are you really sure? (it can't be UNDONE)
95 # button: Delete my account
91 form_password: 96 form_password:
92 old_password_label: 'رمز قدیمی' 97 old_password_label: 'رمز قدیمی'
93 new_password_label: 'رمز تازه' 98 new_password_label: 'رمز تازه'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index 6d85a5ae..8d19ccb1 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -88,6 +88,11 @@ config:
88 name_label: 'Nom' 88 name_label: 'Nom'
89 email_label: 'Adresse e-mail' 89 email_label: 'Adresse e-mail'
90 twoFactorAuthentication_label: 'Double authentification' 90 twoFactorAuthentication_label: 'Double authentification'
91 delete:
92 title: Supprimer mon compte (attention danger !)
93 description: Si vous confirmez la suppression de votre compte, TOUS les articles, TOUS les tags, TOUTES les annotations et votre compte seront DÉFINITIVEMENT supprimé (c'est IRRÉVERSIBLE). Vous serez ensuite déconnecté.
94 confirm: Vous êtes vraiment sûr ? (c'est IRRÉVERSIBLE !)
95 button: 'Supprimer mon compte'
91 form_password: 96 form_password:
92 old_password_label: 'Mot de passe actuel' 97 old_password_label: 'Mot de passe actuel'
93 new_password_label: 'Nouveau mot de passe' 98 new_password_label: 'Nouveau mot de passe'
@@ -195,7 +200,7 @@ entry:
195 description: "Est-ce que cet article s'affiche mal ?" 200 description: "Est-ce que cet article s'affiche mal ?"
196 edit_title: 'Modifier le titre' 201 edit_title: 'Modifier le titre'
197 original_article: 'original' 202 original_article: 'original'
198 annotations_on_the_entry: '{0} Aucune annotation|{1} Une annotation|]1,Inf[ %nbAnnotations% annotations' 203 annotations_on_the_entry: '{0} Aucune annotation|{1} Une annotation|]1,Inf[ %count% annotations'
199 created_at: 'Date de création' 204 created_at: 'Date de création'
200 new: 205 new:
201 page_title: 'Sauvegarder un nouvel article' 206 page_title: 'Sauvegarder un nouvel article'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
index 15f7e774..4d3452ea 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
@@ -88,6 +88,11 @@ config:
88 name_label: 'Nome' 88 name_label: 'Nome'
89 email_label: 'E-mail' 89 email_label: 'E-mail'
90 twoFactorAuthentication_label: 'Two factor authentication' 90 twoFactorAuthentication_label: 'Two factor authentication'
91 delete:
92 # title: Delete my account (danger zone !)
93 # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
94 # confirm: Are you really sure? (it can't be UNDONE)
95 # button: Delete my account
91 form_password: 96 form_password:
92 old_password_label: 'Password corrente' 97 old_password_label: 'Password corrente'
93 new_password_label: 'Nuova password' 98 new_password_label: 'Nuova password'
@@ -195,7 +200,7 @@ entry:
195 description: 'Questo contenuto viene visualizzato male?' 200 description: 'Questo contenuto viene visualizzato male?'
196 edit_title: 'Modifica titolo' 201 edit_title: 'Modifica titolo'
197 original_article: 'originale' 202 original_article: 'originale'
198 annotations_on_the_entry: '{0} Nessuna annotazione|{1} Una annotazione|]1,Inf[ %nbAnnotations% annotazioni' 203 annotations_on_the_entry: '{0} Nessuna annotazione|{1} Una annotazione|]1,Inf[ %count% annotazioni'
199 created_at: 'Data di creazione' 204 created_at: 'Data di creazione'
200 new: 205 new:
201 page_title: 'Salva un nuovo contenuto' 206 page_title: 'Salva un nuovo contenuto'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
index 1d10be2a..f14213c6 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
@@ -25,13 +25,13 @@ menu:
25 internal_settings: 'Configuracion interna' 25 internal_settings: 'Configuracion interna'
26 import: 'Importar' 26 import: 'Importar'
27 howto: 'Ajuda' 27 howto: 'Ajuda'
28 developer: 'Desvolopador' 28 developer: 'Desvolopaire'
29 logout: 'Desconnexion' 29 logout: 'Desconnexion'
30 about: 'A prepaus' 30 about: 'A prepaus'
31 search: 'Cercar' 31 search: 'Cercar'
32 save_link: 'Enregistrar un novèl article' 32 save_link: 'Enregistrar un novèl article'
33 back_to_unread: 'Tornar als articles pas legits' 33 back_to_unread: 'Tornar als articles pas legits'
34 # users_management: 'Users management' 34 users_management: 'Gestion dels utilizaires'
35 top: 35 top:
36 add_new_entry: 'Enregistrar un novèl article' 36 add_new_entry: 'Enregistrar un novèl article'
37 search: 'Cercar' 37 search: 'Cercar'
@@ -46,7 +46,7 @@ footer:
46 social: 'Social' 46 social: 'Social'
47 powered_by: 'propulsat per' 47 powered_by: 'propulsat per'
48 about: 'A prepaus' 48 about: 'A prepaus'
49 # stats: Since %user_creation% you read %nb_archives% articles. That is about %per_day% a day! 49 stats: "Dempuèi %user_creation% avètz legit %nb_archives% articles. Es a l'entorn de %per_day% per jorn !"
50 50
51config: 51config:
52 page_title: 'Configuracion' 52 page_title: 'Configuracion'
@@ -88,6 +88,11 @@ config:
88 name_label: 'Nom' 88 name_label: 'Nom'
89 email_label: 'Adreça de corrièl' 89 email_label: 'Adreça de corrièl'
90 twoFactorAuthentication_label: 'Dobla autentificacion' 90 twoFactorAuthentication_label: 'Dobla autentificacion'
91 delete:
92 # title: Delete my account (danger zone !)
93 # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
94 # confirm: Are you really sure? (it can't be UNDONE)
95 # button: Delete my account
91 form_password: 96 form_password:
92 old_password_label: 'Senhal actual' 97 old_password_label: 'Senhal actual'
93 new_password_label: 'Senhal novèl' 98 new_password_label: 'Senhal novèl'
@@ -96,7 +101,7 @@ config:
96 if_label: 'se' 101 if_label: 'se'
97 then_tag_as_label: 'alara atribuir las etiquetas' 102 then_tag_as_label: 'alara atribuir las etiquetas'
98 delete_rule_label: 'suprimir' 103 delete_rule_label: 'suprimir'
99 # edit_rule_label: 'edit' 104 edit_rule_label: 'modificar'
100 rule_label: 'Règla' 105 rule_label: 'Règla'
101 tags_label: 'Etiquetas' 106 tags_label: 'Etiquetas'
102 faq: 107 faq:
@@ -195,7 +200,7 @@ entry:
195 description: "Marca mal la presentacion d'aqueste article ?" 200 description: "Marca mal la presentacion d'aqueste article ?"
196 edit_title: 'Modificar lo títol' 201 edit_title: 'Modificar lo títol'
197 original_article: 'original' 202 original_article: 'original'
198 annotations_on_the_entry: "{0} Pas cap d'anotacion|{1} Una anotacion|]1,Inf[ %nbAnnotations% anotacions" 203 annotations_on_the_entry: "{0} Pas cap d'anotacion|{1} Una anotacion|]1,Inf[ %count% anotacions"
199 created_at: 'Data de creacion' 204 created_at: 'Data de creacion'
200 new: 205 new:
201 page_title: 'Enregistrar un novèl article' 206 page_title: 'Enregistrar un novèl article'
@@ -209,7 +214,7 @@ entry:
209 is_public_label: 'Public' 214 is_public_label: 'Public'
210 save_label: 'Enregistrar' 215 save_label: 'Enregistrar'
211 public: 216 public:
212 # shared_by_wallabag: "This article has been shared by <a href='%wallabag_instance%'>wallabag</a>" 217 shared_by_wallabag: "Aqueste article es estat partejat per <a href='%wallabag_instance%'>wallabag</a>"
213 218
214about: 219about:
215 page_title: 'A prepaus' 220 page_title: 'A prepaus'
@@ -265,14 +270,14 @@ howto:
265 270
266quickstart: 271quickstart:
267 page_title: 'Per ben començar' 272 page_title: 'Per ben començar'
268 # more: 'More…' 273 more: 'Mai…'
269 intro: 274 intro:
270 title: 'Benvenguda sus wallabag !' 275 title: 'Benvenguda sus wallabag !'
271 paragraph_1: "Anem vos guidar per far lo torn de la proprietat e vos presentar unas fonccionalitats que vos poirián interessar per vos apropriar aquesta aisina." 276 paragraph_1: "Anem vos guidar per far lo torn de la proprietat e vos presentar unas fonccionalitats que vos poirián interessar per vos apropriar aquesta aisina."
272 paragraph_2: 'Seguètz-nos ' 277 paragraph_2: 'Seguètz-nos '
273 configure: 278 configure:
274 title: "Configuratz l'aplicacio" 279 title: "Configuratz l'aplicacion"
275 # description: 'In order to have an application which suits you, have a look into the configuration of wallabag.' 280 description: "Per fin d'aver una aplicacion que vos va ben, anatz veire la configuracion de wallabag."
276 language: "Cambiatz la lenga e l'estil de l'aplicacion" 281 language: "Cambiatz la lenga e l'estil de l'aplicacion"
277 rss: 'Activatz los fluxes RSS' 282 rss: 'Activatz los fluxes RSS'
278 tagging_rules: 'Escrivètz de règlas per classar automaticament vòstres articles' 283 tagging_rules: 'Escrivètz de règlas per classar automaticament vòstres articles'
@@ -286,7 +291,7 @@ quickstart:
286 import: 'Configurar los impòrt' 291 import: 'Configurar los impòrt'
287 first_steps: 292 first_steps:
288 title: 'Primièrs passes' 293 title: 'Primièrs passes'
289 # description: "Now wallabag is well configured, it's time to archive the web. You can click on the top right sign + to add a link." 294 description: "Ara wallabag es ben configurat, es lo moment d'archivar lo web. Podètz clicar sul signe + a man drecha amont per ajustar un ligam."
290 new_article: 'Ajustatz vòstre primièr article' 295 new_article: 'Ajustatz vòstre primièr article'
291 unread_articles: 'E racaptatz-lo !' 296 unread_articles: 'E racaptatz-lo !'
292 migrate: 297 migrate:
@@ -298,14 +303,14 @@ quickstart:
298 readability: 'Migrar dempuèi Readability' 303 readability: 'Migrar dempuèi Readability'
299 instapaper: 'Migrar dempuèi Instapaper' 304 instapaper: 'Migrar dempuèi Instapaper'
300 developer: 305 developer:
301 title: 'Pels desvolopadors' 306 title: 'Pels desvolopaires'
302 # description: 'We also thought to the developers: Docker, API, translations, etc.' 307 description: 'Avèm tanben pensat als desvolopaires : Docker, API, traduccions, etc.'
303 create_application: 'Crear vòstra aplicacion tèrça' 308 create_application: 'Crear vòstra aplicacion tèrça'
304 # use_docker: 'Use Docker to install wallabag' 309 use_docker: 'Utilizar Docker per installar wallabag'
305 docs: 310 docs:
306 title: 'Documentacion complèta' 311 title: 'Documentacion complèta'
307 # description: "There are so much features in wallabag. Don't hesitate to read the manual to know them and to learn how to use them." 312 description: "I a un fum de fonccionalitats dins wallabag. Esitetz pas a legir lo manual per las conéisser e aprendre a las utilizar."
308 annotate: 'Anotatar vòstre article' 313 annotate: 'Anotar vòstre article'
309 export: 'Convertissètz vòstres articles en ePub o en PDF' 314 export: 'Convertissètz vòstres articles en ePub o en PDF'
310 search_filters: "Aprenètz a utilizar lo motor de recèrca e los filtres per retrobar l'article que vos interèssa" 315 search_filters: "Aprenètz a utilizar lo motor de recèrca e los filtres per retrobar l'article que vos interèssa"
311 fetching_errors: "Qué far se mon article es pas recuperat coma cal ?" 316 fetching_errors: "Qué far se mon article es pas recuperat coma cal ?"
@@ -390,7 +395,7 @@ developer:
390 warn_message_2: "Se suprimissètz un client, totas las aplicacions que l'emplegan foncionaràn pas mai amb vòstre compte wallabag." 395 warn_message_2: "Se suprimissètz un client, totas las aplicacions que l'emplegan foncionaràn pas mai amb vòstre compte wallabag."
391 action: 'Suprimir aqueste client' 396 action: 'Suprimir aqueste client'
392 client: 397 client:
393 page_title: 'Desvlopador > Novèl client' 398 page_title: 'Desvolopaire > Novèl client'
394 page_description: "Anatz crear un novèl client. Mercés de cumplir l'url de redireccion cap a vòstra aplicacion." 399 page_description: "Anatz crear un novèl client. Mercés de cumplir l'url de redireccion cap a vòstra aplicacion."
395 form: 400 form:
396 name_label: "Nom del client" 401 name_label: "Nom del client"
@@ -398,7 +403,7 @@ developer:
398 save_label: 'Crear un novèl client' 403 save_label: 'Crear un novèl client'
399 action_back: 'Retorn' 404 action_back: 'Retorn'
400 client_parameter: 405 client_parameter:
401 page_title: 'Desvolopador > Los paramètres de vòstre client' 406 page_title: 'Desvolopaire > Los paramètres de vòstre client'
402 page_description: 'Vaquí los paramètres de vòstre client' 407 page_description: 'Vaquí los paramètres de vòstre client'
403 field_name: 'Nom del client' 408 field_name: 'Nom del client'
404 field_id: 'ID Client' 409 field_id: 'ID Client'
@@ -406,7 +411,7 @@ developer:
406 back: 'Retour' 411 back: 'Retour'
407 read_howto: 'Legir "cossí crear ma primièra aplicacion"' 412 read_howto: 'Legir "cossí crear ma primièra aplicacion"'
408 howto: 413 howto:
409 page_title: 'Desvolopador > Cossí crear ma primièra aplicacion' 414 page_title: 'Desvolopaire > Cossí crear ma primièra aplicacion'
410 description: 415 description:
411 paragraph_1: "Las comandas seguentas utilizan la <a href=\"https://github.com/jkbrzt/httpie\">bibliotèca HTTPie</a>. Asseguratz-vos que siasqueòu installadas abans de l'utilizar." 416 paragraph_1: "Las comandas seguentas utilizan la <a href=\"https://github.com/jkbrzt/httpie\">bibliotèca HTTPie</a>. Asseguratz-vos que siasqueòu installadas abans de l'utilizar."
412 paragraph_2: "Vos cal un geton per escambiar entre vòstra aplicacion e l'API de wallabar." 417 paragraph_2: "Vos cal un geton per escambiar entre vòstra aplicacion e l'API de wallabar."
@@ -419,31 +424,31 @@ developer:
419 back: 'Retorn' 424 back: 'Retorn'
420 425
421user: 426user:
422 # page_title: Users management 427 page_title: 'Gestion dels utilizaires'
423 # new_user: Create a new user 428 new_user: 'Crear un novèl utilizaire'
424 # edit_user: Edit an existing user 429 edit_user: 'Modificar un utilizaire existent'
425 # description: "Here you can manage all users (create, edit and delete)" 430 description: "Aquí podètz gerir totes los utilizaires (crear, modificar e suprimir)"
426 # list: 431 list:
427 # actions: Actions 432 actions: 'Accions'
428 # edit_action: Edit 433 edit_action: 'Modificar'
429 # yes: Yes 434 yes: 'Ã’c'
430 # no: No 435 no: 'Non'
431 # create_new_one: Create a new user 436 create_new_one: 'Crear un novèl utilizaire'
432 form: 437 form:
433 username_label: "Nom d'utilizaire" 438 username_label: "Nom d'utilizaire"
434 # name_label: 'Name' 439 name_label: 'Nom'
435 password_label: 'Senhal' 440 password_label: 'Senhal'
436 repeat_new_password_label: 'Confirmatz vòstre novèl senhal' 441 repeat_new_password_label: 'Confirmatz vòstre novèl senhal'
437 plain_password_label: 'Senhal en clar' 442 plain_password_label: 'Senhal en clar'
438 email_label: 'Adreça de corrièl' 443 email_label: 'Adreça de corrièl'
439 # enabled_label: 'Enabled' 444 enabled_label: 'Actiu'
440 # locked_label: 'Locked' 445 locked_label: 'Varrolhat'
441 # last_login_label: 'Last login' 446 last_login_label: 'Darrièra connexion'
442 # twofactor_label: Two factor authentication 447 twofactor_label: 'Autentificacion doble-factor'
443 # save: Save 448 save: 'Enregistrar'
444 # delete: Delete 449 delete: 'Suprimir'
445 # delete_confirm: Are you sure? 450 delete_confirm: 'Sètz segur ?'
446 # back_to_list: Back to list 451 back_to_list: 'Tornar a la lista'
447 452
448flashes: 453flashes:
449 config: 454 config:
@@ -455,7 +460,7 @@ flashes:
455 rss_updated: 'La configuracion dels fluxes RSS es ben estada mesa a jorn' 460 rss_updated: 'La configuracion dels fluxes RSS es ben estada mesa a jorn'
456 tagging_rules_updated: 'Règlas misa a jorn' 461 tagging_rules_updated: 'Règlas misa a jorn'
457 tagging_rules_deleted: 'Règla suprimida' 462 tagging_rules_deleted: 'Règla suprimida'
458 user_added: 'Utilizaire "%username%" apondut' 463 user_added: 'Utilizaire "%username%" ajustat'
459 rss_token_updated: 'Geton RSS mes a jorn' 464 rss_token_updated: 'Geton RSS mes a jorn'
460 entry: 465 entry:
461 notice: 466 notice:
@@ -467,12 +472,12 @@ flashes:
467 entry_reloaded_failed: "L'article es estat cargat de nòu mai la recuperacion del contengut a fracassat" 472 entry_reloaded_failed: "L'article es estat cargat de nòu mai la recuperacion del contengut a fracassat"
468 entry_archived: 'Article marcat coma legit' 473 entry_archived: 'Article marcat coma legit'
469 entry_unarchived: 'Article marcat coma pas legit' 474 entry_unarchived: 'Article marcat coma pas legit'
470 entry_starred: 'Article apondut dins los favorits' 475 entry_starred: 'Article ajustat dins los favorits'
471 entry_unstarred: 'Article quitat dels favorits' 476 entry_unstarred: 'Article quitat dels favorits'
472 entry_deleted: 'Article suprimit' 477 entry_deleted: 'Article suprimit'
473 tag: 478 tag:
474 notice: 479 notice:
475 tag_added: 'Etiqueta aponduda' 480 tag_added: 'Etiqueta ajustada'
476 import: 481 import:
477 notice: 482 notice:
478 failed: "L'importacion a fracassat, mercés de tornar ensajar" 483 failed: "L'importacion a fracassat, mercés de tornar ensajar"
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
index 547e9c8b..a2fe13db 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
@@ -88,6 +88,11 @@ config:
88 name_label: 'Nazwa' 88 name_label: 'Nazwa'
89 email_label: 'Adres email' 89 email_label: 'Adres email'
90 twoFactorAuthentication_label: 'Autoryzacja dwuetapowa' 90 twoFactorAuthentication_label: 'Autoryzacja dwuetapowa'
91 delete:
92 # title: Delete my account (danger zone !)
93 # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
94 # confirm: Are you really sure? (it can't be UNDONE)
95 # button: Delete my account
91 form_password: 96 form_password:
92 old_password_label: 'Stare hasło' 97 old_password_label: 'Stare hasło'
93 new_password_label: 'Nowe hasło' 98 new_password_label: 'Nowe hasło'
@@ -195,7 +200,7 @@ entry:
195 description: 'Czy ten artykuł wygląda źle?' 200 description: 'Czy ten artykuł wygląda źle?'
196 edit_title: 'Edytuj tytuł' 201 edit_title: 'Edytuj tytuł'
197 original_article: 'oryginalny' 202 original_article: 'oryginalny'
198 annotations_on_the_entry: '{0} Nie ma adnotacji |{1} Jedna adnotacja |]1,Inf[ %nbAnnotations% adnotacji' 203 annotations_on_the_entry: '{0} Nie ma adnotacji |{1} Jedna adnotacja |]1,Inf[ %count% adnotacji'
199 created_at: 'Czas stworzenia' 204 created_at: 'Czas stworzenia'
200 new: 205 new:
201 page_title: 'Zapisz nowy wpis' 206 page_title: 'Zapisz nowy wpis'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
index 2b1d4f6d..29db9c3e 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
@@ -88,6 +88,11 @@ config:
88 name_label: 'Nume' 88 name_label: 'Nume'
89 email_label: 'E-mail' 89 email_label: 'E-mail'
90 # twoFactorAuthentication_label: 'Two factor authentication' 90 # twoFactorAuthentication_label: 'Two factor authentication'
91 delete:
92 # title: Delete my account (danger zone !)
93 # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
94 # confirm: Are you really sure? (it can't be UNDONE)
95 # button: Delete my account
91 form_password: 96 form_password:
92 old_password_label: 'Parola veche' 97 old_password_label: 'Parola veche'
93 new_password_label: 'Parola nouă' 98 new_password_label: 'Parola nouă'
@@ -195,7 +200,7 @@ entry:
195 description: 'Îți pare ciudat articolul?' 200 description: 'Îți pare ciudat articolul?'
196 edit_title: 'Editează titlul' 201 edit_title: 'Editează titlul'
197 original_article: 'original' 202 original_article: 'original'
198 # annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations' 203 # annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %count% annotations'
199 created_at: 'Data creării' 204 created_at: 'Data creării'
200 new: 205 new:
201 page_title: 'Salvează un nou articol' 206 page_title: 'Salvează un nou articol'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
index 8cfc245a..41e8e576 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
@@ -88,6 +88,11 @@ config:
88 name_label: 'Ä°sim' 88 name_label: 'Ä°sim'
89 email_label: 'E-posta' 89 email_label: 'E-posta'
90 twoFactorAuthentication_label: 'İki adımlı doğrulama' 90 twoFactorAuthentication_label: 'İki adımlı doğrulama'
91 delete:
92 # title: Delete my account (danger zone !)
93 # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
94 # confirm: Are you really sure? (it can't be UNDONE)
95 # button: Delete my account
91 form_password: 96 form_password:
92 old_password_label: 'Eski ÅŸifre' 97 old_password_label: 'Eski ÅŸifre'
93 new_password_label: 'Yeni ÅŸifre' 98 new_password_label: 'Yeni ÅŸifre'
@@ -194,7 +199,7 @@ entry:
194 description: 'Bu makalede herhangi bir yanlışlık mı var?' 199 description: 'Bu makalede herhangi bir yanlışlık mı var?'
195 edit_title: 'Başlığı düzenle' 200 edit_title: 'Başlığı düzenle'
196 original_article: 'orijinal' 201 original_article: 'orijinal'
197 # annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations' 202 # annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %count% annotations'
198 created_at: 'OluÅŸturulma tarihi' 203 created_at: 'OluÅŸturulma tarihi'
199 new: 204 new:
200 page_title: 'Yeni makaleyi kaydet' 205 page_title: 'Yeni makaleyi kaydet'
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 ff7ef73a..54508b6d 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
@@ -150,6 +150,15 @@
150 {{ form_widget(form.user.save) }} 150 {{ form_widget(form.user.save) }}
151 </form> 151 </form>
152 152
153 {% if enabled_users > 1 %}
154 <h2>{{ 'config.form_user.delete.title'|trans }}</h2>
155
156 <p>{{ 'config.form_user.delete.description'|trans }}</p>
157 <a href="{{ path('delete_account') }}" onclick="return confirm('{{ 'config.form_user.delete.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red delete-account">
158 {{ 'config.form_user.delete.button'|trans }}
159 </a>
160 {% endif %}
161
153 <h2>{{ 'config.tab_menu.password'|trans }}</h2> 162 <h2>{{ 'config.tab_menu.password'|trans }}</h2>
154 163
155 {{ form_start(form.pwd) }} 164 {{ form_start(form.pwd) }}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
index b1aabf9b..3689159b 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
@@ -54,7 +54,6 @@
54 {% endif %} 54 {% endif %}
55 </i> 55 </i>
56 56
57 {% set nbAnnotations = entry.annotations | length %}
58 <span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> 57 <span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span>
59 <aside class="tags"> 58 <aside class="tags">
60 <div class="card-entry-tags"> 59 <div class="card-entry-tags">
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
index 50043907..1e2c6b42 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
@@ -9,7 +9,7 @@
9 9
10 <ul> 10 <ul>
11 {% for tag in tags %} 11 {% for tag in tags %}
12 <li id="tag-{{ tag.id|e }}"><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{tag.label}} ({{ tag.entries.getValues | length }})</a></li> 12 <li id="tag-{{ tag.id|e }}"><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{tag.label}} ({{ tag.nbEntries | length }})</a></li>
13 {% endfor %} 13 {% endfor %}
14 </ul> 14 </ul>
15 15
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig
index a0a0d3c3..804adb36 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig
@@ -30,11 +30,16 @@
30 <meta property="og:title" content="{{ entry.title | raw }}" /> 30 <meta property="og:title" content="{{ entry.title | raw }}" />
31 <meta property="og:type" content="article" /> 31 <meta property="og:type" content="article" />
32 <meta property="og:url" content="{{ app.request.uri }}" /> 32 <meta property="og:url" content="{{ app.request.uri }}" />
33 {% set picturePath = app.request.schemeAndHttpHost ~ asset('bundles/wallabagcore/themes/_global/img/logo-other_themes.png') %}
33 {% if entry.previewPicture is not null %} 34 {% if entry.previewPicture is not null %}
34 <meta property="og:image" content="{{ entry.previewPicture }}" /> 35 {% set picturePath = entry.previewPicture %}
35 {% else %}
36 <meta property="og:image" content="{{ app.request.schemeAndHttpHost }}{{ asset('bundles/wallabagcore/themes/_global/img/logo-other_themes.png') }}" />
37 {% endif %} 36 {% endif %}
37 <meta property="og:image" content="{{ picturePath }}" />
38 <meta name="twitter:card" content="summary" />
39 <meta name="twitter:image" content="{{ picturePath }}" />
40 <meta name="twitter:site" content="@wallabagapp" />
41 <meta name="twitter:title" content="{{ entry.title | raw }}" />
42 <meta name="twitter:description" content="{{ entry.title | raw }}" />
38 </head> 43 </head>
39 <body> 44 <body>
40 <header> 45 <header>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/_bookmarklet.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/_bookmarklet.html.twig
index 966a84db..3385cd53 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/_bookmarklet.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/_bookmarklet.html.twig
@@ -1 +1 @@
<a id="bookmarklet" ondragend="this.click();" href="javascript:var url=location.href||url;var wllbg=window.open('{{ url('bookmarklet') }}?url=' + encodeURI(url),'_blank');wllbg.close();void(0);">bag it!</a> <a id="bookmarklet" ondragend="this.click();" href="javascript:(function(){var url=location.href||url;var wllbg=window.open('{{ url('bookmarklet') }}?url=' + encodeURI(url),'_blank');})();">bag it!</a>
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 270c077f..8434508d 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
@@ -167,6 +167,18 @@
167 {{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} 167 {{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
168 {{ form_widget(form.user._token) }} 168 {{ form_widget(form.user._token) }}
169 </form> 169 </form>
170
171 {% if enabled_users > 1 %}
172 <br /><hr /><br />
173
174 <div class="row">
175 <h5>{{ 'config.form_user.delete.title'|trans }}</h5>
176 <p>{{ 'config.form_user.delete.description'|trans }}</p>
177 <a href="{{ path('delete_account') }}" onclick="return confirm('{{ 'config.form_user.delete.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red delete-account">
178 {{ 'config.form_user.delete.button'|trans }}
179 </a>
180 </div>
181 {% endif %}
170 </div> 182 </div>
171 183
172 <div id="set4" class="col s12"> 184 <div id="set4" class="col s12">
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
index 55b3ee5c..919f94ec 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
@@ -77,7 +77,7 @@
77 <div class="card-action"> 77 <div class="card-action">
78 <span class="bold"> 78 <span class="bold">
79 <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.list.original_article'|trans }}: {{ entry.title|e }} - {{ entry.domainName|removeWww }}" class="tool original grey-text"><span>{{ entry.domainName|removeWww|truncate(18) }}</span></a> 79 <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.list.original_article'|trans }}: {{ entry.title|e }} - {{ entry.domainName|removeWww }}" class="tool original grey-text"><span>{{ entry.domainName|removeWww|truncate(18) }}</span></a>
80 </bold> 80 </span>
81 81
82 <ul class="tools right"> 82 <ul class="tools right">
83 <li> 83 <li>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
index 1ddb5a15..5188eb01 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
@@ -225,7 +225,7 @@
225 <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool"> 225 <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool">
226 <i class="material-icons link">link</i> <span class="link">{{ entry.domainName|removeWww }}</span> 226 <i class="material-icons link">link</i> <span class="link">{{ entry.domainName|removeWww }}</span>
227 </a> 227 </a>
228 <span class="tool"><i class="material-icons link">comment</i> <span class="link">{{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> 228 <span class="tool"><i class="material-icons link">comment</i></span> <span class="link">{{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span>
229 <div id="list"> 229 <div id="list">
230 {% for tag in entry.tags %} 230 {% for tag in entry.tags %}
231 <div class="chip"> 231 <div class="chip">
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
index 1690633a..96f4f990 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
@@ -6,12 +6,19 @@
6 <div class="results clearfix"> 6 <div class="results clearfix">
7 <div class="nb-results left">{{ 'tag.list.number_on_the_page'|transchoice(tags|length) }}</div> 7 <div class="nb-results left">{{ 'tag.list.number_on_the_page'|transchoice(tags|length) }}</div>
8 </div> 8 </div>
9
9 <br /> 10 <br />
10 <ul class="row data"> 11
11 {% for tag in tags %} 12 <div class="row">
12 <li id="tag-{{ tag.id|e }}" class="col l4 m6 s12"><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{tag.label}} ({{ tag.entries.getValues | length }})</a></li> 13 <ul class="card-tag-labels">
13 {% endfor %} 14 {% for tag in tags %}
14 </ul> 15 <li title="{{tag.label}} ({{ tag.nbEntries }})" id="tag-{{ tag.id }}" class="col l2 m2 s2">
16 <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{tag.label}} ({{ tag.nbEntries }})</a>
17 </li>
18 {% endfor %}
19 </ul>
20 </div>
21
15 <div> 22 <div>
16 <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }}</a> 23 <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }}</a>
17 </div> 24 </div>
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 c7d6d70d..de0049d3 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
@@ -73,7 +73,7 @@
73 <a class="waves-effect" href="{{ path('howto') }}">{{ 'menu.left.howto'|trans }}</a> 73 <a class="waves-effect" href="{{ path('howto') }}">{{ 'menu.left.howto'|trans }}</a>
74 </li> 74 </li>
75 <li class="bold"> 75 <li class="bold">
76 <a class="waves-effect" class="icon icon-power" href="{{ path('fos_user_security_logout') }}">{{ 'menu.left.logout'|trans }}</a> 76 <a class="waves-effect icon icon-power" href="{{ path('fos_user_security_logout') }}">{{ 'menu.left.logout'|trans }}</a>
77 </li> 77 </li>
78 </ul> 78 </ul>
79 <div class="nav-wrapper nav-panels"> 79 <div class="nav-wrapper nav-panels">
diff --git a/src/Wallabag/UserBundle/Repository/UserRepository.php b/src/Wallabag/UserBundle/Repository/UserRepository.php
index 009c4881..445edb3c 100644
--- a/src/Wallabag/UserBundle/Repository/UserRepository.php
+++ b/src/Wallabag/UserBundle/Repository/UserRepository.php
@@ -38,4 +38,18 @@ class UserRepository extends EntityRepository
38 ->getQuery() 38 ->getQuery()
39 ->getSingleResult(); 39 ->getSingleResult();
40 } 40 }
41
42 /**
43 * Count how many users are enabled.
44 *
45 * @return int
46 */
47 public function getSumEnabledUsers()
48 {
49 return $this->createQueryBuilder('u')
50 ->select('count(u)')
51 ->andWhere('u.expired = false')
52 ->getQuery()
53 ->getSingleScalarResult();
54 }
41} 55}