# HG changeset patch # User Sylvain Thénault # Date 1287043680 -7200 # Node ID 34359fbde6ef1627fd82c04c70bed30ed03503c7 # Parent 6ea74c34fc2599bffd55d15ffd53073556a1a0c0 [components] add missing imports for code copied/pasted. Forgot to run pylint afterward... diff -r 6ea74c34fc25 -r 34359fbde6ef web/box.py --- a/web/box.py Thu Oct 14 09:49:59 2010 +0200 +++ b/web/box.py Thu Oct 14 10:08:00 2010 +0200 @@ -23,7 +23,7 @@ from logilab.mtconverter import xml_escape from logilab.common.deprecation import class_deprecated, class_renamed -from cubicweb import Unauthorized, role as get_role, target as get_target +from cubicweb import Unauthorized, role as get_role from cubicweb.schema import display_name from cubicweb.selectors import no_cnx, one_line_rset from cubicweb.view import View diff -r 6ea74c34fc25 -r 34359fbde6ef web/component.py --- a/web/component.py Thu Oct 14 09:49:59 2010 +0200 +++ b/web/component.py Thu Oct 14 10:08:00 2010 +0200 @@ -27,7 +27,8 @@ from logilab.common.deprecation import class_deprecated, class_renamed from logilab.mtconverter import xml_escape -from cubicweb import Unauthorized, role, tags +from cubicweb import Unauthorized, role, target, tags +from cubicweb.schema import display_name from cubicweb.uilib import js, domid from cubicweb.utils import json_dumps from cubicweb.view import ReloadableMixIn, Component @@ -35,7 +36,7 @@ non_final_entity, partial_relation_possible, partial_has_related_entities) from cubicweb.appobject import AppObject -from cubicweb.web import htmlwidgets, stdmsgs +from cubicweb.web import INTERNAL_FIELD_VALUE, htmlwidgets, stdmsgs # abstract base class for navigation components ################################ @@ -362,7 +363,7 @@ class EditRelationMixIn(ReloadableMixIn): def box_item(self, entity, etarget, rql, label): """builds HTML link to edit relation between `entity` and `etarget`""" - args = {role(self)[0] : entity.eid, get_target(self)[0] : etarget.eid} + args = {role(self)[0] : entity.eid, target(self)[0] : etarget.eid} url = self._cw.user_rql_callback((rql, args)) # for each target, provide a link to edit the relation return u'[%s] %s' % (xml_escape(url), label,