if (db_numrows($res)>0) {
echo '<form action="'. getStringFromServer('PHP_SELF') .'" method="get">';
- echo '<input type="hidden" name="group_id" value="'.$group_id.'" />';
- echo '<input type="hidden" name="atid" value="'.$ath->getID().'" />';
- echo '<input type="hidden" name="power_query" value="1" />';
echo ' <table width="100%" cellspacing="0">
<tr>
<td>
';
+ echo '<input type="hidden" name="group_id" value="'.$group_id.'" />';
+ echo '<input type="hidden" name="atid" value="'.$ath->getID().'" />';
+ echo '<input type="hidden" name="power_query" value="1" />';
$optgroup['key'] = 'type';
$optgroup['values'][0] = 'Private queries';
$optgroup['values'][1] = 'Project queries';
</div>
<div class="tabbertab'.($af->query_type == 'custom' ? ' tabbertabdefault' : '').'" title="'._('Simple Filtering and Sorting').'">
<form action="'. getStringFromServer('PHP_SELF') .'?group_id='.$group_id.'&atid='.$ath->getID().'" method="post">
- <input type="hidden" name="query_id" value="-1" />
- <input type="hidden" name="set" value="custom" />
<table width="100%" cellspacing="0">
<tr>
<td>
+ <input type="hidden" name="query_id" value="-1" />
+ <input type="hidden" name="set" value="custom" />
'._('Assignee').': '. $tech_box .'
</td>
<td align="center">
</td>
<td align="right">';
+// Compute the list of fields which can be sorted.
+// Currently, only text & integer are taken (for simplicity only).
+$efarr = $ath->getExtraFields(ARTIFACT_EXTRAFIELDTYPE_TEXT.",".ARTIFACT_EXTRAFIELDTYPE_INTEGER);
+$keys=array_keys($efarr);
+for ($k=0; $k<count($keys); $k++) {
+ $i=$keys[$k];
+ $order_name_arr[] = $efarr[$i]['field_name'];
+ $order_arr[] = $efarr[$i]['extra_field_id'];
+}
+
echo _('Order by').
': <a href="javascript:help_window(\'/help/tracker.php?helpname=sort_by\')">' .
'<strong>(?)</strong></a>'.