19 |
19 |
20 from logilab.common.decorators import cached |
20 from logilab.common.decorators import cached |
21 from logilab.mtconverter import html_escape, TransformError |
21 from logilab.mtconverter import html_escape, TransformError |
22 |
22 |
23 from cubicweb import Unauthorized, NoSelectableObject, typed_eid |
23 from cubicweb import Unauthorized, NoSelectableObject, typed_eid |
24 from cubicweb.common.selectors import (yes_selector, anyrset_selector, accept_selector, |
24 from cubicweb.common.selectors import (yes, nonempty_rset, accept_selector, |
25 onelinerset_selector, searchstate_selector, |
25 one_line_rset, searchstate_selector, |
26 req_form_params_selector, accept_rset_selector) |
26 req_form_params_selector, accept_rset_selector) |
27 from cubicweb.common.uilib import (cut, printable_value, UnicodeCSVWriter, |
27 from cubicweb.common.uilib import (cut, printable_value, UnicodeCSVWriter, |
28 ajax_replace_url, rql_for_eid) |
28 ajax_replace_url, rql_for_eid) |
29 from cubicweb.common.view import EntityView, AnyRsetView, EmptyRsetView |
29 from cubicweb.common.view import EntityView, AnyRsetView, EmptyRsetView |
30 from cubicweb.web.httpcache import MaxAgeHTTPCacheManager |
30 from cubicweb.web.httpcache import MaxAgeHTTPCacheManager |
759 """view called by the edition view when the user asks |
759 """view called by the edition view when the user asks |
760 to search for something to link to the edited eid |
760 to search for something to link to the edited eid |
761 """ |
761 """ |
762 id = 'search-associate' |
762 id = 'search-associate' |
763 title = _('search for association') |
763 title = _('search for association') |
764 __selectors__ = (onelinerset_selector, searchstate_selector, accept_selector) |
764 __selectors__ = (one_line_rset, searchstate_selector, accept_selector) |
765 accepts = ('Any',) |
765 accepts = ('Any',) |
766 search_states = ('linksearch',) |
766 search_states = ('linksearch',) |
767 |
767 |
768 def cell_call(self, row, col): |
768 def cell_call(self, row, col): |
769 rset, vid, divid, paginate = self.filter_box_context_info() |
769 rset, vid, divid, paginate = self.filter_box_context_info() |