author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Fri, 13 Nov 2009 15:38:48 +0100 | |
branch | stable |
changeset 3849 | afba6d304e71 |
parent 3848 | adc706f312a2 |
child 3890 | d7a270f50f54 |
child 4212 | ab6573088b4a |
permissions | -rw-r--r-- |
0 | 1 |
"""Bases HTML components: |
2 |
||
3 |
* the rql input form |
|
4 |
* the logged user link |
|
2937
36b11249014e
[pdf] (ugly) pdf icon, component
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
2650
diff
changeset
|
5 |
* pdf view link |
0 | 6 |
|
7 |
:organization: Logilab |
|
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1968
diff
changeset
|
8 |
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
0 | 9 |
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1968
diff
changeset
|
10 |
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
0 | 11 |
""" |
12 |
__docformat__ = "restructuredtext en" |
|
1937 | 13 |
_ = unicode |
0 | 14 |
|
2313 | 15 |
from logilab.mtconverter import xml_escape |
0 | 16 |
from rql import parse |
17 |
||
1132 | 18 |
from cubicweb.selectors import yes, two_etypes_rset, match_form_params |
1699 | 19 |
from cubicweb.schema import display_name |
2313 | 20 |
from cubicweb.common.uilib import toggle_action |
1739 | 21 |
from cubicweb.web import component |
1699 | 22 |
from cubicweb.web.htmlwidgets import (MenuWidget, PopupBoxMenu, BoxSeparator, |
23 |
BoxLink) |
|
0 | 24 |
|
1511
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
25 |
VISIBLE_PROP_DEF = { |
1968
d3de0f44b57b
components should be visible by default, applmessages components should not be hideable
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1937
diff
changeset
|
26 |
_('visible'): dict(type='Boolean', default=True, |
1511
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
27 |
help=_('display the component or not')), |
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
28 |
} |
0 | 29 |
|
1554
3a3263df6cdd
new primary view using uicfg.rdisplay (major api cleanup)
sylvain.thenault@logilab.fr
parents:
1514
diff
changeset
|
30 |
class RQLInputForm(component.Component): |
0 | 31 |
"""build the rql input form, usually displayed in the header""" |
32 |
id = 'rqlinput' |
|
1511
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
33 |
property_defs = VISIBLE_PROP_DEF |
2120
ed1cd652b343
rqlinput should have its default visible property to false
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2119
diff
changeset
|
34 |
visible = False |
2172
cf8f9180e63e
delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
2120
diff
changeset
|
35 |
|
0 | 36 |
def call(self, view=None): |
37 |
if hasattr(view, 'filter_box_context_info'): |
|
38 |
rset = view.filter_box_context_info()[0] |
|
39 |
else: |
|
40 |
rset = self.rset |
|
41 |
# display multilines query as one line |
|
42 |
rql = rset is not None and rset.printable_rql(encoded=False) or self.req.form.get('rql', '') |
|
43 |
rql = rql.replace(u"\n", u" ") |
|
44 |
req = self.req |
|
45 |
self.w(u'''<div id="rqlinput" class="%s"> |
|
46 |
<form action="%s"> |
|
47 |
<fieldset> |
|
48 |
<input type="text" id="rql" name="rql" value="%s" title="%s" tabindex="%s" accesskey="q" class="searchField" /> |
|
851
33957ff2b790
use rql button
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
533
diff
changeset
|
49 |
<input type="submit" value="" class="rqlsubmit" tabindex="%s" /> |
0 | 50 |
</fieldset> |
2172
cf8f9180e63e
delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
2120
diff
changeset
|
51 |
''' % (not self.propval('visible') and 'hidden' or '', |
2312
af4d8f75c5db
use xml_escape
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2218
diff
changeset
|
52 |
self.build_url('view'), xml_escape(rql), req._('full text or RQL query'), req.next_tabindex(), |
851
33957ff2b790
use rql button
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
533
diff
changeset
|
53 |
req.next_tabindex())) |
0 | 54 |
if self.req.search_state[0] != 'normal': |
55 |
self.w(u'<input type="hidden" name="__mode" value="%s"/>' |
|
56 |
% ':'.join(req.search_state[1])) |
|
57 |
self.w(u'</form></div>') |
|
58 |
||
59 |
||
1554
3a3263df6cdd
new primary view using uicfg.rdisplay (major api cleanup)
sylvain.thenault@logilab.fr
parents:
1514
diff
changeset
|
60 |
class ApplLogo(component.Component): |
2476
1294a6bdf3bf
application -> instance where it makes sense
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2381
diff
changeset
|
61 |
"""build the instance logo, usually displayed in the header""" |
0 | 62 |
id = 'logo' |
1511
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
63 |
property_defs = VISIBLE_PROP_DEF |
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
64 |
# don't want user to hide this component using an cwproperty |
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
65 |
site_wide = True |
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
66 |
|
0 | 67 |
def call(self): |
68 |
self.w(u'<a href="%s"><img class="logo" src="%s" alt="logo"/></a>' |
|
69 |
% (self.req.base_url(), self.req.external_resource('LOGO'))) |
|
70 |
||
1554
3a3263df6cdd
new primary view using uicfg.rdisplay (major api cleanup)
sylvain.thenault@logilab.fr
parents:
1514
diff
changeset
|
71 |
class UserLink(component.Component): |
0 | 72 |
"""if the user is the anonymous user, build a link to login |
73 |
else a link to the connected user object with a loggout link |
|
74 |
""" |
|
1511
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
75 |
property_defs = VISIBLE_PROP_DEF |
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
76 |
# don't want user to hide this component using an cwproperty |
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
77 |
site_wide = True |
0 | 78 |
id = 'loggeduserlink' |
79 |
||
80 |
def call(self): |
|
81 |
if not self.req.cnx.anonymous_connection: |
|
82 |
# display useractions and siteactions |
|
2650
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2476
diff
changeset
|
83 |
actions = self.vreg['actions'].possible_actions(self.req, rset=self.rset) |
0 | 84 |
box = MenuWidget('', 'userActionsBox', _class='', islist=False) |
85 |
menu = PopupBoxMenu(self.req.user.login, isitem=False) |
|
86 |
box.append(menu) |
|
87 |
for action in actions.get('useractions', ()): |
|
88 |
menu.append(BoxLink(action.url(), self.req._(action.title), |
|
89 |
action.html_class())) |
|
90 |
if actions.get('useractions') and actions.get('siteactions'): |
|
91 |
menu.append(BoxSeparator()) |
|
92 |
for action in actions.get('siteactions', ()): |
|
93 |
menu.append(BoxLink(action.url(), self.req._(action.title), |
|
94 |
action.html_class())) |
|
95 |
box.render(w=self.w) |
|
96 |
else: |
|
97 |
self.anon_user_link() |
|
1511
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
98 |
|
0 | 99 |
def anon_user_link(self): |
100 |
if self.config['auth-mode'] == 'cookie': |
|
101 |
self.w(self.req._('anonymous')) |
|
2996
866a2c135c33
B #345282 xhtml requires to use   instead of
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
2650
diff
changeset
|
102 |
self.w(u''' [<a class="logout" href="javascript: popupLoginBox();">%s</a>]''' |
0 | 103 |
% (self.req._('i18n_login_popup'))) |
104 |
else: |
|
105 |
self.w(self.req._('anonymous')) |
|
2996
866a2c135c33
B #345282 xhtml requires to use   instead of
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
2650
diff
changeset
|
106 |
self.w(u' [<a class="logout" href="%s">%s</a>]' |
0 | 107 |
% (self.build_url('login'), self.req._('login'))) |
108 |
||
109 |
||
1554
3a3263df6cdd
new primary view using uicfg.rdisplay (major api cleanup)
sylvain.thenault@logilab.fr
parents:
1514
diff
changeset
|
110 |
class ApplicationMessage(component.Component): |
2476
1294a6bdf3bf
application -> instance where it makes sense
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2381
diff
changeset
|
111 |
"""display messages given using the __message parameter into a special div |
1294a6bdf3bf
application -> instance where it makes sense
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2381
diff
changeset
|
112 |
section |
0 | 113 |
""" |
742
99115e029dca
replaced most of __selectors__ assignments with __select__
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
692
diff
changeset
|
114 |
__select__ = yes() |
0 | 115 |
id = 'applmessages' |
1511
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
116 |
# don't want user to hide this component using an cwproperty |
1968
d3de0f44b57b
components should be visible by default, applmessages components should not be hideable
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1937
diff
changeset
|
117 |
property_defs = {} |
0 | 118 |
|
119 |
def call(self): |
|
120 |
msgs = [msg for msg in (self.req.get_shared_data('sources_error', pop=True), |
|
121 |
self.req.message) if msg] |
|
122 |
self.w(u'<div id="appMsg" onclick="%s" class="%s">\n' % |
|
123 |
(toggle_action('appMsg'), (msgs and ' ' or 'hidden'))) |
|
124 |
for msg in msgs: |
|
125 |
self.w(u'<div class="message" id="%s">%s</div>' % ( |
|
126 |
self.div_id(), msg)) |
|
127 |
self.w(u'</div>') |
|
128 |
||
129 |
||
1554
3a3263df6cdd
new primary view using uicfg.rdisplay (major api cleanup)
sylvain.thenault@logilab.fr
parents:
1514
diff
changeset
|
130 |
class ApplicationName(component.Component): |
2476
1294a6bdf3bf
application -> instance where it makes sense
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2381
diff
changeset
|
131 |
"""display the instance name""" |
0 | 132 |
id = 'appliname' |
1511
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
133 |
property_defs = VISIBLE_PROP_DEF |
1739 | 134 |
# don't want user to hide this component using an cwproperty |
135 |
site_wide = True |
|
0 | 136 |
|
137 |
def call(self): |
|
2119
dc1eedd06766
deal with empty site-title
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
138 |
title = self.req.property_value('ui.site-title') |
dc1eedd06766
deal with empty site-title
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
139 |
if title: |
dc1eedd06766
deal with empty site-title
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
140 |
self.w(u'<span id="appliName"><a href="%s">%s</a></span>' % ( |
3166
2413e5291e8d
properly escape site-title
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2996
diff
changeset
|
141 |
self.req.base_url(), xml_escape(title))) |
1511
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
142 |
|
0 | 143 |
|
1554
3a3263df6cdd
new primary view using uicfg.rdisplay (major api cleanup)
sylvain.thenault@logilab.fr
parents:
1514
diff
changeset
|
144 |
class SeeAlsoVComponent(component.RelatedObjectsVComponent): |
0 | 145 |
"""display any entity's see also""" |
146 |
id = 'seealso' |
|
147 |
context = 'navcontentbottom' |
|
148 |
rtype = 'see_also' |
|
1554
3a3263df6cdd
new primary view using uicfg.rdisplay (major api cleanup)
sylvain.thenault@logilab.fr
parents:
1514
diff
changeset
|
149 |
role = 'subject' |
0 | 150 |
order = 40 |
151 |
# register msg not generated since no entity use see_also in cubicweb itself |
|
152 |
title = _('contentnavigation_seealso') |
|
153 |
help = _('contentnavigation_seealso_description') |
|
154 |
||
1511
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
155 |
|
1554
3a3263df6cdd
new primary view using uicfg.rdisplay (major api cleanup)
sylvain.thenault@logilab.fr
parents:
1514
diff
changeset
|
156 |
class EtypeRestrictionComponent(component.Component): |
0 | 157 |
"""displays the list of entity types contained in the resultset |
158 |
to be able to filter accordingly. |
|
159 |
""" |
|
160 |
id = 'etypenavigation' |
|
758
0c0dfd33a76d
instantiate selectors wherever needed
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
742
diff
changeset
|
161 |
__select__ = two_etypes_rset() | match_form_params('__restrtype', '__restrtypes', |
0c0dfd33a76d
instantiate selectors wherever needed
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
742
diff
changeset
|
162 |
'__restrrql') |
1511
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
163 |
property_defs = VISIBLE_PROP_DEF |
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
164 |
# don't want user to hide this component using an cwproperty |
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
165 |
site_wide = True |
0 | 166 |
visible = False # disabled by default |
1511
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
167 |
|
0 | 168 |
def call(self): |
169 |
_ = self.req._ |
|
170 |
self.w(u'<div id="etyperestriction">') |
|
171 |
restrtype = self.req.form.get('__restrtype') |
|
172 |
restrtypes = self.req.form.get('__restrtypes', '').split(',') |
|
173 |
restrrql = self.req.form.get('__restrrql') |
|
174 |
if not restrrql: |
|
175 |
rqlst = self.rset.syntax_tree() |
|
176 |
restrrql = rqlst.as_string(self.req.encoding, self.rset.args) |
|
177 |
restrtypes = self.rset.column_types(0) |
|
178 |
else: |
|
179 |
rqlst = parse(restrrql) |
|
180 |
html = [] |
|
181 |
on_etype = False |
|
182 |
etypes = sorted((display_name(self.req, etype).capitalize(), etype) |
|
183 |
for etype in restrtypes) |
|
184 |
for elabel, etype in etypes: |
|
185 |
if etype == restrtype: |
|
186 |
html.append(u'<span class="selected">%s</span>' % elabel) |
|
187 |
on_etype = True |
|
188 |
else: |
|
189 |
rqlst.save_state() |
|
190 |
for select in rqlst.children: |
|
191 |
select.add_type_restriction(select.selection[0], etype) |
|
192 |
newrql = rqlst.as_string(self.req.encoding, self.rset.args) |
|
193 |
url = self.build_url(rql=newrql, __restrrql=restrrql, |
|
194 |
__restrtype=etype, __restrtypes=','.join(restrtypes)) |
|
195 |
html.append(u'<span><a href="%s">%s</a></span>' % ( |
|
2312
af4d8f75c5db
use xml_escape
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2218
diff
changeset
|
196 |
xml_escape(url), elabel)) |
0 | 197 |
rqlst.recover() |
198 |
if on_etype: |
|
199 |
url = self.build_url(rql=restrrql) |
|
200 |
html.insert(0, u'<span><a href="%s">%s</a></span>' % ( |
|
201 |
url, _('Any'))) |
|
202 |
else: |
|
203 |
html.insert(0, u'<span class="selected">%s</span>' % _('Any')) |
|
2996
866a2c135c33
B #345282 xhtml requires to use   instead of
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
2650
diff
changeset
|
204 |
self.w(u' | '.join(html)) |
0 | 205 |
self.w(u'</div>') |
1511
514e4e53a3c7
do not set visible property by default
sylvain.thenault@logilab.fr
parents:
1132
diff
changeset
|
206 |
|
3840
2eff4348b1e4
prepare support for a 'context toolbar', used in tracker but will much probably be backported in default primary view. Turn pdfview component into a toolbar element
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3818
diff
changeset
|
207 |
|
2eff4348b1e4
prepare support for a 'context toolbar', used in tracker but will much probably be backported in default primary view. Turn pdfview component into a toolbar element
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3818
diff
changeset
|
208 |
class PdfViewComponent(component.EntityVComponent): |
2eff4348b1e4
prepare support for a 'context toolbar', used in tracker but will much probably be backported in default primary view. Turn pdfview component into a toolbar element
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3818
diff
changeset
|
209 |
id = 'view_page_as_pdf' |
2eff4348b1e4
prepare support for a 'context toolbar', used in tracker but will much probably be backported in default primary view. Turn pdfview component into a toolbar element
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3818
diff
changeset
|
210 |
context = 'ctxtoolbar' |
2937
36b11249014e
[pdf] (ugly) pdf icon, component
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
2650
diff
changeset
|
211 |
|
3840
2eff4348b1e4
prepare support for a 'context toolbar', used in tracker but will much probably be backported in default primary view. Turn pdfview component into a toolbar element
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3818
diff
changeset
|
212 |
def cell_call(self, row, col, view): |
2eff4348b1e4
prepare support for a 'context toolbar', used in tracker but will much probably be backported in default primary view. Turn pdfview component into a toolbar element
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3818
diff
changeset
|
213 |
entity = self.entity(row, col) |
2eff4348b1e4
prepare support for a 'context toolbar', used in tracker but will much probably be backported in default primary view. Turn pdfview component into a toolbar element
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3818
diff
changeset
|
214 |
url = entity.absolute_url(vid=view.id, __template='pdf-main-template') |
2eff4348b1e4
prepare support for a 'context toolbar', used in tracker but will much probably be backported in default primary view. Turn pdfview component into a toolbar element
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3818
diff
changeset
|
215 |
iconurl = self.req.build_url('data/pdf_icon.gif') |
2eff4348b1e4
prepare support for a 'context toolbar', used in tracker but will much probably be backported in default primary view. Turn pdfview component into a toolbar element
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3818
diff
changeset
|
216 |
label = self.req._('Download page as pdf') |
2eff4348b1e4
prepare support for a 'context toolbar', used in tracker but will much probably be backported in default primary view. Turn pdfview component into a toolbar element
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3818
diff
changeset
|
217 |
self.w(u'<a href="%s" title="%s" class="toolbarButton"><img src="%s" alt="%s"/></a>' % |
2eff4348b1e4
prepare support for a 'context toolbar', used in tracker but will much probably be backported in default primary view. Turn pdfview component into a toolbar element
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3818
diff
changeset
|
218 |
(xml_escape(url), label, iconurl, label)) |
2937
36b11249014e
[pdf] (ugly) pdf icon, component
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
2650
diff
changeset
|
219 |
|
36b11249014e
[pdf] (ugly) pdf icon, component
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
2650
diff
changeset
|
220 |
|
143
c4f11f70b75e
adding two different rss feed component
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
142
diff
changeset
|
221 |
|
3844
c2625c512085
stop calling render_entity_metadata in primary view, provides a
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3840
diff
changeset
|
222 |
class MetaDataComponent(component.EntityVComponent): |
c2625c512085
stop calling render_entity_metadata in primary view, provides a
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3840
diff
changeset
|
223 |
id = 'metadata' |
c2625c512085
stop calling render_entity_metadata in primary view, provides a
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3840
diff
changeset
|
224 |
context = 'navbottom' |
c2625c512085
stop calling render_entity_metadata in primary view, provides a
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3840
diff
changeset
|
225 |
order = 1 |
c2625c512085
stop calling render_entity_metadata in primary view, provides a
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3840
diff
changeset
|
226 |
|
c2625c512085
stop calling render_entity_metadata in primary view, provides a
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3840
diff
changeset
|
227 |
def cell_call(self, row, col, view=None): |
c2625c512085
stop calling render_entity_metadata in primary view, provides a
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3840
diff
changeset
|
228 |
self.wview('metadata', self.rset, row=row, col=col) |
c2625c512085
stop calling render_entity_metadata in primary view, provides a
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3840
diff
changeset
|
229 |
|
3848 | 230 |
|
796
62253c7fe5ba
require explicit registration control
sylvain.thenault@logilab.fr
parents:
758
diff
changeset
|
231 |
def registration_callback(vreg): |
62253c7fe5ba
require explicit registration control
sylvain.thenault@logilab.fr
parents:
758
diff
changeset
|
232 |
vreg.register_all(globals().values(), __name__, (SeeAlsoVComponent,)) |
62253c7fe5ba
require explicit registration control
sylvain.thenault@logilab.fr
parents:
758
diff
changeset
|
233 |
if 'see_also' in vreg.schema: |
62253c7fe5ba
require explicit registration control
sylvain.thenault@logilab.fr
parents:
758
diff
changeset
|
234 |
vreg.register(SeeAlsoVComponent) |