Index: trunk/extensions/SemanticDrilldown/includes/SD_PageSchemas.php |
— | — | @@ -7,6 +7,8 @@ |
8 | 8 | * @author Ankit Garg |
9 | 9 | */ |
10 | 10 | |
| 11 | +if ( !defined( 'MEDIAWIKI' ) ) die(); |
| 12 | + |
11 | 13 | class SDPageSchemas { |
12 | 14 | |
13 | 15 | /** |
— | — | @@ -50,13 +52,12 @@ |
51 | 53 | //$require_filter_label = wfMsg( 'sd_createfilter_requirefilter' ); |
52 | 54 | |
53 | 55 | $filter_array = array(); |
| 56 | + $hasExistingValues = false; |
54 | 57 | if ( !is_null( $field ) ) { |
55 | 58 | $sd_array = $field->getObject('semanticdrilldown_Filter'); |
56 | 59 | if ( array_key_exists( 'sd', $sd_array ) ) { |
57 | 60 | $filter_array = $sd_array['sd']; |
58 | 61 | $hasExistingValues = true; |
59 | | - } else { |
60 | | - $hasExistingValues = false; |
61 | 62 | } |
62 | 63 | } |
63 | 64 | |
— | — | @@ -73,12 +74,11 @@ |
74 | 75 | $selectedCategory = ''; |
75 | 76 | } |
76 | 77 | $dateRangesAttrs = array(); |
| 78 | + $year_value = wfMsgForContent( 'sd_filter_year' ); |
77 | 79 | $yearOptionAttrs = array( 'value' => $year_value ); |
| 80 | + $month_value = wfMsgForContent( 'sd_filter_month' ); |
78 | 81 | $monthOptionAttrs = array( 'value' => $month_value ); |
79 | 82 | if ( array_key_exists( 'TimePeriod', $filter_array ) ) { |
80 | | - $year_value = wfMsgForContent( 'sd_filter_year' ); |
81 | | - // This value may eventually get checked against. |
82 | | - //$month_value = wfMsgForContent( 'sd_filter_month' ); |
83 | 83 | $filterTimePeriod = $filter_array['TimePeriod']; |
84 | 84 | $dateRangesAttrs['checked'] = true; |
85 | 85 | if ( $filterTimePeriod == $year_value ) { |
— | — | @@ -126,8 +126,9 @@ |
127 | 127 | $valuesListAttrs['selected'] = true; |
128 | 128 | } |
129 | 129 | |
130 | | - $html_text = '<p>' . wfMsg( 'sd_createfilter_name' ) . ' '; |
| 130 | + $html_text = '<p>' . wfMsg( 'ps-optional-name' ) . ' '; |
131 | 131 | $html_text .= Html::input( 'sd_filter_name_num', $filterLabel, 'text', array( 'size' => 25 ) ) . "</p>\n"; |
| 132 | + $html_text .= '<fieldset><legend>Values</legend>' . "\n"; |
132 | 133 | $html_text .= '<p>' . Html::input( 'sd_values_source_num', 'property', 'radio', $usePropertyValuesAttr ) . ' '; |
133 | 134 | $html_text .= wfMsg( 'sd_createfilter_usepropertyvalues' ) . "</p>\n"; |
134 | 135 | $html_text .= "\t<p>\n"; |
— | — | @@ -157,6 +158,7 @@ |
158 | 159 | $html_text .= "\t" . wfMsg( 'sd_createfilter_entervalues' ) . "\n"; |
159 | 160 | $html_text .= "\t" . Html::input( 'sd_filter_values_num', $filterValuesStr, 'text', $filterValuesAttrs ) . "\n"; |
160 | 161 | $html_text .= "\t</p>\n"; |
| 162 | + $html_text .= "</fieldset>\n"; |
161 | 163 | |
162 | 164 | $html_text .= '<p>' . wfMsg( 'sd_createfilter_inputtype' ) . "\n"; |
163 | 165 | $inputTypeOptionsHTML = "\t" . Html::element( 'option', $valuesListAttrs, wfMsg( 'sd_createfilter_listofvalues' ) ) . "\n"; |