25 from itertools import repeat, chain |
25 from itertools import repeat, chain |
26 |
26 |
27 from cubicweb.selectors import is_instance, score_entity, match_user_groups |
27 from cubicweb.selectors import is_instance, score_entity, match_user_groups |
28 from cubicweb.view import EntityView, StartupView |
28 from cubicweb.view import EntityView, StartupView |
29 from cubicweb.schema import META_RTYPES, VIRTUAL_RTYPES, display_name |
29 from cubicweb.schema import META_RTYPES, VIRTUAL_RTYPES, display_name |
30 from cubicweb.web import uicfg |
30 from cubicweb.web import uicfg, formwidgets as wdgs |
31 from cubicweb.web.views import tabs, actions |
31 from cubicweb.web.views import tabs, actions |
32 |
32 |
33 |
33 |
34 _abaa = uicfg.actionbox_appearsin_addmenu |
34 _abaa = uicfg.actionbox_appearsin_addmenu |
35 _abaa.tag_object_of(('CWSourceSchemaConfig', 'cw_schema', '*'), False) |
35 _abaa.tag_object_of(('CWSourceSchemaConfig', 'cw_schema', '*'), False) |
36 _abaa.tag_object_of(('CWSourceSchemaConfig', 'cw_for_source', '*'), False) |
36 _abaa.tag_object_of(('CWSourceSchemaConfig', 'cw_for_source', '*'), False) |
|
37 |
|
38 _afs = uicfg.autoform_section |
|
39 _afs.tag_attribute(('CWSource', 'synchronizing'), 'main', 'hidden') |
|
40 _afs.tag_object_of(('*', 'cw_for_source', 'CWSource'), 'main', 'hidden') |
|
41 _affk = uicfg.autoform_field_kwargs |
|
42 _affk.tag_attribute(('CWSource', 'parser'), {'widget': wdgs.TextInput}) |
37 |
43 |
38 # source primary views ######################################################### |
44 # source primary views ######################################################### |
39 |
45 |
40 _pvs = uicfg.primaryview_section |
46 _pvs = uicfg.primaryview_section |
41 _pvs.tag_object_of(('*', 'cw_for_source', 'CWSource'), 'hidden') |
47 _pvs.tag_object_of(('*', 'cw_for_source', 'CWSource'), 'hidden') |