Move Import templates to Core

This commit is contained in:
Yassine Guedidi 2023-12-31 22:07:37 +01:00
parent 057dbf0066
commit 8b13631e3d
28 changed files with 28 additions and 28 deletions

View file

@ -46,6 +46,6 @@ class ChromeController extends BrowserController
protected function getImportTemplate() protected function getImportTemplate()
{ {
return '@WallabagImport/Chrome/index.html.twig'; return '@WallabagCore/Import/Chrome/index.html.twig';
} }
} }

View file

@ -76,7 +76,7 @@ class DeliciousController extends AbstractController
$this->addFlash('notice', 'flashes.import.notice.failed_on_file'); $this->addFlash('notice', 'flashes.import.notice.failed_on_file');
} }
return $this->render('@WallabagImport/Delicious/index.html.twig', [ return $this->render('@WallabagCore/Import/Delicious/index.html.twig', [
'form' => $form->createView(), 'form' => $form->createView(),
'import' => $delicious, 'import' => $delicious,
]); ]);

View file

@ -46,6 +46,6 @@ class ElcuratorController extends WallabagController
protected function getImportTemplate() protected function getImportTemplate()
{ {
return '@WallabagImport/Elcurator/index.html.twig'; return '@WallabagCore/Import/Elcurator/index.html.twig';
} }
} }

View file

@ -46,6 +46,6 @@ class FirefoxController extends BrowserController
protected function getImportTemplate() protected function getImportTemplate()
{ {
return '@WallabagImport/Firefox/index.html.twig'; return '@WallabagCore/Import/Firefox/index.html.twig';
} }
} }

View file

@ -24,7 +24,7 @@ class ImportController extends AbstractController
*/ */
public function importAction(ImportChain $importChain) public function importAction(ImportChain $importChain)
{ {
return $this->render('@WallabagImport/Import/index.html.twig', [ return $this->render('@WallabagCore/Import/index.html.twig', [
'imports' => $importChain->getAll(), 'imports' => $importChain->getAll(),
]); ]);
} }
@ -41,7 +41,7 @@ class ImportController extends AbstractController
$rabbitNotInstalled = false; $rabbitNotInstalled = false;
if (!$authorizationChecker->isGranted('ROLE_SUPER_ADMIN')) { if (!$authorizationChecker->isGranted('ROLE_SUPER_ADMIN')) {
return $this->render('@WallabagImport/Import/check_queue.html.twig'); return $this->render('@WallabagCore/Import/check_queue.html.twig');
} }
if ($craueConfig->get('import_with_rabbitmq')) { if ($craueConfig->get('import_with_rabbitmq')) {
@ -85,7 +85,7 @@ class ImportController extends AbstractController
} }
} }
return $this->render('@WallabagImport/Import/check_queue.html.twig', [ return $this->render('@WallabagCore/Import/check_queue.html.twig', [
'nbRedisMessages' => $nbRedisMessages, 'nbRedisMessages' => $nbRedisMessages,
'nbRabbitMessages' => $nbRabbitMessages, 'nbRabbitMessages' => $nbRabbitMessages,
'redisNotInstalled' => $redisNotInstalled, 'redisNotInstalled' => $redisNotInstalled,

View file

@ -76,7 +76,7 @@ class InstapaperController extends AbstractController
$this->addFlash('notice', 'flashes.import.notice.failed_on_file'); $this->addFlash('notice', 'flashes.import.notice.failed_on_file');
} }
return $this->render('@WallabagImport/Instapaper/index.html.twig', [ return $this->render('@WallabagCore/Import/Instapaper/index.html.twig', [
'form' => $form->createView(), 'form' => $form->createView(),
'import' => $instapaper, 'import' => $instapaper,
]); ]);

View file

@ -76,7 +76,7 @@ class PinboardController extends AbstractController
$this->addFlash('notice', 'flashes.import.notice.failed_on_file'); $this->addFlash('notice', 'flashes.import.notice.failed_on_file');
} }
return $this->render('@WallabagImport/Pinboard/index.html.twig', [ return $this->render('@WallabagCore/Import/Pinboard/index.html.twig', [
'form' => $form->createView(), 'form' => $form->createView(),
'import' => $pinboard, 'import' => $pinboard,
]); ]);

