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