]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9844 Do not display "Delete" button for portfolios and applications
authorStas Vilchik <stas.vilchik@sonarsource.com>
Tue, 19 Sep 2017 15:33:47 +0000 (17:33 +0200)
committerStas Vilchik <stas.vilchik@sonarsource.com>
Mon, 25 Sep 2017 08:17:18 +0000 (10:17 +0200)
server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx
server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/Search-test.tsx.snap

index bb5851221cab18e43c5d06b1a9f6e7fb12b1cce4..99e083ce7b296db6ebf9047841133c4c96d2030c 100644 (file)
@@ -223,17 +223,19 @@ export default class Search extends React.PureComponent<Props, State> {
               </td>
               <td className="thin nowrap text-middle">
                 <button
-                  className="spacer-right js-bulk-apply-permission-template"
+                  className="js-bulk-apply-permission-template"
                   disabled={this.props.total === 0}
                   onClick={this.handleBulkApplyTemplateClick}>
                   {translate('permission_templates.bulk_apply_permission_template')}
                 </button>
-                <button
-                  className="js-delete button-red"
-                  disabled={this.props.total === 0}
-                  onClick={this.handleDeleteClick}>
-                  {translate('delete')}
-                </button>
+                {this.props.qualifiers === 'TRK' && (
+                  <button
+                    className="js-delete spacer-left button-red"
+                    disabled={this.props.total === 0}
+                    onClick={this.handleDeleteClick}>
+                    {translate('delete')}
+                  </button>
+                )}
               </td>
             </tr>
           </tbody>
index 9e0a31ce941cdac417c2ad0e0695a3b8774f2bd7..bf2fb591f4a36a6612faf8e310c1bfee8f295480 100644 (file)
@@ -178,14 +178,14 @@ exports[`render qualifiers filter 1`] = `
           className="thin nowrap text-middle"
         >
           <button
-            className="spacer-right js-bulk-apply-permission-template"
+            className="js-bulk-apply-permission-template"
             disabled={false}
             onClick={[Function]}
           >
             permission_templates.bulk_apply_permission_template
           </button>
           <button
-            className="js-delete button-red"
+            className="js-delete spacer-left button-red"
             disabled={false}
             onClick={[Function]}
           >
@@ -280,14 +280,14 @@ exports[`renders 1`] = `
           className="thin nowrap text-middle"
         >
           <button
-            className="spacer-right js-bulk-apply-permission-template"
+            className="js-bulk-apply-permission-template"
             disabled={false}
             onClick={[Function]}
           >
             permission_templates.bulk_apply_permission_template
           </button>
           <button
-            className="js-delete button-red"
+            className="js-delete spacer-left button-red"
             disabled={false}
             onClick={[Function]}
           >