mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
Fix page action buttons
This commit is contained in:
@@ -78,6 +78,7 @@ class Users extends React.Component<Props> {
|
||||
<UserTable users={users} />
|
||||
{this.renderPaginator()}
|
||||
{this.renderCreateButton()}
|
||||
{this.renderPageActionCreateButton()}
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
@@ -91,19 +92,25 @@ class Users extends React.Component<Props> {
|
||||
}
|
||||
|
||||
renderCreateButton() {
|
||||
const { t } = this.props;
|
||||
if (this.props.canAddUsers) {
|
||||
return <CreateButton label={t("users.createButton")} link="/users/add" />;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
renderPageActionCreateButton() {
|
||||
const { t } = this.props;
|
||||
if (this.props.canAddUsers) {
|
||||
return (
|
||||
<>
|
||||
<CreateButton label={t("users.createButton")} link="/users/add" />
|
||||
<PageActions>
|
||||
<Button
|
||||
label={t("users.createButton")}
|
||||
link="/users/add"
|
||||
color="primary"
|
||||
/>
|
||||
</PageActions>
|
||||
</>
|
||||
<PageActions>
|
||||
<Button
|
||||
label={t("users.createButton")}
|
||||
link="/users/add"
|
||||
color="primary"
|
||||
/>
|
||||
</PageActions>
|
||||
);
|
||||
} else {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user