This commit is contained in:
Florian Scholdei
2019-04-17 14:27:17 +02:00
73 changed files with 2311 additions and 530 deletions

View File

@@ -19,6 +19,7 @@ import {
PageActions,
Button,
CreateButton,
Notification,
LinkPaginator,
getPageFromMatch
} from "@scm-manager/ui-components";
@@ -88,14 +89,26 @@ class Users extends React.Component<Props, State> {
history.push("/users/?q=" + filter);
}}
>
<UserTable users={users} />
{this.renderPaginator()}
{this.renderUserTable()}
{this.renderCreateButton()}
{this.renderPageActionCreateButton()}
</Page>
);
}
renderUserTable() {
const { users, t } = this.props;
if (users && users.length > 0) {
return (
<>
<UserTable users={users} />
{this.renderPaginator()}
</>
);
}
return <Notification type="info">{t("users.noUsers")}</Notification>;
}
renderPaginator = () => {
const { list, page } = this.props;
if (list) {