]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #3297 from nclsHart/commands-better-rendering
authorJérémy Benoist <j0k3r@users.noreply.github.com>
Sun, 30 Jul 2017 06:31:04 +0000 (08:31 +0200)
committerGitHub <noreply@github.com>
Sun, 30 Jul 2017 06:31:04 +0000 (08:31 +0200)
Better rendering for all core commands

23 files changed:
src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php
src/Wallabag/ApiBundle/Controller/EntryRestController.php
src/Wallabag/CoreBundle/Controller/EntryController.php
src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php
src/Wallabag/CoreBundle/Helper/EntriesExport.php
src/Wallabag/CoreBundle/Repository/EntryRepository.php
src/Wallabag/CoreBundle/Repository/TagRepository.php
src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_title.html.twig
src/Wallabag/ImportBundle/Controller/WallabagController.php
src/Wallabag/ImportBundle/Import/BrowserImport.php
src/Wallabag/UserBundle/Repository/UserRepository.php

index 014c29b65f97b39758880c894106652dbcf830d3..b44f7e647acc4d35a5d0af70a63fd0bc48785680 100644 (file)
@@ -3,6 +3,8 @@
 namespace Wallabag\AnnotationBundle\Repository;
 
 use Doctrine\ORM\EntityRepository;
+use Doctrine\ORM\QueryBuilder;
+use Wallabag\AnnotationBundle\Entity\Annotation;
 
 /**
  * AnnotationRepository.
index 9277e1a19f093837efbb34540bc0996b02d32bc0..bc1b6f926ecbf28a04aeca3b8e4e7650199f599d 100644 (file)
@@ -8,6 +8,7 @@ use JMS\Serializer\SerializationContext;
 use Nelmio\ApiDocBundle\Annotation\ApiDoc;
 use Symfony\Component\HttpFoundation\JsonResponse;
 use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\HttpKernel\Exception\HttpException;
 use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
 use Wallabag\CoreBundle\Entity\Entry;
index 845ebef680aef6df2f21096fa9785f28bedfd224..3dcfbebeeb00f94afde4cf42dc658411a026b395 100644 (file)
@@ -573,6 +573,7 @@ class EntryController extends Controller
                 'entries' => $entries,
                 'currentPage' => $page,
                 'searchTerm' => $searchTerm,
+                'isFiltered' => $form->isSubmitted(),
             ]
         );
     }
index 10689c62bbf82e631dda0da5f708b23dccc163f2..da19fe3124a2d555ff0b8adc4ccf16923623a851 100644 (file)
@@ -8,6 +8,7 @@ use Graby\SiteConfig\ConfigBuilder;
 use Psr\Log\LoggerInterface;
 use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
 use Wallabag\CoreBundle\Repository\SiteCredentialRepository;
+use Wallabag\UserBundle\Entity\User;
 
 class GrabySiteConfigBuilder implements SiteConfigBuilder
 {
@@ -27,7 +28,7 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder
     private $logger;
 
     /**
-     * @var Wallabag\UserBundle\Entity\User|null
+     * @var User|null
      */
     private $currentUser;
 
index 64d8219325d532e3eed2f8d88a7b31286489f26f..de259e7ffc25246acbab2299078b63afd38778cd 100644 (file)
@@ -2,12 +2,12 @@
 
 namespace Wallabag\CoreBundle\Helper;
 
-use JMS\Serializer;
 use JMS\Serializer\SerializationContext;
 use JMS\Serializer\SerializerBuilder;
 use PHPePub\Core\EPub;
 use PHPePub\Core\Structure\OPF\DublinCore;
 use Symfony\Component\HttpFoundation\Response;
