]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #1916 from wallabag/cleanup
authorNicolas Lœuillet <nicolas@loeuillet.org>
Wed, 13 Apr 2016 07:43:14 +0000 (09:43 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Wed, 13 Apr 2016 07:43:14 +0000 (09:43 +0200)
Convert array + phpDoc

app/AppKernel.php
app/config/services.yml
composer.json
src/Wallabag/CoreBundle/Resources/config/services.yml
src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/main.css
src/Wallabag/CoreBundle/Resources/public/themes/material/css/main.css
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/about.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Static/about.html.twig
src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php

index 30ac7463ba742bb6bdda0b650b69c9c325f3c7a7..04f86eb76c829add567624c616038796e638cec2 100644 (file)
@@ -22,19 +22,22 @@ class AppKernel extends Kernel
             new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
             new Nelmio\CorsBundle\NelmioCorsBundle(),
             new Liip\ThemeBundle\LiipThemeBundle(),
-            new Wallabag\CoreBundle\WallabagCoreBundle(),
-            new Wallabag\ApiBundle\WallabagApiBundle(),
             new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(),
             new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(),
             new FOS\OAuthServerBundle\FOSOAuthServerBundle(),
-            new Wallabag\UserBundle\WallabagUserBundle(),
             new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
             new Scheb\TwoFactorBundle\SchebTwoFactorBundle(),
             new KPhoen\RulerZBundle\KPhoenRulerZBundle(),
-            new Wallabag\ImportBundle\WallabagImportBundle(),
             new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
             new Craue\ConfigBundle\CraueConfigBundle(),
             new Lexik\Bundle\MaintenanceBundle\LexikMaintenanceBundle(),
+            new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
+
+            // wallabag bundles
+            new Wallabag\CoreBundle\WallabagCoreBundle(),
+            new Wallabag\ApiBundle\WallabagApiBundle(),
+            new Wallabag\UserBundle\WallabagUserBundle(),
+            new Wallabag\ImportBundle\WallabagImportBundle(),
             new Wallabag\AnnotationBundle\WallabagAnnotationBundle(),
         ];
 
index e0683ffc7256369109b9e6bed67ed188c438e1c9..480408d918c3e01ea34cc74ea61fd919ff7b82b0 100644 (file)
@@ -6,7 +6,7 @@ services:
     filesystem_cache:
         class: Doctrine\Common\Cache\FilesystemCache
         arguments:
-            - %kernel.cache_dir%/doctrine/metadata
+            - "%kernel.cache_dir%/doctrine/metadata"
 
     twig.extension.text:
         class: Twig_Extensions_Extension_Text
index 7dbc6772d41f9839faf46153cc4ef24a4b33a5c2..a430c59e5aea84e867062f1cff19b8f97a2bd194 100644 (file)
@@ -58,7 +58,6 @@
         "friendsofsymfony/rest-bundle": "~1.4",
         "jms/serializer-bundle": "~1.0",
         "nelmio/api-doc-bundle": "~2.7",
-        "ezyang/htmlpurifier": "~4.6",
         "mgargano/simplehtmldom": "~1.5",
         "tecnickcom/tcpdf": "~6.2",
         "simplepie/simplepie": "~1.3.1",
@@ -81,7 +80,8 @@
         "craue/config-bundle": "~1.4",
         "mnapoli/piwik-twig-extension": "^1.0",
         "lexik/maintenance-bundle": "~2.1",
