rql_download.views.components.SaveCWSearchFilterBox

class rql_download.views.components.SaveCWSearchFilterBox(req, **extra)[source]

Class that enables us to display a ‘Save search’ box when the selected entities fulfill the ‘__select__’ requirements.

  • This component shows up if the current rset is adaptable.
  • This component is integrated in the CW facet component
  • The global parameters ‘RQL_DOWNLOAD_ENTITIES’, ‘RQL_DOWNLOAD_EXPORT_ENTITIES’ and ‘RQL_DOWNLOAD_FSET_ENTITIES’ specify which entities can be downloaded (ie. are adaptable).

Methods

__init__(req, **extra)
action_link(action)
append(item)
critical(msg, *args, **kwargs) Log ‘msg % args’ with severity ‘CRITICAL’.
cw_propval(propid) return cw property value associated to key
debug(msg, *args, **kwargs) Log ‘msg % args’ with severity ‘DEBUG’.
error(msg, *args, **kwargs) Log ‘msg % args’ with severity ‘ERROR’.
exception(msg, *args, **kwargs) Convenience method for logging an ERROR with exception information.
generate_form(w, rset, divid, vid[, ...]) display a form to filter some view’s content
info(msg, *args, **kwargs) Log ‘msg % args’ with severity ‘INFO’.
init_rendering() init rendering callback: that’s the good time to check your component
layout_render(w, **kwargs)
layout_select_args()
layout_widgets(w, wdgs) layout widgets: by default simply render each of them
link(title, url, **kwargs)
render(w, **kwargs) Render the facet box only if something has to be displayed.
render_body(w, **kwargs) Method that generates the html elements to display the ‘Save search’ box.
render_items(w[, items, klass])
render_title(w) return the title for this component
search_link(rset) Method that generates the url of the CWSearch form we want to save.
separator()
sorted_widgets(wdgs) sort widgets: by default sort by widget height, then according to
warning(msg, *args, **kwargs) Log ‘msg % args’ with severity ‘WARNING’.

Attributes

categories_in_order
context
contextual
cssclass return the CSS class name for this component
cw_property_defs
domid return the HTML DOM identifier for this component
layout_args
layout_id
linkbox_template
needs_css
needs_js
order
title
visible
__module__ = 'rql_download.views.components'
__regid__ = 'facet.filterbox'
_get_context()[source]

Method to get the in context box information.

context = 'left'
order = 0
render(w, **kwargs)[source]

Render the facet box only if something has to be displayed.

render_body(w, **kwargs)[source]

Method that generates the html elements to display the ‘Save search’ box.

Note

This method only consider the first registered ‘rqldownload-adapters’ action to generate the resources associated with the current search.

If the ‘eid’ attribute is in the RQL do not show the facets.

Method that generates the url of the CWSearch form we want to save.

title = u'Filter'
visible = True