]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-11534 fix glitch on the permission templates page
authorStas Vilchik <stas.vilchik@sonarsource.com>
Tue, 4 Dec 2018 10:37:10 +0000 (11:37 +0100)
committerSonarTech <sonartech@sonarsource.com>
Fri, 7 Dec 2018 19:21:02 +0000 (20:21 +0100)
server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.js
server/sonar-web/src/main/js/apps/permissions/shared/components/UserHolder.tsx
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index ec89cc25d5e7d1856b03f75423cec04e434f954b..aa447f2aaf7b3fb4415d0e55d094812e6409b44c 100644 (file)
@@ -19,7 +19,9 @@
  */
 import React from 'react';
 import { PermissionType } from '../propTypes';
+import HelpTooltip from '../../../components/controls/HelpTooltip';
 import { translate } from '../../../helpers/l10n';
+import { isSonarCloud } from '../../../helpers/system';
 
 export default class PermissionCell extends React.PureComponent {
   static propTypes = {
@@ -34,8 +36,16 @@ export default class PermissionCell extends React.PureComponent {
         <div className="permission-column-inner">
           <ul>
             {p.withProjectCreator && (
-              <li className="little-spacer-bottom">
+              <li className="little-spacer-bottom display-flex-center">
                 {translate('permission_templates.project_creators')}
+                <HelpTooltip
+                  className="little-spacer-left"
+                  overlay={translate(
+                    isSonarCloud()
+                      ? 'permission_templates.project_creators.explanation.sonarcloud'
+                      : 'permission_templates.project_creators.explanation'
+                  )}
+                />
               </li>
             )}
             <li className="little-spacer-bottom">
index 0a7ed8dde024e998fe6f0ec3aea8d703f3343086..1f0397e54e490d6577b9b66ba343dd10a7f5eb7a 100644 (file)
@@ -23,6 +23,7 @@ import PermissionCell from './PermissionCell';
 import Avatar from '../../../../components/ui/Avatar';
 import { translate } from '../../../../helpers/l10n';
 import { isPermissionDefinitionGroup } from '../../utils';
+import { isSonarCloud } from '../../../../helpers/system';
 
 interface Props {
   onToggle: (user: T.PermissionUser, permission: string) => Promise<void>;
@@ -84,7 +85,11 @@ export default class UserHolder extends React.PureComponent<Props, State> {
                 <strong>{user.name}</strong>
               </div>
               <div className="little-spacer-top" style={{ whiteSpace: 'normal' }}>
-                {translate('permission_templates.project_creators.explanation')}
+                {translate(
+                  isSonarCloud()
+                    ? 'permission_templates.project_creators.explanation.sonarcloud'
+                    : 'permission_templates.project_creators.explanation'
+                )}
               </div>
             </div>
           </td>
index ba3aaa791649ad781179f02d6bc229391398735d..29353f113c43c10faea3237b82bd28be33131f61 100644 (file)
@@ -2144,8 +2144,9 @@ permission_template.edit_permissions=Edit Permissions: {0}
 permission_template.key_pattern=Project key pattern
 permission_template.key_pattern.description=Should be a valid regular expression
 permission_template.default_for=Default for {0}
-permission_templates.project_creators=Project/Portfolio/Application Creators
-permission_templates.project_creators.explanation=When a new project / portfolio / application is created, the user who creates it will receive these permissions on the it.
+permission_templates.project_creators=Creators
+permission_templates.project_creators.explanation=When a new project, portfolio or application is created, the user who creates it will receive these permissions.
+permission_templates.project_creators.explanation.sonarcloud=When a new project is created, the user who creates it will receive these permissions.
 permission_templates.bulk_apply_permission_template=Bulk Apply Permission Template
 permission_templates.bulk_apply_permission_template.apply_to_selected=You're about to apply the selected permission template to {0} selected item(s).
 permission_templates.bulk_apply_permission_template.apply_to_all=You're about to apply the selected permission template to {0} item(s).