소스 검색

when "Duplicate apart from the pages that already exists" check box is checked, enables to press "Duplicate page" button

白石誠 5 년 전
부모
커밋
2ffb925f67
1개의 변경된 파일9개의 추가작업 그리고 2개의 파일을 삭제
  1. 9 2
      src/client/js/components/PageDuplicateModal.jsx

+ 9 - 2
src/client/js/components/PageDuplicateModal.jsx

@@ -149,8 +149,15 @@ const PageDuplicateModal = (props) => {
             <label className="custom-control-label" htmlFor="cbDuplicateRecursivelyAdmit">
               Duplicate apart from the pages that already exists
             </label>
-            <ul>
-              {subordinatedPaths.map(duplicatedNewPath => <li key={duplicatedNewPath}>{duplicatedNewPath}</li>)}
+            <ul className="duplicate-name">
+              {isDuplicateRecursively && subordinatedPaths.map((duplicatedNewPath) => {
+                  // ToDo: The "true" statement below will be modified by task GW3503
+                  if (true) {
+                    return <li className="duplicate-exist" key={duplicatedNewPath}>{duplicatedNewPath}: Same page already exists</li>;
+                  }
+                  return <li key={duplicatedNewPath}>{duplicatedNewPath}</li>;
+                })
+              }
             </ul>
           </div>
           )}