modified transferred link to include add/create information, added new CreateUserButton component

This commit is contained in:
Florian Scholdei
2019-04-23 15:57:23 +02:00
parent 5a4fc6a965
commit d56dc22efc
2 changed files with 22 additions and 6 deletions

View File

@@ -30,12 +30,13 @@ const styles = {
class OverviewPageActions extends React.Component<Props> {
render() {
const { history, location, link } = this.props;
let directory = link.substring(0, link.indexOf("/"));
return (
<PageActions>
<FilterInput
value={urls.getQueryStringFromLocation(location)}
filter={filter => {
history.push(`/${link}/?q=${filter}`);
history.push(`/${directory}/?q=${filter}`);
}}
/>
{this.renderCreateButton()}
@@ -48,11 +49,7 @@ class OverviewPageActions extends React.Component<Props> {
if (showCreateButton) {
return (
<div className={classNames(classes.button, "input-button control")}>
<Button
label={label} //t("overview.createButton")
link={`/${link}/create`}
color="primary"
/>
<Button label={label} link={`/${link}`} color="primary" />
</div>
);
}