def delete_luggage(self, client, params = None): if params == None: dialog = render_to_string("opensim/delete_luggage_confirmation.html") return {'data':{'dom':{'dialog':dialog}}} else: deleted = Luggage.delete_luggage(params) online_simulators = Simulators.get_simulators(online=True) if deleted: response = { 'status':{ 'code':'SCENES_DELETE_OK', 'i18n':_('Deleted: %(deleted)s inventory archive file(s) ') % {'deleted':deleted}, 'type': HWIOS.ws_realm._t['notify-info'] } } else: response = { 'status':{ 'code':'SCENES_DELETE_FAIL', 'i18n':_('Failed to delete inventory archive file(s). Invalid characters!'), 'type': HWIOS.ws_realm._t['notify-error'] } } response.update(self.view_avatars(client)) return response
def delete_luggage(self, client, params = None): """Either renders the template that shows the dialog to confirm lugguge deletion, or handle the luggage deletion process itself. :param Client client: The requesting client :param dict params: Optional; contains the form parameters :return: dict - Status and Html-layout data response """ if params == None: dialog = render_to_string("opensim/delete_luggage_confirmation.html") return {'data':{'dom':{'dialog':dialog}}} else: deleted = Luggage.delete_luggage(params) online_simulators = Simulators.get_simulators(online=True) if deleted: response = { 'status':{ 'code':'SCENES_DELETE_OK', 'i18n':_('Deleted: %(deleted)s inventory archive file(s) ') % {'deleted':deleted}, 'type': HWIOS.ws_realm._t['notify-info'] } } else: response = { 'status':{ 'code':'SCENES_DELETE_FAIL', 'i18n':_('Failed to delete inventory archive file(s). Invalid characters!'), 'type': HWIOS.ws_realm._t['notify-error'] } } response.update(self.view_avatars(client)) return response