{# Copyright (C) 2006-2023 Edgewall Software This software is licensed as described in the file COPYING, which you should have received as part of this distribution. The terms are also available at https://trac.edgewall.org/wiki/TracLicense. This software consists of voluntary contributions made by many individuals. For the exact contribution history, see the revision history and logs, available at https://trac.edgewall.org/. #} ## Query view # extends 'layout.html' # block title ${title} ${ super() } # endblock title ## FIXME: find a way to make that the default... # block head ${ super() } # endblock head # block content

${title} (${ ngettext('%(num)s match', '%(num)s matches', query.num_items) })

# if description:
${wiki_to_html(context.child(report_resource), description)}
# endif
${jmacros.form_token_input()}
${_("Filters")} # for constraints in (clauses or [{}]): # set clause_num = loop.index0 # set clause_pre = '%d_' % loop.index0 # endfor
 
${_("Or")}
 
# for field_name in field_names if field_name in constraints: # set field = fields[field_name] # set n_field_name = clause_pre + field_name # set constraint = constraints[field_name] # set multiline = field.type in ('select', 'text', 'textarea', 'time') # for constraint_value in constraint['values']: # if multiline or loop.first: # if loop.first: # if field.type not in ('radio', 'checkbox', 'time'): # endif # else: ## not the first line of a multiline constraint # endif # endif # endfor # endfor # if loop.last: # endif
# if field.type == 'select': # elif field.type == 'radio': # for option in field.options: # endfor # elif field.type == 'checkbox': # elif field.type in ('text', 'textarea', 'id'): # elif field.type == 'time': # set start, end = '..' in constraint_value and constraint_value.split('..', 1) or (constraint_value, '') # set format = field.get('format', 'datetime') # set date_or_datetime = 'date' if format == 'relative' else format # set start_picker # endset # set end_picker # endset # trans start=start_picker, end=end_picker # endtrans # endif
  
 
## Allow the user to decide what columns to include in the ## output of the query
${_("Columns")}
# for column in all_columns: # endfor

## Allow the user to decide what rows to include in the ## output of the query ${_("Show under each result:")} # for column in all_textareas: # endfor

# if report_resource: # endif # if query.desc: # endif

# include 'query_results.html' # if tickets: # include 'batch_modify.html' ignore missing # endif
# set edit = report_resource and 'REPORT_MODIFY' in perm(report_resource) # set new = 'REPORT_CREATE' in perm('report') # set delete = report_resource and 'REPORT_DELETE' in perm(report_resource) # if edit:
# endif # if new or edit:
# endif # if delete:
# endif
# call(note, page) jmacros.wikihelp('TracQuery'): # trans note, page ${note} See ${page} for help on using queries. # endtrans # endcall
${ super() } # endblock content