diff options
Diffstat (limited to 'src')
43 files changed, 942 insertions, 63 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index 03eb9b08..869fdc56 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php | |||
@@ -334,6 +334,77 @@ class WallabagRestController extends FOSRestController | |||
334 | * | 334 | * |
335 | * @ApiDoc( | 335 | * @ApiDoc( |
336 | * requirements={ | 336 | * requirements={ |
337 | * {"name"="tag", "dataType"="string", "required"=true, "requirement"="\w+", "description"="Tag as a string"} | ||
338 | * } | ||
339 | * ) | ||
340 | * | ||
341 | * @return Response | ||
342 | */ | ||
343 | public function deleteTagLabelAction(Request $request) | ||
344 | { | ||
345 | $this->validateAuthentication(); | ||
346 | $label = $request->request->get('tag', ''); | ||
347 | |||
348 | $tag = $this->getDoctrine()->getRepository('WallabagCoreBundle:Tag')->findOneByLabel($label); | ||
349 | |||
350 | if (empty($tag)) { | ||
351 | throw $this->createNotFoundException('Tag not found'); | ||
352 | } | ||
353 | |||
354 | $this->getDoctrine() | ||
355 | ->getRepository('WallabagCoreBundle:Entry') | ||
356 | ->removeTag($this->getUser()->getId(), $tag); | ||
357 | |||
358 | $json = $this->get('serializer')->serialize($tag, 'json'); | ||
359 | |||
360 | return $this->renderJsonResponse($json); | ||
361 | } | ||
362 | |||
363 | /** | ||
364 | * Permanently remove some tags from **every** entry. | ||
365 | * | ||
366 | * @ApiDoc( | ||
367 | * requirements={ | ||
368 | * {"name"="tags", "dataType"="string", "required"=true, "format"="tag1,tag2", "description"="Tags as strings (comma splitted)"} | ||
369 | * } | ||
370 | * ) | ||
371 | * | ||
372 | * @return Response | ||
373 | */ | ||
374 | public function deleteTagsLabelAction(Request $request) | ||
375 | { | ||
376 | $this->validateAuthentication(); | ||
377 | |||
378 | $tagsLabels = $request->request->get('tags', ''); | ||
379 | |||
380 | $tags = []; | ||
381 | |||
382 | foreach (explode(',', $tagsLabels) as $tagLabel) { | ||
383 | $tagEntity = $this->getDoctrine()->getRepository('WallabagCoreBundle:Tag')->findOneByLabel($tagLabel); | ||
384 | |||
385 | if (!empty($tagEntity)) { | ||
386 | $tags[] = $tagEntity; | ||
387 | } | ||
388 | } | ||
389 | |||
390 | if (empty($tags)) { | ||
391 | throw $this->createNotFoundException('Tags not found'); | ||
392 | } | ||
393 | |||
394 | $this->getDoctrine() | ||
395 | ->getRepository('WallabagCoreBundle:Entry') | ||
396 | ->removeTags($this->getUser()->getId(), $tags); | ||
397 | |||
398 | $json = $this->get('serializer')->serialize($tags, 'json'); | ||
399 | |||
400 | return $this->renderJsonResponse($json); | ||
401 | } | ||
402 | |||
403 | /** | ||
404 | * Permanently remove one tag from **every** entry. | ||
405 | * | ||
406 | * @ApiDoc( | ||
407 | * requirements={ | ||
337 | * {"name"="tag", "dataType"="integer", "requirement"="\w+", "description"="The tag"} | 408 | * {"name"="tag", "dataType"="integer", "requirement"="\w+", "description"="The tag"} |
338 | * } | 409 | * } |
339 | * ) | 410 | * ) |
@@ -352,6 +423,7 @@ class WallabagRestController extends FOSRestController | |||
352 | 423 | ||
353 | return $this->renderJsonResponse($json); | 424 | return $this->renderJsonResponse($json); |
354 | } | 425 | } |
426 | |||
355 | /** | 427 | /** |
356 | * Retrieve version number. | 428 | * Retrieve version number. |
357 | * | 429 | * |
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index e134ced5..143def4f 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php | |||
@@ -242,6 +242,11 @@ class InstallCommand extends ContainerAwareCommand | |||
242 | 242 | ||
243 | $settings = [ | 243 | $settings = [ |
244 | [ | 244 | [ |
245 | 'name' => 'share_public', | ||
246 | 'value' => '1', | ||
247 | 'section' => 'entry', | ||
248 | ], | ||
249 | [ | ||
245 | 'name' => 'carrot', | 250 | 'name' => 'carrot', |
246 | 'value' => '1', | 251 | 'value' => '1', |
247 | 'section' => 'entry', | 252 | 'section' => 'entry', |
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index ccdf9406..624576b5 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php | |||
@@ -4,7 +4,6 @@ namespace Wallabag\CoreBundle\Controller; | |||
4 | 4 | ||
5 | use Pagerfanta\Adapter\DoctrineORMAdapter; | 5 | use Pagerfanta\Adapter\DoctrineORMAdapter; |
6 | use Pagerfanta\Exception\OutOfRangeCurrentPageException; | 6 | use Pagerfanta\Exception\OutOfRangeCurrentPageException; |
7 | use Pagerfanta\Pagerfanta; | ||
8 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
9 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 8 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
10 | use Symfony\Component\HttpFoundation\Request; | 9 | use Symfony\Component\HttpFoundation\Request; |
@@ -13,6 +12,7 @@ use Wallabag\CoreBundle\Entity\Entry; | |||
13 | use Wallabag\CoreBundle\Form\Type\EntryFilterType; | 12 | use Wallabag\CoreBundle\Form\Type\EntryFilterType; |
14 | use Wallabag\CoreBundle\Form\Type\EditEntryType; | 13 | use Wallabag\CoreBundle\Form\Type\EditEntryType; |
15 | use Wallabag\CoreBundle\Form\Type\NewEntryType; | 14 | use Wallabag\CoreBundle\Form\Type\NewEntryType; |
15 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache; | ||
16 | 16 | ||
17 | class EntryController extends Controller | 17 | class EntryController extends Controller |
18 | { | 18 | { |
@@ -226,6 +226,10 @@ class EntryController extends Controller | |||
226 | $repository = $this->get('wallabag_core.entry_repository'); | 226 | $repository = $this->get('wallabag_core.entry_repository'); |
227 | 227 | ||
228 | switch ($type) { | 228 | switch ($type) { |
229 | case 'untagged': | ||
230 | $qb = $repository->getBuilderForUntaggedByUser($this->getUser()->getId()); | ||
231 | |||
232 | break; | ||
229 | case 'starred': | 233 | case 'starred': |
230 | $qb = $repository->getBuilderForStarredByUser($this->getUser()->getId()); | 234 | $qb = $repository->getBuilderForStarredByUser($this->getUser()->getId()); |
231 | break; | 235 | break; |
@@ -257,9 +261,10 @@ class EntryController extends Controller | |||
257 | } | 261 | } |
258 | 262 | ||
259 | $pagerAdapter = new DoctrineORMAdapter($qb->getQuery()); | 263 | $pagerAdapter = new DoctrineORMAdapter($qb->getQuery()); |
260 | $entries = new Pagerfanta($pagerAdapter); | ||
261 | 264 | ||
262 | $entries->setMaxPerPage($this->getUser()->getConfig()->getItemsPerPage()); | 265 | $entries = $this->get('wallabag_core.helper.prepare_pager_for_entries') |
266 | ->prepare($pagerAdapter, $page); | ||
267 | |||
263 | try { | 268 | try { |
264 | $entries->setCurrentPage($page); | 269 | $entries->setCurrentPage($page); |
265 | } catch (OutOfRangeCurrentPageException $e) { | 270 | } catch (OutOfRangeCurrentPageException $e) { |
@@ -434,7 +439,7 @@ class EntryController extends Controller | |||
434 | */ | 439 | */ |
435 | private function checkUserAction(Entry $entry) | 440 | private function checkUserAction(Entry $entry) |
436 | { | 441 | { |
437 | if ($this->getUser()->getId() != $entry->getUser()->getId()) { | 442 | if (null === $this->getUser() || $this->getUser()->getId() != $entry->getUser()->getId()) { |
438 | throw $this->createAccessDeniedException('You can not access this entry.'); | 443 | throw $this->createAccessDeniedException('You can not access this entry.'); |
439 | } | 444 | } |
440 | } | 445 | } |
@@ -450,4 +455,91 @@ class EntryController extends Controller | |||
450 | { | 455 | { |
451 | return $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($entry->getUrl(), $this->getUser()->getId()); | 456 | return $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($entry->getUrl(), $this->getUser()->getId()); |
452 | } | 457 | } |
458 | |||
459 | /** | ||
460 | * Get public URL for entry (and generate it if necessary). | ||
461 | * | ||
462 | * @param Entry $entry | ||
463 | * | ||
464 | * @Route("/share/{id}", requirements={"id" = "\d+"}, name="share") | ||
465 | * | ||
466 | * @return \Symfony\Component\HttpFoundation\Response | ||
467 | */ | ||
468 | public function shareAction(Entry $entry) | ||
469 | { | ||
470 | $this->checkUserAction($entry); | ||
471 | |||
472 | if (null === $entry->getUuid()) { | ||
473 | $entry->generateUuid(); | ||
474 | |||
475 | $em = $this->getDoctrine()->getManager(); | ||
476 | $em->persist($entry); | ||
477 | $em->flush(); | ||
478 | } | ||
479 | |||
480 | return $this->redirect($this->generateUrl('share_entry', [ | ||
481 | 'uuid' => $entry->getUuid(), | ||
482 | ])); | ||
483 | } | ||
484 | |||
485 | /** | ||
486 | * Disable public sharing for an entry. | ||
487 | * | ||
488 | * @param Entry $entry | ||
489 | * | ||
490 | * @Route("/share/delete/{id}", requirements={"id" = "\d+"}, name="delete_share") | ||
491 | * | ||
492 | * @return \Symfony\Component\HttpFoundation\Response | ||
493 | */ | ||
494 | public function deleteShareAction(Entry $entry) | ||
495 | { | ||
496 | $this->checkUserAction($entry); | ||
497 | |||
498 | $entry->cleanUuid(); | ||
499 | |||
500 | $em = $this->getDoctrine()->getManager(); | ||
501 | $em->persist($entry); | ||
502 | $em->flush(); | ||
503 | |||
504 | return $this->redirect($this->generateUrl('view', [ | ||
505 | 'id' => $entry->getId(), | ||
506 | ])); | ||
507 | } | ||
508 | |||
509 | /** | ||
510 | * Ability to view a content publicly. | ||
511 | * | ||
512 | * @param Entry $entry | ||
513 | * | ||
514 | * @Route("/share/{uuid}", requirements={"uuid" = ".+"}, name="share_entry") | ||
515 | * @Cache(maxage="25200", smaxage="25200", public=true) | ||
516 | * | ||
517 | * @return \Symfony\Component\HttpFoundation\Response | ||
518 | */ | ||
519 | public function shareEntryAction(Entry $entry) | ||
520 | { | ||
521 | if (!$this->get('craue_config')->get('share_public')) { | ||
522 | throw $this->createAccessDeniedException('Sharing an entry is disabled for this user.'); | ||
523 | } | ||
524 | |||
525 | return $this->render( | ||
526 | '@WallabagCore/themes/share.html.twig', | ||
527 | ['entry' => $entry] | ||
528 | ); | ||
529 | } | ||
530 | |||
531 | /** | ||
532 | * Shows untagged articles for current user. | ||
533 | * | ||
534 | * @param Request $request | ||
535 | * @param int $page | ||
536 | * | ||
537 | * @Route("/untagged/list/{page}", name="untagged", defaults={"page" = "1"}) | ||
538 | * | ||
539 | * @return \Symfony\Component\HttpFoundation\Response | ||
540 | */ | ||
541 | public function showUntaggedEntriesAction(Request $request, $page) | ||
542 | { | ||
543 | return $this->showEntries('untagged', $request, $page); | ||
544 | } | ||
453 | } | 545 | } |
diff --git a/src/Wallabag/CoreBundle/Controller/ExportController.php b/src/Wallabag/CoreBundle/Controller/ExportController.php index 944c755d..6191d5d7 100644 --- a/src/Wallabag/CoreBundle/Controller/ExportController.php +++ b/src/Wallabag/CoreBundle/Controller/ExportController.php | |||
@@ -46,7 +46,7 @@ class ExportController extends Controller | |||
46 | * | 46 | * |
47 | * @Route("/export/{category}.{format}", name="export_entries", requirements={ | 47 | * @Route("/export/{category}.{format}", name="export_entries", requirements={ |
48 | * "format": "epub|mobi|pdf|json|xml|txt|csv", | 48 | * "format": "epub|mobi|pdf|json|xml|txt|csv", |
49 | * "category": "all|unread|starred|archive" | 49 | * "category": "all|unread|starred|archive|tag_entries|untagged" |
50 | * }) | 50 | * }) |
51 | * | 51 | * |
52 | * @return \Symfony\Component\HttpFoundation\Response | 52 | * @return \Symfony\Component\HttpFoundation\Response |
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index 8645fb44..1cbc413d 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php | |||
@@ -2,12 +2,15 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\Controller; | 3 | namespace Wallabag\CoreBundle\Controller; |
4 | 4 | ||
5 | use Pagerfanta\Adapter\ArrayAdapter; | ||
6 | use Pagerfanta\Exception\OutOfRangeCurrentPageException; | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 8 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | use Symfony\Component\HttpFoundation\Request; | 9 | use Symfony\Component\HttpFoundation\Request; |
8 | use Wallabag\CoreBundle\Entity\Entry; | 10 | use Wallabag\CoreBundle\Entity\Entry; |
9 | use Wallabag\CoreBundle\Entity\Tag; | 11 | use Wallabag\CoreBundle\Entity\Tag; |
10 | use Wallabag\CoreBundle\Form\Type\NewTagType; | 12 | use Wallabag\CoreBundle\Form\Type\NewTagType; |
13 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; | ||
11 | 14 | ||
12 | class TagController extends Controller | 15 | class TagController extends Controller |
13 | { | 16 | { |
@@ -90,4 +93,45 @@ class TagController extends Controller | |||
90 | ] | 93 | ] |
91 | ); | 94 | ); |
92 | } | 95 | } |
96 | |||
97 | /** | ||
98 | * @param Tag $tag | ||
99 | * @param int $page | ||
100 | * | ||
101 | * @Route("/tag/list/{slug}/{page}", name="tag_entries", defaults={"page" = "1"}) | ||
102 | * @ParamConverter("tag", options={"mapping": {"slug": "slug"}}) | ||
103 | * | ||
104 | * @return \Symfony\Component\HttpFoundation\Response | ||
105 | */ | ||
106 | public function showEntriesForTagAction(Tag $tag, $page, Request $request) | ||
107 | { | ||
108 | $entriesByTag = $this->getDoctrine() | ||
109 | ->getRepository('WallabagCoreBundle:Entry') | ||
110 | ->findAllByTagId($this->getUser()->getId(), $tag->getId()); | ||
111 | |||
112 | $pagerAdapter = new ArrayAdapter($entriesByTag); | ||
113 | |||
114 | $entries = $this->get('wallabag_core.helper.prepare_pager_for_entries') | ||
115 | ->prepare($pagerAdapter, $page); | ||
116 | |||
117 | try { | ||
118 | $entries->setCurrentPage($page); | ||
119 | } catch (OutOfRangeCurrentPageException $e) { | ||
120 | if ($page > 1) { | ||
121 | return $this->redirect($this->generateUrl($request->get('_route'), [ | ||
122 | 'slug' => $tag->getSlug(), | ||
123 | 'page' => $entries->getNbPages(), | ||
124 | ]), 302); | ||
125 | } | ||
126 | } | ||
127 | |||
128 | return $this->render( | ||
129 | 'WallabagCoreBundle:Entry:entries.html.twig', | ||
130 | [ | ||
131 | 'form' => null, | ||
132 | 'entries' => $entries, | ||
133 | 'currentPage' => $page, | ||
134 | ] | ||
135 | ); | ||
136 | } | ||
93 | } | 137 | } |
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php index 09058796..b4309304 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php | |||
@@ -16,6 +16,11 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface | |||
16 | { | 16 | { |
17 | $settings = [ | 17 | $settings = [ |
18 | [ | 18 | [ |
19 | 'name' => 'share_public', | ||
20 | 'value' => '1', | ||
21 | 'section' => 'entry', | ||
22 | ], | ||
23 | [ | ||
19 | 'name' => 'carrot', | 24 | 'name' => 'carrot', |
20 | 'value' => '1', | 25 | 'value' => '1', |
21 | 'section' => 'entry', | 26 | 'section' => 'entry', |
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php index 8553dced..09e99f36 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php | |||
@@ -28,6 +28,13 @@ class LoadTagData extends AbstractFixture implements OrderedFixtureInterface | |||
28 | 28 | ||
29 | $this->addReference('bar-tag', $tag2); | 29 | $this->addReference('bar-tag', $tag2); |
30 | 30 | ||
31 | $tag3 = new Tag(); | ||
32 | $tag3->setLabel('baz'); | ||
33 | |||
34 | $manager->persist($tag3); | ||
35 | |||
36 | $this->addReference('baz-tag', $tag3); | ||
37 | |||
31 | $manager->flush(); | 38 | $manager->flush(); |
32 | } | 39 | } |
33 | 40 | ||
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index ceae78b0..4d7e001b 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -40,6 +40,15 @@ class Entry | |||
40 | /** | 40 | /** |
41 | * @var string | 41 | * @var string |
42 | * | 42 | * |
43 | * @ORM\Column(name="uuid", type="text", nullable=true) | ||
44 | * | ||
45 | * @Groups({"entries_for_user", "export_all"}) | ||
46 | */ | ||
47 | private $uuid; | ||
48 | |||
49 | /** | ||
50 | * @var string | ||
51 | * | ||
43 | * @ORM\Column(name="title", type="text", nullable=true) | 52 | * @ORM\Column(name="title", type="text", nullable=true) |
44 | * | 53 | * |
45 | * @Groups({"entries_for_user", "export_all"}) | 54 | * @Groups({"entries_for_user", "export_all"}) |
@@ -595,4 +604,37 @@ class Entry | |||
595 | { | 604 | { |
596 | return $this->language; | 605 | return $this->language; |
597 | } | 606 | } |
607 | |||
608 | /** | ||
609 | * @return string | ||
610 | */ | ||
611 | public function getUuid() | ||
612 | { | ||
613 | return $this->uuid; | ||
614 | } | ||
615 | |||
616 | /** | ||
617 | * @param string $uuid | ||
618 | * | ||
619 | * @return Entry | ||
620 | */ | ||
621 | public function setUuid($uuid) | ||
622 | { | ||
623 | $this->uuid = $uuid; | ||
624 | |||
625 | return $this; | ||
626 | } | ||
627 | |||
628 | public function generateUuid() | ||
629 | { | ||
630 | if (null === $this->uuid) { | ||
631 | // @see http://blog.kevingomez.fr/til/2015/07/26/why-is-uniqid-slow/ for true parameter | ||
632 | $this->uuid = uniqid('', true); | ||
633 | } | ||
634 | } | ||
635 | |||
636 | public function cleanUuid() | ||
637 | { | ||
638 | $this->uuid = null; | ||
639 | } | ||
598 | } | 640 | } |
diff --git a/src/Wallabag/CoreBundle/Helper/PreparePagerForEntries.php b/src/Wallabag/CoreBundle/Helper/PreparePagerForEntries.php new file mode 100644 index 00000000..f9066bee --- /dev/null +++ b/src/Wallabag/CoreBundle/Helper/PreparePagerForEntries.php | |||
@@ -0,0 +1,34 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Helper; | ||
4 | |||
5 | use Pagerfanta\Adapter\AdapterInterface; | ||
6 | use Pagerfanta\Pagerfanta; | ||
7 | use Symfony\Component\Routing\Router; | ||
8 | use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; | ||
9 | |||
10 | class PreparePagerForEntries | ||
11 | { | ||
12 | private $user; | ||
13 | private $router; | ||
14 | |||
15 | public function __construct(TokenStorage $token, Router $router) | ||
16 | { | ||
17 | $this->user = $token->getToken()->getUser(); | ||
18 | $this->router = $router; | ||
19 | } | ||
20 | |||
21 | /** | ||
22 | * @param AdapterInterface $adapter | ||
23 | * @param int $page | ||
24 | * | ||
25 | * @return null|Pagerfanta | ||
26 | */ | ||
27 | public function prepare(AdapterInterface $adapter, $page = 1) | ||
28 | { | ||
29 | $entries = new Pagerfanta($adapter); | ||
30 | $entries->setMaxPerPage($this->user->getConfig()->getItemsPerPage()); | ||
31 | |||
32 | return $entries; | ||
33 | } | ||
34 | } | ||
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 4b205f6e..24d1a57a 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -88,6 +88,22 @@ class EntryRepository extends EntityRepository | |||
88 | } | 88 | } |
89 | 89 | ||
90 | /** | 90 | /** |
91 | * Retrieves untagged entries for a user. | ||
92 | * | ||
93 | * @param int $userId | ||
94 | * | ||
95 | * @return QueryBuilder | ||
96 | */ | ||
97 | public function getBuilderForUntaggedByUser($userId) | ||
98 | { | ||
99 | return $this | ||
100 | ->getBuilderByUser($userId) | ||
101 | ->leftJoin('e.tags', 't') | ||
102 | ->groupBy('e.id') | ||
103 | ->having('count(t.id) = 0'); | ||
104 | } | ||
105 | |||
106 | /** | ||
91 | * Find Entries. | 107 | * Find Entries. |
92 | * | 108 | * |
93 | * @param int $userId | 109 | * @param int $userId |
@@ -226,6 +242,19 @@ class EntryRepository extends EntityRepository | |||
226 | } | 242 | } |
227 | 243 | ||
228 | /** | 244 | /** |
245 | * Remove tags from all user entries. | ||
246 | * | ||
247 | * @param int $userId | ||
248 | * @param Array<Tag> $tags | ||
249 | */ | ||
250 | public function removeTags($userId, $tags) | ||
251 | { | ||
252 | foreach ($tags as $tag) { | ||
253 | $this->removeTag($userId, $tag); | ||
254 | } | ||
255 | } | ||
256 | |||
257 | /** | ||
229 | * Find all entries that are attached to a give tag id. | 258 | * Find all entries that are attached to a give tag id. |
230 | * | 259 | * |
231 | * @param int $userId | 260 | * @param int $userId |
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index b70d9b8c..1c1457e7 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml | |||
@@ -121,3 +121,9 @@ services: | |||
121 | class: Wallabag\CoreBundle\Helper\Redirect | 121 | class: Wallabag\CoreBundle\Helper\Redirect |
122 | arguments: | 122 | arguments: |
123 | - "@router" | 123 | - "@router" |
124 | |||
125 | wallabag_core.helper.prepare_pager_for_entries: | ||
126 | class: Wallabag\CoreBundle\Helper\PreparePagerForEntries | ||
127 | arguments: | ||
128 | - "@security.token_storage" | ||
129 | - "@router" | ||
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index c24475d2..073dee28 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -139,6 +139,8 @@ entry: | |||
139 | # starred: 'Starred entries' | 139 | # starred: 'Starred entries' |
140 | # archived: 'Archived entries' | 140 | # archived: 'Archived entries' |
141 | # filtered: 'Filtered entries' | 141 | # filtered: 'Filtered entries' |
142 | # filtered_tags: 'Filtered by tags' | ||
143 | # untagged: 'Untagged entries' | ||
142 | list: | 144 | list: |
143 | # number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.' | 145 | # number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.' |
144 | reading_time: 'estimeret læsetid' | 146 | reading_time: 'estimeret læsetid' |
@@ -186,6 +188,8 @@ entry: | |||
186 | add_a_tag: 'Tliføj et tag' | 188 | add_a_tag: 'Tliføj et tag' |
187 | share_content: 'Deling' | 189 | share_content: 'Deling' |
188 | # share_email_label: 'Email' | 190 | # share_email_label: 'Email' |
191 | # public_link: 'public link' | ||
192 | # delete_public_link: 'delete public link' | ||
189 | download: 'Download' | 193 | download: 'Download' |
190 | # print: 'Print' | 194 | # print: 'Print' |
191 | problem: | 195 | problem: |
@@ -288,6 +292,7 @@ quickstart: | |||
288 | # pocket: 'Migrate from Pocket' | 292 | # pocket: 'Migrate from Pocket' |
289 | # wallabag_v1: 'Migrate from wallabag v1' | 293 | # wallabag_v1: 'Migrate from wallabag v1' |
290 | # wallabag_v2: 'Migrate from wallabag v2' | 294 | # wallabag_v2: 'Migrate from wallabag v2' |
295 | # readability: 'Migrate from Readability' | ||
291 | # developer: | 296 | # developer: |
292 | # title: 'Developers' | 297 | # title: 'Developers' |
293 | # create_application: 'Create your third application' | 298 | # create_application: 'Create your third application' |
@@ -309,6 +314,7 @@ tag: | |||
309 | page_title: 'Tags' | 314 | page_title: 'Tags' |
310 | list: | 315 | list: |
311 | # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' | 316 | # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' |
317 | # see_untagged_entries: 'See untagged entries' | ||
312 | 318 | ||
313 | import: | 319 | import: |
314 | # page_title: 'Import' | 320 | # page_title: 'Import' |
@@ -336,6 +342,10 @@ import: | |||
336 | # wallabag_v2: | 342 | # wallabag_v2: |
337 | # page_title: 'Import > Wallabag v2' | 343 | # page_title: 'Import > Wallabag v2' |
338 | # description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' | 344 | # description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' |
345 | # readability: | ||
346 | # page_title: 'Import > Readability' | ||
347 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
339 | 349 | ||
340 | developer: | 350 | developer: |
341 | # page_title: 'Developer' | 351 | # page_title: 'Developer' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index 384ec09a..4cfd240f 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -139,6 +139,8 @@ entry: | |||
139 | starred: 'Favorisierte Einträge' | 139 | starred: 'Favorisierte Einträge' |
140 | archived: 'Archivierte Einträge' | 140 | archived: 'Archivierte Einträge' |
141 | filtered: 'Gefilterte Einträge' | 141 | filtered: 'Gefilterte Einträge' |
142 | # filtered_tags: 'Filtered by tags' | ||
143 | # untagged: 'Untagged entries' | ||
142 | list: | 144 | list: |
143 | number_on_the_page: '{0} Es gibt keine Einträge.|{1} Es gibt einen Eintrag.|]1,Inf[ Es gibt %count% Einträge.' | 145 | number_on_the_page: '{0} Es gibt keine Einträge.|{1} Es gibt einen Eintrag.|]1,Inf[ Es gibt %count% Einträge.' |
144 | reading_time: 'geschätzte Lesezeit' | 146 | reading_time: 'geschätzte Lesezeit' |
@@ -186,6 +188,8 @@ entry: | |||
186 | add_a_tag: 'Tag hinzufügen' | 188 | add_a_tag: 'Tag hinzufügen' |
187 | share_content: 'Teilen' | 189 | share_content: 'Teilen' |
188 | share_email_label: 'E-Mail' | 190 | share_email_label: 'E-Mail' |
191 | # public_link: 'public link' | ||
192 | # delete_public_link: 'delete public link' | ||
189 | download: 'Herunterladen' | 193 | download: 'Herunterladen' |
190 | print: 'Drucken' | 194 | print: 'Drucken' |
191 | problem: | 195 | problem: |
@@ -288,6 +292,7 @@ quickstart: | |||
288 | pocket: 'von Pocket migrieren' | 292 | pocket: 'von Pocket migrieren' |
289 | wallabag_v1: 'von wallabag v1 migrieren' | 293 | wallabag_v1: 'von wallabag v1 migrieren' |
290 | wallabag_v2: 'von wallabag v2 migrieren' | 294 | wallabag_v2: 'von wallabag v2 migrieren' |
295 | readability: 'von Readability migrieren' | ||
291 | developer: | 296 | developer: |
292 | title: 'Entwickler' | 297 | title: 'Entwickler' |
293 | create_application: 'Erstelle eine Anwendung und nutze die wallabag API' | 298 | create_application: 'Erstelle eine Anwendung und nutze die wallabag API' |
@@ -309,6 +314,7 @@ tag: | |||
309 | page_title: 'Tags' | 314 | page_title: 'Tags' |
310 | list: | 315 | list: |
311 | number_on_the_page: '{0} Es gibt keine Tags.|{1} Es gibt einen Tag.|]1,Inf[ Es gibt %count% Tags.' | 316 | number_on_the_page: '{0} Es gibt keine Tags.|{1} Es gibt einen Tag.|]1,Inf[ Es gibt %count% Tags.' |
317 | # see_untagged_entries: 'See untagged entries' | ||
312 | 318 | ||
313 | import: | 319 | import: |
314 | page_title: 'Importieren' | 320 | page_title: 'Importieren' |
@@ -336,6 +342,10 @@ import: | |||
336 | wallabag_v2: | 342 | wallabag_v2: |
337 | page_title: 'Aus wallabag v2 importieren' | 343 | page_title: 'Aus wallabag v2 importieren' |
338 | description: 'Dieser Import wird all deine Artikel aus wallabag v2 importieren. Gehe auf "Alle Artikel" und dann, in der Exportieren-Seitenleiste auf "JSON". Dabei erhältst du eine "All articles.json"-Datei.' | 344 | description: 'Dieser Import wird all deine Artikel aus wallabag v2 importieren. Gehe auf "Alle Artikel" und dann, in der Exportieren-Seitenleiste auf "JSON". Dabei erhältst du eine "All articles.json"-Datei.' |
345 | readability: | ||
346 | page_title: 'Aus Readability importieren' | ||
347 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
339 | 349 | ||
340 | developer: | 350 | developer: |
341 | page_title: 'Entwickler' | 351 | page_title: 'Entwickler' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index ea860564..42374b40 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -139,6 +139,8 @@ entry: | |||
139 | starred: 'Starred entries' | 139 | starred: 'Starred entries' |
140 | archived: 'Archived entries' | 140 | archived: 'Archived entries' |
141 | filtered: 'Filtered entries' | 141 | filtered: 'Filtered entries' |
142 | filtered_tags: 'Filtered by tags' | ||
143 | untagged: 'Untagged entries' | ||
142 | list: | 144 | list: |
143 | number_on_the_page: '{0} There are no entries.|{1} There is one entry.|]1,Inf[ There are %count% entries.' | 145 | number_on_the_page: '{0} There are no entries.|{1} There is one entry.|]1,Inf[ There are %count% entries.' |
144 | reading_time: 'estimated reading time' | 146 | reading_time: 'estimated reading time' |
@@ -186,6 +188,8 @@ entry: | |||
186 | add_a_tag: 'Add a tag' | 188 | add_a_tag: 'Add a tag' |
187 | share_content: 'Share' | 189 | share_content: 'Share' |
188 | share_email_label: 'Email' | 190 | share_email_label: 'Email' |
191 | public_link: 'public link' | ||
192 | delete_public_link: 'delete public link' | ||
189 | download: 'Download' | 193 | download: 'Download' |
190 | print: 'Print' | 194 | print: 'Print' |
191 | problem: | 195 | problem: |
@@ -288,6 +292,7 @@ quickstart: | |||
288 | pocket: 'Migrate from Pocket' | 292 | pocket: 'Migrate from Pocket' |
289 | wallabag_v1: 'Migrate from wallabag v1' | 293 | wallabag_v1: 'Migrate from wallabag v1' |
290 | wallabag_v2: 'Migrate from wallabag v2' | 294 | wallabag_v2: 'Migrate from wallabag v2' |
295 | readability: 'Migrate from Readability' | ||
291 | developer: | 296 | developer: |
292 | title: 'Developers' | 297 | title: 'Developers' |
293 | create_application: 'Create your third application' | 298 | create_application: 'Create your third application' |
@@ -309,6 +314,7 @@ tag: | |||
309 | page_title: 'Tags' | 314 | page_title: 'Tags' |
310 | list: | 315 | list: |
311 | number_on_the_page: '{0} There are no tags.|{1} There is one tag.|]1,Inf[ There are %count% tags.' | 316 | number_on_the_page: '{0} There are no tags.|{1} There is one tag.|]1,Inf[ There are %count% tags.' |
317 | see_untagged_entries: 'See untagged entries' | ||
312 | 318 | ||
313 | import: | 319 | import: |
314 | page_title: 'Import' | 320 | page_title: 'Import' |
@@ -336,6 +342,10 @@ import: | |||
336 | wallabag_v2: | 342 | wallabag_v2: |
337 | page_title: 'Import > Wallabag v2' | 343 | page_title: 'Import > Wallabag v2' |
338 | description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' | 344 | description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' |
345 | readability: | ||
346 | page_title: 'Import > Readability' | ||
347 | description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
339 | 349 | ||
340 | developer: | 350 | developer: |
341 | page_title: 'Developer' | 351 | page_title: 'Developer' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index f64e95d5..ee84cc62 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -139,6 +139,8 @@ entry: | |||
139 | starred: 'Artículos favoritos' | 139 | starred: 'Artículos favoritos' |
140 | archived: 'Artículos archivados' | 140 | archived: 'Artículos archivados' |
141 | filtered: 'Artículos filtrados' | 141 | filtered: 'Artículos filtrados' |
142 | # filtered_tags: 'Filtered by tags' | ||
143 | # untagged: 'Untagged entries' | ||
142 | list: | 144 | list: |
143 | number_on_the_page: '{0} No hay artículos.|{1} Hay un artículo.|]1,Inf[ Hay %count% artículos.' | 145 | number_on_the_page: '{0} No hay artículos.|{1} Hay un artículo.|]1,Inf[ Hay %count% artículos.' |
144 | reading_time: 'tiempo estimado de lectura' | 146 | reading_time: 'tiempo estimado de lectura' |
@@ -186,6 +188,8 @@ entry: | |||
186 | add_a_tag: 'Añadir una etiqueta' | 188 | add_a_tag: 'Añadir una etiqueta' |
187 | share_content: 'Compartir' | 189 | share_content: 'Compartir' |
188 | share_email_label: 'Dirección e-mail' | 190 | share_email_label: 'Dirección e-mail' |
191 | # public_link: 'public link' | ||
192 | # delete_public_link: 'delete public link' | ||
189 | download: 'Descargar' | 193 | download: 'Descargar' |
190 | print: 'Imprimir' | 194 | print: 'Imprimir' |
191 | problem: | 195 | problem: |
@@ -288,6 +292,7 @@ quickstart: | |||
288 | pocket: 'Migrar desde Pocket' | 292 | pocket: 'Migrar desde Pocket' |
289 | wallabag_v1: 'Migrar desde wallabag v1' | 293 | wallabag_v1: 'Migrar desde wallabag v1' |
290 | wallabag_v2: 'Migrar desde wallabag v2' | 294 | wallabag_v2: 'Migrar desde wallabag v2' |
295 | readability: 'Migrar desde Readability' | ||
291 | developer: | 296 | developer: |
292 | title: 'Promotores' | 297 | title: 'Promotores' |
293 | create_application: 'Cree su tercera aplicación' | 298 | create_application: 'Cree su tercera aplicación' |
@@ -309,6 +314,7 @@ tag: | |||
309 | page_title: 'Etiquetas' | 314 | page_title: 'Etiquetas' |
310 | list: | 315 | list: |
311 | number_on_the_page: '{0} No hay ninguna etiqueta.|{1} Hay una etiqueta.|]1,Inf[ Hay %count% etiquetas.' | 316 | number_on_the_page: '{0} No hay ninguna etiqueta.|{1} Hay una etiqueta.|]1,Inf[ Hay %count% etiquetas.' |
317 | # see_untagged_entries: 'See untagged entries' | ||
312 | 318 | ||
313 | import: | 319 | import: |
314 | page_title: 'Importar' | 320 | page_title: 'Importar' |
@@ -336,6 +342,10 @@ import: | |||
336 | wallabag_v2: | 342 | wallabag_v2: |
337 | page_title: 'Importar > Wallabag v2' | 343 | page_title: 'Importar > Wallabag v2' |
338 | description: 'Va a importar sus artículos de otra instancia de wallabag v2. Vaya a Todos los artículos, entonces, en la barra lateral, oprima en "JSON". Usted tendrá un fichero "All articles.json"' | 344 | description: 'Va a importar sus artículos de otra instancia de wallabag v2. Vaya a Todos los artículos, entonces, en la barra lateral, oprima en "JSON". Usted tendrá un fichero "All articles.json"' |
345 | readability: | ||
346 | page_title: 'Importar > Readability' | ||
347 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
339 | 349 | ||
340 | developer: | 350 | developer: |
341 | page_title: 'Promotor' | 351 | page_title: 'Promotor' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index e3592a78..e9af1e8d 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -139,6 +139,8 @@ entry: | |||
139 | starred: 'مقالههای برگزیده' | 139 | starred: 'مقالههای برگزیده' |
140 | archived: 'مقالههای بایگانیشده' | 140 | archived: 'مقالههای بایگانیشده' |
141 | filtered: 'مقالههای فیلترشده' | 141 | filtered: 'مقالههای فیلترشده' |
142 | # filtered_tags: 'Filtered by tags' | ||
143 | # untagged: 'Untagged entries' | ||
142 | list: | 144 | list: |
143 | number_on_the_page: '{0} هیج مقالهای نیست.|{1} یک مقاله هست.|]1,Inf[ %count% مقاله هست.' | 145 | number_on_the_page: '{0} هیج مقالهای نیست.|{1} یک مقاله هست.|]1,Inf[ %count% مقاله هست.' |
144 | reading_time: 'زمان تخمینی برای خواندن' | 146 | reading_time: 'زمان تخمینی برای خواندن' |
@@ -186,6 +188,8 @@ entry: | |||
186 | add_a_tag: 'افزودن برچسب' | 188 | add_a_tag: 'افزودن برچسب' |
187 | share_content: 'همرسانی' | 189 | share_content: 'همرسانی' |
188 | share_email_label: 'نشانی ایمیل' | 190 | share_email_label: 'نشانی ایمیل' |
191 | # public_link: 'public link' | ||
192 | # delete_public_link: 'delete public link' | ||
189 | download: 'بارگیری' | 193 | download: 'بارگیری' |
190 | print: 'چاپ' | 194 | print: 'چاپ' |
191 | problem: | 195 | problem: |
@@ -288,6 +292,7 @@ quickstart: | |||
288 | pocket: 'مهاجرت از Pocket' | 292 | pocket: 'مهاجرت از Pocket' |
289 | wallabag_v1: 'مهاجرت از نسخهٔ یکم wallabag' | 293 | wallabag_v1: 'مهاجرت از نسخهٔ یکم wallabag' |
290 | wallabag_v2: 'مهاجرت از نسخهٔ دوم wallabag' | 294 | wallabag_v2: 'مهاجرت از نسخهٔ دوم wallabag' |
295 | readability: 'مهاجرت از نسخهٔ دوم Readability' | ||
291 | developer: | 296 | developer: |
292 | title: 'برنامهنویسان' | 297 | title: 'برنامهنویسان' |
293 | create_application: 'برنامهٔ wallabag خود را بسازید' | 298 | create_application: 'برنامهٔ wallabag خود را بسازید' |
@@ -309,18 +314,19 @@ tag: | |||
309 | page_title: 'برچسبها' | 314 | page_title: 'برچسبها' |
310 | list: | 315 | list: |
311 | number_on_the_page: '{0} هیچ برچسبی نیست.|{1} یک برچسب هست.|]1,Inf[ %count% برچسب هست.' | 316 | number_on_the_page: '{0} هیچ برچسبی نیست.|{1} یک برچسب هست.|]1,Inf[ %count% برچسب هست.' |
317 | # see_untagged_entries: 'See untagged entries' | ||
312 | 318 | ||
313 | import: | 319 | import: |
314 | page_title: 'درونریزی' | 320 | page_title: 'درونریزی' |
315 | page_description: 'به درونریز wallabag خوش آمدید. لطفاً سرویس قبلی خود را که میخواهید از آن مهاجرت کنید انتخاب کنید.' | 321 | page_description: 'به درونریز wallabag خوش آمدید. لطفاً سرویس قبلی خود را که میخواهید از آن مهاجرت کنید انتخاب کنید.' |
316 | action: | 322 | action: |
317 | import_contents: 'درونریزی مقالهها' | 323 | import_contents: 'درونریزی مقالهها' |
318 | form: | 324 | form: |
319 | mark_as_read_title: 'علامتزدن همه به عنوان خواندهشده؟' | 325 | mark_as_read_title: 'علامتزدن همه به عنوان خواندهشده؟' |
320 | mark_as_read_label: 'همهٔ مقالههای درونریزی شده را به عنوان خواندهشده علامت بزن' | 326 | mark_as_read_label: 'همهٔ مقالههای درونریزی شده را به عنوان خواندهشده علامت بزن' |
321 | file_label: 'پرونده' | 327 | file_label: 'پرونده' |
322 | save_label: 'بارگذاری پرونده' | 328 | save_label: 'بارگذاری پرونده' |
323 | pocket: | 329 | pocket: |
324 | page_title: 'درونریزی > Pocket' | 330 | page_title: 'درونریزی > Pocket' |
325 | description: "این برنامه همهٔ دادههای Pocket شما را درونریزی میکند. سرویس Pocket اجازه نمیدهد که متن مقالهها را درونریزی کنیم، بنابراین wallabag متن مقالهها را دوباره از اینترنت دریافت میکند." | 331 | description: "این برنامه همهٔ دادههای Pocket شما را درونریزی میکند. سرویس Pocket اجازه نمیدهد که متن مقالهها را درونریزی کنیم، بنابراین wallabag متن مقالهها را دوباره از اینترنت دریافت میکند." |
326 | config_missing: | 332 | config_missing: |
@@ -329,13 +335,17 @@ import: | |||
329 | user_message: 'مدیر سرور شما باید یک API Key برای Pocket تعریف کند.' | 335 | user_message: 'مدیر سرور شما باید یک API Key برای Pocket تعریف کند.' |
330 | authorize_message: 'شما میتوانید دادههایتان را از حساب Pocket خود درونریزی کنید. روی دکمهٔ زیر کلیک کنید و به برنامه اجازه دهید تا به getpocket.com وصل شود.' | 336 | authorize_message: 'شما میتوانید دادههایتان را از حساب Pocket خود درونریزی کنید. روی دکمهٔ زیر کلیک کنید و به برنامه اجازه دهید تا به getpocket.com وصل شود.' |
331 | connect_to_pocket: 'به Pocket وصل شو و دادهها را دریافت کن' | 337 | connect_to_pocket: 'به Pocket وصل شو و دادهها را دریافت کن' |
332 | wallabag_v1: | 338 | wallabag_v1: |
333 | page_title: 'درونریزی > Wallabag v1' | 339 | page_title: 'درونریزی > Wallabag v1' |
334 | description: 'این برنامه همهٔ دادههای شما را در نسخهٔ ۱ wallabag درونریزی میکند. در صفحهٔ تنظیمات، روی "JSON export" در بخش "Export your wallabag data" کلیک کنید. با این کار شما پروندهای به شکل "wallabag-export-1-xxxx-xx-xx.json" دریافت خواهید کرد.' | 340 | description: 'این برنامه همهٔ دادههای شما را در نسخهٔ ۱ wallabag درونریزی میکند. در صفحهٔ تنظیمات، روی "JSON export" در بخش "Export your wallabag data" کلیک کنید. با این کار شما پروندهای به شکل "wallabag-export-1-xxxx-xx-xx.json" دریافت خواهید کرد.' |
335 | how_to: 'لطفاً پرونده را انتخاب کنید و روی دکمهٔ زیر کلیک کنید تا بارگذاری و درونریزی شود.' | 341 | how_to: 'لطفاً پرونده را انتخاب کنید و روی دکمهٔ زیر کلیک کنید تا بارگذاری و درونریزی شود.' |
336 | wallabag_v2: | 342 | wallabag_v2: |
337 | page_title: 'درونریزی > Wallabag v2' | 343 | page_title: 'درونریزی > Wallabag v2' |
338 | description: 'این برنامه همهٔ دادههای شما را در نسخهٔ ۲ wallabag درونریزی میکند. به بخش «همهٔ مقالهها» بروید و در بخش «برونریزی» روی "JSON" کلیک کنید. با این کار شما پروندهای به شکل "All articles.json" دریافت خواهید کرد.' | 344 | description: 'این برنامه همهٔ دادههای شما را در نسخهٔ ۲ wallabag درونریزی میکند. به بخش «همهٔ مقالهها» بروید و در بخش «برونریزی» روی "JSON" کلیک کنید. با این کار شما پروندهای به شکل "All articles.json" دریافت خواهید کرد.' |
345 | readability: | ||
346 | page_title: 'درونریزی > Readability' | ||
347 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
339 | 349 | ||
340 | developer: | 350 | developer: |
341 | # page_title: 'Developer' | 351 | # page_title: 'Developer' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 9e47d600..402cdf4a 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -139,6 +139,8 @@ entry: | |||
139 | starred: 'Articles favoris' | 139 | starred: 'Articles favoris' |
140 | archived: 'Articles lus' | 140 | archived: 'Articles lus' |
141 | filtered: 'Articles filtrés' | 141 | filtered: 'Articles filtrés' |
142 | filtered_tags: 'Articles filtrés par tags' | ||
143 | untagged: 'Article sans tag' | ||
142 | list: | 144 | list: |
143 | number_on_the_page: "{0} Il n'y a pas d'articles.|{1} Il y a un article.|]1,Inf[ Il y a %count% articles." | 145 | number_on_the_page: "{0} Il n'y a pas d'articles.|{1} Il y a un article.|]1,Inf[ Il y a %count% articles." |
144 | reading_time: 'durée de lecture' | 146 | reading_time: 'durée de lecture' |
@@ -186,6 +188,8 @@ entry: | |||
186 | add_a_tag: 'Ajouter un tag' | 188 | add_a_tag: 'Ajouter un tag' |
187 | share_content: 'Partager' | 189 | share_content: 'Partager' |
188 | share_email_label: 'Email' | 190 | share_email_label: 'Email' |
191 | public_link: 'Lien public' | ||
192 | delete_public_link: 'Supprimer lien public' | ||
189 | download: 'Télécharger' | 193 | download: 'Télécharger' |
190 | print: 'Imprimer' | 194 | print: 'Imprimer' |
191 | problem: | 195 | problem: |
@@ -288,6 +292,7 @@ quickstart: | |||
288 | pocket: 'Migrer depuis Pocket' | 292 | pocket: 'Migrer depuis Pocket' |
289 | wallabag_v1: 'Migrer depuis wallabag v1' | 293 | wallabag_v1: 'Migrer depuis wallabag v1' |
290 | wallabag_v2: 'Migrer depuis wallabag v2' | 294 | wallabag_v2: 'Migrer depuis wallabag v2' |
295 | readability: 'Migrer depuis Readability' | ||
291 | developer: | 296 | developer: |
292 | title: 'Pour les développeurs' | 297 | title: 'Pour les développeurs' |
293 | create_application: 'Créer votre application tierce' | 298 | create_application: 'Créer votre application tierce' |
@@ -309,6 +314,7 @@ tag: | |||
309 | page_title: 'Tags' | 314 | page_title: 'Tags' |
310 | list: | 315 | list: |
311 | number_on_the_page: "{0} Il n'y a pas de tag.|{1} Il y a un tag.|]1,Inf[ Il y a %count% tags." | 316 | number_on_the_page: "{0} Il n'y a pas de tag.|{1} Il y a un tag.|]1,Inf[ Il y a %count% tags." |
317 | see_untagged_entries: 'Voir les articles sans tag' | ||
312 | 318 | ||
313 | import: | 319 | import: |
314 | page_title: 'Importer' | 320 | page_title: 'Importer' |
@@ -336,6 +342,10 @@ import: | |||
336 | wallabag_v2: | 342 | wallabag_v2: |
337 | page_title: 'Importer > Wallabag v2' | 343 | page_title: 'Importer > Wallabag v2' |
338 | description: "Cet outil va importer tous vos articles d'une autre instance de wallabag v2. Allez dans tous vos articles, puis, sur la barre latérale, cliquez sur \"JSON\". Vous allez récupérer un fichier \"All articles.json\"" | 344 | description: "Cet outil va importer tous vos articles d'une autre instance de wallabag v2. Allez dans tous vos articles, puis, sur la barre latérale, cliquez sur \"JSON\". Vous allez récupérer un fichier \"All articles.json\"" |
345 | readability: | ||
346 | page_title: 'Importer > Readability' | ||
347 | description: 'Cet outil va importer toutes vos données de Readability. Sur la page des outils (https://www.readability.com/tools/), cliquez sur "Export your data" dans la section "Data Export". Vous allez recevoir un email avec un lien pour télécharger le json.' | ||
348 | how_to: "Choisissez le fichier de votre export Readability et cliquez sur le bouton ci-dessous pour l'importer." | ||
339 | 349 | ||
340 | developer: | 350 | developer: |
341 | page_title: 'Développeur' | 351 | page_title: 'Développeur' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 3760c2d6..3aee4816 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | |||
@@ -139,6 +139,8 @@ entry: | |||
139 | starred: 'Contenuti preferiti' | 139 | starred: 'Contenuti preferiti' |
140 | archived: 'Contenuti archiviati' | 140 | archived: 'Contenuti archiviati' |
141 | filtered: 'Contenuti filtrati' | 141 | filtered: 'Contenuti filtrati' |
142 | # filtered_tags: 'Filtered by tags' | ||
143 | # untagged: 'Untagged entries' | ||
142 | list: | 144 | list: |
143 | number_on_the_page: "{0} Non ci sono contenuti.|{1} C'è un contenuto.|]1,Inf[ Ci sono %count% contenuti." | 145 | number_on_the_page: "{0} Non ci sono contenuti.|{1} C'è un contenuto.|]1,Inf[ Ci sono %count% contenuti." |
144 | reading_time: 'tempo di lettura stimato' | 146 | reading_time: 'tempo di lettura stimato' |
@@ -185,6 +187,8 @@ entry: | |||
185 | add_a_tag: 'Aggiungi un tag' | 187 | add_a_tag: 'Aggiungi un tag' |
186 | share_content: 'Condividi' | 188 | share_content: 'Condividi' |
187 | share_email_label: 'E-mail' | 189 | share_email_label: 'E-mail' |
190 | # public_link: 'public link' | ||
191 | # delete_public_link: 'delete public link' | ||
188 | download: 'Download' | 192 | download: 'Download' |
189 | print: 'Stampa' | 193 | print: 'Stampa' |
190 | problem: | 194 | problem: |
@@ -287,6 +291,7 @@ quickstart: | |||
287 | pocket: 'Trasferisci da Pocket' | 291 | pocket: 'Trasferisci da Pocket' |
288 | wallabag_v1: 'Trasferisci da wallabag v1' | 292 | wallabag_v1: 'Trasferisci da wallabag v1' |
289 | wallabag_v2: 'Trasferisci da wallabag v2' | 293 | wallabag_v2: 'Trasferisci da wallabag v2' |
294 | readability: 'Trasferisci da Readability' | ||
290 | developer: | 295 | developer: |
291 | title: 'Sviluppatori' | 296 | title: 'Sviluppatori' |
292 | create_application: 'Crea la tua applicazione' | 297 | create_application: 'Crea la tua applicazione' |
@@ -308,6 +313,7 @@ tag: | |||
308 | page_title: 'Tags' | 313 | page_title: 'Tags' |
309 | list: | 314 | list: |
310 | number_on_the_page: "{0} Non ci sono tag.|{1} C'è un tag.|]1,Inf[ ci sono %count% tag." | 315 | number_on_the_page: "{0} Non ci sono tag.|{1} C'è un tag.|]1,Inf[ ci sono %count% tag." |
316 | # see_untagged_entries: 'See untagged entries' | ||
311 | 317 | ||
312 | import: | 318 | import: |
313 | page_title: 'Importa' | 319 | page_title: 'Importa' |
@@ -335,6 +341,10 @@ import: | |||
335 | wallabag_v2: | 341 | wallabag_v2: |
336 | page_title: 'Importa da > Wallabag v2' | 342 | page_title: 'Importa da > Wallabag v2' |
337 | description: 'Questo importatore copierà tutti i tuoi dati da un wallabag v2. Vai in "Tutti i contenuti", e, nella sidebar di esportazione, clicca su "JSON". Otterrai un file "Tutti i contenuti.json".' | 343 | description: 'Questo importatore copierà tutti i tuoi dati da un wallabag v2. Vai in "Tutti i contenuti", e, nella sidebar di esportazione, clicca su "JSON". Otterrai un file "Tutti i contenuti.json".' |
344 | readability: | ||
345 | page_title: 'Importa da > Readability' | ||
346 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
347 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
338 | 348 | ||
339 | developer: | 349 | developer: |
340 | page_title: 'Sviluppatori' | 350 | page_title: 'Sviluppatori' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index 1e23168b..855f2361 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -139,6 +139,8 @@ entry: | |||
139 | starred: 'Articles favorits' | 139 | starred: 'Articles favorits' |
140 | archived: 'Articles legits' | 140 | archived: 'Articles legits' |
141 | filtered: 'Articles filtrats' | 141 | filtered: 'Articles filtrats' |
142 | # filtered_tags: 'Filtered by tags' | ||
143 | # untagged: 'Untagged entries' | ||
142 | list: | 144 | list: |
143 | number_on_the_page: "{0} I a pas cap d'article.|{1} I a un article.|]1,Inf[ I a %count% articles." | 145 | number_on_the_page: "{0} I a pas cap d'article.|{1} I a un article.|]1,Inf[ I a %count% articles." |
144 | reading_time: 'durada de lectura' | 146 | reading_time: 'durada de lectura' |
@@ -186,6 +188,8 @@ entry: | |||
186 | add_a_tag: 'Ajustar una etiqueta' | 188 | add_a_tag: 'Ajustar una etiqueta' |
187 | share_content: 'Partatjar' | 189 | share_content: 'Partatjar' |
188 | share_email_label: 'Corrièl' | 190 | share_email_label: 'Corrièl' |
191 | # public_link: 'public link' | ||
192 | # delete_public_link: 'delete public link' | ||
189 | download: 'Telecargar' | 193 | download: 'Telecargar' |
190 | print: 'Imprimir' | 194 | print: 'Imprimir' |
191 | problem: | 195 | problem: |
@@ -288,6 +292,7 @@ quickstart: | |||
288 | pocket: 'Migrar dempuèi Pocket' | 292 | pocket: 'Migrar dempuèi Pocket' |
289 | wallabag_v1: 'Migrar dempuèi wallabag v1' | 293 | wallabag_v1: 'Migrar dempuèi wallabag v1' |
290 | wallabag_v2: 'Migrar dempuèi wallabag v2' | 294 | wallabag_v2: 'Migrar dempuèi wallabag v2' |
295 | readability: 'Migrar dempuèi Readability' | ||
291 | developer: | 296 | developer: |
292 | title: 'Pels desvolopadors' | 297 | title: 'Pels desvolopadors' |
293 | create_application: 'Crear vòstra aplicacion tèrça' | 298 | create_application: 'Crear vòstra aplicacion tèrça' |
@@ -309,6 +314,7 @@ tag: | |||
309 | page_title: 'Etiquetas' | 314 | page_title: 'Etiquetas' |
310 | list: | 315 | list: |
311 | number_on_the_page: "{0} I a pas cap d'etiquetas.|{1} I a una etiqueta.|]1,Inf[ I a %count% etiquetas." | 316 | number_on_the_page: "{0} I a pas cap d'etiquetas.|{1} I a una etiqueta.|]1,Inf[ I a %count% etiquetas." |
317 | # see_untagged_entries: 'See untagged entries' | ||
312 | 318 | ||
313 | import: | 319 | import: |
314 | page_title: 'Importar' | 320 | page_title: 'Importar' |
@@ -336,6 +342,10 @@ import: | |||
336 | wallabag_v2: | 342 | wallabag_v2: |
337 | page_title: 'Importer > Wallabag v2' | 343 | page_title: 'Importer > Wallabag v2' |
338 | description: "Aquesta aisina importarà totas vòstras donadas d'una instància mai de wallabag v2. Anatz dins totes vòstres articles, puèi, sus la barra laterala, clicatz sus \"JSON\". Traparatz un fichièr \"All articles.json\"" | 344 | description: "Aquesta aisina importarà totas vòstras donadas d'una instància mai de wallabag v2. Anatz dins totes vòstres articles, puèi, sus la barra laterala, clicatz sus \"JSON\". Traparatz un fichièr \"All articles.json\"" |
345 | readability: | ||
346 | page_title: 'Importer > Readability' | ||
347 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
339 | 349 | ||
340 | developer: | 350 | developer: |
341 | page_title: 'Desvolopador' | 351 | page_title: 'Desvolopador' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 0a325c57..da50cd4c 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -139,12 +139,14 @@ entry: | |||
139 | starred: 'Wpisy oznaczone gwiazdką' | 139 | starred: 'Wpisy oznaczone gwiazdką' |
140 | archived: 'Zarchiwizowane wpisy' | 140 | archived: 'Zarchiwizowane wpisy' |
141 | filtered: 'Odfiltrowane wpisy' | 141 | filtered: 'Odfiltrowane wpisy' |
142 | filtered_tags: 'Filtrowane po tagach' | ||
143 | untagged: 'Odtaguj wpisy' | ||
142 | list: | 144 | list: |
143 | number_on_the_page: '{0} Nie ma wpisów.|{1} Jest jeden wpis.|]1,Inf[ Są %count% wpisy.' | 145 | number_on_the_page: '{0} Nie ma wpisów.|{1} Jest jeden wpis.|]1,Inf[ Są %count% wpisy.' |
144 | reading_time: 'szacunkowy czas czytania' | 146 | reading_time: 'szacunkowy czas czytania' |
145 | reading_time_minutes: 'szacunkowy czas czytania: %readingTime% min' | 147 | reading_time_minutes: 'szacunkowy czas czytania: %readingTime% min' |
146 | reading_time_less_one_minute: 'szacunkowy czas czytania: <small class="inferieur"><</small> 1 min' | 148 | reading_time_less_one_minute: 'szacunkowy czas czytania: <small class="inferieur"><</small> 1 min' |
147 | # number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags' | 149 | number_of_tags: '{1} i inny tag|]1,Inf[i %count% innych tagów' |
148 | reading_time_minutes_short: '%readingTime% min' | 150 | reading_time_minutes_short: '%readingTime% min' |
149 | reading_time_less_one_minute_short: '<small class="inferieur"><</small> 1 min' | 151 | reading_time_less_one_minute_short: '<small class="inferieur"><</small> 1 min' |
150 | original_article: 'oryginał' | 152 | original_article: 'oryginał' |
@@ -186,6 +188,8 @@ entry: | |||
186 | add_a_tag: 'Dodaj tag' | 188 | add_a_tag: 'Dodaj tag' |
187 | share_content: 'Udostępnij' | 189 | share_content: 'Udostępnij' |
188 | share_email_label: 'Adres email' | 190 | share_email_label: 'Adres email' |
191 | public_link: 'Publiczny link' | ||
192 | delete_public_link: 'Usuń publiczny link' | ||
189 | download: 'Pobierz' | 193 | download: 'Pobierz' |
190 | print: 'Drukuj' | 194 | print: 'Drukuj' |
191 | problem: | 195 | problem: |
@@ -288,6 +292,7 @@ quickstart: | |||
288 | pocket: 'Migruj z Pocket' | 292 | pocket: 'Migruj z Pocket' |
289 | wallabag_v1: 'Migruj z wallabag v1' | 293 | wallabag_v1: 'Migruj z wallabag v1' |
290 | wallabag_v2: 'Migruj z wallabag v2' | 294 | wallabag_v2: 'Migruj z wallabag v2' |
295 | readability: 'Migruj z Readability' | ||
291 | developer: | 296 | developer: |
292 | title: 'Deweloperzy' | 297 | title: 'Deweloperzy' |
293 | create_application: 'Stwórz swoją aplikację' | 298 | create_application: 'Stwórz swoją aplikację' |
@@ -309,6 +314,7 @@ tag: | |||
309 | page_title: 'Tagi' | 314 | page_title: 'Tagi' |
310 | list: | 315 | list: |
311 | number_on_the_page: '{0} Nie ma tagów.|{1} Jest jeden tag.|]1,Inf[ Są %count% tagi.' | 316 | number_on_the_page: '{0} Nie ma tagów.|{1} Jest jeden tag.|]1,Inf[ Są %count% tagi.' |
317 | see_untagged_entries: 'Zobacz nieotagowane wpisy' | ||
312 | 318 | ||
313 | import: | 319 | import: |
314 | page_title: 'Import' | 320 | page_title: 'Import' |
@@ -336,6 +342,10 @@ import: | |||
336 | wallabag_v2: | 342 | wallabag_v2: |
337 | page_title: 'Import > Wallabag v2' | 343 | page_title: 'Import > Wallabag v2' |
338 | description: 'Ten importer, zaimportuje wszystkie twoje artykułu z wallabag v2. Idź do wszystkich artykułów, a następnie na panelu exportu kliknij na "JSON". Otrzymasz plik "All articles.json".' | 344 | description: 'Ten importer, zaimportuje wszystkie twoje artykułu z wallabag v2. Idź do wszystkich artykułów, a następnie na panelu exportu kliknij na "JSON". Otrzymasz plik "All articles.json".' |
345 | readability: | ||
346 | page_title: 'Import > Readability' | ||
347 | description: 'Ten importer, zaimportuje wszystkie twoje artykuły z Readability. Na stronie narzędzi (https://www.readability.com/tools/), kliknij na "Export your data" w sekcji "Data Export". Otrzymach email z plikiem JSON (plik nie będzie zawierał rozszerzenia .json).' | ||
348 | how_to: 'Wybierz swój plik eksportu z Readability i kliknij poniższy przycisk, aby go załadować.' | ||
339 | 349 | ||
340 | developer: | 350 | developer: |
341 | page_title: 'Deweloper' | 351 | page_title: 'Deweloper' |
@@ -343,7 +353,7 @@ developer: | |||
343 | documentation: 'Dokumentacja' | 353 | documentation: 'Dokumentacja' |
344 | how_to_first_app: 'Jak stworzyć moją pierwszą aplikację' | 354 | how_to_first_app: 'Jak stworzyć moją pierwszą aplikację' |
345 | full_documentation: 'Pokaż pełne API' | 355 | full_documentation: 'Pokaż pełne API' |
346 | # list_methods: 'List API methods' | 356 | list_methods: 'Lista metod API' |
347 | clients: | 357 | clients: |
348 | title: 'Klienci' | 358 | title: 'Klienci' |
349 | create_new: 'Utwórz nowego klienta' | 359 | create_new: 'Utwórz nowego klienta' |
@@ -401,7 +411,7 @@ flashes: | |||
401 | notice: | 411 | notice: |
402 | entry_already_saved: 'Wpis już został dodany %date%' | 412 | entry_already_saved: 'Wpis już został dodany %date%' |
403 | entry_saved: 'Wpis zapisany' | 413 | entry_saved: 'Wpis zapisany' |
404 | # entry_saved_failed: 'Failed to save entry' | 414 | entry_saved_failed: 'Zapis artykułu się nie powiódł' |
405 | entry_updated: 'Wpis zaktualizowany' | 415 | entry_updated: 'Wpis zaktualizowany' |
406 | entry_reloaded: 'Wpis ponownie załadowany' | 416 | entry_reloaded: 'Wpis ponownie załadowany' |
407 | entry_reload_failed: 'Błąd ponownego załadowania' | 417 | entry_reload_failed: 'Błąd ponownego załadowania' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 42ad28ee..f41609d0 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -139,6 +139,8 @@ entry: | |||
139 | # starred: 'Starred entries' | 139 | # starred: 'Starred entries' |
140 | # archived: 'Archived entries' | 140 | # archived: 'Archived entries' |
141 | # filtered: 'Filtered entries' | 141 | # filtered: 'Filtered entries' |
142 | # filtered_tags: 'Filtered by tags' | ||
143 | # untagged: 'Untagged entries' | ||
142 | list: | 144 | list: |
143 | # number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.' | 145 | # number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.' |
144 | reading_time: 'timp estimat de citire' | 146 | reading_time: 'timp estimat de citire' |
@@ -186,6 +188,8 @@ entry: | |||
186 | add_a_tag: 'Adaugă un tag' | 188 | add_a_tag: 'Adaugă un tag' |
187 | share_content: 'Dă mai departe' | 189 | share_content: 'Dă mai departe' |
188 | share_email_label: 'E-mail' | 190 | share_email_label: 'E-mail' |
191 | # public_link: 'public link' | ||
192 | # delete_public_link: 'delete public link' | ||
189 | download: 'Descarcă' | 193 | download: 'Descarcă' |
190 | # print: 'Print' | 194 | # print: 'Print' |
191 | problem: | 195 | problem: |
@@ -288,6 +292,7 @@ quickstart: | |||
288 | # pocket: 'Migrate from Pocket' | 292 | # pocket: 'Migrate from Pocket' |
289 | # wallabag_v1: 'Migrate from wallabag v1' | 293 | # wallabag_v1: 'Migrate from wallabag v1' |
290 | # wallabag_v2: 'Migrate from wallabag v2' | 294 | # wallabag_v2: 'Migrate from wallabag v2' |
295 | # readability: 'Migrate from Readability' | ||
291 | # developer: | 296 | # developer: |
292 | # title: 'Developers' | 297 | # title: 'Developers' |
293 | # create_application: 'Create your third application' | 298 | # create_application: 'Create your third application' |
@@ -309,6 +314,7 @@ tag: | |||
309 | page_title: 'Tag-uri' | 314 | page_title: 'Tag-uri' |
310 | list: | 315 | list: |
311 | # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' | 316 | # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' |
317 | # see_untagged_entries: 'See untagged entries' | ||
312 | 318 | ||
313 | import: | 319 | import: |
314 | # page_title: 'Import' | 320 | # page_title: 'Import' |
@@ -336,6 +342,10 @@ import: | |||
336 | # wallabag_v2: | 342 | # wallabag_v2: |
337 | # page_title: 'Import > Wallabag v2' | 343 | # page_title: 'Import > Wallabag v2' |
338 | # description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' | 344 | # description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' |
345 | # readability: | ||
346 | # page_title: 'Import > Readability' | ||
347 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
339 | 349 | ||
340 | developer: | 350 | developer: |
341 | # page_title: 'Developer' | 351 | # page_title: 'Developer' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index a60dfc86..6dfbfa89 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | |||
@@ -139,6 +139,8 @@ entry: | |||
139 | # starred: 'Starred entries' | 139 | # starred: 'Starred entries' |
140 | # archived: 'Archived entries' | 140 | # archived: 'Archived entries' |
141 | # filtered: 'Filtered entries' | 141 | # filtered: 'Filtered entries' |
142 | # filtered_tags: 'Filtered by tags' | ||
143 | # untagged: 'Untagged entries' | ||
142 | list: | 144 | list: |
143 | number_on_the_page: '{0} Herhangi bir makale yok.|{1} Burada bir adet makale var.|]1,Inf[ Burada %count% adet makale var.' | 145 | number_on_the_page: '{0} Herhangi bir makale yok.|{1} Burada bir adet makale var.|]1,Inf[ Burada %count% adet makale var.' |
144 | reading_time: 'tahmini okuma süresi' | 146 | reading_time: 'tahmini okuma süresi' |
@@ -186,6 +188,8 @@ entry: | |||
186 | add_a_tag: 'Bir etiket ekle' | 188 | add_a_tag: 'Bir etiket ekle' |
187 | share_content: 'Paylaş' | 189 | share_content: 'Paylaş' |
188 | share_email_label: 'E-posta' | 190 | share_email_label: 'E-posta' |
191 | # public_link: 'public link' | ||
192 | # delete_public_link: 'delete public link' | ||
189 | download: 'İndir' | 193 | download: 'İndir' |
190 | # print: 'Print' | 194 | # print: 'Print' |
191 | problem: | 195 | problem: |
@@ -288,6 +292,7 @@ quickstart: | |||
288 | pocket: "Pocket üzerindeki verilerinizi wallabag'e aktarın" | 292 | pocket: "Pocket üzerindeki verilerinizi wallabag'e aktarın" |
289 | wallabag_v1: "wallabag v1 üzerindeki verilerinizi wallabag'in yeni sürümüne aktarın" | 293 | wallabag_v1: "wallabag v1 üzerindeki verilerinizi wallabag'in yeni sürümüne aktarın" |
290 | wallabag_v2: "wallabag v2 üzerindeki verilerinizi wallabag'in yeni sürümüne aktarın" | 294 | wallabag_v2: "wallabag v2 üzerindeki verilerinizi wallabag'in yeni sürümüne aktarın" |
295 | readability: "Readability üzerindeki verilerinizi wallabag'e aktarın'" | ||
291 | developer: | 296 | developer: |
292 | # title: 'Developers' | 297 | # title: 'Developers' |
293 | # create_application: 'Create your third application' | 298 | # create_application: 'Create your third application' |
@@ -309,6 +314,7 @@ tag: | |||
309 | page_title: 'Etiketler' | 314 | page_title: 'Etiketler' |
310 | list: | 315 | list: |
311 | number_on_the_page: '{0} Herhangi bir etiket yok.|{1} Burada bir adet etiket var.|]1,Inf[ Burada %count% adet etiket var.' | 316 | number_on_the_page: '{0} Herhangi bir etiket yok.|{1} Burada bir adet etiket var.|]1,Inf[ Burada %count% adet etiket var.' |
317 | # see_untagged_entries: 'See untagged entries' | ||
312 | 318 | ||
313 | import: | 319 | import: |
314 | page_title: 'İçe Aktar' | 320 | page_title: 'İçe Aktar' |
@@ -336,6 +342,10 @@ import: | |||
336 | wallabag_v2: | 342 | wallabag_v2: |
337 | page_title: 'İçe Aktar > Wallabag v2' | 343 | page_title: 'İçe Aktar > Wallabag v2' |
338 | # description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' | 344 | # description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' |
345 | readability: | ||
346 | page_title: 'İçe Aktar > Readability' | ||
347 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
339 | 349 | ||
340 | developer: | 350 | developer: |
341 | # page_title: 'Developer' | 351 | # page_title: 'Developer' |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/_title.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/_title.html.twig new file mode 100644 index 00000000..d1c2f203 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/_title.html.twig | |||
@@ -0,0 +1,15 @@ | |||
1 | {% set currentRoute = app.request.attributes.get('_route') %} | ||
2 | |||
3 | {% if currentRoute == 'starred' %} | ||
4 | {{ 'entry.page_titles.starred'|trans }} | ||
5 | {% elseif currentRoute == 'archive' %} | ||
6 | {{ 'entry.page_titles.archived'|trans }} | ||
7 | {% elseif currentRoute == 'all' %} | ||
8 | {{ 'entry.page_titles.filtered'|trans }} | ||
9 | {% elseif currentRoute == 'tag_entries' %} | ||
10 | {{ 'entry.page_titles.filtered_tags'|trans }} | ||
11 | {% elseif currentRoute == 'untagged' %} | ||
12 | {{ 'entry.page_titles.untagged'|trans }} | ||
13 | {% else %} | ||
14 | {{ 'entry.page_titles.unread'|trans }} | ||
15 | {% endif %} | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index 92eecb9b..1554cce4 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig | |||
@@ -1,6 +1,8 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | 1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | 2 | ||
3 | {% block title %}{{ 'entry.page_titles.unread'|trans }}{% endblock %} | 3 | {% block title %} |
4 | {% include "@WallabagCore/themes/_title.html.twig" %} | ||
5 | {% endblock %} | ||
4 | 6 | ||
5 | {% block content %} | 7 | {% block content %} |
6 | {% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %} | 8 | {% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %} |
@@ -44,7 +46,6 @@ | |||
44 | </div> | 46 | </div> |
45 | {% endfor %} | 47 | {% endfor %} |
46 | 48 | ||
47 | |||
48 | <!-- Export --> | 49 | <!-- Export --> |
49 | <aside id="download-form"> | 50 | <aside id="download-form"> |
50 | {% set currentRoute = app.request.attributes.get('_route') %} | 51 | {% set currentRoute = app.request.attributes.get('_route') %} |
@@ -63,8 +64,10 @@ | |||
63 | {% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml' }) }}">XML</a></li>{% endif %} | 64 | {% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml' }) }}">XML</a></li>{% endif %} |
64 | </ul> | 65 | </ul> |
65 | </aside> | 66 | </aside> |
67 | |||
66 | <!-- Filter --> | 68 | <!-- Filter --> |
67 | <aside id="filter-form"> | 69 | {% if form is not null %} |
70 | <aside id="filter-form" class=""> | ||
68 | <form method="get" action="{{ path('all') }}"> | 71 | <form method="get" action="{{ path('all') }}"> |
69 | <h2>{{ 'entry.filters.title'|trans }}</h2> | 72 | <h2>{{ 'entry.filters.title'|trans }}</h2> |
70 | <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">×</a> | 73 | <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">×</a> |
@@ -145,6 +148,5 @@ | |||
145 | </div> | 148 | </div> |
146 | </form> | 149 | </form> |
147 | </aside> | 150 | </aside> |
148 | 151 | {% endif %} | |
149 | {% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %} | ||
150 | {% endblock %} | 152 | {% endblock %} |
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 ce47a677..675168bb 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 | |||
@@ -17,6 +17,7 @@ | |||
17 | <li><a title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" class="tool icon icon-star {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.set_as_starred'|trans }}</span></a></li> | 17 | <li><a title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" class="tool icon icon-star {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.set_as_starred'|trans }}</span></a></li> |
18 | <li><a id="nav-btn-add-tag" title="{{ 'entry.view.left_menu.add_a_tag'|trans }}"><span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span></a></li> | 18 | <li><a id="nav-btn-add-tag" title="{{ 'entry.view.left_menu.add_a_tag'|trans }}"><span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span></a></li> |
19 | <li><a title="{{ 'entry.view.left_menu.delete'|trans }}" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.delete'|trans }}</span></a></li> | 19 | <li><a title="{{ 'entry.view.left_menu.delete'|trans }}" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.delete'|trans }}</span></a></li> |
20 | {% if craue_setting('share_public') %}<li><a href="{{ path('share', {'id': entry.id }) }}" target="_blank" class="tool public" title="{{ 'entry.view.left_menu.public_link'|trans }}"><span>{{ 'entry.view.left_menu.public_link'|trans }}</span></a></li> <li><a href="{{ path('delete_share', {'id': entry.id }) }}" class="tool public" title="{{ 'entry.view.left_menu.delete_public_link'|trans }}"><span>{{ 'entry.view.left_menu.delete_public_link'|trans }}</span></a></li>{% endif %} | ||
20 | {% if craue_setting('share_twitter') %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="Tweet"><span>Tweet</span></a></li>{% endif %} | 21 | {% if craue_setting('share_twitter') %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="Tweet"><span>Tweet</span></a></li>{% endif %} |
21 | {% if craue_setting('share_mail') %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="Email"><span>Email</span></a></li>{% endif %} | 22 | {% if craue_setting('share_mail') %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="Email"><span>Email</span></a></li>{% endif %} |
22 | {% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="shaarli"><span>shaarli</span></a></li>{% endif %} | 23 | {% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="shaarli"><span>shaarli</span></a></li>{% endif %} |
@@ -29,29 +30,32 @@ | |||
29 | <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.label'|trans }}" class="tool bad-display icon icon-delete"><span>{{ 'entry.view.left_menu.problem.label'|trans }}</span></a></li> | 30 | <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.label'|trans }}" class="tool bad-display icon icon-delete"><span>{{ 'entry.view.left_menu.problem.label'|trans }}</span></a></li> |
30 | </ul> | 31 | </ul> |
31 | </div> | 32 | </div> |
32 | <div class="link mdi-action-today"> | ||
33 | {{ 'entry.view.created_at'|trans }}: {{ entry.createdAt|date('Y-m-d') }} | ||
34 | </div> | ||
35 | 33 | ||
36 | <div class="link mdi-action-query-builder"> | 34 | <div id="article-informations"> |
37 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} | 35 | <div class="link mdi-action-today"> |
38 | {% if readingTime > 0 %} | 36 | {{ 'entry.view.created_at'|trans }}: {{ entry.createdAt|date('Y-m-d') }} |
39 | {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round})|capitalize }} | 37 | </div> |
40 | {% else %} | ||
41 | {{ 'entry.list.reading_time_less_one_minute'|trans|raw }} | ||
42 | {% endif %} | ||
43 | </div> | ||
44 | 38 | ||
45 | {% set nbAnnotations = entry.annotations | length %} | 39 | <div class="link mdi-action-query-builder"> |
46 | <span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> | 40 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} |
47 | <aside class="tags"> | 41 | {% if readingTime > 0 %} |
48 | {% for tag in entry.tags %} | 42 | {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round})|capitalize }} |
49 | <span class="label-outline"><i class="material-icons">label_outline</i> {{ tag.label }}</span> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"class="nostyle"><i>✘</i></a> | 43 | {% else %} |
50 | {% endfor %} | 44 | {{ 'entry.list.reading_time_less_one_minute'|trans|raw }} |
51 | <div class="input-field nav-panel-add-tag" style="display: none"> | 45 | {% endif %} |
52 | {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} | ||
53 | </div> | 46 | </div> |
54 | </aside> | 47 | |
48 | {% set nbAnnotations = entry.annotations | length %} | ||
49 | <span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> | ||
50 | <aside class="tags"> | ||
51 | {% for tag in entry.tags %} | ||
52 | <span class="label-outline"><i class="material-icons">label_outline</i> {{ tag.label }}</span> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"class="nostyle"><i>✘</i></a> | ||
53 | {% endfor %} | ||
54 | <div class="input-field nav-panel-add-tag" style="display: none"> | ||
55 | {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} | ||
56 | </div> | ||
57 | </aside> | ||
58 | </div> | ||
55 | {% if entry.previewPicture is not null %} | 59 | {% if entry.previewPicture is not null %} |
56 | <div><img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /></div> | 60 | <div><img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /></div> |
57 | {% endif %} | 61 | {% endif %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/quickstart.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/quickstart.html.twig index b3d3d5a0..ea1c1cbe 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/quickstart.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/quickstart.html.twig | |||
@@ -39,6 +39,7 @@ | |||
39 | <li><a href="{{ path('import_pocket') }}">{{ 'quickstart.migrate.pocket'|trans }}</a></li> | 39 | <li><a href="{{ path('import_pocket') }}">{{ 'quickstart.migrate.pocket'|trans }}</a></li> |
40 | <li><a href="{{ path('import_wallabag_v1') }}">{{ 'quickstart.migrate.wallabag_v1'|trans }}</a></li> | 40 | <li><a href="{{ path('import_wallabag_v1') }}">{{ 'quickstart.migrate.wallabag_v1'|trans }}</a></li> |
41 | <li><a href="{{ path('import_wallabag_v2') }}">{{ 'quickstart.migrate.wallabag_v2'|trans }}</a></li> | 41 | <li><a href="{{ path('import_wallabag_v2') }}">{{ 'quickstart.migrate.wallabag_v2'|trans }}</a></li> |
42 | <li><a href="{{ path('import_readability') }}">{{ 'quickstart.migrate.readability'|trans }}</a></li> | ||
42 | </ul> | 43 | </ul> |
43 | 44 | ||
44 | <h4>{{ 'quickstart.developer.title'|trans }}</h4> | 45 | <h4>{{ 'quickstart.developer.title'|trans }}</h4> |
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 524a1d23..50043907 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,11 @@ | |||
9 | 9 | ||
10 | <ul> | 10 | <ul> |
11 | {% for tag in tags %} | 11 | {% for tag in tags %} |
12 | <li id="tag-{{ tag.id|e }}">{{tag.label}} ({{ tag.getEntriesByUserId(app.user.id) | length }})</li> | 12 | <li id="tag-{{ tag.id|e }}"><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{tag.label}} ({{ tag.entries.getValues | length }})</a></li> |
13 | {% endfor %} | 13 | {% endfor %} |
14 | </ul> | 14 | </ul> |
15 | |||
16 | <div> | ||
17 | <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }}</a> | ||
18 | </div> | ||
15 | {% endblock %} | 19 | {% endblock %} |
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 11b02294..bf390e89 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 | |||
@@ -196,6 +196,7 @@ | |||
196 | </div> | 196 | </div> |
197 | 197 | ||
198 | <div id="set5" class="col s12"> | 198 | <div id="set5" class="col s12"> |
199 | {% if app.user.config.taggingRules is not empty %} | ||
199 | <div class="row"> | 200 | <div class="row"> |
200 | <div class="input-field col s12"> | 201 | <div class="input-field col s12"> |
201 | <ul> | 202 | <ul> |
@@ -213,6 +214,7 @@ | |||
213 | </ul> | 214 | </ul> |
214 | </div> | 215 | </div> |
215 | </div> | 216 | </div> |
217 | {% endif %} | ||
216 | 218 | ||
217 | {{ form_start(form.new_tagging_rule) }} | 219 | {{ form_start(form.new_tagging_rule) }} |
218 | {{ form_errors(form.new_tagging_rule) }} | 220 | {{ form_errors(form.new_tagging_rule) }} |
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 eca8924e..806a4eef 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 | |||
@@ -1,18 +1,7 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | 1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | 2 | ||
3 | {% block title %} | 3 | {% block title %} |
4 | {% set currentRoute = app.request.attributes.get('_route') %} | 4 | {% include "@WallabagCore/themes/_title.html.twig" %} |
5 | |||
6 | {% if currentRoute == 'starred' %} | ||
7 | {{ 'entry.page_titles.starred'|trans }} | ||
8 | {% elseif currentRoute == 'archive' %} | ||
9 | {{ 'entry.page_titles.archived'|trans }} | ||
10 | {% elseif currentRoute == 'all' %} | ||
11 | {{ 'entry.page_titles.filtered'|trans }} | ||
12 | {% else %} | ||
13 | {{ 'entry.page_titles.unread'|trans }} | ||
14 | {% endif %} | ||
15 | |||
16 | {% endblock %} | 5 | {% endblock %} |
17 | 6 | ||
18 | {% block content %} | 7 | {% block content %} |
@@ -40,7 +29,7 @@ | |||
40 | <i class="card-title grey-text text-darken-4 activator material-icons right">more_vert</i> | 29 | <i class="card-title grey-text text-darken-4 activator material-icons right">more_vert</i> |
41 | {% endif %} | 30 | {% endif %} |
42 | 31 | ||
43 | <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|striptags }}">{{ entry.title|striptags|raw }}</a></span> | 32 | <span class="card-title dot-ellipsis dot-resize-update"><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|raw }}">{{ entry.title|striptags|raw }}</a></span> |
44 | 33 | ||
45 | <div class="estimatedTime grey-text"> | 34 | <div class="estimatedTime grey-text"> |
46 | <span class="tool reading-time"> | 35 | <span class="tool reading-time"> |
@@ -122,6 +111,7 @@ | |||
122 | </div> | 111 | </div> |
123 | 112 | ||
124 | <!-- Filters --> | 113 | <!-- Filters --> |
114 | {% if form is not null %} | ||
125 | <div id="filters" class="side-nav fixed right-aligned"> | 115 | <div id="filters" class="side-nav fixed right-aligned"> |
126 | <form action="{{ path('all') }}"> | 116 | <form action="{{ path('all') }}"> |
127 | 117 | ||
@@ -205,5 +195,6 @@ | |||
205 | 195 | ||
206 | </form> | 196 | </form> |
207 | </div> | 197 | </div> |
208 | {% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %} | 198 | {% endif %} |
199 | |||
209 | {% endblock %} | 200 | {% endblock %} |
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 5dd2afb3..9b587c34 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 | |||
@@ -99,6 +99,18 @@ | |||
99 | </a> | 99 | </a> |
100 | <div class="collapsible-body"> | 100 | <div class="collapsible-body"> |
101 | <ul> | 101 | <ul> |
102 | {% if craue_setting('share_public') %} | ||
103 | <li> | ||
104 | <a href="{{ path('share', {'id': entry.id }) }}" target="_blank" class="public icon-link" title="{{ 'entry.view.left_menu.public_link'|trans }}"> | ||
105 | <span>{{ 'entry.view.left_menu.public_link'|trans }}</span> | ||
106 | </a> | ||
107 | </li> | ||
108 | <li> | ||
109 | <a href="{{ path('delete_share', {'id': entry.id }) }}" class="tool public" title="{{ 'entry.view.left_menu.delete_public_link'|trans }}"> | ||
110 | <span>{{ 'entry.view.left_menu.delete_public_link'|trans }}</span> | ||
111 | </a> | ||
112 | </li> | ||
113 | {% endif %} | ||
102 | {% if craue_setting('share_twitter') %} | 114 | {% if craue_setting('share_twitter') %} |
103 | <li> | 115 | <li> |
104 | <a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="twitter"> | 116 | <a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="twitter"> |
@@ -149,7 +161,6 @@ | |||
149 | </li> | 161 | </li> |
150 | {% endif %} | 162 | {% endif %} |
151 | 163 | ||
152 | |||
153 | <li class="bold"> | 164 | <li class="bold"> |
154 | <a class="waves-effect collapsible-header"> | 165 | <a class="waves-effect collapsible-header"> |
155 | <i class="material-icons small">file_download</i> | 166 | <i class="material-icons small">file_download</i> |
@@ -195,17 +206,18 @@ | |||
195 | </header> | 206 | </header> |
196 | <aside> | 207 | <aside> |
197 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} | 208 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} |
198 | <span class="link mdi-action-query-builder"> | 209 | <span class="mdi-action-query-builder"></span> |
210 | <span class="link"> | ||
199 | {% if readingTime > 0 %} | 211 | {% if readingTime > 0 %} |
200 | {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }} | 212 | {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }} |
201 | {% else %} | 213 | {% else %} |
202 | {{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }} | 214 | {{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }} |
203 | {% endif %} | 215 | {% endif %} |
204 | </span> | 216 | </span> |
205 | <span class="link mdi-action-today" title="{{ 'entry.view.created_at'|trans }}"> {{ entry.createdAt|date('Y-m-d') }}</span> | 217 | <span class="mdi-action-today" title="{{ 'entry.view.created_at'|trans }}"> </span> <span class="link">{{ entry.createdAt|date('Y-m-d') }}</span> |
206 | <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool"> | 218 | <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool"> |
207 | <span class="link"><i class="material-icons link">link</i> {{ entry.domainName|removeWww }}</span></a> | 219 | <i class="material-icons link">link</i> <span class="link">{{ entry.domainName|removeWww }}</span></a> |
208 | <span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> | 220 | <span class="tool"><i class="material-icons link">comment</i> <span class="link">{{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> |
209 | <div id="list"> | 221 | <div id="list"> |
210 | {% for tag in entry.tags %} | 222 | {% for tag in entry.tags %} |
211 | <div class="chip"> | 223 | <div class="chip"> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/quickstart.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/quickstart.html.twig index 59dd037b..8cbf4ab4 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/quickstart.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/quickstart.html.twig | |||
@@ -44,6 +44,7 @@ | |||
44 | <li><a href="{{ path('import_pocket') }}">{{ 'quickstart.migrate.pocket'|trans }}</a></li> | 44 | <li><a href="{{ path('import_pocket') }}">{{ 'quickstart.migrate.pocket'|trans }}</a></li> |
45 | <li><a href="{{ path('import_wallabag_v1') }}">{{ 'quickstart.migrate.wallabag_v1'|trans }}</a></li> | 45 | <li><a href="{{ path('import_wallabag_v1') }}">{{ 'quickstart.migrate.wallabag_v1'|trans }}</a></li> |
46 | <li><a href="{{ path('import_wallabag_v2') }}">{{ 'quickstart.migrate.wallabag_v2'|trans }}</a></li> | 46 | <li><a href="{{ path('import_wallabag_v2') }}">{{ 'quickstart.migrate.wallabag_v2'|trans }}</a></li> |
47 | <li><a href="{{ path('import_readability') }}">{{ 'quickstart.migrate.readability'|trans }}</a></li> | ||
47 | </ul> | 48 | </ul> |
48 | 49 | ||
49 | <h4>{{ 'quickstart.developer.title'|trans }}</h4> | 50 | <h4>{{ 'quickstart.developer.title'|trans }}</h4> |
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 d958c4b8..1690633a 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 | |||
@@ -9,7 +9,10 @@ | |||
9 | <br /> | 9 | <br /> |
10 | <ul class="row data"> | 10 | <ul class="row data"> |
11 | {% for tag in tags %} | 11 | {% for tag in tags %} |
12 | <li id="tag-{{ tag.id|e }}" class="col l4 m6 s12">{{tag.label}} ({{ tag.getEntriesByUserId(app.user.id) | length }})</li> | 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 | {% endfor %} | 13 | {% endfor %} |
14 | </ul> | 14 | </ul> |
15 | <div> | ||
16 | <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }}</a> | ||
17 | </div> | ||
15 | {% endblock %} | 18 | {% endblock %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/share.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/share.html.twig new file mode 100644 index 00000000..b82b3d3d --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/share.html.twig | |||
@@ -0,0 +1,40 @@ | |||
1 | <html> | ||
2 | <head> | ||
3 | <title>{{ entry.title | raw }}</title> | ||
4 | <style> | ||
5 | body { | ||
6 | margin: 10px; | ||
7 | font-family: 'Roboto',Verdana,Geneva,sans-serif; | ||
8 | font-size: 16px; | ||
9 | color: #000; | ||
10 | } | ||
11 | header { | ||
12 | text-align: center; | ||
13 | } | ||
14 | |||
15 | header h1 { | ||
16 | font-size: 1.3em; | ||
17 | } | ||
18 | |||
19 | a, | ||
20 | a:hover, | ||
21 | a:visited { | ||
22 | color: #000; | ||
23 | } | ||
24 | |||
25 | article { | ||
26 | margin: 0 auto; | ||
27 | width: 600px; | ||
28 | } | ||
29 | </style> | ||
30 | </head> | ||
31 | <body> | ||
32 | <header> | ||
33 | <h1>{{ entry.title | raw }}</h1> | ||
34 | <span><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool">{{ entry.domainName|removeWww }}</a></span> | ||
35 | </header> | ||
36 | <article> | ||
37 | {{ entry.content | raw }} | ||
38 | </article> | ||
39 | </body> | ||
40 | </html> | ||
diff --git a/src/Wallabag/ImportBundle/Controller/ReadabilityController.php b/src/Wallabag/ImportBundle/Controller/ReadabilityController.php new file mode 100644 index 00000000..b61aa99c --- /dev/null +++ b/src/Wallabag/ImportBundle/Controller/ReadabilityController.php | |||
@@ -0,0 +1,65 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\ImportBundle\Controller; | ||
4 | |||
5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
7 | use Symfony\Component\HttpFoundation\Request; | ||
8 | use Wallabag\ImportBundle\Form\Type\UploadImportType; | ||
9 | |||
10 | class ReadabilityController extends Controller | ||
11 | { | ||
12 | /** | ||
13 | * @Route("/readability", name="import_readability") | ||
14 | */ | ||
15 | public function indexAction(Request $request) | ||
16 | { | ||
17 | $form = $this->createForm(UploadImportType::class); | ||
18 | $form->handleRequest($request); | ||
19 | |||
20 | $readability = $this->get('wallabag_import.readability.import'); | ||
21 | |||
22 | if ($form->isValid()) { | ||
23 | $file = $form->get('file')->getData(); | ||
24 | $markAsRead = $form->get('mark_as_read')->getData(); | ||
25 | $name = 'readability_'.$this->getUser()->getId().'.json'; | ||
26 | |||
27 | if (in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes')) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) { | ||
28 | $res = $readability | ||
29 | ->setUser($this->getUser()) | ||
30 | ->setFilepath($this->getParameter('wallabag_import.resource_dir').'/'.$name) | ||
31 | ->setMarkAsRead($markAsRead) | ||
32 | ->import(); | ||
33 | |||
34 | $message = 'flashes.import.notice.failed'; | ||
35 | |||
36 | if (true === $res) { | ||
37 | $summary = $readability->getSummary(); | ||
38 | $message = $this->get('translator')->trans('flashes.import.notice.summary', [ | ||
39 | '%imported%' => $summary['imported'], | ||
40 | '%skipped%' => $summary['skipped'], | ||
41 | ]); | ||
42 | |||
43 | unlink($this->getParameter('wallabag_import.resource_dir').'/'.$name); | ||
44 | } | ||
45 | |||
46 | $this->get('session')->getFlashBag()->add( | ||
47 | 'notice', | ||
48 | $message | ||
49 | ); | ||
50 | |||
51 | return $this->redirect($this->generateUrl('homepage')); | ||
52 | } else { | ||
53 | $this->get('session')->getFlashBag()->add( | ||
54 | 'notice', | ||
55 | 'flashes.import.notice.failed_on_file' | ||
56 | ); | ||
57 | } | ||
58 | } | ||
59 | |||
60 | return $this->render('WallabagImportBundle:Readability:index.html.twig', [ | ||
61 | 'form' => $form->createView(), | ||
62 | 'import' => $readability, | ||
63 | ]); | ||
64 | } | ||
65 | } | ||
diff --git a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php new file mode 100644 index 00000000..37b160c5 --- /dev/null +++ b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php | |||
@@ -0,0 +1,179 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\ImportBundle\Import; | ||
4 | |||
5 | use Wallabag\CoreBundle\Entity\Entry; | ||
6 | use Wallabag\UserBundle\Entity\User; | ||
7 | |||
8 | class ReadabilityImport extends AbstractImport | ||
9 | { | ||
10 | private $user; | ||
11 | private $skippedEntries = 0; | ||
12 | private $importedEntries = 0; | ||
13 | private $filepath; | ||
14 | private $markAsRead; | ||
15 | |||
16 | /** | ||
17 | * We define the user in a custom call because on the import command there is no logged in user. | ||
18 | * So we can't retrieve user from the `security.token_storage` service. | ||
19 | * | ||
20 | * @param User $user | ||
21 | */ | ||
22 | public function setUser(User $user) | ||
23 | { | ||
24 | $this->user = $user; | ||
25 | |||
26 | return $this; | ||
27 | } | ||
28 | |||
29 | /** | ||
30 | * {@inheritdoc} | ||
31 | */ | ||
32 | public function getName() | ||
33 | { | ||
34 | return 'Readability'; | ||
35 | } | ||
36 | |||
37 | /** | ||
38 | * {@inheritdoc} | ||
39 | */ | ||
40 | public function getUrl() | ||
41 | { | ||
42 | return 'import_readability'; | ||
43 | } | ||
44 | |||
45 | /** | ||
46 | * {@inheritdoc} | ||
47 | */ | ||
48 | public function getDescription() | ||
49 | { | ||
50 | return 'import.readability.description'; | ||
51 | } | ||
52 | |||
53 | /** | ||
54 | * Set file path to the json file. | ||
55 | * | ||
56 | * @param string $filepath | ||
57 | */ | ||
58 | public function setFilepath($filepath) | ||
59 | { | ||
60 | $this->filepath = $filepath; | ||
61 | |||
62 | return $this; | ||
63 | } | ||
64 | |||
65 | /** | ||
66 | * Set whether articles must be all marked as read. | ||
67 | * | ||
68 | * @param bool $markAsRead | ||
69 | */ | ||
70 | public function setMarkAsRead($markAsRead) | ||
71 | { | ||
72 | $this->markAsRead = $markAsRead; | ||
73 | |||
74 | return $this; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * Get whether articles must be all marked as read. | ||
79 | */ | ||
80 | public function getMarkAsRead() | ||
81 | { | ||
82 | return $this->markAsRead; | ||
83 | } | ||
84 | |||
85 | /** | ||
86 | * {@inheritdoc} | ||
87 | */ | ||
88 | public function getSummary() | ||
89 | { | ||
90 | return [ | ||
91 | 'skipped' => $this->skippedEntries, | ||
92 | 'imported' => $this->importedEntries, | ||
93 | ]; | ||
94 | } | ||
95 | |||
96 | /** | ||
97 | * {@inheritdoc} | ||
98 | */ | ||
99 | public function import() | ||
100 | { | ||
101 | if (!$this->user) { | ||
102 | $this->logger->error('ReadabilityImport: user is not defined'); | ||
103 | |||
104 | return false; | ||
105 | } | ||
106 | |||
107 | if (!file_exists($this->filepath) || !is_readable($this->filepath)) { | ||
108 | $this->logger->error('ReadabilityImport: unable to read file', ['filepath' => $this->filepath]); | ||
109 | |||
110 | return false; | ||
111 | } | ||
112 | |||
113 | $data = json_decode(file_get_contents($this->filepath), true); | ||
114 | |||
115 | if (empty($data) || empty($data['bookmarks'])) { | ||
116 | return false; | ||
117 | } | ||
118 | |||
119 | $this->parseEntries($data['bookmarks']); | ||
120 | |||
121 | return true; | ||
122 | } | ||
123 | |||
124 | /** | ||
125 | * Parse and insert all given entries. | ||
126 | * | ||
127 | * @param $entries | ||
128 | */ | ||
129 | protected function parseEntries($entries) | ||
130 | { | ||
131 | $i = 1; | ||
132 | |||
133 | foreach ($entries as $importedEntry) { | ||
134 | $existingEntry = $this->em | ||
135 | ->getRepository('WallabagCoreBundle:Entry') | ||
136 | ->findByUrlAndUserId($importedEntry['article__url'], $this->user->getId()); | ||
137 | |||
138 | if (false !== $existingEntry) { | ||
139 | ++$this->skippedEntries; | ||
140 | continue; | ||
141 | } | ||
142 | |||
143 | $data = [ | ||
144 | 'title' => $importedEntry['article__title'], | ||
145 | 'url' => $importedEntry['article__url'], | ||
146 | 'content_type' => '', | ||
147 | 'language' => '', | ||
148 | 'is_archived' => $importedEntry['archive'] || $this->markAsRead, | ||
149 | 'is_starred' => $importedEntry['favorite'], | ||
150 | ]; | ||
151 | |||
152 | $entry = $this->fetchContent( | ||
153 | new Entry($this->user), | ||
154 | $data['url'], | ||
155 | $data | ||
156 | ); | ||
157 | |||
158 | // jump to next entry in case of problem while getting content | ||
159 | if (false === $entry) { | ||
160 | ++$this->skippedEntries; | ||
161 | continue; | ||
162 | } | ||
163 | $entry->setArchived($data['is_archived']); | ||
164 | $entry->setStarred($data['is_starred']); | ||
165 | |||
166 | $this->em->persist($entry); | ||
167 | ++$this->importedEntries; | ||
168 | |||
169 | // flush every 20 entries | ||
170 | if (($i % 20) === 0) { | ||
171 | $this->em->flush(); | ||
172 | $this->em->clear($entry); | ||
173 | } | ||
174 | ++$i; | ||
175 | } | ||
176 | |||
177 | $this->em->flush(); | ||
178 | } | ||
179 | } | ||
diff --git a/src/Wallabag/ImportBundle/Resources/config/services.yml b/src/Wallabag/ImportBundle/Resources/config/services.yml index 86b44cb3..520d43af 100644 --- a/src/Wallabag/ImportBundle/Resources/config/services.yml +++ b/src/Wallabag/ImportBundle/Resources/config/services.yml | |||
@@ -43,3 +43,13 @@ services: | |||
43 | - [ setLogger, [ "@logger" ]] | 43 | - [ setLogger, [ "@logger" ]] |
44 | tags: | 44 | tags: |
45 | - { name: wallabag_import.import, alias: wallabag_v2 } | 45 | - { name: wallabag_import.import, alias: wallabag_v2 } |
46 | |||
47 | wallabag_import.readability.import: | ||
48 | class: Wallabag\ImportBundle\Import\ReadabilityImport | ||
49 | arguments: | ||
50 | - "@doctrine.orm.entity_manager" | ||
51 | - "@wallabag_core.content_proxy" | ||
52 | calls: | ||
53 | - [ setLogger, [ "@logger" ]] | ||
54 | tags: | ||
55 | - { name: wallabag_import.import, alias: readability } | ||
diff --git a/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig new file mode 100644 index 00000000..f527d309 --- /dev/null +++ b/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig | |||
@@ -0,0 +1,43 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{{ 'import.readability.page_title'|trans }}{% endblock %} | ||
4 | |||
5 | {% block content %} | ||
6 | <div class="row"> | ||
7 | <div class="col s12"> | ||
8 | <div class="card-panel settings"> | ||
9 | <div class="row"> | ||
10 | <blockquote>{{ import.description|trans }}</blockquote> | ||
11 | <p>{{ 'import.readability.how_to'|trans }}</p> | ||
12 | |||
13 | <div class="col s12"> | ||
14 | {{ form_start(form, {'method': 'POST'}) }} | ||
15 | {{ form_errors(form) }} | ||
16 | <div class="row"> | ||
17 | <div class="file-field input-field col s12"> | ||
18 | {{ form_errors(form.file) }} | ||
19 | <div class="btn"> | ||
20 | <span>{{ form.file.vars.label|trans }}</span> | ||
21 | {{ form_widget(form.file) }} | ||
22 | </div> | ||
23 | <div class="file-path-wrapper"> | ||
24 | <input class="file-path validate" type="text"> | ||
25 | </div> | ||
26 | </div> | ||
27 | <div class="input-field col s6 with-checkbox"> | ||
28 | <h6>{{ 'import.form.mark_as_read_title'|trans }}</h6> | ||
29 | {{ form_widget(form.mark_as_read) }} | ||
30 | {{ form_label(form.mark_as_read) }} | ||
31 | </div> | ||
32 | </div> | ||
33 | |||
34 | {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'} }) }} | ||
35 | |||
36 | {{ form_rest(form) }} | ||
37 | </form> | ||
38 | </div> | ||
39 | </div> | ||
40 | </div> | ||
41 | </div> | ||
42 | </div> | ||
43 | {% endblock %} | ||
diff --git a/src/Wallabag/UserBundle/Controller/RegistrationController.php b/src/Wallabag/UserBundle/Controller/RegistrationController.php new file mode 100644 index 00000000..f81f3a7b --- /dev/null +++ b/src/Wallabag/UserBundle/Controller/RegistrationController.php | |||
@@ -0,0 +1,18 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\UserBundle\Controller; | ||
4 | |||
5 | use FOS\UserBundle\Controller\RegistrationController as FOSRegistrationController; | ||
6 | use Symfony\Component\HttpFoundation\Request; | ||
7 | |||
8 | class RegistrationController extends FOSRegistrationController | ||
9 | { | ||
10 | public function registerAction(Request $request) | ||
11 | { | ||
12 | if ($this->container->getParameter('wallabag_user.registration_enabled')) { | ||
13 | return parent::registerAction($request); | ||
14 | } | ||
15 | |||
16 | return $this->redirectToRoute('fos_user_security_login', [], 301); | ||
17 | } | ||
18 | } | ||
diff --git a/src/Wallabag/UserBundle/Controller/SecurityController.php b/src/Wallabag/UserBundle/Controller/SecurityController.php new file mode 100644 index 00000000..83fa0b20 --- /dev/null +++ b/src/Wallabag/UserBundle/Controller/SecurityController.php | |||
@@ -0,0 +1,21 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\UserBundle\Controller; | ||
4 | |||
5 | use FOS\UserBundle\Controller\SecurityController as FOSSecurityController; | ||
6 | |||
7 | /** | ||
8 | * Extends login form in order to pass the registration_enabled parameter. | ||
9 | */ | ||
10 | class SecurityController extends FOSSecurityController | ||
11 | { | ||
12 | protected function renderLogin(array $data) | ||
13 | { | ||
14 | return $this->render('FOSUserBundle:Security:login.html.twig', | ||
15 | array_merge( | ||
16 | $data, | ||
17 | ['registration_enabled' => $this->container->getParameter('wallabag_user.registration_enabled')] | ||
18 | ) | ||
19 | ); | ||
20 | } | ||
21 | } | ||
diff --git a/src/Wallabag/UserBundle/DependencyInjection/Configuration.php b/src/Wallabag/UserBundle/DependencyInjection/Configuration.php index 4223f8db..971ce1a0 100644 --- a/src/Wallabag/UserBundle/DependencyInjection/Configuration.php +++ b/src/Wallabag/UserBundle/DependencyInjection/Configuration.php | |||
@@ -12,6 +12,14 @@ class Configuration implements ConfigurationInterface | |||
12 | $treeBuilder = new TreeBuilder(); | 12 | $treeBuilder = new TreeBuilder(); |
13 | $rootNode = $treeBuilder->root('wallabag_user'); | 13 | $rootNode = $treeBuilder->root('wallabag_user'); |
14 | 14 | ||
15 | $rootNode | ||
16 | ->children() | ||
17 | ->booleanNode('registration_enabled') | ||
18 | ->defaultValue(true) | ||
19 | ->end() | ||
20 | ->end() | ||
21 | ; | ||
22 | |||
15 | return $treeBuilder; | 23 | return $treeBuilder; |
16 | } | 24 | } |
17 | } | 25 | } |
diff --git a/src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php b/src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php index c12a8937..99040f69 100644 --- a/src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php +++ b/src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php | |||
@@ -16,6 +16,7 @@ class WallabagUserExtension extends Extension | |||
16 | 16 | ||
17 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | 17 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
18 | $loader->load('services.yml'); | 18 | $loader->load('services.yml'); |
19 | $container->setParameter('wallabag_user.registration_enabled', $config['registration_enabled']); | ||
19 | } | 20 | } |
20 | 21 | ||
21 | public function getAlias() | 22 | public function getAlias() |
diff --git a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml new file mode 100644 index 00000000..53a1afd1 --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml | |||
@@ -0,0 +1,11 @@ | |||
1 | # Two factor mail | ||
2 | auth_code: | ||
3 | on: 'sus' | ||
4 | mailer: | ||
5 | subject: "Còdi d'autentificacion wallabag" | ||
6 | body: | ||
7 | hello: "Bonjorn %user%," | ||
8 | first_para: "Estant qu'avètz activat la dobla autentificacion sus vòtre compte wallabag e que venètz de vos conectar dempuèi un novèl aparelh (ordinador, mobil, etc.) vos mandem un còdi per validar la connexion." | ||
9 | second_para: "Vaquí lo còdi a dintrar :" | ||
10 | support: "S'avètz un problèma de connexion, dobtetz pas a contacter l'assisténcia : " | ||
11 | signature: "La còla de wallabag" | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/Security/login.html.twig b/src/Wallabag/UserBundle/Resources/views/Security/login.html.twig index 8474b497..938f1a31 100644 --- a/src/Wallabag/UserBundle/Resources/views/Security/login.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/Security/login.html.twig | |||
@@ -33,13 +33,15 @@ | |||
33 | </div> | 33 | </div> |
34 | <div class="card-action center"> | 34 | <div class="card-action center"> |
35 | <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" /> | 35 | <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" /> |
36 | <a href="{{ path('fos_user_registration_register') }}" class="waves-effect waves-light grey btn">{{ 'security.login.register'|trans }}</a> | 36 | {% if registration_enabled %} |
37 | <a href="{{ path('fos_user_registration_register') }}" class="waves-effect waves-light grey btn">{{ 'security.login.register'|trans }}</a> | ||
38 | {% endif %} | ||
37 | <button class="btn waves-effect waves-light" type="submit" name="send"> | 39 | <button class="btn waves-effect waves-light" type="submit" name="send"> |
38 | {{ 'security.login.submit'|trans }} | 40 | {{ 'security.login.submit'|trans }} |
39 | <i class="material-icons right">send</i> | 41 | <i class="material-icons right">send</i> |
40 | </button> | 42 | </button> |
41 | </div> | 43 | </div> |
42 | <div class="center"> | 44 | <div class="row center"> |
43 | <a href="{{ path('fos_user_resetting_request') }}">{{ 'security.login.forgot_password'|trans }}</a> | 45 | <a href="{{ path('fos_user_resetting_request') }}">{{ 'security.login.forgot_password'|trans }}</a> |
44 | </div> | 46 | </div> |
45 | </form> | 47 | </form> |