Преглед изворни кода

ensure that the warning when site URL not set to be stand out

Yuki Takei пре 7 година
родитељ
комит
192a560259

+ 2 - 1
resource/locales/en-US/translation.json

@@ -321,7 +321,8 @@
     "Site Name": "Site name",
     "sitename_change": "You can change Site Name which is used for header and HTML title.",
     "header_content": "The contents entered here will be shown in the header etc.",
-    "Site URL": "This is for the site URL setting. If this setting is not done, some features don't work.",
+    "Site URL desc": "This is for the site URL setting.",
+    "Site URL warn": "Some features don't work because site URL is not set.",
     "siteurl_help": "Site full URL beginning from <code>http://</code> or <code>https://</code>.",
     "Confidential name": "Confidential name",
     "Default Language for new users": "Default Language for new users",

+ 2 - 1
resource/locales/ja/translation.json

@@ -335,7 +335,8 @@
     "Site Name": "サイト名",
     "sitename_change": "ヘッダーや HTML タイトルに使用されるサイト名を変更できます。",
     "header_content": "ここに入力した内容は、ヘッダー等に表示されます。",
-    "Site URL": "サイトURLを設定します。この設定が行われていない場合は一部機能が動作しません。",
+    "Site URL desc": "サイトURLを設定します。",
+    "Site URL warn": "サイトURLが設定されていないため、一部機能が動作しない状態になっています。",
     "siteurl_help": "<code>http://</code> または <code>https://</code> から始まるサイトのURL",
     "Confidential name": "コンフィデンシャル表示",
     "Default Language for new users": "新規ユーザーのデフォルト設定言語",

+ 4 - 1
src/server/views/admin/app.html

@@ -117,7 +117,10 @@
       <form action="/_api/admin/settings/siteUrl" method="post" class="form-horizontal" id="siteUrlSettingForm" role="form">
         <fieldset>
           <legend>{{ t('Site URL settings') }}</legend>
-          <p class="well">{{ t('app_setting.Site URL') }}</p>
+          <p class="well">{{ t('app_setting.Site URL desc') }}</p>
+          {% if !getConfig('crowi', 'app:siteUrl') %}
+            <p class="alert alert-danger"><i class="icon-exclamation"></i> {{ t('app_setting.Site URL warn') }}</p>
+          {% endif %}
 
           <div class="col-xs-offset-3">
             <table class="table settings-table">

+ 2 - 1
src/server/views/layout/layout.html

@@ -196,7 +196,8 @@
   {% endblock  %} {# layout_head_nav #}
 
   {% if !getConfig('crowi', 'app:siteUrl') %}
-  <div class="alert alert-warning m-b-0">
+  <div class="alert alert-danger mb-0">
+    <i class="icon-exclamation"></i>
     {{ t("security_setting.alert_siteUrl_is_not_set", '<a href="/admin/app">' + t('App settings') + '<i class="icon-login"></i></a>') }}
   </div>
   {% endif %}