Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php |
— | — | @@ -702,7 +702,9 @@ |
703 | 703 | $printer = SMWQueryProcessor::getResultPrinter( $format, SMWQueryProcessor::SPECIAL_PAGE ); |
704 | 704 | |
705 | 705 | $params = method_exists( $printer, 'getParameters' ) ? $printer->getParameters() : array(); |
706 | | - |
| 706 | + |
| 707 | + $optionsHtml = array(); |
| 708 | + |
707 | 709 | foreach ( $params as $i => $param ) { |
708 | 710 | $param_name = $param['name']; |
709 | 711 | $type = $param['type']; |
— | — | @@ -710,6 +712,9 @@ |
711 | 713 | |
712 | 714 | $cur_value = ( array_key_exists( $param_name, $paramValues ) ) ? $paramValues[$param_name] : ''; |
713 | 715 | |
| 716 | + //$optionsHtml[] = $optionsHtml[$i] = "<div style=\"width: 30%; padding: 5px; float: left;\">$param_name:\n" |
| 717 | + // . $this->showFormatOption( $this->toValidatorParam( $param ) ); |
| 718 | + |
714 | 719 | // 3 values per row, with alternating colors for rows |
715 | 720 | if ( $i % 3 == 0 ) { |
716 | 721 | $bgcolor = ( $i % 6 ) == 0 ? '#dddddd' : 'white'; |
— | — | @@ -726,9 +731,40 @@ |
727 | 732 | $text .= "<div style=\"clear: both\";></div></div>\n"; |
728 | 733 | } |
729 | 734 | } |
730 | | - |
| 735 | + /* |
| 736 | + for ( $i = 0, $n = count( $optionsHtml ); $i < $n; $i++ ) { |
| 737 | + if ( $i % 3 == 2 || $i == $n - 1 ) { |
| 738 | + $optionsHtml[$i] .= "<div style=\"clear: both\";></div></div>\n"; |
| 739 | + } |
| 740 | + } |
| 741 | + */ |
731 | 742 | return $text; |
732 | 743 | } |
| 744 | + |
| 745 | + /** |
| 746 | + * Returns a Validator style Parameter definition. |
| 747 | + * SMW 1.5.x style definitions are converted. |
| 748 | + * |
| 749 | + * @since 1.6 |
| 750 | + * |
| 751 | + * @return Parameter |
| 752 | + */ |
| 753 | + protected function toValidatorParam() { |
| 754 | + // TODO |
| 755 | + } |
| 756 | + |
| 757 | + /** |
| 758 | + * Get the HTML for a single parameter input. |
| 759 | + * |
| 760 | + * @since 1.6 |
| 761 | + * |
| 762 | + * @param Parameter $parameter |
| 763 | + * |
| 764 | + * @return string |
| 765 | + */ |
| 766 | + protected function showFormatOption( Parameter $parameter ) { |
| 767 | + // TODO |
| 768 | + } |
733 | 769 | |
734 | 770 | /** |
735 | 771 | * Adds a an input for a result format parameter to $text. |