Procházet zdrojové kódy

Merge branch 'feat/article-area-renovation' into imprv/article-area-gw4051

白石誠 před 5 roky
rodič
revize
d0ea2bdd3f

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

@@ -448,7 +448,8 @@
     "check_configuration": "Check your configuration following <a href='https://docs.growi.org/guide/admin-cookbook/integrate-with-hackmd.html'>the manual</a>.",
     "not_initialized": "HackmdEditor component has not initialized",
     "someone_editing": "Someone editing this page on HackMD",
-    "this_page_has_draft": "This page has a draft on HackMD"
+    "this_page_has_draft": "This page has a draft on HackMD",
+    "need_to_associate_with_growi_to_use_hackmd_refer_to_this": "To use HackMD for simultaneous multi-person editing, need to associate HackMD with GROWI.Please refer to <a href='https://docs.growi.org/en/admin-guide/admin-cookbook/integrate-with-hackmd.html'>here</a>."
   },
   "slack_notification": {
     "popover_title": "Slack Notification",

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

@@ -450,7 +450,8 @@
     "check_configuration": "<a href='https://docs.growi.org/ja/admin-guide/admin-cookbook/integrate-with-hackmd.html'>こちらのマニュアル</a>から設定を確認してください",
     "not_initialized": "HackMD コンポーネントは初期化されていません",
     "someone_editing": "このページは、HackMD で編集されています。",
-    "this_page_has_draft": "このページは、HackMD のドラフトがあります。"
+    "this_page_has_draft": "このページは、HackMD のドラフトがあります。",
+    "need_to_associate_with_growi_to_use_hackmd_refer_to_this": "HackMD を利用して同時多人数編集を行うには、HackMD と GROWI を連携する必要があります。<a href='https://docs.growi.org/ja/admin-guide/admin-cookbook/integrate-with-hackmd.html'>こちら</a>を参照してください。"
   },
   "slack_notification": {
     "popover_title": "Slack 通知",

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

@@ -424,7 +424,8 @@
 		"check_configuration": "Check your configuration following <a href='https://docs.growi.org/guide/admin-cookbook/integrate-with-hackmd.html'>the manual</a>.",
 		"not_initialized": "HackmdEditor component has not initialized",
 		"someone_editing": "Someone editing this page on HackMD",
-		"this_page_has_draft": "This page has a draft on HackMD"
+    "this_page_has_draft": "This page has a draft on HackMD",
+    "need_to_associate_with_growi_to_use_hackmd_refer_to_this": "To use HackMD for simultaneous multi-person editing, need to associate HackMD with GROWI.Please refer to <a href='https://docs.growi.org/en/admin-guide/admin-cookbook/integrate-with-hackmd.html'>here</a>."
   },
   "slack_notification": {
     "popover_title": "Slack Notification",

+ 3 - 5
src/client/js/components/Page/NotFoundAlert.jsx

@@ -4,12 +4,10 @@ import PropTypes from 'prop-types';
 const NotFoundAlert = (props) => {
 
   function clickHandler(viewType) {
-    if (props.onPageCreateClicked) {
-      props.onPageCreateClicked(viewType);
-    }
-    else {
-      return null;
+    if (props.onPageCreateClicked === null) {
+      return;
     }
+    props.onPageCreateClicked(viewType);
   }
 
   return (

+ 2 - 0
src/client/js/components/PageEditorByHackmd.jsx

@@ -243,6 +243,8 @@ class PageEditorByHackmd extends React.Component {
       content = (
         <div>
           <p className="text-center hackmd-status-label"><i className="fa fa-file-text"></i> { t('hackmd.not_set_up')}</p>
+          {/* eslint-disable-next-line react/no-danger */}
+          <p dangerouslySetInnerHTML={{ __html: t('hackmd.need_to_associate_with_growi_to_use_hackmd_refer_to_this') }} />
         </div>
       );
     }

+ 1 - 3
src/server/views/widget/not_found_content.html

@@ -6,9 +6,7 @@
   {% endif %}
   >
 
-  <div id="display-switcher">
-    <script type="text/template" id="raw-text-original">{{ revision.body.toString() | encodeHTML }}</script>
-  </div>
+  <div id="display-switcher"></div>
   <div id="not-found-alert"></div>
   {% include 'not_found_tabs.html' %}