-        "ocramius/proxy-manager": "1.*"
+        "ocramius/proxy-manager": "1.*",
+        "white-october/pagerfanta-bundle": "^1.0"
     },
     "require-dev": {
         "doctrine/doctrine-fixtures-bundle": "~2.2",
index a36f33922e8805ecd00d7727ddb13293f084c898..6dc1f1d7f5808d2345dacc6731bb4441ec46e80a 100644 (file)
@@ -3,14 +3,14 @@ services:
         class: Wallabag\CoreBundle\Helper\DetectActiveTheme
         arguments:
             - "@security.token_storage"
-            - %wallabag_core.theme%
+            - "%wallabag_core.theme%"
 
     # custom form type
     wallabag_core.form.type.config:
         class: Wallabag\CoreBundle\Form\Type\ConfigType
         arguments:
-            - %liip_theme.themes%
-            - %wallabag_core.languages%
+            - "%liip_theme.themes%"
+            - "%wallabag_core.languages%"
         tags:
             - { name: form.type }
 
@@ -32,7 +32,7 @@ services:
     wallabag_core.table_prefix_subscriber:
         class: Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber
         arguments:
-            - %database_table_prefix%
+            - "%database_table_prefix%"
         tags:
             - { name: doctrine.event_subscriber }
 
@@ -92,10 +92,10 @@ services:
         class: Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener
         arguments:
             - "@doctrine.orm.entity_manager"
-            - %wallabag_core.theme%
-            - %wallabag_core.items_on_page%
-            - %wallabag_core.rss_limit%
-            - %wallabag_core.language%
+            - "%wallabag_core.theme%"
+            - "%wallabag_core.items_on_page%"
+            - "%wallabag_core.rss_limit%"
+            - "%wallabag_core.language%"
         tags:
             - { name: kernel.event_subscriber }
 
index 1cb2ddf34f039d7a224752f67bfd7e6e726b1aca..ba430cc4aa9e048f0297b76561471d6453c17231 100755 (executable)
@@ -512,7 +512,7 @@ img.preview {
   width: 50%;
 }
 
-.pagination {
+div.pagination ul {
   text-align: right;
   margin-bottom:50px;
 }
@@ -523,25 +523,25 @@ img.preview {
   color: #999;
 }
 
-.pagination > * {
+div.pagination ul > * {
   display: inline-block;
   margin-left: 0.5em;
 }
 
-.pagination a {
+div.pagination ul a {
   color: #999;
   text-decoration: none;
 }
 
-  .pagination a:hover, .pagination a:focus {
+div.pagination ul a:hover, div.pagination ul a:focus {
     text-decoration: underline;
-  }
+}
 
-.pagination .disabled {
+div.pagination ul .disabled {
   display: none;
 }
 
-.pagination .current {
+div.pagination ul .current {
   height: 25px;
   padding: 4px 8px;
   border: 1px solid #d5d5d5;
index 96c38822e4133b7f79ce541435bc862570d7e2b2..a3915b1d90dc2490f024bae14d56783082a69bba 100755 (executable)
@@ -80,6 +80,14 @@ main, #content, .valign-wrapper {
     margin-bottom: 0;
 }
 
+.pagination {
+    float: right;
+}
+
+.pagination ul {
+    margin: 0 !important;
+}
+
 .pagination li {
     padding: 0;
 }
@@ -90,6 +98,18 @@ main, #content, .valign-wrapper {
     display: block;
 }
 
+.pagination li.active span {
+    padding: 0px 10px;
+    height: 30px;
+    display: block;
+    color: #fff;
+}
+
+.pagination .disabled {
+    margin-right: 10px;
+    margin-left: 10px;
+}
+
 .page-footer .footer-copyright p {
     display: inline;
 }
index 22f456daac03b2ce6b09f81c1d8cf5b38ac33537..04e519553fd880f2624d2eb405fe1dd28eb96713 100644 (file)
@@ -6,23 +6,16 @@
     {% block pager %}
         <div class="results">
             <div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
-                <div class="pagination">
+            <div class="pagination">
                 <a href="#" id="filter">{{ 'entry.filters.title'|trans }}</a>
-                {% if entries is not empty %}
-                    –
-                    {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
-                        <li>
-                            <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}" class="{{ currentPage == p ? 'current':''}}" >{{ p }}</a>
-                        </li>
-                    {% endfor %}
-                {% endif %}
+                {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
             </div>
         </div>
     {% endblock %}
 
     {% for entry in entries %}
         <div id="entry-{{ entry.id|e }}" class="entry">
-            <h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2>
+            <h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|raw }}">{{ entry.title|raw }}</a></h2>
 
             {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
             <div class="estimatedTime">
index 5687e48c936c240f4e26e1e516f33fbdf5d21da0..0b54556a46348172f36a33ba8e40c4532239e00c 100644 (file)
@@ -67,7 +67,6 @@
         <tr><td>doctrine/lexer</td><td>MIT</td></tr>
         <tr><td>doctrine/migrations</td><td>LGPL-2.1</td></tr>
         <tr><td>doctrine/orm</td><td>MIT</td></tr>
-        <tr><td>ezyang/htmlpurifier</td><td>LGPL</td></tr>
         <tr><td>friendsofsymfony/oauth-server-bundle</td><td>MIT</td></tr>
         <tr><td>friendsofsymfony/oauth2-php</td><td>MIT</td></tr>
         <tr><td>friendsofsymfony/rest-bundle</td><td>MIT</td></tr>
index 15eb16d43b4dcc005121e86c6e3a34459f596af1..05cab9549aab5eb2bce689bec1ba9dc49a078cca 100644 (file)
         <div class="nb-results left">
             {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
         </div>
-        <ul class="pagination right">
-            {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
-                <li class="{{ currentPage == p ? 'active':'waves-effect'}}">
-                    <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}">{{ p }}</a>
-                </li>
-            {% endfor %}
-        </ul>
+        {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
     </div>
     {% endblock %}
     <br />
@@ -48,7 +42,7 @@
                                 <i class="card-title grey-text text-darken-4 activator mdi-navigation-more-vert right"></i>
                             {% endif %}
 
-                            <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|striptags|slice(0, 42)|raw }}</a></span>
+                            <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|raw }}">{{ entry.title|striptags|slice(0, 42)|raw }}</a></span>
 
                             <div class="estimatedTime grey-text">
                                 <span class="tool reading-time">
index 4b1fdcce4691222c3cd0219f76ac04d0346eeff6..f77f092ee2be10757c1dd3519970029ac8e50d08 100644 (file)
@@ -76,7 +76,6 @@
                             <tr><td>doctrine/lexer</td><td>MIT</td></tr>
                             <tr><td>doctrine/migrations</td><td>LGPL-2.1</td></tr>
                             <tr><td>doctrine/orm</td><td>MIT</td></tr>
-                            <tr><td>ezyang/htmlpurifier</td><td>LGPL</td></tr>
                             <tr><td>friendsofsymfony/oauth-server-bundle</td><td>MIT</td></tr>
                             <tr><td>friendsofsymfony/oauth2-php</td><td>MIT</td></tr>
                             <tr><td>friendsofsymfony/rest-bundle</td><td>MIT</td></tr>
index 5260ca53bbba97f532435e71d9fdb950334dedfa..64ebd6318be8d3d17ee1c39a25741e553be1e20f 100644 (file)
@@ -522,7 +522,7 @@ class EntryControllerTest extends WallabagCoreTestCase
 
         $client->submit($form, $data);
 
-        $parameters = '?entry_filter%5BreadingTime%5D%5Bleft_number%5D=&amp;entry_filter%5BreadingTime%5D%5Bright_number%5D=';
+        $parameters = '?entry_filter%5BreadingTime%5D%5Bleft_number%5D=&entry_filter%5BreadingTime%5D%5Bright_number%5D=';
 
         $client->request('GET', 'unread/list'.$parameters);