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 %}