View file

@ -43,7 +43,7 @@ class PocketController extends AbstractController
]) ])
->getForm(); ->getForm();
return $this->render('@WallabagImport/Pocket/index.html.twig', [ return $this->render('@WallabagCore/Import/Pocket/index.html.twig', [
'import' => $pocket, 'import' => $pocket,
'has_consumer_key' => '' === trim($this->getUser()->getConfig()->getPocketConsumerKey()) ? false : true, 'has_consumer_key' => '' === trim($this->getUser()->getConfig()->getPocketConsumerKey()) ? false : true,
'form' => $form->createView(), 'form' => $form->createView(),

View file

@ -46,6 +46,6 @@ class PocketHtmlController extends HtmlController
protected function getImportTemplate() protected function getImportTemplate()
{ {
return '@WallabagImport/PocketHtml/index.html.twig'; return '@WallabagCore/Import/PocketHtml/index.html.twig';
} }
} }

View file

@ -76,7 +76,7 @@ class ReadabilityController extends AbstractController
$this->addFlash('notice', 'flashes.import.notice.failed_on_file'); $this->addFlash('notice', 'flashes.import.notice.failed_on_file');
} }
return $this->render('@WallabagImport/Readability/index.html.twig', [ return $this->render('@WallabagCore/Import/Readability/index.html.twig', [
'form' => $form->createView(), 'form' => $form->createView(),
'import' => $readability, 'import' => $readability,
]); ]);

View file

@ -46,6 +46,6 @@ class ShaarliController extends HtmlController
protected function getImportTemplate() protected function getImportTemplate()
{ {
return '@WallabagImport/Shaarli/index.html.twig'; return '@WallabagCore/Import/Shaarli/index.html.twig';
} }
} }

View file

@ -46,6 +46,6 @@ class WallabagV1Controller extends WallabagController
protected function getImportTemplate() protected function getImportTemplate()
{ {
return '@WallabagImport/WallabagV1/index.html.twig'; return '@WallabagCore/Import/WallabagV1/index.html.twig';
} }
} }

View file

@ -46,6 +46,6 @@ class WallabagV2Controller extends WallabagController
protected function getImportTemplate() protected function getImportTemplate()
{ {
return '@WallabagImport/WallabagV2/index.html.twig'; return '@WallabagCore/Import/WallabagV2/index.html.twig';
} }
} }

View file

@ -6,7 +6,7 @@
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<div class="card-panel settings"> <div class="card-panel settings">
{% include '@WallabagImport/Import/_information.html.twig' %} {% include '@WallabagCore/Import/_information.html.twig' %}
<div class="row"> <div class="row">
<blockquote>{{ import.description|trans|raw }}</blockquote> <blockquote>{{ import.description|trans|raw }}</blockquote>

View file

@ -6,7 +6,7 @@
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<div class="card-panel settings"> <div class="card-panel settings">
{% include '@WallabagImport/Import/_information.html.twig' %} {% include '@WallabagCore/Import/_information.html.twig' %}
<div class="row"> <div class="row">
<blockquote>{{ import.description|trans }}</blockquote> <blockquote>{{ import.description|trans }}</blockquote>

View file

@ -1,3 +1,3 @@
{% extends "@WallabagImport/WallabagV1/index.html.twig" %} {% extends "@WallabagCore/Import/WallabagV1/index.html.twig" %}
{% block title %}{{ 'import.elcurator.page_title'|trans }}{% endblock %} {% block title %}{{ 'import.elcurator.page_title'|trans }}{% endblock %}

