diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-05-15 14:38:07 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-05-15 14:38:07 +0200 |
commit | 9f0957b831622ee577fa7d8f92ec0df6f3a8e274 (patch) | |
tree | 362e95af5fc0786e7934e0ab25764d90123bf997 /src | |
parent | 9e2194e9cb55acf0a715e36c33f9f9d8689e0761 (diff) | |
parent | 227a1a27f19604d64ffdfee56b4c8fc6b325bee6 (diff) | |
download | wallabag-9f0957b831622ee577fa7d8f92ec0df6f3a8e274.tar.gz wallabag-9f0957b831622ee577fa7d8f92ec0df6f3a8e274.tar.zst wallabag-9f0957b831622ee577fa7d8f92ec0df6f3a8e274.zip |
Merge remote-tracking branch 'origin/master' into 2.4
Diffstat (limited to 'src')
20 files changed, 62 insertions, 28 deletions
diff --git a/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php index c73173e8..9a7d116f 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php | |||
@@ -5,20 +5,39 @@ namespace Wallabag\CoreBundle\DataFixtures; | |||
5 | use Doctrine\Bundle\FixturesBundle\Fixture; | 5 | use Doctrine\Bundle\FixturesBundle\Fixture; |
6 | use Doctrine\Common\DataFixtures\DependentFixtureInterface; | 6 | use Doctrine\Common\DataFixtures\DependentFixtureInterface; |
7 | use Doctrine\Common\Persistence\ObjectManager; | 7 | use Doctrine\Common\Persistence\ObjectManager; |
8 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | ||
9 | use Symfony\Component\DependencyInjection\ContainerInterface; | ||
8 | use Wallabag\CoreBundle\Entity\SiteCredential; | 10 | use Wallabag\CoreBundle\Entity\SiteCredential; |
9 | use Wallabag\UserBundle\DataFixtures\UserFixtures; | 11 | use Wallabag\UserBundle\DataFixtures\UserFixtures; |
10 | 12 | ||
11 | class SiteCredentialFixtures extends Fixture implements DependentFixtureInterface | 13 | class SiteCredentialFixtures extends Fixture implements DependentFixtureInterface, ContainerAwareInterface |
12 | { | 14 | { |
13 | /** | 15 | /** |
16 | * @var ContainerInterface | ||
17 | */ | ||
18 | private $container; | ||
19 | |||
20 | public function setContainer(ContainerInterface $container = null) | ||
21 | { | ||
22 | $this->container = $container; | ||
23 | } | ||
24 | |||
25 | /** | ||
14 | * {@inheritdoc} | 26 | * {@inheritdoc} |
15 | */ | 27 | */ |
16 | public function load(ObjectManager $manager) | 28 | public function load(ObjectManager $manager) |
17 | { | 29 | { |
18 | $credential = new SiteCredential($this->getReference('admin-user')); | 30 | $credential = new SiteCredential($this->getReference('admin-user')); |
19 | $credential->setHost('example.com'); | 31 | $credential->setHost('.super.com'); |
20 | $credential->setUsername('foo'); | 32 | $credential->setUsername($this->container->get('wallabag_core.helper.crypto_proxy')->crypt('.super')); |
21 | $credential->setPassword('bar'); | 33 | $credential->setPassword($this->container->get('wallabag_core.helper.crypto_proxy')->crypt('bar')); |
34 | |||
35 | $manager->persist($credential); | ||
36 | |||
37 | $credential = new SiteCredential($this->getReference('admin-user')); | ||
38 | $credential->setHost('paywall.example.com'); | ||
39 | $credential->setUsername($this->container->get('wallabag_core.helper.crypto_proxy')->crypt('paywall.example')); | ||
40 | $credential->setPassword($this->container->get('wallabag_core.helper.crypto_proxy')->crypt('bar')); | ||
22 | 41 | ||
23 | $manager->persist($credential); | 42 | $manager->persist($credential); |
24 | 43 | ||
diff --git a/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php b/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php index 90e00c62..c7502bac 100644 --- a/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php +++ b/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php | |||
@@ -62,11 +62,24 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder | |||
62 | $host = substr($host, 4); | 62 | $host = substr($host, 4); |
63 | } | 63 | } |
64 | 64 | ||
65 | $credentials = null; | 65 | if (!$this->currentUser) { |
66 | if ($this->currentUser) { | 66 | $this->logger->debug('Auth: no current user defined.'); |
67 | $credentials = $this->credentialRepository->findOneByHostAndUser($host, $this->currentUser->getId()); | 67 | |
68 | return false; | ||
69 | } | ||
70 | |||
71 | $hosts = [$host]; | ||
72 | // will try to see for a host without the first subdomain (fr.example.org & .example.org) | ||
73 | $split = explode('.', $host); | ||
74 | |||
75 | if (\count($split) > 1) { | ||
76 | // remove first subdomain | ||
77 | array_shift($split); | ||
78 | $hosts[] = '.' . implode('.', $split); | ||
68 | } | 79 | } |
69 | 80 | ||
81 | $credentials = $this->credentialRepository->findOneByHostsAndUser($hosts, $this->currentUser->getId()); | ||
82 | |||
70 | if (null === $credentials) { | 83 | if (null === $credentials) { |
71 | $this->logger->debug('Auth: no credentials available for host.', ['host' => $host]); | 84 | $this->logger->debug('Auth: no credentials available for host.', ['host' => $host]); |
72 | 85 | ||
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index 31953f12..bc257ffb 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php | |||
@@ -47,6 +47,7 @@ class ContentProxy | |||
47 | */ | 47 | */ |
48 | public function updateEntry(Entry $entry, $url, array $content = [], $disableContentUpdate = false) | 48 | public function updateEntry(Entry $entry, $url, array $content = [], $disableContentUpdate = false) |
49 | { | 49 | { |
50 | $this->graby->toggleImgNoReferrer(true); | ||
50 | if (!empty($content['html'])) { | 51 | if (!empty($content['html'])) { |
51 | $content['html'] = $this->graby->cleanupHtml($content['html'], $url); | 52 | $content['html'] = $this->graby->cleanupHtml($content['html'], $url); |
52 | } | 53 | } |
diff --git a/src/Wallabag/CoreBundle/Repository/SiteCredentialRepository.php b/src/Wallabag/CoreBundle/Repository/SiteCredentialRepository.php index b2e212a4..aeadd770 100644 --- a/src/Wallabag/CoreBundle/Repository/SiteCredentialRepository.php +++ b/src/Wallabag/CoreBundle/Repository/SiteCredentialRepository.php | |||
@@ -19,16 +19,16 @@ class SiteCredentialRepository extends \Doctrine\ORM\EntityRepository | |||
19 | /** | 19 | /** |
20 | * Retrieve one username/password for the given host and userId. | 20 | * Retrieve one username/password for the given host and userId. |
21 | * | 21 | * |
22 | * @param string $host | 22 | * @param array $hosts An array of host to look for |
23 | * @param int $userId | 23 | * @param int $userId |
24 | * | 24 | * |
25 | * @return array|null | 25 | * @return array|null |
26 | */ | 26 | */ |
27 | public function findOneByHostAndUser($host, $userId) | 27 | public function findOneByHostsAndUser($hosts, $userId) |
28 | { | 28 | { |
29 | $res = $this->createQueryBuilder('s') | 29 | $res = $this->createQueryBuilder('s') |
30 | ->select('s.username', 's.password') | 30 | ->select('s.username', 's.password') |
31 | ->where('s.host = :hostname')->setParameter('hostname', $host) | 31 | ->where('s.host IN (:hosts)')->setParameter('hosts', $hosts) |
32 | ->andWhere('s.user = :userId')->setParameter('userId', $userId) | 32 | ->andWhere('s.user = :userId')->setParameter('userId', $userId) |
33 | ->setMaxResults(1) | 33 | ->setMaxResults(1) |
34 | ->getQuery() | 34 | ->getQuery() |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index 61ef3b8f..e04c2ff1 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -572,7 +572,7 @@ site_credential: | |||
572 | # create_new_one: Create a new credential | 572 | # create_new_one: Create a new credential |
573 | # form: | 573 | # form: |
574 | # username_label: 'Username' | 574 | # username_label: 'Username' |
575 | # host_label: 'Host' | 575 | # host_label: 'Host (subdomain.example.org, .example.org, etc.)' |
576 | # password_label: 'Password' | 576 | # password_label: 'Password' |
577 | # save: Save | 577 | # save: Save |
578 | # delete: Delete | 578 | # delete: Delete |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index 991e00f1..5a9668a9 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -563,7 +563,7 @@ site_credential: | |||
563 | create_new_one: 'Einen neuen Seitenzugang anlegen' | 563 | create_new_one: 'Einen neuen Seitenzugang anlegen' |
564 | form: | 564 | form: |
565 | username_label: 'Benutzername' | 565 | username_label: 'Benutzername' |
566 | host_label: 'Host' | 566 | host_label: 'Host (subdomain.example.org, .example.org, etc.)' |
567 | password_label: 'Passwort' | 567 | password_label: 'Passwort' |
568 | save: 'Speichern' | 568 | save: 'Speichern' |
569 | delete: 'Löschen' | 569 | delete: 'Löschen' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 5b875652..e2994f53 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -572,7 +572,7 @@ site_credential: | |||
572 | create_new_one: Create a new credential | 572 | create_new_one: Create a new credential |
573 | form: | 573 | form: |
574 | username_label: 'Username' | 574 | username_label: 'Username' |
575 | host_label: 'Host' | 575 | host_label: 'Host (subdomain.example.org, .example.org, etc.)' |
576 | password_label: 'Password' | 576 | password_label: 'Password' |
577 | save: Save | 577 | save: Save |
578 | delete: Delete | 578 | delete: Delete |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index 562b4191..d1ccfc81 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -572,7 +572,7 @@ site_credential: | |||
572 | # create_new_one: Create a new credential | 572 | # create_new_one: Create a new credential |
573 | # form: | 573 | # form: |
574 | # username_label: 'Username' | 574 | # username_label: 'Username' |
575 | # host_label: 'Host' | 575 | # host_label: 'Host (subdomain.example.org, .example.org, etc.)' |
576 | # password_label: 'Password' | 576 | # password_label: 'Password' |
577 | # save: Save | 577 | # save: Save |
578 | # delete: Delete | 578 | # delete: Delete |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index f360e0d6..e5d36bd3 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -572,7 +572,7 @@ site_credential: | |||
572 | # create_new_one: Create a new credential | 572 | # create_new_one: Create a new credential |
573 | # form: | 573 | # form: |
574 | # username_label: 'Username' | 574 | # username_label: 'Username' |
575 | # host_label: 'Host' | 575 | # host_label: 'Host (subdomain.example.org, .example.org, etc.)' |
576 | # password_label: 'Password' | 576 | # password_label: 'Password' |
577 | # save: Save | 577 | # save: Save |
578 | # delete: Delete | 578 | # delete: Delete |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 79f15154..0b1853a4 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -573,7 +573,7 @@ site_credential: | |||
573 | create_new_one: Créer un nouvel accès à un site | 573 | create_new_one: Créer un nouvel accès à un site |
574 | form: | 574 | form: |
575 | username_label: 'Identifiant' | 575 | username_label: 'Identifiant' |
576 | host_label: 'Domaine' | 576 | host_label: 'Domaine (subdomain.example.org, .example.org, etc.)' |
577 | password_label: 'Mot de passe' | 577 | password_label: 'Mot de passe' |
578 | save: "Sauvegarder" | 578 | save: "Sauvegarder" |
579 | delete: "Supprimer" | 579 | delete: "Supprimer" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index daef359f..0474d2bc 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | |||
@@ -571,7 +571,7 @@ site_credential: | |||
571 | # create_new_one: Create a new credential | 571 | # create_new_one: Create a new credential |
572 | # form: | 572 | # form: |
573 | # username_label: 'Username' | 573 | # username_label: 'Username' |
574 | # host_label: 'Host' | 574 | # host_label: 'Host (subdomain.example.org, .example.org, etc.)' |
575 | # password_label: 'Password' | 575 | # password_label: 'Password' |
576 | # save: Save | 576 | # save: Save |
577 | # delete: Delete | 577 | # delete: Delete |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index 980ddeb4..e761832e 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -571,7 +571,7 @@ site_credential: | |||
571 | create_new_one: Crear un novèl identificant | 571 | create_new_one: Crear un novèl identificant |
572 | form: | 572 | form: |
573 | username_label: "Nom d'utilizaire" | 573 | username_label: "Nom d'utilizaire" |
574 | host_label: 'Òste' | 574 | host_label: 'Òste (subdomain.example.org, .example.org, etc.)' |
575 | password_label: 'Senhal' | 575 | password_label: 'Senhal' |
576 | save: 'Enregistrar' | 576 | save: 'Enregistrar' |
577 | delete: 'Suprimir' | 577 | delete: 'Suprimir' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 3813ac37..f3d506e5 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -571,7 +571,7 @@ site_credential: | |||
571 | create_new_one: Stwórz nowe poświadczenie | 571 | create_new_one: Stwórz nowe poświadczenie |
572 | form: | 572 | form: |
573 | username_label: 'Nazwa użytkownika' | 573 | username_label: 'Nazwa użytkownika' |
574 | host_label: 'Host' | 574 | host_label: 'Host (subdomain.example.org, .example.org, etc.)' |
575 | password_label: 'Hasło' | 575 | password_label: 'Hasło' |
576 | save: Zapisz | 576 | save: Zapisz |
577 | delete: Usuń | 577 | delete: Usuń |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index 96943c05..6ddc1fc1 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml | |||
@@ -571,7 +571,7 @@ site_credential: | |||
571 | # create_new_one: Create a new credential | 571 | # create_new_one: Create a new credential |
572 | form: | 572 | form: |
573 | # username_label: 'Username' | 573 | # username_label: 'Username' |
574 | # host_label: 'Host' | 574 | # host_label: 'Host (subdomain.example.org, .example.org, etc.)' |
575 | # password_label: 'Password' | 575 | # password_label: 'Password' |
576 | save: 'Salvar' | 576 | save: 'Salvar' |
577 | delete: 'Apagar' | 577 | delete: 'Apagar' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 0ce11e74..8c0791f0 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -571,7 +571,7 @@ site_credential: | |||
571 | # create_new_one: Create a new credential | 571 | # create_new_one: Create a new credential |
572 | # form: | 572 | # form: |
573 | # username_label: 'Username' | 573 | # username_label: 'Username' |
574 | # host_label: 'Host' | 574 | # host_label: 'Host (subdomain.example.org, .example.org, etc.)' |
575 | # password_label: 'Password' | 575 | # password_label: 'Password' |
576 | # save: Save | 576 | # save: Save |
577 | # delete: Delete | 577 | # delete: Delete |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml index e04eee68..967ae427 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml | |||
@@ -569,7 +569,7 @@ site_credential: | |||
569 | create_new_one: สร้างข้อมูลส่วนตัวใหม่ | 569 | create_new_one: สร้างข้อมูลส่วนตัวใหม่ |
570 | form: | 570 | form: |
571 | username_label: 'ชื่อผู้ใช้' | 571 | username_label: 'ชื่อผู้ใช้' |
572 | host_label: 'โฮส' | 572 | host_label: 'โฮส (subdomain.example.org, .example.org, etc.)' |
573 | password_label: 'รหัสผ่าน' | 573 | password_label: 'รหัสผ่าน' |
574 | save: บันทึก | 574 | save: บันทึก |
575 | delete: ลบ | 575 | delete: ลบ |
diff --git a/src/Wallabag/CoreBundle/Resources/views/base.html.twig b/src/Wallabag/CoreBundle/Resources/views/base.html.twig index aa388bcb..c0eecd57 100644 --- a/src/Wallabag/CoreBundle/Resources/views/base.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/base.html.twig | |||
@@ -8,6 +8,7 @@ | |||
8 | {% block head %} | 8 | {% block head %} |
9 | <meta name="viewport" content="initial-scale=1.0"> | 9 | <meta name="viewport" content="initial-scale=1.0"> |
10 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 10 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
11 | <meta name="referrer" content="strict-origin-when-cross-origin"> | ||
11 | <!--[if IE]> | 12 | <!--[if IE]> |
12 | <meta http-equiv="X-UA-Compatible" content="IE=10"> | 13 | <meta http-equiv="X-UA-Compatible" content="IE=10"> |
13 | <![endif]--> | 14 | <![endif]--> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig index e1c7aad9..4294a60d 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig | |||
@@ -29,9 +29,6 @@ | |||
29 | <h1>{{ entry.title|e|raw }}</h1> | 29 | <h1>{{ entry.title|e|raw }}</h1> |
30 | <a href="{{ entry.url|e }}" target="_blank" rel="noopener" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e|raw }}" class="tool">{{ entry.domainName|removeWww }}</a> | 30 | <a href="{{ entry.url|e }}" target="_blank" rel="noopener" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e|raw }}" class="tool">{{ entry.domainName|removeWww }}</a> |
31 | <p class="shared-by">{{ "entry.public.shared_by_wallabag"|trans({'%wallabag_instance%': url('homepage'), '%username%': entry.user.username})|raw }}.</p> | 31 | <p class="shared-by">{{ "entry.public.shared_by_wallabag"|trans({'%wallabag_instance%': url('homepage'), '%username%': entry.user.username})|raw }}.</p> |
32 | {% if entry.previewPicture is not null %} | ||
33 | <img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|striptags|e('html_attr') }}" /> | ||
34 | {% endif %} | ||
35 | </header> | 32 | </header> |
36 | <article class="block"> | 33 | <article class="block"> |
37 | {{ entry.content | raw }} | 34 | {{ entry.content | raw }} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig index 1f3cd1a7..1102a0bd 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig | |||
@@ -8,8 +8,11 @@ | |||
8 | 8 | ||
9 | <div class="{{ subClass|default('original grey-text') }}"> | 9 | <div class="{{ subClass|default('original grey-text') }}"> |
10 | <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool grey-text">{{ entry.domainName|removeWww }}</a> | 10 | <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool grey-text">{{ entry.domainName|removeWww }}</a> |
11 | {% if withTags is defined %} | 11 | {% if withMetadata is defined %} |
12 | {% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags | slice(0, 3), 'entryId': entry.id, 'listClass': ' hide-on-med-and-down'} only %} | 12 | {% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags | slice(0, 3), 'entryId': entry.id, 'listClass': ' hide-on-med-and-down'} only %} |
13 | <div class="reading-time grey-text"> | ||
14 | <div class="card-reading-time">{% include "@WallabagCore/themes/material/Entry/_reading_time.html.twig" with {'entry': entry} only %}</div> | ||
15 | </div> | ||
13 | {% endif %} | 16 | {% endif %} |
14 | </div> | 17 | </div> |
15 | </div> | 18 | </div> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig index 1c00f2fa..6a095035 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig | |||
@@ -5,7 +5,7 @@ | |||
5 | <span class="preview{{ previewClassModifier }}" style="background-image: url({{ entry.previewPicture | default(asset('wallassets/themes/_global/img/logo-square.svg')) }})"></span> | 5 | <span class="preview{{ previewClassModifier }}" style="background-image: url({{ entry.previewPicture | default(asset('wallassets/themes/_global/img/logo-square.svg')) }})"></span> |
6 | </a> | 6 | </a> |
7 | </div> | 7 | </div> |
8 | {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withTags': true, 'subClass': 'metadata'} only %} | 8 | {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withMetadata': true, 'subClass': 'metadata'} only %} |
9 | <ul class="tools-list hide-on-small-only"> | 9 | <ul class="tools-list hide-on-small-only"> |
10 | <li> | 10 | <li> |
11 | <a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i></a> | 11 | <a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i></a> |