|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
if:query.report_href ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
var:query.report_href ?>">Available Reports
|
|
|
ef5584 |
Custom Query
|
|
|
ef5584 |
/if ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
(
|
|
|
ef5584 |
alt:v ?>No matches)
|
|
|
ef5584 |
/def ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<form id="query" method="post" action="<?cs var:trac.href.query ?>">
|
|
|
ef5584 |
<fieldset id="filters">
|
|
|
ef5584 |
<legend>Filters</legend>
|
|
|
ef5584 |
|
|
|
ef5584 |
set:checked = 0 ?>
|
|
|
ef5584 |
each:value = constraint.values ?>
|
|
|
ef5584 |
if:(value == option) == (constraint.mode == '') ?>
|
|
|
ef5584 |
set:checked = 1 ?>
|
|
|
ef5584 |
/if ?>
|
|
|
ef5584 |
/each ?>
|
|
|
ef5584 |
if:checked ?> checked="checked"
|
|
|
ef5584 |
/def ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
each:field = query.fields ?>
|
|
|
ef5584 |
each:constraint = query.constraints ?>
|
|
|
ef5584 |
if:name(field) == name(constraint) ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
<label></label>
|
|
|
ef5584 |
if:field.type != "radio" && field.type != "checkbox" ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
<select name="<?cs var:name(field) ?>_mode">
|
|
|
ef5584 |
each:mode = query.modes[field.type] ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
if:mode.value == constraint.mode ?> selected="selected"
|
|
|
ef5584 |
/if ?>></option>
|
|
|
ef5584 |
/each ?>
|
|
|
ef5584 |
</select>
|
|
|
ef5584 |
|
|
|
ef5584 |
/if ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
if:field.type == "radio" || field.type == "checkbox" ?> colspan="2"
|
|
|
ef5584 |
/if ?>>
|
|
|
ef5584 |
if:field.type == "select" ?>
|
|
|
ef5584 |
each:value = constraint.values ?>
|
|
|
ef5584 |
<select name="<?cs var:name(constraint) ?>"><option></option>
|
|
|
ef5584 |
each:option = field.options ?>
|
|
|
ef5584 |
<option<?cs if:option == value ?> selected="selected">
|
|
|
ef5584 |
var:option ?></option>
|
|
|
ef5584 |
/each ?></select>
|
|
|
ef5584 |
if:name(value) != len(constraint.values) - 1 ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
var:name(field) ?>_" value="-" />
|
|
|
ef5584 |
|
|
|
ef5584 |
<label>or</label>
|
|
|
ef5584 |
|
|
|
ef5584 |
/if ?>
|
|
|
ef5584 |
/each ?>
|
|
|
ef5584 |
elif:field.type == "radio" ?>
|
|
|
ef5584 |
each:option = field.options ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
var:option ?>" name="" value="
|
|
|
ef5584 |
var:option ?>" />
|
|
|
ef5584 |
<label for="<?cs var:name(field) ?>_<?cs var:option ?>">
|
|
|
ef5584 |
alt:option ?>none</label>
|
|
|
ef5584 |
/each ?>
|
|
|
ef5584 |
elif:field.type == "checkbox" ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
var:name(field) ?>" value="1"
|
|
|
ef5584 |
if:constraint.mode != '!' ?> checked="checked" />
|
|
|
ef5584 |
<label for="<?cs var:name(field) ?>_on">yes</label>
|
|
|
ef5584 |
|
|
|
ef5584 |
var:name(field) ?>" value="!1"
|
|
|
ef5584 |
if:constraint.mode == '!' ?> checked="checked" />
|
|
|
ef5584 |
<label for="<?cs var:name(field) ?>_off">no</label>
|
|
|
ef5584 |
elif:field.type == "text" ?>
|
|
|
ef5584 |
each:value = constraint.values ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
var:value ?>" size="42" />
|
|
|
ef5584 |
if:name(value) != len(constraint.values) - 1 ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
var:name(field) ?>_" value="-" />
|
|
|
ef5584 |
|
|
|
ef5584 |
<label>or</label>
|
|
|
ef5584 |
|
|
|
ef5584 |
/if ?>
|
|
|
ef5584 |
/each ?>
|
|
|
ef5584 |
/if ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
var:name(field) ?>
|
|
|
ef5584 |
if:field.type != 'radio' ?>_
|
|
|
ef5584 |
var:len(constraint.values) - 1 ?>
|
|
|
ef5584 |
/if ?>" value="-" />
|
|
|
ef5584 |
|
|
|
ef5584 |
/each ?>
|
|
|
ef5584 |
/each ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<label for="add_filter">Add filter</label>
|
|
|
ef5584 |
<select name="add_filter" id="add_filter">
|
|
|
ef5584 |
<option></option>
|
|
|
ef5584 |
each:field = query.fields ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
if:field.type == "radio" ?>
|
|
|
ef5584 |
if:len(query.constraints[name(field)]) != 0 ?> disabled="disabled"
|
|
|
ef5584 |
/if ?>
|
|
|
ef5584 |
/if ?>></option>
|
|
|
ef5584 |
/each ?>
|
|
|
ef5584 |
</select>
|
|
|
ef5584 |
<input type="submit" name="add" value="+" />
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
</fieldset>
|
|
|
ef5584 |
|
|
|
ef5584 |
<label for="group">Group results by</label>
|
|
|
ef5584 |
<select name="group" id="group">
|
|
|
ef5584 |
<option></option>
|
|
|
ef5584 |
each:field = query.fields ?>
|
|
|
ef5584 |
if:field.type == 'select' || field.type == 'radio' ||
|
|
|
ef5584 |
name(field) == 'owner' ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
if:name(field) == query.group ?> selected="selected">
|
|
|
ef5584 |
var:field.label ?></option>
|
|
|
ef5584 |
/if ?>
|
|
|
ef5584 |
/each ?>
|
|
|
ef5584 |
</select>
|
|
|
ef5584 |
|
|
|
ef5584 |
if:query.groupdesc ?> checked="checked" />
|
|
|
ef5584 |
<label for="groupdesc">descending</label>
|
|
|
ef5584 |
<script type="text/javascript">
|
|
|
ef5584 |
var group = document.getElementById("group");
|
|
|
ef5584 |
var updateGroupDesc = function() {
|
|
|
ef5584 |
enableControl('groupdesc', group.selectedIndex > 0);
|
|
|
ef5584 |
}
|
|
|
ef5584 |
addEvent(window, 'load', updateGroupDesc);
|
|
|
ef5584 |
addEvent(group, 'change', updateGroupDesc);
|
|
|
ef5584 |
</script>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
if:query.verbose ?> checked="checked" />
|
|
|
ef5584 |
<label for="verbose">Show full description under each result</label>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="hidden" name="order" value="<?cs var:query.order ?>" />
|
|
|
ef5584 |
<input type="hidden" name="desc" value="1" />
|
|
|
ef5584 |
<input type="submit" name="update" value="Update" />
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
</form>
|
|
|
ef5584 |
<script type="text/javascript">
|
|
|
ef5584 |
var properties={
|
|
|
ef5584 |
var:name(field) ?>:{type:"",label:"
|
|
|
ef5584 |
var:field.label ?>",options:[
|
|
|
ef5584 |
each:option = field.options ?>""
|
|
|
ef5584 |
if:name(option) < len(field.options) -1 ?>,
|
|
|
ef5584 |
/each ?>]}
|
|
|
ef5584 |
set:idx = idx + 1 ?>,
|
|
|
ef5584 |
/each ?>};
|
|
|
ef5584 |
var modes = {:[
|
|
|
ef5584 |
each:mode = type ?>{text:"",value:""}
|
|
|
ef5584 |
if:name(mode) < len(type) -1 ?>,
|
|
|
ef5584 |
/each ?>]
|
|
|
ef5584 |
set:idx = idx + 1 ?>,
|
|
|
ef5584 |
/each ?>};
|
|
|
ef5584 |
initializeFilters();
|
|
|
ef5584 |
</script>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
if:query.desc ?>descasc">
|
|
|
ef5584 |
|
|
|
ef5584 |
if:query.order == header.name && !query.desc ?> (descending)
|
|
|
ef5584 |
/if ?>" href="">
|
|
|
ef5584 |
|
|
|
ef5584 |
/each ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
if:!query.group ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
/if ?>
|
|
|
ef5584 |
each:result = query.results ?>
|
|
|
ef5584 |
if:result[query.group] != prev_group ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
each:field = query.fields ?>
|
|
|
ef5584 |
if:name(field) == query.group ?>
|
|
|
ef5584 |
var:field.label ?>
|
|
|
ef5584 |
/if ?>
|
|
|
ef5584 |
/each ?>:
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
/if ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
if:name(result) % 2 ?>oddeven prio
|
|
|
ef5584 |
var:result.priority_value ?>
|
|
|
ef5584 |
if:result.added ?> added
|
|
|
ef5584 |
if:result.changed ?> changed
|
|
|
ef5584 |
if:result.removed ?> removed">
|
|
|
ef5584 |
each:header = query.headers ?>
|
|
|
ef5584 |
if:name(header) == 0 ?>
|
|
|
ef5584 |
var:result.href ?>" title="View ticket">
|
|
|
ef5584 |
else ?>
|
|
|
ef5584 |
if:header.name == 'summary' ?>
|
|
|
ef5584 |
var:result.href ?>" title="View ticket">
|
|
|
ef5584 |
var:result.summary ?>
|
|
|
ef5584 |
else ?>
|
|
|
ef5584 |
/if ?>
|
|
|
ef5584 |
/if ?>
|
|
|
ef5584 |
/each ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
Reported by ,
|
|
|
ef5584 |
:
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
/if ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
Note: See TracQuery
|
|
|
ef5584 |
for help on using queries.
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|