equal
deleted
inserted
replaced
205 class EtypeRestrictionComponent(component.Component): |
205 class EtypeRestrictionComponent(component.Component): |
206 """displays the list of entity types contained in the resultset |
206 """displays the list of entity types contained in the resultset |
207 to be able to filter accordingly. |
207 to be able to filter accordingly. |
208 """ |
208 """ |
209 __regid__ = 'etypenavigation' |
209 __regid__ = 'etypenavigation' |
210 __select__ = multi_etypes_rset() | match_form_params('__restrtype', '__restrtypes', |
210 __select__ = multi_etypes_rset() | match_form_params( |
211 '__restrrql') |
211 '__restrtype', '__restrtypes', '__restrrql') |
212 cw_property_defs = VISIBLE_PROP_DEF |
212 cw_property_defs = VISIBLE_PROP_DEF |
213 # don't want user to hide this component using an cwproperty |
213 # don't want user to hide this component using an cwproperty |
214 site_wide = True |
214 site_wide = True |
215 visible = False # disabled by default |
215 visible = False # disabled by default |
216 |
216 |
235 html.append(u'<span class="selected">%s</span>' % elabel) |
235 html.append(u'<span class="selected">%s</span>' % elabel) |
236 on_etype = True |
236 on_etype = True |
237 else: |
237 else: |
238 rqlst.save_state() |
238 rqlst.save_state() |
239 for select in rqlst.children: |
239 for select in rqlst.children: |
240 select.add_type_restriction(select.selection[0], etype) |
240 select.add_type_restriction(select.selection[0].variable, etype) |
241 newrql = rqlst.as_string(self._cw.encoding, self.cw_rset.args) |
241 newrql = rqlst.as_string(self._cw.encoding, self.cw_rset.args) |
242 url = self._cw.build_url(rql=newrql, __restrrql=restrrql, |
242 url = self._cw.build_url(rql=newrql, __restrrql=restrrql, |
243 __restrtype=etype, __restrtypes=','.join(restrtypes)) |
243 __restrtype=etype, __restrtypes=','.join(restrtypes)) |
244 html.append(u'<span><a href="%s">%s</a></span>' % ( |
244 html.append(u'<span><a href="%s">%s</a></span>' % ( |
245 xml_escape(url), elabel)) |
245 xml_escape(url), elabel)) |