aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/shared/status-helper.jsx
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-08-04 17:53:08 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-08-10 17:11:54 +0200
commitcc871d7b8c4af1f66234830719d27e45d4136334 (patch)
tree4a0e191441ba2fcd706853a74d6288436640bc85 /server/sonar-web/src/main/js/components/shared/status-helper.jsx
parenta3df8c53bec6e8e61cac61a41c8e7489b5bfb098 (diff)
downloadsonarqube-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.jsx26
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}/>
+ &nbsp;
+ {window.t('issue.status', this.props.status)}
+ {resolution}
+ </span>
+ );
+ }
+ });
+
+});