aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/projects/components/PageHeader.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-10-18 09:46:22 +0200
committerStas Vilchik <vilchiks@gmail.com>2016-10-21 10:24:17 +0200
commitb7129679327efeeb44f9205656b46376adfe9689 (patch)
treef01159db52a79aae8e478dcafe79a7d9d22156c6 /server/sonar-web/src/main/js/apps/projects/components/PageHeader.js
parent3d8cdcbf8558e40385f481272045056d5435a3e6 (diff)
downloadsonarqube-b7129679327efeeb44f9205656b46376adfe9689.tar.gz
sonarqube-b7129679327efeeb44f9205656b46376adfe9689.zip
SONAR-8300 Create new "Projects" page [first iter]
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projects/components/PageHeader.js')
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/PageHeader.js52
1 files changed, 52 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/projects/components/PageHeader.js b/server/sonar-web/src/main/js/apps/projects/components/PageHeader.js
new file mode 100644
index 00000000000..4043e0176f9
--- /dev/null
+++ b/server/sonar-web/src/main/js/apps/projects/components/PageHeader.js
@@ -0,0 +1,52 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+import React from 'react';
+import { translate } from '../../../helpers/l10n';
+
+export default class PageHeader extends React.Component {
+ static propTypes = {
+ total: React.PropTypes.number,
+ loading: React.PropTypes.bool
+ };
+
+ render () {
+ const { total, loading } = this.props;
+
+ return (
+ <header className="page-header">
+ <h1 className="page-title">{translate('projects.page')}</h1>
+
+ {!!loading && (
+ <i className="spinner"/>
+ )}
+
+ <div className="page-actions">
+ {total != null && (
+ <span><strong>{total}</strong> {translate('projects._projects')}</span>
+ )}
+ </div>
+
+ <div className="page-description">
+ {translate('projects.page.description')}
+ </div>
+ </header>
+ );
+ }
+}