import { Link } from 'react-router-dom';
import { Link as ButtonLink } from '@material-ui/core';
import { ResourceOwnerWithName, ResponsiblePerson } from 'views-components/data-explorer/renderers';
+import { MPVContainer, MPVPanelContent, MPVPanelState } from 'components/multi-panel-view/multi-panel-view';
type CssRules = 'root'
| 'button'
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
root: {
- display: 'flex',
- flexFlow: 'column',
- height: 'calc(100vh - 130px)', // (100% viewport height) - (top bar + breadcrumbs)
+ width: '100%',
},
button: {
cursor: 'pointer'
isWritable = true;
} else {
const itemOwner = getResource<GroupResource | UserResource>(item.ownerUuid)(state.resources);
- if (itemOwner) {
+ if (itemOwner && itemOwner.writableBy) {
isWritable = itemOwner.writableBy.indexOf(currentUserUUID || '') >= 0;
}
}
class extends React.Component<CollectionPanelProps> {
render() {
const { classes, item, dispatch, isWritable, isOldVersion, isLoadingFiles, tooManyFiles } = this.props;
+ const panelsData: MPVPanelState[] = [
+ {name: "Details"},
+ {name: "Properties", visible: false},
+ {name: "Files"},
+ ];
return item
- ? <div className={classes.root}>
- <ExpansionPanel data-cy='collection-info-panel' defaultExpanded>
+ ? <MPVContainer className={classes.root} spacing={8} direction="column" justify-content="flex-start" wrap="nowrap" panelStates={panelsData}>
+ <MPVPanelContent xs="auto"><ExpansionPanel data-cy='collection-info-panel' defaultExpanded>
<ExpansionPanelSummary expandIcon={<ExpandIcon />}>
<Grid container justify="space-between">
<Grid item xs={11}><span>
</Grid>
</Grid>
</ExpansionPanelDetails>
- </ExpansionPanel>
+ </ExpansionPanel></MPVPanelContent>
- <ExpansionPanel data-cy='collection-properties-panel' defaultExpanded>
+ <MPVPanelContent xs="auto"><ExpansionPanel data-cy='collection-properties-panel' defaultExpanded>
<ExpansionPanelSummary expandIcon={<ExpandIcon />}>
{"Properties"}
</ExpansionPanelSummary>
</Grid>
</Grid>
</ExpansionPanelDetails>
- </ExpansionPanel>
- <div className={classes.filesCard}>
+ </ExpansionPanel></MPVPanelContent>
+ <MPVPanelContent xs className={classes.filesCard}>
<CollectionPanelFiles
isWritable={isWritable}
isLoading={isLoadingFiles}
dispatch<any>(loadCollectionFiles(this.props.item.uuid));
}
} />
- </div>
- </div>
+ </MPVPanelContent>
+ </MPVContainer>
: null;
}
handleContextMenu = (event: React.MouseEvent<any>) => {
- const { uuid, ownerUuid, name, description, kind } = this.props.item;
+ const { uuid, ownerUuid, name, description, kind, storageClassesDesired } = this.props.item;
const menuKind = this.props.dispatch<any>(resourceUuidToContextMenuKind(uuid));
const resource = {
uuid,
ownerUuid,
name,
description,
+ storageClassesDesired,
kind,
menuKind,
};
<DetailsAttribute classLabel={classes.label} classValue={classes.value}
label='Content size' value={formatFileSize(item.fileSizeTotal)} />
</Grid>
+ <Grid item xs={12} md={mdSize}>
+ <DetailsAttribute classLabel={classes.label} classValue={classes.value}
+ label='Storage classes' value={item.storageClassesDesired.join(', ')} />
+ </Grid>
</Grid>;
};