aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/permission-templates/header.jsx
blob: 0325d4bf6cb76d35c249fd78dd86dba29ef4cd62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import React from 'react';
import CreateView from './create-view';

export default React.createClass({
  onCreate(e) {
    e.preventDefault();
    new CreateView({
      refresh: this.props.refresh
    }).render();
  },

  render() {
    return (
        <header id="project-permissions-header" className="page-header">
          <h1 className="page-title">{window.t('permission_templates.page')}</h1>
          <div className="page-actions">
            <button onClick={this.onCreate}>Create</button>
          </div>
          <p className="page-description">{window.t('roles.page.description')}</p>
        </header>
    );
  }
});