kopia lustrzana https://github.com/OpenDroneMap/WebODM
Propagate publicEdit flag
rodzic
2d83fb039e
commit
921cfa3e74
|
@ -11,6 +11,7 @@ class MapView extends React.Component {
|
|||
selectedMapType: 'auto',
|
||||
title: "",
|
||||
public: false,
|
||||
publicEdit: false,
|
||||
shareButtons: true,
|
||||
permissions: ["view"]
|
||||
};
|
||||
|
@ -20,6 +21,7 @@ class MapView extends React.Component {
|
|||
selectedMapType: PropTypes.oneOf(['auto', 'orthophoto', 'plant', 'dsm', 'dtm']),
|
||||
title: PropTypes.string,
|
||||
public: PropTypes.bool,
|
||||
publicEdit: PropTypes.bool,
|
||||
shareButtons: PropTypes.bool,
|
||||
permissions: PropTypes.array
|
||||
};
|
||||
|
@ -152,6 +154,7 @@ class MapView extends React.Component {
|
|||
showBackground={true}
|
||||
mapType={this.state.selectedMapType}
|
||||
public={this.props.public}
|
||||
publicEdit={this.props.publicEdit}
|
||||
shareButtons={this.props.shareButtons}
|
||||
permissions={this.props.permissions}
|
||||
thermal={isThermal}
|
||||
|
|
|
@ -35,6 +35,7 @@ class Map extends React.Component {
|
|||
showBackground: false,
|
||||
mapType: "orthophoto",
|
||||
public: false,
|
||||
publicEdit: false,
|
||||
shareButtons: true,
|
||||
permissions: ["view"],
|
||||
thermal: false
|
||||
|
@ -45,6 +46,7 @@ class Map extends React.Component {
|
|||
tiles: PropTypes.array.isRequired,
|
||||
mapType: PropTypes.oneOf(['orthophoto', 'plant', 'dsm', 'dtm']),
|
||||
public: PropTypes.bool,
|
||||
publicEdit: PropTypes.bool,
|
||||
shareButtons: PropTypes.bool,
|
||||
permissions: PropTypes.array,
|
||||
thermal: PropTypes.bool
|
||||
|
|
|
@ -30,6 +30,7 @@ def handle_map(request, template, task_pk=None, hide_title=False):
|
|||
'map-items': json.dumps([task.get_map_items()]),
|
||||
'title': task.name if not hide_title else '',
|
||||
'public': 'true',
|
||||
'public-edit': str(task.public_edit).lower(),
|
||||
'share-buttons': 'false' if settings.DESKTOP_MODE else 'true',
|
||||
'selected-map-type': request.GET.get('t', 'auto'),
|
||||
'permissions': json.dumps(get_permissions(request.user, task.project))
|
||||
|
@ -51,6 +52,7 @@ def handle_model_display(request, template, task_pk=None):
|
|||
'params': {
|
||||
'task': json.dumps(task.get_model_display_params()),
|
||||
'public': 'true',
|
||||
'public-edit': str(task.public_edit).lower(),
|
||||
'share-buttons': 'false' if settings.DESKTOP_MODE else 'true'
|
||||
}.items()
|
||||
})
|
||||
|
|
Ładowanie…
Reference in New Issue