equal
deleted
inserted
replaced
26 |
26 |
27 from logilab.common.deprecation import deprecated |
27 from logilab.common.deprecation import deprecated |
28 |
28 |
29 from cubicweb.web._exceptions import * |
29 from cubicweb.web._exceptions import * |
30 from cubicweb.utils import json_dumps |
30 from cubicweb.utils import json_dumps |
|
31 from cubicweb.uilib import eid_param |
31 |
32 |
32 dumps = deprecated('[3.9] use cubicweb.utils.json_dumps instead of dumps')(json_dumps) |
33 dumps = deprecated('[3.9] use cubicweb.utils.json_dumps instead of dumps')(json_dumps) |
33 |
34 |
34 INTERNAL_FIELD_VALUE = '__cubicweb_internal_field__' |
35 INTERNAL_FIELD_VALUE = '__cubicweb_internal_field__' |
35 |
36 |
40 BUTTON_APPLY = (_('button_apply'), 'APPLY_ICON') |
41 BUTTON_APPLY = (_('button_apply'), 'APPLY_ICON') |
41 BUTTON_CANCEL = (_('button_cancel'), 'CANCEL_ICON') |
42 BUTTON_CANCEL = (_('button_cancel'), 'CANCEL_ICON') |
42 BUTTON_DELETE = (_('button_delete'), 'TRASH_ICON') |
43 BUTTON_DELETE = (_('button_delete'), 'TRASH_ICON') |
43 YES = (_('yes'), None) |
44 YES = (_('yes'), None) |
44 NO = (_('no'), None) |
45 NO = (_('no'), None) |
45 |
|
46 |
|
47 def eid_param(name, eid): |
|
48 assert eid is not None |
|
49 if eid is None: |
|
50 eid = '' |
|
51 return '%s:%s' % (name, eid) |
|
52 |
46 |
53 |
47 |
54 from logging import getLogger |
48 from logging import getLogger |
55 LOGGER = getLogger('cubicweb.web') |
49 LOGGER = getLogger('cubicweb.web') |
56 |
50 |