зеркало из https://github.com/mozilla/hubs.git
added search to pending and approved scenes
This commit is contained in:
Родитель
04cdd6be65
Коммит
25e4837493
|
@ -12,11 +12,19 @@ import {
|
|||
NumberInput,
|
||||
Datagrid,
|
||||
TextField,
|
||||
ReferenceField
|
||||
ReferenceField,
|
||||
Filter
|
||||
} from "react-admin";
|
||||
|
||||
const SceneFilter = props => (
|
||||
<Filter {...props}>
|
||||
<TextInput label="Search Name" source="name" alwaysOn />
|
||||
<TextInput label="Search SID" source="scene_sid" alwaysOn />
|
||||
</Filter>
|
||||
);
|
||||
|
||||
export const FeaturedSceneListingList = props => (
|
||||
<List {...props} sort={{ field: "order", order: "ASC" }}>
|
||||
<List {...props} filters={<SceneFilter />} sort={{ field: "order", order: "ASC" }}>
|
||||
<Datagrid>
|
||||
<OwnedFileImage source="screenshot_owned_file_id" />
|
||||
<OwnedFileSizeField label="Model size" source="model_owned_file_id" />
|
||||
|
|
|
@ -3,10 +3,17 @@ import { SceneLink, OwnedFileImage, OwnedFileSizeField, ConditionalReferenceFiel
|
|||
import { ApproveSceneButton } from "./approve-buttons";
|
||||
import { DenySceneButton } from "./deny-buttons";
|
||||
|
||||
import { List, Datagrid, TextField, DateField } from "react-admin";
|
||||
import { List, TextInput, Datagrid, TextField, DateField, Filter } from "react-admin";
|
||||
|
||||
const SceneFilter = props => (
|
||||
<Filter {...props}>
|
||||
<TextInput label="Search Name" source="name" alwaysOn />
|
||||
<TextInput label="Search SID" source="scene_sid" alwaysOn />
|
||||
</Filter>
|
||||
);
|
||||
|
||||
export const PendingSceneList = props => (
|
||||
<List {...props}>
|
||||
<List {...props} filters={<SceneFilter />}>
|
||||
<Datagrid>
|
||||
<OwnedFileImage source="screenshot_owned_file_id" />
|
||||
<OwnedFileSizeField label="Model size" source="model_owned_file_id" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче