From 5d0424d9b33baef54d49e25f5d04b53d7e2c505f Mon Sep 17 00:00:00 2001 From: daichi_otani Date: Mon, 4 Sep 2023 13:26:37 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A1=E3=83=B3=E3=83=86=E3=83=8A=E3=83=B3?= =?UTF-8?q?=E3=82=B9=E3=83=A2=E3=83=BC=E3=83=89=E3=81=8C=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=94=BB=E9=9D=A2=E3=81=8B=E3=82=89=E7=A2=BA=E8=AA=8D=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Eccube/EventListener/TwigInitializeListener.php | 1 + src/Eccube/Resource/locale/messages.en.yaml | 1 + src/Eccube/Resource/locale/messages.ja.yaml | 1 + src/Eccube/Resource/template/admin/default_frame.twig | 1 + src/Eccube/Resource/template/admin/info.twig | 8 ++++++++ 5 files changed, 12 insertions(+) create mode 100644 src/Eccube/Resource/template/admin/info.twig diff --git a/src/Eccube/EventListener/TwigInitializeListener.php b/src/Eccube/EventListener/TwigInitializeListener.php index 6d057b9aeb2..32309ed1c59 100644 --- a/src/Eccube/EventListener/TwigInitializeListener.php +++ b/src/Eccube/EventListener/TwigInitializeListener.php @@ -253,6 +253,7 @@ public function setAdminGlobals(RequestEvent $event) $eccubeNav = $this->getDisplayEccubeNav($eccubeNav, $AuthorityRoles, $baseUrl); } $this->twig->addGlobal('eccubeNav', $eccubeNav); + $this->twig->addGlobal('isMaintenance', $this->systemService->isMaintenanceMode()); } /** diff --git a/src/Eccube/Resource/locale/messages.en.yaml b/src/Eccube/Resource/locale/messages.en.yaml index b43ac56e698..6194eb2454a 100644 --- a/src/Eccube/Resource/locale/messages.en.yaml +++ b/src/Eccube/Resource/locale/messages.en.yaml @@ -503,6 +503,7 @@ admin.common.move_to_confirm_move_only: Move admin.common.move_to_confirm_save_and_move: Save & Move admin.common.admin_url_warning: 'Please set the Admin Console URL that is hard to guess for security. You can set it at "Security".' admin.common.restrict_file_upload_info: 'If this feature is used infrequently, disabling it while not in use provides additional security. You can disable this feature by setting the environment variable ECCUBE_RESTRICT_FILE_UPLOAD to 1.' +admin.common.notice_maintenance_mode: 'Currently in maintenance mode.' # Labels related to entity diff --git a/src/Eccube/Resource/locale/messages.ja.yaml b/src/Eccube/Resource/locale/messages.ja.yaml index ab805f6454d..9e59daf494a 100644 --- a/src/Eccube/Resource/locale/messages.ja.yaml +++ b/src/Eccube/Resource/locale/messages.ja.yaml @@ -503,6 +503,7 @@ admin.common.move_to_confirm_move_only: 保存せずに移動 admin.common.move_to_confirm_save_and_move: 保存して移動 admin.common.admin_url_warning: '管理画面URLは、セキュリティのため推測されにくいものを設定してください。「セキュリティ管理」から設定できます。' admin.common.restrict_file_upload_info: 'この機能の利用頻度が低い場合、使用しない間は無効化することでセキュリティを更に向上させることができます。環境変数 ECCUBE_RESTRICT_FILE_UPLOAD を 1 に設定することで機能を無効化することが可能です。' +admin.common.notice_maintenance_mode: '現在メンテナンスモード中です。' # エンティティに関連するラベル diff --git a/src/Eccube/Resource/template/admin/default_frame.twig b/src/Eccube/Resource/template/admin/default_frame.twig index 57a99f01a11..ad44600c7d3 100644 --- a/src/Eccube/Resource/template/admin/default_frame.twig +++ b/src/Eccube/Resource/template/admin/default_frame.twig @@ -64,6 +64,7 @@ file that was distributed with this source code. {{ include('@admin/alert.twig') }} + {{ include('@admin/info.twig') }} {% block main %}{% endblock %} diff --git a/src/Eccube/Resource/template/admin/info.twig b/src/Eccube/Resource/template/admin/info.twig new file mode 100644 index 00000000000..2ae63cbb635 --- /dev/null +++ b/src/Eccube/Resource/template/admin/info.twig @@ -0,0 +1,8 @@ +{% if isMaintenance %} + +{% endif %}