diff options
Diffstat (limited to 'src/Wallabag')
27 files changed, 158 insertions, 27 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index 6f161a08..7d820c7e 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php | |||
@@ -309,6 +309,7 @@ class EntryRestController extends WallabagRestController | |||
309 | * {"name"="published_at", "dataType"="datetime|integer", "format"="YYYY-MM-DDTHH:II:SS+TZ or a timestamp", "required"=false, "description"="Published date of the entry"}, | 309 | * {"name"="published_at", "dataType"="datetime|integer", "format"="YYYY-MM-DDTHH:II:SS+TZ or a timestamp", "required"=false, "description"="Published date of the entry"}, |
310 | * {"name"="authors", "dataType"="string", "format"="Name Firstname,author2,author3", "required"=false, "description"="Authors of the entry"}, | 310 | * {"name"="authors", "dataType"="string", "format"="Name Firstname,author2,author3", "required"=false, "description"="Authors of the entry"}, |
311 | * {"name"="public", "dataType"="integer", "required"=false, "format"="1 or 0", "description"="will generate a public link for the entry"}, | 311 | * {"name"="public", "dataType"="integer", "required"=false, "format"="1 or 0", "description"="will generate a public link for the entry"}, |
312 | * {"name"="origin_url", "dataType"="string", "required"=false, "format"="http://www.test.com/article.html", "description"="Origin url for the entry (from where you found it)."}, | ||
312 | * } | 313 | * } |
313 | * ) | 314 | * ) |
314 | * | 315 | * |
@@ -368,6 +369,10 @@ class EntryRestController extends WallabagRestController | |||
368 | $this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $data['tags']); | 369 | $this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $data['tags']); |
369 | } | 370 | } |
370 | 371 | ||
372 | if (!empty($data['origin_url'])) { | ||
373 | $entry->setOriginUrl($data['origin_url']); | ||
374 | } | ||
375 | |||
371 | if (null !== $data['isPublic']) { | 376 | if (null !== $data['isPublic']) { |
372 | if (true === (bool) $data['isPublic'] && null === $entry->getUid()) { | 377 | if (true === (bool) $data['isPublic'] && null === $entry->getUid()) { |
373 | $entry->generateUid(); | 378 | $entry->generateUid(); |
@@ -404,6 +409,7 @@ class EntryRestController extends WallabagRestController | |||
404 | * {"name"="published_at", "dataType"="datetime|integer", "format"="YYYY-MM-DDTHH:II:SS+TZ or a timestamp", "required"=false, "description"="Published date of the entry"}, | 409 | * {"name"="published_at", "dataType"="datetime|integer", "format"="YYYY-MM-DDTHH:II:SS+TZ or a timestamp", "required"=false, "description"="Published date of the entry"}, |
405 | * {"name"="authors", "dataType"="string", "format"="Name Firstname,author2,author3", "required"=false, "description"="Authors of the entry"}, | 410 | * {"name"="authors", "dataType"="string", "format"="Name Firstname,author2,author3", "required"=false, "description"="Authors of the entry"}, |
406 | * {"name"="public", "dataType"="integer", "required"=false, "format"="1 or 0", "description"="will generate a public link for the entry"}, | 411 | * {"name"="public", "dataType"="integer", "required"=false, "format"="1 or 0", "description"="will generate a public link for the entry"}, |
412 | * {"name"="origin_url", "dataType"="string", "required"=false, "format"="http://www.test.com/article.html", "description"="Origin url for the entry (from where you found it)."}, | ||
407 | * } | 413 | * } |
408 | * ) | 414 | * ) |
409 | * | 415 | * |
@@ -480,6 +486,10 @@ class EntryRestController extends WallabagRestController | |||
480 | } | 486 | } |
481 | } | 487 | } |
482 | 488 | ||
489 | if (!empty($data['origin_url'])) { | ||
490 | $entry->setOriginUrl($data['origin_url']); | ||
491 | } | ||
492 | |||
483 | $em = $this->getDoctrine()->getManager(); | 493 | $em = $this->getDoctrine()->getManager(); |
484 | $em->persist($entry); | 494 | $em->persist($entry); |
485 | $em->flush(); | 495 | $em->flush(); |
@@ -778,6 +788,7 @@ class EntryRestController extends WallabagRestController | |||
778 | 'picture' => $request->request->get('preview_picture'), | 788 | 'picture' => $request->request->get('preview_picture'), |
779 | 'publishedAt' => $request->request->get('published_at'), | 789 | 'publishedAt' => $request->request->get('published_at'), |
780 | 'authors' => $request->request->get('authors', ''), | 790 | 'authors' => $request->request->get('authors', ''), |
791 | 'origin_url' => $request->request->get('origin_url', ''), | ||
781 | ]; | 792 | ]; |
782 | } | 793 | } |
783 | 794 | ||
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 877dbfa2..dec2bf9c 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php | |||
@@ -61,7 +61,6 @@ class InstallCommand extends ContainerAwareCommand | |||
61 | ->setupDatabase() | 61 | ->setupDatabase() |
62 | ->setupAdmin() | 62 | ->setupAdmin() |
63 | ->setupConfig() | 63 | ->setupConfig() |
64 | ->runMigrations() | ||
65 | ; | 64 | ; |
66 | 65 | ||
67 | $this->io->success('Wallabag has been successfully installed.'); | 66 | $this->io->success('Wallabag has been successfully installed.'); |
@@ -70,7 +69,7 @@ class InstallCommand extends ContainerAwareCommand | |||
70 | 69 | ||
71 | protected function checkRequirements() | 70 | protected function checkRequirements() |
72 | { | 71 | { |
73 | $this->io->section('Step 1 of 5: Checking system requirements.'); | 72 | $this->io->section('Step 1 of 4: Checking system requirements.'); |
74 | 73 | ||
75 | $doctrineManager = $this->getContainer()->get('doctrine')->getManager(); | 74 | $doctrineManager = $this->getContainer()->get('doctrine')->getManager(); |
76 | 75 | ||
@@ -169,7 +168,7 @@ class InstallCommand extends ContainerAwareCommand | |||
169 | 168 | ||
170 | protected function setupDatabase() | 169 | protected function setupDatabase() |
171 | { | 170 | { |
172 | $this->io->section('Step 2 of 5: Setting up database.'); | 171 | $this->io->section('Step 2 of 4: Setting up database.'); |
173 | 172 | ||
174 | // user want to reset everything? Don't care about what is already here | 173 | // user want to reset everything? Don't care about what is already here |
175 | if (true === $this->defaultInput->getOption('reset')) { | 174 | if (true === $this->defaultInput->getOption('reset')) { |
@@ -178,7 +177,7 @@ class InstallCommand extends ContainerAwareCommand | |||
178 | $this | 177 | $this |
179 | ->runCommand('doctrine:database:drop', ['--force' => true]) | 178 | ->runCommand('doctrine:database:drop', ['--force' => true]) |
180 | ->runCommand('doctrine:database:create') | 179 | ->runCommand('doctrine:database:create') |
181 | ->runCommand('doctrine:schema:create') | 180 | ->runCommand('doctrine:migrations:migrate', ['--no-interaction' => true]) |
182 | ->runCommand('cache:clear') | 181 | ->runCommand('cache:clear') |
183 | ; | 182 | ; |
184 | 183 | ||
@@ -192,7 +191,7 @@ class InstallCommand extends ContainerAwareCommand | |||
192 | 191 | ||
193 | $this | 192 | $this |
194 | ->runCommand('doctrine:database:create') | 193 | ->runCommand('doctrine:database:create') |
195 | ->runCommand('doctrine:schema:create') | 194 | ->runCommand('doctrine:migrations:migrate', ['--no-interaction' => true]) |
196 | ->runCommand('cache:clear') | 195 | ->runCommand('cache:clear') |
197 | ; | 196 | ; |
198 | 197 | ||
@@ -207,7 +206,7 @@ class InstallCommand extends ContainerAwareCommand | |||
207 | $this | 206 | $this |
208 | ->runCommand('doctrine:database:drop', ['--force' => true]) | 207 | ->runCommand('doctrine:database:drop', ['--force' => true]) |
209 | ->runCommand('doctrine:database:create') | 208 | ->runCommand('doctrine:database:create') |
210 | ->runCommand('doctrine:schema:create') | 209 | ->runCommand('doctrine:migrations:migrate', ['--no-interaction' => true]) |
211 | ; | 210 | ; |
212 | } elseif ($this->isSchemaPresent()) { | 211 | } elseif ($this->isSchemaPresent()) { |
213 | if ($this->io->confirm('Seems like your database contains schema. Do you want to reset it?', false)) { | 212 | if ($this->io->confirm('Seems like your database contains schema. Do you want to reset it?', false)) { |
@@ -215,14 +214,14 @@ class InstallCommand extends ContainerAwareCommand | |||
215 | 214 | ||
216 | $this | 215 | $this |
217 | ->runCommand('doctrine:schema:drop', ['--force' => true]) | 216 | ->runCommand('doctrine:schema:drop', ['--force' => true]) |
218 | ->runCommand('doctrine:schema:create') | 217 | ->runCommand('doctrine:migrations:migrate', ['--no-interaction' => true]) |
219 | ; | 218 | ; |
220 | } | 219 | } |
221 | } else { | 220 | } else { |
222 | $this->io->text('Creating schema...'); | 221 | $this->io->text('Creating schema...'); |
223 | 222 | ||
224 | $this | 223 | $this |
225 | ->runCommand('doctrine:schema:create') | 224 | ->runCommand('doctrine:migrations:migrate', ['--no-interaction' => true]) |
226 | ; | 225 | ; |
227 | } | 226 | } |
228 | 227 | ||
@@ -237,7 +236,7 @@ class InstallCommand extends ContainerAwareCommand | |||
237 | 236 | ||
238 | protected function setupAdmin() | 237 | protected function setupAdmin() |
239 | { | 238 | { |
240 | $this->io->section('Step 3 of 5: Administration setup.'); | 239 | $this->io->section('Step 3 of 4: Administration setup.'); |
241 | 240 | ||
242 | if (!$this->io->confirm('Would you like to create a new admin user (recommended)?', true)) { | 241 | if (!$this->io->confirm('Would you like to create a new admin user (recommended)?', true)) { |
243 | return $this; | 242 | return $this; |
@@ -272,7 +271,7 @@ class InstallCommand extends ContainerAwareCommand | |||
272 | 271 | ||
273 | protected function setupConfig() | 272 | protected function setupConfig() |
274 | { | 273 | { |
275 | $this->io->section('Step 4 of 5: Config setup.'); | 274 | $this->io->section('Step 4 of 4: Config setup.'); |
276 | $em = $this->getContainer()->get('doctrine.orm.entity_manager'); | 275 | $em = $this->getContainer()->get('doctrine.orm.entity_manager'); |
277 | 276 | ||
278 | // cleanup before insert new stuff | 277 | // cleanup before insert new stuff |
@@ -293,18 +292,6 @@ class InstallCommand extends ContainerAwareCommand | |||
293 | return $this; | 292 | return $this; |
294 | } | 293 | } |
295 | 294 | ||
296 | protected function runMigrations() | ||
297 | { | ||
298 | $this->io->section('Step 5 of 5: Run migrations.'); | ||
299 | |||
300 | $this | ||
301 | ->runCommand('doctrine:migrations:migrate', ['--no-interaction' => true]); | ||
302 | |||
303 | $this->io->text('<info>Migrations successfully executed.</info>'); | ||
304 | |||
305 | return $this; | ||
306 | } | ||
307 | |||
308 | /** | 295 | /** |
309 | * Run a command. | 296 | * Run a command. |
310 | * | 297 | * |
diff --git a/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php b/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php index fa2066dc..548de744 100644 --- a/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php +++ b/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php | |||
@@ -24,6 +24,8 @@ class SiteCredentialController extends Controller | |||
24 | */ | 24 | */ |
25 | public function indexAction() | 25 | public function indexAction() |
26 | { | 26 | { |
27 | $this->isSiteCredentialsEnabled(); | ||
28 | |||
27 | $credentials = $this->get('wallabag_core.site_credential_repository')->findByUser($this->getUser()); | 29 | $credentials = $this->get('wallabag_core.site_credential_repository')->findByUser($this->getUser()); |
28 | 30 | ||
29 | return $this->render('WallabagCoreBundle:SiteCredential:index.html.twig', [ | 31 | return $this->render('WallabagCoreBundle:SiteCredential:index.html.twig', [ |
@@ -43,6 +45,8 @@ class SiteCredentialController extends Controller | |||
43 | */ | 45 | */ |
44 | public function newAction(Request $request) | 46 | public function newAction(Request $request) |
45 | { | 47 | { |
48 | $this->isSiteCredentialsEnabled(); | ||
49 | |||
46 | $credential = new SiteCredential($this->getUser()); | 50 | $credential = new SiteCredential($this->getUser()); |
47 | 51 | ||
48 | $form = $this->createForm('Wallabag\CoreBundle\Form\Type\SiteCredentialType', $credential); | 52 | $form = $this->createForm('Wallabag\CoreBundle\Form\Type\SiteCredentialType', $credential); |
@@ -83,6 +87,8 @@ class SiteCredentialController extends Controller | |||
83 | */ | 87 | */ |
84 | public function editAction(Request $request, SiteCredential $siteCredential) | 88 | public function editAction(Request $request, SiteCredential $siteCredential) |
85 | { | 89 | { |
90 | $this->isSiteCredentialsEnabled(); | ||
91 | |||
86 | $this->checkUserAction($siteCredential); | 92 | $this->checkUserAction($siteCredential); |
87 | 93 | ||
88 | $deleteForm = $this->createDeleteForm($siteCredential); | 94 | $deleteForm = $this->createDeleteForm($siteCredential); |
@@ -125,6 +131,8 @@ class SiteCredentialController extends Controller | |||
125 | */ | 131 | */ |
126 | public function deleteAction(Request $request, SiteCredential $siteCredential) | 132 | public function deleteAction(Request $request, SiteCredential $siteCredential) |
127 | { | 133 | { |
134 | $this->isSiteCredentialsEnabled(); | ||
135 | |||
128 | $this->checkUserAction($siteCredential); | 136 | $this->checkUserAction($siteCredential); |
129 | 137 | ||
130 | $form = $this->createDeleteForm($siteCredential); | 138 | $form = $this->createDeleteForm($siteCredential); |
@@ -145,6 +153,16 @@ class SiteCredentialController extends Controller | |||
145 | } | 153 | } |
146 | 154 | ||
147 | /** | 155 | /** |
156 | * Throw a 404 if the feature is disabled. | ||
157 | */ | ||
158 | private function isSiteCredentialsEnabled() | ||
159 | { | ||
160 | if (!$this->get('craue_config')->get('restricted_access')) { | ||
161 | throw $this->createNotFoundException('Feature "restricted_access" is disabled, controllers too.'); | ||
162 | } | ||
163 | } | ||
164 | |||
165 | /** | ||
148 | * Creates a form to delete a site credential entity. | 166 | * Creates a form to delete a site credential entity. |
149 | * | 167 | * |
150 | * @param SiteCredential $siteCredential The site credential entity | 168 | * @param SiteCredential $siteCredential The site credential entity |
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php index fedad009..0e1510a2 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php | |||
@@ -37,6 +37,7 @@ class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface | |||
37 | $entry2->setMimetype('text/html'); | 37 | $entry2->setMimetype('text/html'); |
38 | $entry2->setTitle('test title entry2'); | 38 | $entry2->setTitle('test title entry2'); |
39 | $entry2->setContent('This is my content /o/'); | 39 | $entry2->setContent('This is my content /o/'); |
40 | $entry2->setOriginUrl('ftp://oneftp.tld'); | ||
40 | $entry2->setLanguage('fr'); | 41 | $entry2->setLanguage('fr'); |
41 | 42 | ||
42 | $manager->persist($entry2); | 43 | $manager->persist($entry2); |
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index cfb8db75..2b1f2e05 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -245,6 +245,15 @@ class Entry | |||
245 | */ | 245 | */ |
246 | private $tags; | 246 | private $tags; |
247 | 247 | ||
248 | /** | ||
249 | * @var string | ||
250 | * | ||
251 | * @ORM\Column(name="origin_url", type="text", nullable=true) | ||
252 | * | ||
253 | * @Groups({"entries_for_user", "export_all"}) | ||
254 | */ | ||
255 | private $originUrl; | ||
256 | |||
248 | /* | 257 | /* |
249 | * @param User $user | 258 | * @param User $user |
250 | */ | 259 | */ |
@@ -831,4 +840,28 @@ class Entry | |||
831 | 840 | ||
832 | return $this; | 841 | return $this; |
833 | } | 842 | } |
843 | |||
844 | /** | ||
845 | * Set origin url. | ||
846 | * | ||
847 | * @param string $originUrl | ||
848 | * | ||
849 | * @return Entry | ||
850 | */ | ||
851 | public function setOriginUrl($originUrl) | ||
852 | { | ||
853 | $this->originUrl = $originUrl; | ||
854 | |||
855 | return $this; | ||
856 | } | ||
857 | |||
858 | /** | ||
859 | * Get origin url. | ||
860 | * | ||
861 | * @return string | ||
862 | */ | ||
863 | public function getOriginUrl() | ||
864 | { | ||
865 | return $this->originUrl; | ||
866 | } | ||
834 | } | 867 | } |
diff --git a/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php b/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php index 1627cc44..08355928 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php | |||
@@ -5,6 +5,7 @@ namespace Wallabag\CoreBundle\Form\Type; | |||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | 6 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; |
7 | use Symfony\Component\Form\Extension\Core\Type\TextType; | 7 | use Symfony\Component\Form\Extension\Core\Type\TextType; |
8 | use Symfony\Component\Form\Extension\Core\Type\UrlType; | ||
8 | use Symfony\Component\Form\FormBuilderInterface; | 9 | use Symfony\Component\Form\FormBuilderInterface; |
9 | use Symfony\Component\OptionsResolver\OptionsResolver; | 10 | use Symfony\Component\OptionsResolver\OptionsResolver; |
10 | 11 | ||
@@ -17,11 +18,16 @@ class EditEntryType extends AbstractType | |||
17 | 'required' => true, | 18 | 'required' => true, |
18 | 'label' => 'entry.edit.title_label', | 19 | 'label' => 'entry.edit.title_label', |
19 | ]) | 20 | ]) |
20 | ->add('url', TextType::class, [ | 21 | ->add('url', UrlType::class, [ |
21 | 'disabled' => true, | 22 | 'disabled' => true, |
22 | 'required' => false, | 23 | 'required' => false, |
23 | 'label' => 'entry.edit.url_label', | 24 | 'label' => 'entry.edit.url_label', |
24 | ]) | 25 | ]) |
26 | ->add('origin_url', UrlType::class, [ | ||
27 | 'required' => false, | ||
28 | 'property_path' => 'originUrl', | ||
29 | 'label' => 'entry.edit.origin_url_label', | ||
30 | ]) | ||
25 | ->add('save', SubmitType::class, [ | 31 | ->add('save', SubmitType::class, [ |
26 | 'label' => 'entry.edit.save_label', | 32 | 'label' => 'entry.edit.save_label', |
27 | ]) | 33 | ]) |
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index 854acb6a..4cc20c9c 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php | |||
@@ -24,8 +24,9 @@ class ContentProxy | |||
24 | protected $mimeGuesser; | 24 | protected $mimeGuesser; |
25 | protected $fetchingErrorMessage; | 25 | protected $fetchingErrorMessage; |
26 | protected $eventDispatcher; | 26 | protected $eventDispatcher; |
27 | protected $storeArticleHeaders; | ||
27 | 28 | ||
28 | public function __construct(Graby $graby, RuleBasedTagger $tagger, ValidatorInterface $validator, LoggerInterface $logger, $fetchingErrorMessage) | 29 | public function __construct(Graby $graby, RuleBasedTagger $tagger, ValidatorInterface $validator, LoggerInterface $logger, $fetchingErrorMessage, $storeArticleHeaders = false) |
29 | { | 30 | { |
30 | $this->graby = $graby; | 31 | $this->graby = $graby; |
31 | $this->tagger = $tagger; | 32 | $this->tagger = $tagger; |
@@ -33,6 +34,7 @@ class ContentProxy | |||
33 | $this->logger = $logger; | 34 | $this->logger = $logger; |
34 | $this->mimeGuesser = new MimeTypeExtensionGuesser(); | 35 | $this->mimeGuesser = new MimeTypeExtensionGuesser(); |
35 | $this->fetchingErrorMessage = $fetchingErrorMessage; | 36 | $this->fetchingErrorMessage = $fetchingErrorMessage; |
37 | $this->storeArticleHeaders = $storeArticleHeaders; | ||
36 | } | 38 | } |
37 | 39 | ||
38 | /** | 40 | /** |
@@ -185,7 +187,7 @@ class ContentProxy | |||
185 | $entry->setPublishedBy($content['authors']); | 187 | $entry->setPublishedBy($content['authors']); |
186 | } | 188 | } |
187 | 189 | ||
188 | if (!empty($content['all_headers'])) { | 190 | if (!empty($content['all_headers']) && $this->storeArticleHeaders) { |
189 | $entry->setHeaders($content['all_headers']); | 191 | $entry->setHeaders($content['all_headers']); |
190 | } | 192 | } |
191 | 193 | ||
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index 31b16739..85306276 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml | |||
@@ -94,6 +94,7 @@ services: | |||
94 | - "@validator" | 94 | - "@validator" |
95 | - "@logger" | 95 | - "@logger" |
96 | - '%wallabag_core.fetching_error_message%' | 96 | - '%wallabag_core.fetching_error_message%' |
97 | - '@=service(''craue_config'').get(''store_article_headers'')' | ||
97 | 98 | ||
98 | wallabag_core.tags_assigner: | 99 | wallabag_core.tags_assigner: |
99 | class: Wallabag\CoreBundle\Helper\TagsAssigner | 100 | class: Wallabag\CoreBundle\Helper\TagsAssigner |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index d0a38f7e..27dbb388 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -233,6 +233,7 @@ entry: | |||
233 | created_at: 'Oprettelsesdato' | 233 | created_at: 'Oprettelsesdato' |
234 | # published_at: 'Publication date' | 234 | # published_at: 'Publication date' |
235 | # published_by: 'Published by' | 235 | # published_by: 'Published by' |
236 | # provided_by: 'Provided by' | ||
236 | new: | 237 | new: |
237 | page_title: 'Gem ny artikel' | 238 | page_title: 'Gem ny artikel' |
238 | placeholder: 'http://website.com' | 239 | placeholder: 'http://website.com' |
@@ -244,6 +245,7 @@ entry: | |||
244 | # page_title: 'Edit an entry' | 245 | # page_title: 'Edit an entry' |
245 | # title_label: 'Title' | 246 | # title_label: 'Title' |
246 | url_label: 'Url' | 247 | url_label: 'Url' |
248 | # origin_url_label: 'Origin url (from where you found that entry)' | ||
247 | save_label: 'Gem' | 249 | save_label: 'Gem' |
248 | public: | 250 | public: |
249 | # shared_by_wallabag: "This article has been shared by %username% with <a href='%wallabag_instance%'>wallabag</a>" | 251 | # shared_by_wallabag: "This article has been shared by %username% with <a href='%wallabag_instance%'>wallabag</a>" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index 158762a9..d47986e5 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -233,6 +233,7 @@ entry: | |||
233 | created_at: 'Erstellungsdatum' | 233 | created_at: 'Erstellungsdatum' |
234 | published_at: 'Erscheinungsdatum' | 234 | published_at: 'Erscheinungsdatum' |
235 | published_by: 'Veröffentlicht von' | 235 | published_by: 'Veröffentlicht von' |
236 | # provided_by: 'Provided by' | ||
236 | new: | 237 | new: |
237 | page_title: 'Neuen Artikel speichern' | 238 | page_title: 'Neuen Artikel speichern' |
238 | placeholder: 'https://website.de' | 239 | placeholder: 'https://website.de' |
@@ -244,6 +245,7 @@ entry: | |||
244 | page_title: 'Eintrag bearbeiten' | 245 | page_title: 'Eintrag bearbeiten' |
245 | title_label: 'Titel' | 246 | title_label: 'Titel' |
246 | url_label: 'URL' | 247 | url_label: 'URL' |
248 | # origin_url_label: 'Origin url (from where you found that entry)' | ||
247 | save_label: 'Speichern' | 249 | save_label: 'Speichern' |
248 | public: | 250 | public: |
249 | shared_by_wallabag: 'Dieser Artikel wurde von %username% mittels <a href="%wallabag_instance%">wallabag</a> geteilt' | 251 | shared_by_wallabag: 'Dieser Artikel wurde von %username% mittels <a href="%wallabag_instance%">wallabag</a> geteilt' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index de3e11fe..bbaecb24 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -233,6 +233,7 @@ entry: | |||
233 | created_at: 'Creation date' | 233 | created_at: 'Creation date' |
234 | published_at: 'Publication date' | 234 | published_at: 'Publication date' |
235 | published_by: 'Published by' | 235 | published_by: 'Published by' |
236 | provided_by: 'Provided by' | ||
236 | new: | 237 | new: |
237 | page_title: 'Save new entry' | 238 | page_title: 'Save new entry' |
238 | placeholder: 'http://website.com' | 239 | placeholder: 'http://website.com' |
@@ -244,6 +245,7 @@ entry: | |||
244 | page_title: 'Edit an entry' | 245 | page_title: 'Edit an entry' |
245 | title_label: 'Title' | 246 | title_label: 'Title' |
246 | url_label: 'Url' | 247 | url_label: 'Url' |
248 | origin_url_label: 'Origin url (from where you found that entry)' | ||
247 | save_label: 'Save' | 249 | save_label: 'Save' |
248 | public: | 250 | public: |
249 | shared_by_wallabag: "This article has been shared by %username% with <a href='%wallabag_instance%'>wallabag</a>" | 251 | shared_by_wallabag: "This article has been shared by %username% with <a href='%wallabag_instance%'>wallabag</a>" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index 6dfc1525..e3b625f7 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -233,6 +233,7 @@ entry: | |||
233 | created_at: 'Fecha de creación' | 233 | created_at: 'Fecha de creación' |
234 | # published_at: 'Publication date' | 234 | # published_at: 'Publication date' |
235 | # published_by: 'Published by' | 235 | # published_by: 'Published by' |
236 | # provided_by: 'Provided by' | ||
236 | new: | 237 | new: |
237 | page_title: 'Guardar un nuevo artículo' | 238 | page_title: 'Guardar un nuevo artículo' |
238 | placeholder: 'http://sitioweb.com' | 239 | placeholder: 'http://sitioweb.com' |
@@ -244,6 +245,7 @@ entry: | |||
244 | page_title: 'Editar un artículo' | 245 | page_title: 'Editar un artículo' |
245 | title_label: 'Título' | 246 | title_label: 'Título' |
246 | url_label: 'URL' | 247 | url_label: 'URL' |
248 | # origin_url_label: 'Origin url (from where you found that entry)' | ||
247 | save_label: 'Guardar' | 249 | save_label: 'Guardar' |
248 | public: | 250 | public: |
249 | shared_by_wallabag: "Este artículo se ha compartido con <a href='%wallabag_instance%'>wallabag</a>" | 251 | shared_by_wallabag: "Este artículo se ha compartido con <a href='%wallabag_instance%'>wallabag</a>" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index ffc48933..c03cca46 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -233,6 +233,7 @@ entry: | |||
233 | created_at: 'زمان ساخت' | 233 | created_at: 'زمان ساخت' |
234 | # published_at: 'Publication date' | 234 | # published_at: 'Publication date' |
235 | # published_by: 'Published by' | 235 | # published_by: 'Published by' |
236 | # provided_by: 'Provided by' | ||
236 | new: | 237 | new: |
237 | page_title: 'ذخیرهٔ مقالهٔ تازه' | 238 | page_title: 'ذخیرهٔ مقالهٔ تازه' |
238 | placeholder: 'http://website.com' | 239 | placeholder: 'http://website.com' |
@@ -244,6 +245,7 @@ entry: | |||
244 | page_title: 'ویرایش مقاله' | 245 | page_title: 'ویرایش مقاله' |
245 | title_label: 'عنوان' | 246 | title_label: 'عنوان' |
246 | url_label: 'نشانی' | 247 | url_label: 'نشانی' |
248 | # origin_url_label: 'Origin url (from where you found that entry)' | ||
247 | save_label: 'ذخیره' | 249 | save_label: 'ذخیره' |
248 | public: | 250 | public: |
249 | # shared_by_wallabag: "This article has been shared by %username% with <a href='%wallabag_instance%'>wallabag</a>" | 251 | # shared_by_wallabag: "This article has been shared by %username% with <a href='%wallabag_instance%'>wallabag</a>" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index c9d95e2b..b0037ad2 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -233,6 +233,7 @@ entry: | |||
233 | created_at: "Date de création" | 233 | created_at: "Date de création" |
234 | published_at: "Date de publication" | 234 | published_at: "Date de publication" |
235 | published_by: "Publié par" | 235 | published_by: "Publié par" |
236 | provided_by: "Fourni par" | ||
236 | new: | 237 | new: |
237 | page_title: "Sauvegarder un nouvel article" | 238 | page_title: "Sauvegarder un nouvel article" |
238 | placeholder: "http://website.com" | 239 | placeholder: "http://website.com" |
@@ -244,6 +245,7 @@ entry: | |||
244 | page_title: "Éditer un article" | 245 | page_title: "Éditer un article" |
245 | title_label: "Titre" | 246 | title_label: "Titre" |
246 | url_label: "Adresse" | 247 | url_label: "Adresse" |
248 | origin_url_label: "Adresse d'origine (d'où vous avez trouvé cet article)" | ||
247 | save_label: "Enregistrer" | 249 | save_label: "Enregistrer" |
248 | public: | 250 | public: |
249 | shared_by_wallabag: "Cet article a été partagé par %username% avec <a href=\"%wallabag_instance%\">wallabag</a>" | 251 | shared_by_wallabag: "Cet article a été partagé par %username% avec <a href=\"%wallabag_instance%\">wallabag</a>" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index c53266ca..56cf341b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | |||
@@ -233,6 +233,7 @@ entry: | |||
233 | created_at: 'Data di creazione' | 233 | created_at: 'Data di creazione' |
234 | published_at: 'Data di pubblicazione' | 234 | published_at: 'Data di pubblicazione' |
235 | published_by: 'Pubblicato da' | 235 | published_by: 'Pubblicato da' |
236 | # provided_by: 'Provided by' | ||
236 | new: | 237 | new: |
237 | page_title: 'Salva un nuovo contenuto' | 238 | page_title: 'Salva un nuovo contenuto' |
238 | placeholder: 'http://website.com' | 239 | placeholder: 'http://website.com' |
@@ -244,6 +245,7 @@ entry: | |||
244 | page_title: 'Modifica voce' | 245 | page_title: 'Modifica voce' |
245 | title_label: 'Titolo' | 246 | title_label: 'Titolo' |
246 | url_label: 'Url' | 247 | url_label: 'Url' |
248 | # origin_url_label: 'Origin url (from where you found that entry)' | ||
247 | save_label: 'Salva' | 249 | save_label: 'Salva' |
248 | public: | 250 | public: |
249 | shared_by_wallabag: "Questo articolo è stato condiviso da %username% con <a href='%wallabag_instance%'>wallabag</a>" | 251 | shared_by_wallabag: "Questo articolo è stato condiviso da %username% con <a href='%wallabag_instance%'>wallabag</a>" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index 3ae64c49..1b5b221f 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -233,6 +233,7 @@ entry: | |||
233 | created_at: 'Data de creacion' | 233 | created_at: 'Data de creacion' |
234 | published_at: 'Data de publicacion' | 234 | published_at: 'Data de publicacion' |
235 | published_by: 'Publicat per' | 235 | published_by: 'Publicat per' |
236 | # provided_by: 'Provided by' | ||
236 | new: | 237 | new: |
237 | page_title: 'Enregistrar un novèl article' | 238 | page_title: 'Enregistrar un novèl article' |
238 | placeholder: 'http://website.com' | 239 | placeholder: 'http://website.com' |
@@ -244,6 +245,7 @@ entry: | |||
244 | page_title: 'Modificar un article' | 245 | page_title: 'Modificar un article' |
245 | title_label: 'Títol' | 246 | title_label: 'Títol' |
246 | url_label: 'Url' | 247 | url_label: 'Url' |
248 | # origin_url_label: 'Origin url (from where you found that entry)' | ||
247 | save_label: 'Enregistrar' | 249 | save_label: 'Enregistrar' |
248 | public: | 250 | public: |
249 | shared_by_wallabag: "Aqueste article es estat partejat per <a href='%wallabag_instance%'>wallabag</a>" | 251 | shared_by_wallabag: "Aqueste article es estat partejat per <a href='%wallabag_instance%'>wallabag</a>" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index e642c530..88f35738 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -233,6 +233,7 @@ entry: | |||
233 | created_at: 'Czas stworzenia' | 233 | created_at: 'Czas stworzenia' |
234 | published_at: 'Data publikacji' | 234 | published_at: 'Data publikacji' |
235 | published_by: 'Opublikowane przez' | 235 | published_by: 'Opublikowane przez' |
236 | # provided_by: 'Provided by' | ||
236 | new: | 237 | new: |
237 | page_title: 'Zapisz nowy wpis' | 238 | page_title: 'Zapisz nowy wpis' |
238 | placeholder: 'http://website.com' | 239 | placeholder: 'http://website.com' |
@@ -244,6 +245,7 @@ entry: | |||
244 | page_title: 'Edytuj wpis' | 245 | page_title: 'Edytuj wpis' |
245 | title_label: 'Tytuł' | 246 | title_label: 'Tytuł' |
246 | url_label: 'Adres URL' | 247 | url_label: 'Adres URL' |
248 | # origin_url_label: 'Origin url (from where you found that entry)' | ||
247 | save_label: 'Zapisz' | 249 | save_label: 'Zapisz' |
248 | public: | 250 | public: |
249 | shared_by_wallabag: "Ten artykuł został udostępniony przez <a href='%wallabag_instance%'>wallabag</a>" | 251 | shared_by_wallabag: "Ten artykuł został udostępniony przez <a href='%wallabag_instance%'>wallabag</a>" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index 9b3fea6b..3987cec3 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml | |||
@@ -233,6 +233,7 @@ entry: | |||
233 | created_at: 'Data de criação' | 233 | created_at: 'Data de criação' |
234 | # published_at: 'Publication date' | 234 | # published_at: 'Publication date' |
235 | # published_by: 'Published by' | 235 | # published_by: 'Published by' |
236 | # provided_by: 'Provided by' | ||
236 | new: | 237 | new: |
237 | page_title: 'Salvar nova entrada' | 238 | page_title: 'Salvar nova entrada' |
238 | placeholder: 'http://website.com' | 239 | placeholder: 'http://website.com' |
@@ -244,6 +245,7 @@ entry: | |||
244 | page_title: 'Editar uma entrada' | 245 | page_title: 'Editar uma entrada' |
245 | title_label: 'Título' | 246 | title_label: 'Título' |
246 | url_label: 'Url' | 247 | url_label: 'Url' |
248 | # origin_url_label: 'Origin url (from where you found that entry)' | ||
247 | save_label: 'Salvar' | 249 | save_label: 'Salvar' |
248 | public: | 250 | public: |
249 | shared_by_wallabag: "Este artigo foi compartilhado pelo <a href='%wallabag_instance%'>wallabag</a>" | 251 | shared_by_wallabag: "Este artigo foi compartilhado pelo <a href='%wallabag_instance%'>wallabag</a>" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 673ca183..4d2fd569 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -233,6 +233,7 @@ entry: | |||
233 | created_at: 'Data creării' | 233 | created_at: 'Data creării' |
234 | # published_at: 'Publication date' | 234 | # published_at: 'Publication date' |
235 | # published_by: 'Published by' | 235 | # published_by: 'Published by' |
236 | # provided_by: 'Provided by' | ||
236 | new: | 237 | new: |
237 | page_title: 'Salvează un nou articol' | 238 | page_title: 'Salvează un nou articol' |
238 | placeholder: 'http://website.com' | 239 | placeholder: 'http://website.com' |
@@ -244,6 +245,7 @@ entry: | |||
244 | # page_title: 'Edit an entry' | 245 | # page_title: 'Edit an entry' |
245 | # title_label: 'Title' | 246 | # title_label: 'Title' |
246 | url_label: 'Url' | 247 | url_label: 'Url' |
248 | # origin_url_label: 'Origin url (from where you found that entry)' | ||
247 | save_label: 'Salvează' | 249 | save_label: 'Salvează' |
248 | public: | 250 | public: |
249 | # shared_by_wallabag: "This article has been shared by %username% with <a href='%wallabag_instance%'>wallabag</a>" | 251 | # shared_by_wallabag: "This article has been shared by %username% with <a href='%wallabag_instance%'>wallabag</a>" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml index eceecabf..a560e58d 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml | |||
@@ -223,6 +223,7 @@ entry: | |||
223 | original_article: 'оригинал' | 223 | original_article: 'оригинал' |
224 | annotations_on_the_entry: '{0} Нет аннотации|{1} Одна аннотация|]1,Inf[ %count% аннотаций' | 224 | annotations_on_the_entry: '{0} Нет аннотации|{1} Одна аннотация|]1,Inf[ %count% аннотаций' |
225 | created_at: 'Дата создания' | 225 | created_at: 'Дата создания' |
226 | # provided_by: 'Provided by' | ||
226 | new: | 227 | new: |
227 | page_title: 'Сохранить новую запись' | 228 | page_title: 'Сохранить новую запись' |
228 | placeholder: 'http://website.com' | 229 | placeholder: 'http://website.com' |
@@ -234,6 +235,7 @@ entry: | |||
234 | page_title: 'Изменить запись' | 235 | page_title: 'Изменить запись' |
235 | title_label: 'Название' | 236 | title_label: 'Название' |
236 | url_label: 'Ссылка' | 237 | url_label: 'Ссылка' |
238 | # origin_url_label: 'Origin url (from where you found that entry)' | ||
237 | is_public_label: 'Публичная' | 239 | is_public_label: 'Публичная' |
238 | save_label: 'Сохранить' | 240 | save_label: 'Сохранить' |
239 | public: | 241 | public: |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index 563bc50b..0fd6e989 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | |||
@@ -231,6 +231,7 @@ entry: | |||
231 | created_at: 'Oluşturulma tarihi' | 231 | created_at: 'Oluşturulma tarihi' |
232 | # published_at: 'Publication date' | 232 | # published_at: 'Publication date' |
233 | # published_by: 'Published by' | 233 | # published_by: 'Published by' |
234 | # provided_by: 'Provided by' | ||
234 | new: | 235 | new: |
235 | page_title: 'Yeni makaleyi kaydet' | 236 | page_title: 'Yeni makaleyi kaydet' |
236 | placeholder: 'http://website.com' | 237 | placeholder: 'http://website.com' |
@@ -242,6 +243,7 @@ entry: | |||
242 | page_title: 'Makaleyi düzenle' | 243 | page_title: 'Makaleyi düzenle' |
243 | title_label: 'Başlık' | 244 | title_label: 'Başlık' |
244 | url_label: 'Url' | 245 | url_label: 'Url' |
246 | # origin_url_label: 'Origin url (from where you found that entry)' | ||
245 | save_label: 'Kaydet' | 247 | save_label: 'Kaydet' |
246 | public: | 248 | public: |
247 | # shared_by_wallabag: "This article has been shared by %username% with <a href='%wallabag_instance%'>wallabag</a>" | 249 | # shared_by_wallabag: "This article has been shared by %username% with <a href='%wallabag_instance%'>wallabag</a>" |
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 f8723189..0c7cbaa6 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 | |||
@@ -71,6 +71,14 @@ | |||
71 | </i> | 71 | </i> |
72 | 72 | ||
73 | <span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> | 73 | <span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> |
74 | |||
75 | {% if entry.originUrl is not empty %} | ||
76 | <i class="material-icons" title="{{ 'entry.view.provided_by'|trans }}">launch</i> | ||
77 | <a href="{{ entry.originUrl|e }}" target="_blank" class="tool"> | ||
78 | {{ entry.originUrl|striptags|removeSchemeAndWww|truncate(32) }} | ||
79 | </a> | ||
80 | {% endif %} | ||
81 | |||
74 | <aside class="tags"> | 82 | <aside class="tags"> |
75 | <div class="card-entry-tags"> | 83 | <div class="card-entry-tags"> |
76 | {% for tag in entry.tags %} | 84 | {% for tag in entry.tags %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/edit.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/edit.html.twig index b9537975..ed225957 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/edit.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/edit.html.twig | |||
@@ -27,6 +27,11 @@ | |||
27 | {{ form_label(form.url) }} | 27 | {{ form_label(form.url) }} |
28 | {{ form_widget(form.url) }} | 28 | {{ form_widget(form.url) }} |
29 | </div> | 29 | </div> |
30 | |||
31 | <div class="input-field s12"> | ||
32 | {{ form_label(form.origin_url) }} | ||
33 | {{ form_widget(form.origin_url) }} | ||
34 | </div> | ||
30 | <br> | 35 | <br> |
31 | 36 | ||
32 | {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} | 37 | {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} |
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 4cff7bf2..019569f7 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 | |||
@@ -125,7 +125,7 @@ | |||
125 | {% endif %} | 125 | {% endif %} |
126 | {% if craue_setting('share_shaarli') %} | 126 | {% if craue_setting('share_shaarli') %} |
127 | <li> | 127 | <li> |
128 | <a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|striptags|url_encode }}&tags={{ entry.tags|join(',')|striptags|url_encode }}" target="_blank" title="shaarli" class="tool icon-image shaarli"> | 128 | <a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|striptags|url_encode }}&tags={{ entry.tags|join(',')|striptags|url_encode }}&lf_original_url={{ entry.originUrl|url_encode }}" target="_blank" title="shaarli" class="tool icon-image shaarli"> |
129 | <span>shaarli</span> | 129 | <span>shaarli</span> |
130 | </a> | 130 | </a> |
131 | </li> | 131 | </li> |
@@ -249,6 +249,14 @@ | |||
249 | <i class="material-icons link">comment</i> | 249 | <i class="material-icons link">comment</i> |
250 | {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }} | 250 | {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }} |
251 | </li> | 251 | </li> |
252 | {% if entry.originUrl is not empty %} | ||
253 | <li> | ||
254 | <i class="material-icons" title="{{ 'entry.view.provided_by'|trans }}">launch</i> | ||
255 | <a href="{{ entry.originUrl|e }}" target="_blank" class="tool"> | ||
256 | {{ entry.originUrl|striptags|removeSchemeAndWww|truncate(32) }} | ||
257 | </a> | ||
258 | </li> | ||
259 | {% endif %} | ||
252 | </ul> | 260 | </ul> |
253 | <ul class="tags"> | 261 | <ul class="tags"> |
254 | {% for tag in entry.tags %} | 262 | {% for tag in entry.tags %} |
diff --git a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php index 351172c4..8992117e 100644 --- a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php +++ b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php | |||
@@ -28,6 +28,7 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa | |||
28 | { | 28 | { |
29 | return [ | 29 | return [ |
30 | new \Twig_SimpleFilter('removeWww', [$this, 'removeWww']), | 30 | new \Twig_SimpleFilter('removeWww', [$this, 'removeWww']), |
31 | new \Twig_SimpleFilter('removeSchemeAndWww', [$this, 'removeSchemeAndWww']), | ||
31 | ]; | 32 | ]; |
32 | } | 33 | } |
33 | 34 | ||
@@ -45,6 +46,13 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa | |||
45 | return preg_replace('/^www\./i', '', $url); | 46 | return preg_replace('/^www\./i', '', $url); |
46 | } | 47 | } |
47 | 48 | ||
49 | public function removeSchemeAndWww($url) | ||
50 | { | ||
51 | return $this->removeWww( | ||
52 | preg_replace('@^https?://@i', '', $url) | ||
53 | ); | ||
54 | } | ||
55 | |||
48 | /** | 56 | /** |
49 | * Return number of entries depending of the type (unread, archive, starred or all). | 57 | * Return number of entries depending of the type (unread, archive, starred or all). |
50 | * | 58 | * |
diff --git a/src/Wallabag/ImportBundle/Consumer/RedisEntryConsumer.php b/src/Wallabag/ImportBundle/Consumer/RedisEntryConsumer.php index 450b71ff..862d0c43 100644 --- a/src/Wallabag/ImportBundle/Consumer/RedisEntryConsumer.php +++ b/src/Wallabag/ImportBundle/Consumer/RedisEntryConsumer.php | |||
@@ -21,9 +21,26 @@ class RedisEntryConsumer extends AbstractConsumer implements Job | |||
21 | /** | 21 | /** |
22 | * Should tell if the given job will kill the worker. | 22 | * Should tell if the given job will kill the worker. |
23 | * We don't want to stop it :). | 23 | * We don't want to stop it :). |
24 | * | ||
25 | * @param string $job Content of the message (directly from Redis) | ||
26 | * | ||
27 | * @return false | ||
24 | */ | 28 | */ |
25 | public function isStopJob($job) | 29 | public function isStopJob($job) |
26 | { | 30 | { |
27 | return false; | 31 | return false; |
28 | } | 32 | } |
33 | |||
34 | /** | ||
35 | * This abstract method is only used when we use one queue for multiple job type. | ||
36 | * We don't do that, so we'll always return true. | ||
37 | * | ||
38 | * @param string $job Content of the message (directly from Redis) | ||
39 | * | ||
40 | * @return true | ||
41 | */ | ||
42 | public function isMyJob($job) | ||
43 | { | ||
44 | return true; | ||
45 | } | ||
29 | } | 46 | } |
diff --git a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.en.yml b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.en.yml index ee0a27d5..5fc57617 100644 --- a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.en.yml +++ b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.en.yml | |||
@@ -5,7 +5,7 @@ auth_code: | |||
5 | subject: 'wallabag authentication code' | 5 | subject: 'wallabag authentication code' |
6 | body: | 6 | body: |
7 | hello: "Hi %user%," | 7 | hello: "Hi %user%," |
8 | first_para: "Since you enable two factor authentication on your wallabag account and you just logged in from a new device (computer, phone, etc.), we send you a code to validate your connection." | 8 | first_para: "Since you require two factor authentication to log in on your wallabag account, and a new device just used it, we send you a code to validate its connection." |
9 | second_para: "Here is the code:" | 9 | second_para: "Here is the code:" |
10 | support: "Please don't hesitate to contact us if you have any problems:" | 10 | support: "Please don't hesitate to contact us if you have any problems:" |
11 | signature: "The wallabag team" | 11 | signature: "The wallabag team" |