diff --git a/html/template/default/assets/css/style.css b/html/template/default/assets/css/style.css index 539264e6ed4..636a117d4ea 100755 --- a/html/template/default/assets/css/style.css +++ b/html/template/default/assets/css/style.css @@ -10471,6 +10471,38 @@ Styleguide 11.2.7 .ec-maintenanceAlert + * { margin-top: 50px; } + +/* devモードの追加 */ +.ec-debugModeAlert { + background: red; + height: 50px; + position: fixed; + top: 0; + width: 100%; + color: white; + z-index: 9999; + display: flex; + font-weight: bold; +} +.ec-debugModeAlert > * { + margin: auto; +} +.ec-debugModeAlert .ec-debugModeAlert__icon { + display: inline-block; + margin-right: 1rem; + width: 20px; + height: 20px; + color: #fff; + fill: #fff; + vertical-align: top; +} +.ec-debugModeAlert + * { + margin-top: 50px; +} +.ec-twoModeAlert + * { + margin-top: 100px; +} + /** メディアクエリ SP フォーストで記述する。 @@ -19574,4 +19606,4 @@ Styleguide 22.1 display: none !important; } } -/*# sourceMappingURL=style.css.map */ \ No newline at end of file +/*# sourceMappingURL=style.css.map */ diff --git a/src/Eccube/EventListener/TwigInitializeListener.php b/src/Eccube/EventListener/TwigInitializeListener.php index 32309ed1c59..4913fb76b2a 100644 --- a/src/Eccube/EventListener/TwigInitializeListener.php +++ b/src/Eccube/EventListener/TwigInitializeListener.php @@ -235,6 +235,7 @@ public function setFrontVariables(RequestEvent $event) $this->twig->addGlobal('Page', $Page); $this->twig->addGlobal('title', $Page->getName()); $this->twig->addGlobal('isMaintenance', $this->systemService->isMaintenanceMode()); + $this->twig->addGlobal('isDebugMode', env('APP_DEBUG')); } public function setAdminGlobals(RequestEvent $event) @@ -254,6 +255,8 @@ public function setAdminGlobals(RequestEvent $event) } $this->twig->addGlobal('eccubeNav', $eccubeNav); $this->twig->addGlobal('isMaintenance', $this->systemService->isMaintenanceMode()); + $this->twig->addGlobal('isDebugMode', env('APP_DEBUG')); + } /** diff --git a/src/Eccube/Resource/locale/messages.en.yaml b/src/Eccube/Resource/locale/messages.en.yaml index 70872492ba5..ad4a5395f92 100644 --- a/src/Eccube/Resource/locale/messages.en.yaml +++ b/src/Eccube/Resource/locale/messages.en.yaml @@ -392,6 +392,7 @@ front.shopping.payment_method_unselected: Please select the payment method. front.shopping.not_available_payment_method: The payment method you have selected is not available. front.shopping.payment_method_not_fount: Sorry, you have no payment options. If you have selected multiple delivery methods, you can only select the same payment option for them all. front.under_maintenance: The site is currently under maintenance. +front.under_debug_mode: The site is currently under debug mode. #==================================================================================== # Admin Console @@ -505,6 +506,7 @@ 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.' +admin.common.notice_debug_mode: The site is currently under debug mode. # Labels related to entity diff --git a/src/Eccube/Resource/locale/messages.ja.yaml b/src/Eccube/Resource/locale/messages.ja.yaml index fcaf434fef3..29b77e5cc7c 100644 --- a/src/Eccube/Resource/locale/messages.ja.yaml +++ b/src/Eccube/Resource/locale/messages.ja.yaml @@ -392,6 +392,8 @@ front.shopping.payment_method_unselected: お支払い方法を選択してく front.shopping.not_available_payment_method: 選択したお支払い方法はご利用できません。 front.shopping.payment_method_not_fount: 選択できるお支払い方法がありません。配送方法が異なる場合は同じ配送方法を選んでください。 front.under_maintenance: メンテナンスモードが有効になっています。 +front.under_debug_mode: デバッグモードが有効になっています。 + #==================================================================================== # 管理画面 @@ -505,7 +507,7 @@ 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: '現在メンテナンスモード中です。' - +admin.common.notice_debug_mode: 'デバッグモードが有効になっています。' # エンティティに関連するラベル admin.common.id: ID diff --git a/src/Eccube/Resource/template/admin/default_frame.twig b/src/Eccube/Resource/template/admin/default_frame.twig index ad44600c7d3..56dc1b0407c 100644 --- a/src/Eccube/Resource/template/admin/default_frame.twig +++ b/src/Eccube/Resource/template/admin/default_frame.twig @@ -65,6 +65,7 @@ file that was distributed with this source code. {{ include('@admin/alert.twig') }} {{ include('@admin/info.twig') }} + {{ include('@admin/notice_debug_mode.twig') }} {% block main %}{% endblock %} diff --git a/src/Eccube/Resource/template/admin/notice_debug_mode.twig b/src/Eccube/Resource/template/admin/notice_debug_mode.twig new file mode 100644 index 00000000000..83dcc88932a --- /dev/null +++ b/src/Eccube/Resource/template/admin/notice_debug_mode.twig @@ -0,0 +1,8 @@ +{% if isDebugMode %} +