File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ class Dashboard extends React.Component {
101
101
addClass : true ,
102
102
removeClass : true ,
103
103
clearAllDataFromClass : false , //This still goes through ruby
104
+ exportClass : false , //Still goes through ruby
104
105
} ,
105
106
cloudCode : {
106
107
viewCode : true ,
Original file line number Diff line number Diff line change @@ -32,11 +32,13 @@ let BrowserToolbar = ({
32
32
onAddRow,
33
33
onExport,
34
34
onRemoveColumn,
35
- enableDeleteAllRows,
36
35
onDeleteRows,
37
36
onDropClass,
38
37
updateCLP,
39
38
hidePerms,
39
+
40
+ enableDeleteAllRows,
41
+ enableExportClass,
40
42
} ) => {
41
43
let selectionLength = Object . keys ( selection ) . length ;
42
44
let details = [ ] ;
@@ -74,17 +76,17 @@ let BrowserToolbar = ({
74
76
menu = (
75
77
< BrowserMenu title = 'Edit' icon = 'edit-solid' >
76
78
< MenuItem text = 'Add a row' onClick = { onAddRow } />
79
+ < MenuItem text = 'Add a column' onClick = { onAddColumn } />
80
+ < Separator />
77
81
< MenuItem
78
82
disabled = { selectionLength === 0 }
79
83
text = { selectionLength === 1 && ! selection [ '*' ] ? 'Delete this row' : 'Delete these rows' }
80
84
onClick = { ( ) => onDeleteRows ( selection ) } />
81
- < MenuItem text = 'Add a column' onClick = { onAddColumn } />
82
85
< MenuItem text = 'Delete a column' onClick = { onRemoveColumn } />
83
- < Separator />
84
- < MenuItem text = 'Export this data' onClick = { onExport } />
85
- < Separator />
86
86
{ enableDeleteAllRows ? < MenuItem text = 'Delete all rows' onClick = { ( ) => onDeleteRows ( { '*' : true } ) } /> : < noscript /> }
87
87
< MenuItem text = 'Delete this class' onClick = { onDropClass } />
88
+ { enableExportClass ? < Separator /> : < noscript /> }
89
+ { enableExportClass ? < MenuItem text = 'Export this data' onClick = { onExport } /> : < noscript /> }
88
90
</ BrowserMenu >
89
91
) ;
90
92
}
Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ export default class DataBrowser extends React.Component {
197
197
classNameForPermissionsEditor = { className }
198
198
setCurrent = { this . setCurrent . bind ( this ) }
199
199
enableDeleteAllRows = { this . context . currentApp . enabledFeatures . schemas . clearAllDataFromClass }
200
+ enableExportClass = { this . context . currentApp . enabledFeatures . schemas . exportClass }
200
201
{ ...other } />
201
202
</ div >
202
203
) ;
You can’t perform that action at this time.
0 commit comments