diff options
| author | monikahedman <monika_hedman@brown.edu> | 2019-08-21 10:23:23 -0400 |
|---|---|---|
| committer | monikahedman <monika_hedman@brown.edu> | 2019-08-21 10:23:23 -0400 |
| commit | 4a6231e1631cda4f3f09ce0202538108609a8d47 (patch) | |
| tree | 41a355f31456e9181ec30ba85b746080add71282 /src/client/views/collections/CollectionView.tsx | |
| parent | 2423533d1044ed14b5b356709234bbaa27fd2561 (diff) | |
| parent | 9984f2f19001c07e63738947172e12da25e4498e (diff) | |
pulled from master
Diffstat (limited to 'src/client/views/collections/CollectionView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionView.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx index 7e1adaa19..3a8253720 100644 --- a/src/client/views/collections/CollectionView.tsx +++ b/src/client/views/collections/CollectionView.tsx @@ -108,9 +108,13 @@ export class CollectionView extends React.Component<FieldViewProps> { ContextMenu.Instance.addItem({ description: "View Modes...", subitems: subItems, icon: "eye" }); let existing = ContextMenu.Instance.findByDescription("Layout..."); let layoutItems: ContextMenuProps[] = existing && "subitems" in existing ? existing.subitems : []; - layoutItems.push({ description: "Create Layout Instance", event: () => this.props.addDocTab && this.props.addDocTab(Doc.ApplyTemplate(this.props.Document)!, undefined, "onRight"), icon: "project-diagram" }); layoutItems.push({ description: `${this.props.Document.forceActive ? "Select" : "Force"} Contents Active`, event: () => this.props.Document.forceActive = !this.props.Document.forceActive, icon: "project-diagram" }); !existing && ContextMenu.Instance.addItem({ description: "Layout...", subitems: layoutItems, icon: "hand-point-right" }); + + let makes = ContextMenu.Instance.findByDescription("Make..."); + let makeItems: ContextMenuProps[] = makes && "subitems" in makes ? makes.subitems : []; + makeItems.push({ description: "Template Layout Instance", event: () => this.props.addDocTab && this.props.addDocTab(Doc.ApplyTemplate(this.props.Document)!, undefined, "onRight"), icon: "project-diagram" }); + !makes && ContextMenu.Instance.addItem({ description: "Make...", subitems: makeItems, icon: "hand-point-right" }); } } |
