Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php |
— | — | @@ -228,7 +228,7 @@ |
229 | 229 | |
230 | 230 | |
231 | 231 | protected function getInputForm($printoutstring, $urltail) { |
232 | | - global $wgUser, $smwgQSortingSupport, $wgLang; |
| 232 | + global $wgUser, $smwgQSortingSupport, $wgLang, $smwgResultFormats; |
233 | 233 | $skin = $wgUser->getSkin(); |
234 | 234 | $result = ''; |
235 | 235 | |
— | — | @@ -264,7 +264,22 @@ |
265 | 265 | $result .= '<input type="hidden" name="sc" value="' . $i . '"/>'; |
266 | 266 | $result .= '<a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask',$urltail . '&eq=yes&sc=1')) . '" rel="nofollow">' . wfMsg('smw_add_sortcondition') . '</a>'; // note that $urltail uses a , separated list for sorting, so setting sc to 1 always adds one new condition |
267 | 267 | } |
268 | | - $result .= '<br /><input type="submit" value="' . wfMsg('smw_ask_submit') . '"/>' . |
| 268 | + |
| 269 | + $result .= '<div>'.wfMsg('smw_ask_format_as').' <input type="hidden" name="eq" value="yes"/>' . |
| 270 | + '<select name="p">' . |
| 271 | + '<option value="format=broadtable"'.($this->m_params['format'] == 'broadtable' ? ' selected' : '').'>broadtable ('.wfMsg('smw_ask_defaultformat').')</option>'."\n"; |
| 272 | + |
| 273 | + foreach (array_keys($smwgResultFormats) as $format) |
| 274 | + { |
| 275 | + if ($format != 'broadtable') |
| 276 | + { |
| 277 | + $result .= '<option value="format='.$format.'"'.($this->m_params['format'] == $format ? ' selected' : '').'>'.$format."</option>\n"; |
| 278 | + } |
| 279 | + } |
| 280 | + |
| 281 | + $result .= '</select></div>'; |
| 282 | + |
| 283 | + $result .= '<input type="submit" value="' . wfMsg('smw_ask_submit') . '"/>' . |
269 | 284 | '<input type="hidden" name="eq" value="yes"/>' . |
270 | 285 | ' <a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask',$urltail)) . '" rel="nofollow">' . wfMsg('smw_ask_hidequery') . '</a> ' . |
271 | 286 | SMWAskPage::$pipeseparator . |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php |
— | — | @@ -196,6 +196,8 @@ |
197 | 197 | 'smw_ask_help' => 'Querying help', |
198 | 198 | 'smw_ask_queryhead' => 'Query', |
199 | 199 | 'smw_ask_printhead' => 'Additional printouts (optional)', |
| 200 | + 'smw_ask_format_as' => 'Format as', |
| 201 | + 'smw_ask_defaultformat' => 'default', |
200 | 202 | |
201 | 203 | // Messages for the search by property special |
202 | 204 | 'searchbyproperty' => 'Search by property', |