## -*- coding: utf-8 -*- <%! from pylons import app_globals as g import mpulsweb.lib.helper.filters as F import mpulsweb.lib.helpers as h from mpulsweb.lib.translation import _ all_roles = ['admin', 'cm'] ## Fields to show in the case list. Each entry is a tuple of the form ## (TITLE, FIELDNAME, STYLE, ROLES, FORMATTER) ## Here, TITLE is the title of the field, FIELDNAME is the field name ## used in the search URL that's built for each column, STYLE is a CSS ## class name to use in the style attribute of the HTML TH-element, ## ROLES is a list with the names of the roles for which the field ## should be shown. Finally, FORMATTER is a python callable that is ## called with the case object as argument and which should return the ## formatted value for the column. fields = [] for d in g.agency.get_overview_fields(): f = d.name fn = d.overview_label fs = d.overview_style field = (fn,f,fs, all_roles, lambda case, d=d: h.shorten(h.format_object(case.get_value(d.name)), d.overview_length)) fields.append(field) %> <%def name="build_list_headers()"> % if g.mpuls_config.is_enabled('case-module', 'casebundle'):
${_('No data found.')} |