diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-08-04 17:53:08 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-08-10 17:11:54 +0200 |
commit | cc871d7b8c4af1f66234830719d27e45d4136334 (patch) | |
tree | 4a0e191441ba2fcd706853a74d6288436640bc85 /server/sonar-web/src/main/js/components/shared/status-helper.jsx | |
parent | a3df8c53bec6e8e61cac61a41c8e7489b5bfb098 (diff) | |
download | sonarqube-cc871d7b8c4af1f66234830719d27e45d4136334.tar.gz sonarqube-cc871d7b8c4af1f66234830719d27e45d4136334.zip |
SONAR-6331 add project overview
Diffstat (limited to 'server/sonar-web/src/main/js/components/shared/status-helper.jsx')
-rw-r--r-- | server/sonar-web/src/main/js/components/shared/status-helper.jsx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/components/shared/status-helper.jsx b/server/sonar-web/src/main/js/components/shared/status-helper.jsx new file mode 100644 index 00000000000..033fd3ff786 --- /dev/null +++ b/server/sonar-web/src/main/js/components/shared/status-helper.jsx @@ -0,0 +1,26 @@ +define([ + 'libs/third-party/react', + './status-icon' +], function (React, StatusIcon) { + + return React.createClass({ + render: function () { + if (!this.props.status) { + return null; + } + var resolution; + if (this.props.resolution) { + resolution = ' (' + window.t('issue.resolution', this.props.resolution) + ')'; + } + return ( + <span> + <StatusIcon status={this.props.status}/> + + {window.t('issue.status', this.props.status)} + {resolution} + </span> + ); + } + }); + +}); |