View file

@ -6,7 +6,7 @@
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<div class="card-panel settings"> <div class="card-panel settings">
{% include '@WallabagImport/Import/_information.html.twig' %} {% include '@WallabagCore/Import/_information.html.twig' %}
<div class="row"> <div class="row">
<blockquote>{{ import.description|trans|raw }}</blockquote> <blockquote>{{ import.description|trans|raw }}</blockquote>

View file

@ -6,7 +6,7 @@
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<div class="card-panel settings"> <div class="card-panel settings">
{% include '@WallabagImport/Import/_information.html.twig' %} {% include '@WallabagCore/Import/_information.html.twig' %}
<div class="row"> <div class="row">
<blockquote>{{ import.description|trans }}</blockquote> <blockquote>{{ import.description|trans }}</blockquote>

View file

@ -6,7 +6,7 @@
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<div class="card-panel settings"> <div class="card-panel settings">
{% include '@WallabagImport/Import/_information.html.twig' %} {% include '@WallabagCore/Import/_information.html.twig' %}
<div class="row"> <div class="row">
<blockquote>{{ import.description|trans }}</blockquote> <blockquote>{{ import.description|trans }}</blockquote>

View file

@ -6,7 +6,7 @@
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<div class="card-panel settings"> <div class="card-panel settings">
{% include '@WallabagImport/Import/_information.html.twig' %} {% include '@WallabagCore/Import/_information.html.twig' %}
{% if not has_consumer_key %} {% if not has_consumer_key %}
<div class="card-panel red white-text"> <div class="card-panel red white-text">

View file

@ -6,7 +6,7 @@
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<div class="card-panel settings"> <div class="card-panel settings">
{% include '@WallabagImport/Import/_information.html.twig' %} {% include '@WallabagCore/Import/_information.html.twig' %}
<div class="row"> <div class="row">
<blockquote>{{ import.description|trans|raw }}</blockquote> <blockquote>{{ import.description|trans|raw }}</blockquote>

View file

@ -6,7 +6,7 @@
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<div class="card-panel settings"> <div class="card-panel settings">
{% include '@WallabagImport/Import/_information.html.twig' %} {% include '@WallabagCore/Import/_information.html.twig' %}
<div class="row"> <div class="row">
<blockquote>{{ import.description|trans }}</blockquote> <blockquote>{{ import.description|trans }}</blockquote>

View file

@ -6,7 +6,7 @@
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<div class="card-panel settings"> <div class="card-panel settings">
{% include '@WallabagImport/Import/_information.html.twig' %} {% include '@WallabagCore/Import/_information.html.twig' %}
<div class="row"> <div class="row">
<blockquote>{{ import.description|trans|raw }}</blockquote> <blockquote>{{ import.description|trans|raw }}</blockquote>

View file

@ -6,7 +6,7 @@
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<div class="card-panel settings"> <div class="card-panel settings">
{% include '@WallabagImport/Import/_information.html.twig' %} {% include '@WallabagCore/Import/_information.html.twig' %}
<div class="row"> <div class="row">
<blockquote>{{ import.description|trans }}</blockquote> <blockquote>{{ import.description|trans }}</blockquote>

View file

@ -1,3 +1,3 @@
{% extends "@WallabagImport/WallabagV1/index.html.twig" %} {% extends "@WallabagCore/Import/WallabagV1/index.html.twig" %}
{% block title %}{{ 'import.wallabag_v2.page_title'|trans }}{% endblock %} {% block title %}{{ 'import.wallabag_v2.page_title'|trans }}{% endblock %}

View file

@ -12,7 +12,7 @@
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<div class="card-panel settings"> <div class="card-panel settings">
{% include '@WallabagImport/Import/_information.html.twig' %} {% include '@WallabagCore/Import/_information.html.twig' %}
{{ 'import.page_description'|trans }} {{ 'import.page_description'|trans }}
<ul> <ul>