]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8653 hide organization name on organization's projects page
authorStas Vilchik <vilchiks@gmail.com>
Fri, 3 Feb 2017 10:52:50 +0000 (11:52 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Fri, 3 Feb 2017 10:55:38 +0000 (11:55 +0100)
server/sonar-web/src/main/js/apps/projects/components/AllProjects.js
server/sonar-web/src/main/js/apps/projects/components/ProjectCard.js
server/sonar-web/src/main/js/apps/projects/components/ProjectsList.js

index a8e7a59543e76a4cd04ece782ab2695d8c39106d..6d9d24531240707a41df18c8c79f68b442de815a 100644 (file)
@@ -62,7 +62,10 @@ export default class AllProjects extends React.Component {
                 organization={this.props.organization}/>
           </aside>
           <div className="page-main">
-            <ProjectsListContainer isFavorite={this.props.isFavorite} isFiltered={isFiltered}/>
+            <ProjectsListContainer
+                isFavorite={this.props.isFavorite}
+                isFiltered={isFiltered}
+                organization={this.props.organization}/>
             <ProjectsListFooterContainer
                 query={this.state.query}
                 isFavorite={this.props.isFavorite}
index 1a91872fee55357b348d0c5dea6dce7580cb6404..af9f1c9d4ebf6011d73e539f209dc4231c525f97 100644 (file)
@@ -28,7 +28,8 @@ import Organization from '../../../components/shared/Organization';
 
 export default class ProjectCard extends React.Component {
   static propTypes = {
-    project: React.PropTypes.object
+    project: React.PropTypes.object,
+    organization: React.PropTypes.object
   };
 
   render () {
@@ -57,7 +58,7 @@ export default class ProjectCard extends React.Component {
                 <FavoriteContainer className="spacer-right" componentKey={project.key}/>
             )}
             <h2 className="project-card-name">
-              {project.organization != null && (
+              {this.props.organization == null && project.organization != null && (
                 <span className="text-normal">
                   <Organization organizationKey={project.organization}/>
                 </span>
index 4ac5b7ef4004ec65b5ef3080e2f992eba94b1165..e00b5d29c047c97e44c3b5a1aecc0a8aed492f06 100644 (file)
@@ -27,7 +27,8 @@ export default class ProjectsList extends React.Component {
   static propTypes = {
     projects: React.PropTypes.arrayOf(React.PropTypes.string),
     isFavorite: React.PropTypes.bool.isRequired,
-    isFiltered: React.PropTypes.bool.isRequired
+    isFiltered: React.PropTypes.bool.isRequired,
+    organization: React.PropTypes.object
   };
 
   renderNoProjects () {
@@ -51,7 +52,10 @@ export default class ProjectsList extends React.Component {
         <div className="projects-list">
           {projects.length > 0 ? (
               projects.map(projectKey => (
-                  <ProjectCardContainer key={projectKey} projectKey={projectKey}/>
+                  <ProjectCardContainer
+                      key={projectKey}
+                      projectKey={projectKey}
+                      organization={this.props.organization}/>
               ))
           ) : (
               this.renderNoProjects()