+use Wallabag\CoreBundle\Entity\Entry;
 
 /**
  * This class doesn't have unit test BUT it's fully covered by a functional test with ExportControllerTest.
@@ -427,7 +427,7 @@ class EntriesExport
      *
      * @param string $format
      *
-     * @return Serializer
+     * @return string
      */
     private function prepareSerializingContent($format)
     {
index c27ee90cc197c45ed9733db448b1d1f29f795741..7f35bb9a19b6746ea665d34fab6de9acc4d853ec 100644 (file)
@@ -3,9 +3,10 @@
 namespace Wallabag\CoreBundle\Repository;
 
 use Doctrine\ORM\EntityRepository;
-use Doctrine\ORM\Query;
+use Doctrine\ORM\QueryBuilder;
 use Pagerfanta\Adapter\DoctrineORMAdapter;
 use Pagerfanta\Pagerfanta;
+use Wallabag\CoreBundle\Entity\Entry;
 use Wallabag\CoreBundle\Entity\Tag;
 
 class EntryRepository extends EntityRepository
@@ -74,7 +75,7 @@ class EntryRepository extends EntityRepository
      *
      * @param int    $userId
      * @param string $term
-     * @param strint $currentRoute
+     * @param string $currentRoute
      *
      * @return QueryBuilder
      */
@@ -126,7 +127,7 @@ class EntryRepository extends EntityRepository
      * @param int    $since
      * @param string $tags
      *
-     * @return array
+     * @return Pagerfanta
      */
     public function findEntries($userId, $isArchived = null, $isStarred = null, $isPublic = null, $sort = 'created', $order = 'ASC', $since = 0, $tags = '')
     {
@@ -172,7 +173,7 @@ class EntryRepository extends EntityRepository
      *
      * @param int $userId
      *
-     * @return Entry
+     * @return array
      */
     public function findOneWithTags($userId)
     {
index 6c63a6a2792e8f276d49b098eed055c688834d8e..213283e5d6d8b1da418a2eba536823fc152ec83e 100644 (file)
@@ -3,6 +3,7 @@
 namespace Wallabag\CoreBundle\Repository;
 
 use Doctrine\ORM\EntityRepository;
+use Wallabag\CoreBundle\Entity\Tag;
 
 class TagRepository extends EntityRepository
 {
index 5229ac73287f5f00ac85a3a16893718cb39e468c..5e5bbde2f0a4739043cdf7176753858ed5381def 100644 (file)
@@ -169,6 +169,7 @@ entry:
         # filtered_tags: 'Filtered by tags:'
         # filtered_search: 'Filtered by search:'
         # untagged: 'Untagged entries'
+        # all: 'All entries'
     list:
         # number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.'
         reading_time: 'estimeret læsetid'
index 996f173a892f08db3285b606f3a86c505181bbdb..48f8a53539cb6f08b73b2cd7095aa81ca5a57304 100644 (file)
@@ -169,6 +169,7 @@ entry:
         filtered_tags: 'Gefiltert nach Tags:'
         filtered_search: 'Gefiltert nach Suche:'
         untagged: 'Nicht getaggte Einträge'
+        all: 'Alle Einträge'
     list:
         number_on_the_page: '{0} Es gibt keine Einträge.|{1} Es gibt einen Eintrag.|]1,Inf[ Es gibt %count% Einträge.'
         reading_time: 'geschätzte Lesezeit'
index aa1cd1a970b1d8ea23a964757cf859795315f498..f41a7c8532ef08b4ac0decbfdb2b0f5bb7b5f527 100644 (file)
@@ -169,6 +169,7 @@ entry:
         filtered_tags: 'Filtered by tags:'
         filtered_search: 'Filtered by search:'
         untagged: 'Untagged entries'
+        all: 'All entries'
     list:
         number_on_the_page: '{0} There are no entries.|{1} There is one entry.|]1,Inf[ There are %count% entries.'
         reading_time: 'estimated reading time'
index 96998f53579b8c38882918bdc729680148134684..ea4d84ba51d20380169a4f00ad12eba5164a8102 100644 (file)
@@ -169,6 +169,7 @@ entry:
         filtered_tags: 'Filtrado por etiquetas:'
         filtered_search: 'Filtrado por búsqueda:'
         untagged: 'Artículos sin etiquetas'
+        all: "Todos los artículos"
     list:
         number_on_the_page: '{0} No hay artículos.|{1} Hay un artículo.|]1,Inf[ Hay %count% artículos.'
         reading_time: 'tiempo estimado de lectura'
index 57e6c0298150a77fb170836eed848bc25841bad4..11047e830029833611751804625f9c7610e2065d 100644 (file)
@@ -169,6 +169,7 @@ entry:
         # filtered_tags: 'Filtered by tags:'
         # filtered_search: 'Filtered by search:'
         # untagged: 'Untagged entries'
+        # all: 'All entries'
     list:
         number_on_the_page: '{0} هیج مقاله‌ای نیست.|{1} یک مقاله هست.|]1,Inf[ %count% مقاله هست.'
         reading_time: 'زمان تخمینی برای خواندن'
index 6eac4c36d2e9f3fea5197c1606c20cbe8e753cc5..246add86de7db9754439b7cc0c1cabb2489431dc 100644 (file)
@@ -169,6 +169,7 @@ entry:
         filtered_tags: "Articles filtrés par tags :"
         filtered_search: "Articles filtrés par recherche :"
         untagged: "Article sans tag"
+        all: "Tous les articles"
     list:
         number_on_the_page: "{0} Il n’y a pas d’article.|{1} Il y a un article.|]1,Inf[ Il y a %count% articles."
         reading_time: "durée de lecture"
index fa7ae0b20d12e8c060413f0ef93285ea1e2fbeff..0de8bed7fec5807d8ad5c2be645217bc7ec8205a 100644 (file)
@@ -169,6 +169,7 @@ entry:
         filtered_tags: 'Filtrati per etichetta:'
         filtered_search: 'Filtrati per ricerca:'
         untagged: 'Articoli non etichettati'
+        all: 'Tutti gli articoli'
     list:
         number_on_the_page: "{0} Non ci sono contenuti.|{1} C'è un contenuto.|]1,Inf[ Ci sono %count% contenuti."
         reading_time: 'tempo di lettura stimato'
index be57e9034af7efe8b8c5a6d6d3bc0e87c98a9a4e..b2842ed2aaa989d7d58a15ccad860d81879a0dfe 100644 (file)
@@ -169,6 +169,7 @@ entry:
         filtered_tags: 'Articles filtrats per etiquetas :'
         filtered_search: 'Articles filtrats per recèrca :'
         untagged: 'Articles sens etiqueta'
+        all: 'Totes los articles'
     list:
         number_on_the_page: "{0} I a pas cap d'article.|{1} I a un article.|]1,Inf[ I a %count% articles."
         reading_time: 'durada de lectura'
index 00c559ede0c5602bbb6adc26c4c0fd7ecd9dc80f..ab1b3d6307c16b78333ad0dfbe4a3a240ea45f53 100644 (file)
@@ -169,6 +169,7 @@ entry:
         filtered_tags: 'Filtrowane po tagach:'
         filtered_search: 'Filtrowanie po wyszukiwaniu:'
         untagged: 'Odtaguj wpisy'
+        all: 'Wszystkie przedmioty'
     list:
         number_on_the_page: '{0} Nie ma wpisów.|{1} Jest jeden wpis.|]1,Inf[ Są %count% wpisy.'
         reading_time: 'szacunkowy czas czytania'
index 4ab5f144c590fddfd335cbb2bc61c01cc3c3258c..5c1ae0584470324b088cf8c115fbf1870f9d53eb 100644 (file)
@@ -169,6 +169,7 @@ entry:
         filtered_tags: 'Filtrar por tags:'
         # filtered_search: 'Filtered by search:'
         untagged: 'Entradas sem tags'
+        # all: 'All entries'
     list:
         number_on_the_page: '{0} Não existem entradas.|{1} Existe uma entrada.|]1,Inf[ Existem %count% entradas.'
         reading_time: 'tempo estimado de leitura'
index f16504eda89bc849adbf230e8f60c10d1838c782..0d6f5f8e38fd4433052b8c6c91e150480c66196b 100644 (file)
@@ -169,6 +169,7 @@ entry:
         # filtered_tags: 'Filtered by tags:'
         # filtered_search: 'Filtered by search:'
         # untagged: 'Untagged entries'
+        # all: 'All entries'
     list:
         # number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.'
         reading_time: 'timp estimat de citire'
index 90a140cd4f9386738ace39726c3b5bd741bad621..87b5e20043614e15b458a92e03019811f83e35dd 100644 (file)
@@ -169,6 +169,7 @@ entry:
         # filtered_tags: 'Filtered by tags:'
         # filtered_search: 'Filtered by search:'
         # untagged: 'Untagged entries'
+        # all: 'All entries'
     list:
         number_on_the_page: '{0} Herhangi bir makale yok.|{1} Burada bir adet makale var.|]1,Inf[ Burada %count% adet makale var.'
         reading_time: 'tahmini okuma süresi'
index 654c1d2dd1410bccfb40ba6cd87b2db600a7fb8f..5c17e9f7b78d5ced3f91807059e0c8f2b466b224 100644 (file)
@@ -5,7 +5,7 @@
 {% elseif currentRoute == 'archive' %}
     {{ 'entry.page_titles.archived'|trans }}
 {% elseif currentRoute == 'all' %}
-    {{ 'entry.page_titles.filtered'|trans }}
+    {{ isFiltered ? 'entry.page_titles.filtered'|trans : 'entry.page_titles.all'|trans }}
 {% elseif currentRoute == 'search' %}
     {{ 'entry.page_titles.filtered_search'|trans }} {{ filter }}
 {% elseif currentRoute == 'tag_entries' %}
index 7b61805b51cec4f7dfb72d466928ae3a584855c4..6e6524b4cd151cd0c855d2101e91cbc44bc6af11 100644 (file)
@@ -3,7 +3,9 @@
 namespace Wallabag\ImportBundle\Controller;
 
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
+use Symfony\Component\HttpFoundation\RedirectResponse;
 use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\Response;
 use Wallabag\ImportBundle\Form\Type\UploadImportType;
 
 /**
index f11958247e4f3ac8622add715c59ab1e1c583eab..780773246e6a3d8343646eab5d0da0ba20d44d82 100644 (file)
@@ -4,7 +4,6 @@ namespace Wallabag\ImportBundle\Import;
 
 use Wallabag\CoreBundle\Entity\Entry;
 use Wallabag\CoreBundle\Event\EntrySavedEvent;
-use Wallabag\UserBundle\Entity\User;
 
 abstract class BrowserImport extends AbstractImport
 {
@@ -232,4 +231,6 @@ abstract class BrowserImport extends AbstractImport
 
         return $importedEntry;
     }
+
+    abstract protected function prepareEntry(array $entry = []);
 }
index b1d753d2f42e97d2b1e016f45a87cc5ee546ec61..75cbeef20b28e6c02b445920dd89a5f88c2da10f 100644 (file)
@@ -3,6 +3,8 @@
 namespace Wallabag\UserBundle\Repository;
 
 use Doctrine\ORM\EntityRepository;
+use Doctrine\ORM\QueryBuilder;
+use Wallabag\UserBundle\Entity\User;
 
 class UserRepository extends EntityRepository
 {