blob: eb367d830bfdf2a33d562bbd6733e52954174b92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import React from 'react';
import CreateView from './create-view';
export default React.createClass({
onCreate(e) {
e.preventDefault();
new CreateView({
refresh: this.props.refresh
}).render();
},
renderSpinner () {
if (this.props.ready) {
return null;
}
return <i className="spinner"/>;
},
render() {
return (
<header id="project-permissions-header" className="page-header">
<h1 className="page-title">{window.t('permission_templates.page')}</h1>
{this.renderSpinner()}
<div className="page-actions">
<button onClick={this.onCreate}>Create</button>
</div>
<p className="page-description">{window.t('roles.page.description')}</p>
</header>
);
}
});
|