Index: trunk/extensions/DataCenter/DataCenter.db.php |
— | — | @@ -1922,6 +1922,10 @@ |
1923 | 1923 | } |
1924 | 1924 | return null; |
1925 | 1925 | } |
| 1926 | + |
| 1927 | + public function getLocation() { |
| 1928 | + return DataCenterDB::getLocation( $this->get( 'location' ) ); |
| 1929 | + } |
1926 | 1930 | } |
1927 | 1931 | |
1928 | 1932 | /* Meta Rows */ |
Index: trunk/extensions/DataCenter/Controllers/Plans.php |
— | — | @@ -35,12 +35,6 @@ |
36 | 36 | 'action' => 'configure', |
37 | 37 | 'id' => $path['id'] |
38 | 38 | ); |
39 | | - $this->actions['history'] = array( |
40 | | - 'page' => 'plans', |
41 | | - 'type' => $path['type'], |
42 | | - 'action' => 'history', |
43 | | - 'id' => $path['id'] |
44 | | - ); |
45 | 39 | $this->actions['view'] = array( |
46 | 40 | 'page' => 'plans', |
47 | 41 | 'type' => $path['type'], |
Index: trunk/extensions/DataCenter/DataCenter.ui.php |
— | — | @@ -835,6 +835,12 @@ |
836 | 836 | case 'type': |
837 | 837 | return self::message( 'type', $value ); |
838 | 838 | break; |
| 839 | + case 'side': |
| 840 | + return self::message( 'option', $value ? 'front' : 'back' ); |
| 841 | + break; |
| 842 | + case 'angle': |
| 843 | + return self::message( 'label', 'degrees-value', $value * 90 ); |
| 844 | + break; |
839 | 845 | default: |
840 | 846 | // Performs no formatting |
841 | 847 | return $value; |
Index: trunk/extensions/DataCenter/UI/Widgets/Heading.php |
— | — | @@ -32,6 +32,11 @@ |
33 | 33 | */ |
34 | 34 | 'subject' => null, |
35 | 35 | /** |
| 36 | + * Name of type of component to inject as parameter for message |
| 37 | + * @datatype string |
| 38 | + */ |
| 39 | + 'type' => null, |
| 40 | + /** |
36 | 41 | * Text to display |
37 | 42 | * @datatype string |
38 | 43 | */ |
— | — | @@ -60,6 +65,15 @@ |
61 | 66 | $message = DataCenterUI::message( |
62 | 67 | 'heading', $parameters['message'], $parameters['subject'] |
63 | 68 | ); |
| 69 | + } |
| 70 | + // Checks if a type was given |
| 71 | + else if ( $parameters['type'] !== null ) { |
| 72 | + // Uses type-based message |
| 73 | + $message = DataCenterUI::message( |
| 74 | + 'heading', |
| 75 | + $parameters['message'], |
| 76 | + DataCenterUI::message( 'type', $parameters['type'] ) |
| 77 | + ); |
64 | 78 | } else { |
65 | 79 | // Uses plain message |
66 | 80 | $message = DataCenterUI::message( |
Index: trunk/extensions/DataCenter/Views/History.php |
— | — | @@ -17,34 +17,43 @@ |
18 | 18 | return DataCenterUI::renderLayout( |
19 | 19 | 'columns', |
20 | 20 | array( |
21 | | - DataCenterUI::renderWidget( 'table', |
| 21 | + DataCenterUI::renderLayout( |
| 22 | + 'rows', |
22 | 23 | array( |
23 | | - 'rows' => $changes, |
24 | | - 'fields' => array( |
25 | | - 'date' => array( |
26 | | - 'field' => 'timestamp', |
27 | | - 'format' => 'date' |
28 | | - ), |
29 | | - 'username', |
30 | | - 'type', |
31 | | - 'component' => array( |
| 24 | + DataCenterUI::renderWidget( |
| 25 | + 'heading', array( 'message' => 'history' ) |
| 26 | + ), |
| 27 | + DataCenterUI::renderWidget( |
| 28 | + 'table', |
| 29 | + array( |
| 30 | + 'rows' => $changes, |
32 | 31 | 'fields' => array( |
33 | | - 'component_category', |
34 | | - 'component_type', |
35 | | - 'component_id' |
| 32 | + 'date' => array( |
| 33 | + 'field' => 'timestamp', |
| 34 | + 'format' => 'date' |
| 35 | + ), |
| 36 | + 'username', |
| 37 | + 'type', |
| 38 | + 'component' => array( |
| 39 | + 'fields' => array( |
| 40 | + 'component_category', |
| 41 | + 'component_type', |
| 42 | + 'component_id' |
| 43 | + ), |
| 44 | + 'glue' => ' / ' |
| 45 | + ), |
| 46 | + 'note' |
36 | 47 | ), |
37 | | - 'glue' => ' / ' |
38 | | - ), |
39 | | - 'note' |
| 48 | + 'link' => array( |
| 49 | + 'page' => 'history', |
| 50 | + 'type' => 'change', |
| 51 | + 'action' => 'view', |
| 52 | + 'id' => '#id', |
| 53 | + ) |
| 54 | + ) |
40 | 55 | ), |
41 | | - 'link' => array( |
42 | | - 'page' => 'history', |
43 | | - 'type' => 'change', |
44 | | - 'action' => 'view', |
45 | | - 'id' => '#id', |
46 | | - ) |
47 | 56 | ) |
48 | | - ) |
| 57 | + ), |
49 | 58 | ) |
50 | 59 | ); |
51 | 60 | } |
— | — | @@ -100,24 +109,35 @@ |
101 | 110 | 'meta', 'change', 'timestamp DESC' |
102 | 111 | ) |
103 | 112 | ); |
104 | | - return DataCenterUI::renderWidget( 'table', |
| 113 | + return DataCenterUI::renderLayout( |
| 114 | + 'rows', |
105 | 115 | array( |
106 | | - 'rows' => $changes, |
107 | | - 'fields' => array( |
108 | | - 'date' => array( |
109 | | - 'field' => 'timestamp', |
110 | | - 'format' => 'date' |
111 | | - ), |
112 | | - 'username', |
113 | | - 'type', |
114 | | - 'note' |
| 116 | + DataCenterUI::renderWidget( |
| 117 | + 'heading', |
| 118 | + array( |
| 119 | + 'message' => 'history-type', 'type' => $path['type'] |
| 120 | + ) |
115 | 121 | ), |
116 | | - 'link' => array( |
117 | | - 'page' => 'history', |
118 | | - 'type' => 'change', |
119 | | - 'action' => 'view', |
120 | | - 'id' => '#id', |
121 | | - ) |
| 122 | + DataCenterUI::renderWidget( 'table', |
| 123 | + array( |
| 124 | + 'rows' => $changes, |
| 125 | + 'fields' => array( |
| 126 | + 'date' => array( |
| 127 | + 'field' => 'timestamp', |
| 128 | + 'format' => 'date' |
| 129 | + ), |
| 130 | + 'username', |
| 131 | + 'type', |
| 132 | + 'note' |
| 133 | + ), |
| 134 | + 'link' => array( |
| 135 | + 'page' => 'history', |
| 136 | + 'type' => 'change', |
| 137 | + 'action' => 'view', |
| 138 | + 'id' => '#id', |
| 139 | + ) |
| 140 | + ) |
| 141 | + ), |
122 | 142 | ) |
123 | 143 | ); |
124 | 144 | } |
Index: trunk/extensions/DataCenter/Views/Assets.php |
— | — | @@ -161,12 +161,9 @@ |
162 | 162 | 'rows', |
163 | 163 | array( |
164 | 164 | DataCenterUI::renderWidget( |
165 | | - 'heading', |
166 | | - array( |
| 165 | + 'heading', array( |
167 | 166 | 'message' => 'asset-type', |
168 | | - 'subject' => DataCenterUI::message( |
169 | | - 'type', $path['type'] |
170 | | - ) |
| 167 | + 'type' => $path['type'], |
171 | 168 | ) |
172 | 169 | ), |
173 | 170 | DataCenterUI::renderWidget( |
— | — | @@ -190,18 +187,15 @@ |
191 | 188 | ), |
192 | 189 | ) |
193 | 190 | ), |
194 | | - '[PLANS THAT USE THIS]' |
195 | 191 | ) |
196 | 192 | ), |
197 | 193 | DataCenterUI::renderLayout( |
198 | 194 | 'rows', |
199 | 195 | array( |
200 | | - |
201 | 196 | DataCenterUI::renderWidget( |
202 | | - 'heading', |
203 | | - array( |
204 | | - 'message' => 'details-for', |
205 | | - 'subject' => $model->get( 'name' ) |
| 197 | + 'heading', array( |
| 198 | + 'message' => 'model-type', |
| 199 | + 'type' => $path['type'], |
206 | 200 | ) |
207 | 201 | ), |
208 | 202 | DataCenterUI::renderWidget( |
— | — | @@ -234,10 +228,8 @@ |
235 | 229 | DataCenterUI::renderWidget( |
236 | 230 | 'heading', |
237 | 231 | array( |
238 | | - 'message' => 'deploy-type', |
239 | | - 'subject' => DataCenterUI::message( |
240 | | - 'type', $path['type'] |
241 | | - ), |
| 232 | + 'message' => 'select-deploy-type', |
| 233 | + 'type' => 'model' |
242 | 234 | ) |
243 | 235 | ), |
244 | 236 | DataCenterUI::renderWidget( |
— | — | @@ -366,8 +358,8 @@ |
367 | 359 | DataCenterUI::renderWidget( |
368 | 360 | 'heading', |
369 | 361 | array( |
370 | | - 'message' => 'details-for', |
371 | | - 'subject' => $model->get( 'name' ) |
| 362 | + 'message' => 'model-type', |
| 363 | + 'type' => $path['type'], |
372 | 364 | ) |
373 | 365 | ), |
374 | 366 | DataCenterUI::renderWidget( |
Index: trunk/extensions/DataCenter/Views/Models.php |
— | — | @@ -239,7 +239,7 @@ |
240 | 240 | 'rows', |
241 | 241 | array( |
242 | 242 | DataCenterUI::renderWidget( |
243 | | - 'heading', array( 'message' => 'model-outline' ) |
| 243 | + 'heading', array( 'message' => 'model-attachments' ) |
244 | 244 | ), |
245 | 245 | DataCenterUI::renderWidget( |
246 | 246 | 'model', |
— | — | @@ -339,7 +339,8 @@ |
340 | 340 | DataCenterUI::renderWidget( |
341 | 341 | 'heading', |
342 | 342 | array( |
343 | | - 'message' => 'attach-' . $path['parameter'] |
| 343 | + 'message' => 'select-attach-type', |
| 344 | + 'type' => 'model' |
344 | 345 | ) |
345 | 346 | ), |
346 | 347 | DataCenterUI::renderWidget( |
— | — | @@ -410,7 +411,7 @@ |
411 | 412 | ); |
412 | 413 | $headingOptions = array( |
413 | 414 | 'message' => 'configuring-type', |
414 | | - 'subject' => DataCenterUI::message( 'type', $path['type'] ) |
| 415 | + 'type' => 'attachment' |
415 | 416 | ); |
416 | 417 | } |
417 | 418 | return DataCenterUI::renderLayout( |
— | — | @@ -453,10 +454,9 @@ |
454 | 455 | 'rows', |
455 | 456 | array( |
456 | 457 | DataCenterUI::renderWidget( |
457 | | - 'heading', |
458 | | - array( |
459 | | - 'message' => 'details-for', |
460 | | - 'subject' => $model->get( 'name' ), |
| 458 | + 'heading', array( |
| 459 | + 'message' => 'model-type', |
| 460 | + 'type' => $path['type'] |
461 | 461 | ) |
462 | 462 | ), |
463 | 463 | DataCenterUI::renderWidget( |
Index: trunk/extensions/DataCenter/Views/Facilities/Space.php |
— | — | @@ -106,10 +106,6 @@ |
107 | 107 | $tables[$tense] = DataCenterUI::renderWidget( |
108 | 108 | 'table', |
109 | 109 | array( |
110 | | - 'heading' => array( |
111 | | - 'message' => 'plans-for', |
112 | | - 'subject' => $space->get( 'name' ), |
113 | | - ), |
114 | 110 | 'rows' => ( |
115 | 111 | isset( $plansTable[$tense] ) ? |
116 | 112 | $plansTable[$tense] : |
— | — | @@ -140,11 +136,7 @@ |
141 | 137 | 'rows', |
142 | 138 | array( |
143 | 139 | DataCenterUI::renderWidget( |
144 | | - 'heading', |
145 | | - array( |
146 | | - 'message' => 'plans-for', |
147 | | - 'subject' => $space->get( 'name' ), |
148 | | - ) |
| 140 | + 'heading', array( 'message' => 'plans' ) |
149 | 141 | ), |
150 | 142 | DataCenterUI::renderLayout( |
151 | 143 | 'tabs', $tables |
— | — | @@ -164,10 +156,7 @@ |
165 | 157 | ) |
166 | 158 | ), |
167 | 159 | DataCenterUI::renderWidget( |
168 | | - 'heading', array( |
169 | | - 'message' => 'details-for', |
170 | | - 'subject' => $space->get( 'name' ), |
171 | | - ) |
| 160 | + 'heading', array( 'message' => 'space' ) |
172 | 161 | ), |
173 | 162 | DataCenterUI::renderWidget( |
174 | 163 | 'details', |
Index: trunk/extensions/DataCenter/Views/Facilities/Location.php |
— | — | @@ -112,10 +112,6 @@ |
113 | 113 | $tables[$tense] = DataCenterUI::renderWidget( |
114 | 114 | 'table', |
115 | 115 | array( |
116 | | - 'heading' => array( |
117 | | - 'message' => 'spaces-in', |
118 | | - 'subject' => $location->get( 'name' ), |
119 | | - ), |
120 | 116 | 'rows' => $spacesTable[$tense], |
121 | 117 | 'fields' => array( 'name' ), |
122 | 118 | 'link' => array( |
— | — | @@ -138,11 +134,7 @@ |
139 | 135 | 'rows', |
140 | 136 | array( |
141 | 137 | DataCenterUI::renderWidget( |
142 | | - 'heading', |
143 | | - array( |
144 | | - 'message' => 'spaces-in', |
145 | | - 'subject' => $location->get( 'name' ) |
146 | | - ) |
| 138 | + 'heading', array( 'message' => 'spaces' ) |
147 | 139 | ), |
148 | 140 | DataCenterUI::renderLayout( 'tabs', $tables ), |
149 | 141 | DataCenterUI::renderWidget( |
— | — | @@ -162,10 +154,7 @@ |
163 | 155 | ) |
164 | 156 | ), |
165 | 157 | DataCenterUI::renderWidget( |
166 | | - 'heading', |
167 | | - array( |
168 | | - 'message' => 'details-for', |
169 | | - 'subject' => $location->get( 'name' ) ) |
| 158 | + 'heading', array( 'message' => 'location' ) |
170 | 159 | ), |
171 | 160 | DataCenterUI::renderWidget( |
172 | 161 | 'details', |
Index: trunk/extensions/DataCenter/Views/Plans/Plan.php |
— | — | @@ -22,8 +22,13 @@ |
23 | 23 | $plan = DataCenterDB::getPlan( $path['id'] ); |
24 | 24 | // Gets space of plan |
25 | 25 | $space = $plan->getSpace(); |
26 | | - // Sets the space name in the plan |
27 | | - $plan->set( 'space_name', $space->get( 'name' ) ); |
| 26 | + // Gets location of space |
| 27 | + $location = $space->getLocation(); |
| 28 | + // Sets location information to space |
| 29 | + $space->set( |
| 30 | + 'location_name', |
| 31 | + implode( ' / ', $location->get( array( 'name', 'region' ) ) ) |
| 32 | + ); |
28 | 33 | // Gets structure of plan from database |
29 | 34 | $structure = $plan->getStructure( |
30 | 35 | DataCenterDB::buildSort( |
— | — | @@ -124,11 +129,7 @@ |
125 | 130 | 'rows', |
126 | 131 | array( |
127 | 132 | DataCenterUI::renderWidget( |
128 | | - 'heading', |
129 | | - array( |
130 | | - 'message' => 'racks-in', |
131 | | - 'subject' => $space->get( 'name' ), |
132 | | - ) |
| 133 | + 'heading', array( 'message' => 'racks' ) |
133 | 134 | ), |
134 | 135 | $racks, |
135 | 136 | DataCenterUI::renderWidget( |
— | — | @@ -147,24 +148,42 @@ |
148 | 149 | ) |
149 | 150 | ), |
150 | 151 | DataCenterUI::renderWidget( |
151 | | - 'heading', |
152 | | - array( |
153 | | - 'message' => 'details-for', |
154 | | - 'subject' => $plan->get( 'name' ), |
155 | | - ) |
| 152 | + 'heading', array( 'message' => 'configuration' ) |
156 | 153 | ), |
157 | 154 | DataCenterUI::renderWidget( |
158 | 155 | 'details', |
159 | 156 | array( |
160 | 157 | 'row' => $plan, |
161 | 158 | 'fields' => array( |
| 159 | + 'tense' => array( 'format' => 'option' ), |
162 | 160 | 'name', |
163 | | - 'tense' => array( 'format' => 'option' ), |
164 | | - 'space' => array( 'field' => 'space_name' ), |
165 | 161 | 'note', |
166 | 162 | ), |
167 | 163 | ) |
168 | 164 | ), |
| 165 | + DataCenterUI::renderWidget( |
| 166 | + 'heading', array( 'message' => 'facility' ) |
| 167 | + ), |
| 168 | + DataCenterUI::renderWidget( |
| 169 | + 'details', |
| 170 | + array( |
| 171 | + 'row' => $space, |
| 172 | + 'fields' => array( |
| 173 | + 'tense' => array( 'format' => 'option' ), |
| 174 | + 'location' => array( |
| 175 | + 'field' => 'location_name' |
| 176 | + ), |
| 177 | + 'name', |
| 178 | + 'size' => array( |
| 179 | + 'fields' => array( |
| 180 | + 'width', 'depth', 'height' |
| 181 | + ), |
| 182 | + 'glue' => ' x ' |
| 183 | + ), |
| 184 | + 'power', |
| 185 | + ), |
| 186 | + ) |
| 187 | + ), |
169 | 188 | ) |
170 | 189 | ), |
171 | 190 | DataCenterUI::renderWidget( |
— | — | @@ -192,8 +211,8 @@ |
193 | 212 | DataCenterUI::renderWidget( |
194 | 213 | 'heading', |
195 | 214 | array( |
196 | | - 'message' => 'confirm-remove', |
197 | | - 'subject' => $plan->get( 'name' ), |
| 215 | + 'message' => 'remove-type', |
| 216 | + 'type' => 'plan', |
198 | 217 | ) |
199 | 218 | ), |
200 | 219 | DataCenterUI::renderWidget( |
— | — | @@ -280,6 +299,10 @@ |
281 | 300 | 'hidden' => array( 'space' ), |
282 | 301 | 'success' => array( 'page' => 'plans' ), |
283 | 302 | ); |
| 303 | + $headingParameters = array( |
| 304 | + 'message' => 'adding-type', |
| 305 | + 'type' => 'plan' |
| 306 | + ); |
284 | 307 | } else { |
285 | 308 | throw new MWException( |
286 | 309 | 'Invalid parameters. space,# expected.' |
— | — | @@ -299,6 +322,10 @@ |
300 | 323 | 'id' => $path['id'], |
301 | 324 | ), |
302 | 325 | ); |
| 326 | + $headingParameters = array( |
| 327 | + 'message' => 'configuring-type', |
| 328 | + 'type' => 'plan' |
| 329 | + ); |
303 | 330 | } |
304 | 331 | // Returns 2 columm layout with a form and a scene |
305 | 332 | return DataCenterUI::renderLayout( |
— | — | @@ -308,11 +335,7 @@ |
309 | 336 | 'rows', |
310 | 337 | array( |
311 | 338 | DataCenterUI::renderWidget( |
312 | | - 'heading', |
313 | | - array( |
314 | | - 'message' => 'editing-details-for', |
315 | | - 'subject' => $plan->get( 'name' ), |
316 | | - ) |
| 339 | + 'heading', $headingParameters |
317 | 340 | ), |
318 | 341 | DataCenterUI::renderWidget( |
319 | 342 | 'form', |
— | — | @@ -327,8 +350,8 @@ |
328 | 351 | ), |
329 | 352 | 'row' => $plan, |
330 | 353 | 'fields' => array( |
| 354 | + 'tense' => array( 'type' => 'tense' ), |
331 | 355 | 'name' => array( 'type' => 'string' ), |
332 | | - 'tense' => array( 'type' => 'tense' ), |
333 | 356 | 'note' => array( 'type' => 'text' ) |
334 | 357 | ) |
335 | 358 | ) |
Index: trunk/extensions/DataCenter/Views/Plans/Rack.php |
— | — | @@ -80,11 +80,7 @@ |
81 | 81 | 'rows', |
82 | 82 | array( |
83 | 83 | DataCenterUI::renderWidget( |
84 | | - 'heading', |
85 | | - array( |
86 | | - 'message' => 'objects-in', |
87 | | - 'subject' => $rackLink->get( 'name' ) |
88 | | - ) |
| 84 | + 'heading', array( 'message' => 'objects' ) |
89 | 85 | ), |
90 | 86 | 'objects' => DataCenterUI::renderWidget( |
91 | 87 | 'table', |
— | — | @@ -130,13 +126,27 @@ |
131 | 127 | ) |
132 | 128 | ), |
133 | 129 | DataCenterUI::renderWidget( |
134 | | - 'heading', |
| 130 | + 'heading', array( 'message' => 'configuration' ) |
| 131 | + ), |
| 132 | + DataCenterUI::renderWidget( |
| 133 | + 'details', |
135 | 134 | array( |
136 | | - 'message' => 'details-for', |
137 | | - 'subject' => $rackLink->get( 'name' ), |
| 135 | + 'row' => $rackLink, |
| 136 | + 'fields' => array( |
| 137 | + 'position' => array( |
| 138 | + 'fields' => array( 'x', 'y' ), |
| 139 | + 'glue' => ' x ' |
| 140 | + ), |
| 141 | + 'orientation' => array( |
| 142 | + 'format' => 'angle' |
| 143 | + ) |
| 144 | + ), |
138 | 145 | ) |
139 | 146 | ), |
140 | | - 'details' => DataCenterUI::renderWidget( |
| 147 | + DataCenterUI::renderWidget( |
| 148 | + 'heading', array( 'message' => 'asset' ) |
| 149 | + ), |
| 150 | + DataCenterUI::renderWidget( |
141 | 151 | 'details', |
142 | 152 | array( |
143 | 153 | 'row' => $rack, |
— | — | @@ -227,7 +237,6 @@ |
228 | 238 | $tabs[$groupName] = DataCenterUI::renderWidget( |
229 | 239 | 'table', |
230 | 240 | array( |
231 | | - 'heading' => array( 'message' => 'select-rack' ), |
232 | 241 | 'rows' => $rackGroup, |
233 | 242 | 'fields' => array( |
234 | 243 | 'manufacturer', |
— | — | @@ -258,7 +267,11 @@ |
259 | 268 | 'rows', |
260 | 269 | array( |
261 | 270 | DataCenterUI::renderWidget( |
262 | | - 'heading', array( 'message' => 'select-rack' ) |
| 271 | + 'heading', |
| 272 | + array( |
| 273 | + 'message' => 'select-type', |
| 274 | + 'type' => 'rack' |
| 275 | + ) |
263 | 276 | ), |
264 | 277 | DataCenterUI::renderLayout( 'tabs', $tabs ) |
265 | 278 | ) |
— | — | @@ -289,8 +302,7 @@ |
290 | 303 | DataCenterUI::renderWidget( |
291 | 304 | 'heading', |
292 | 305 | array( |
293 | | - 'message' => 'confirm-remove', |
294 | | - 'subject' => $rackLink->get( 'name' ), |
| 306 | + 'message' => 'remove-type', 'type' => 'rack', |
295 | 307 | ) |
296 | 308 | ), |
297 | 309 | DataCenterUI::renderWidget( |
— | — | @@ -401,8 +413,7 @@ |
402 | 414 | ), |
403 | 415 | ); |
404 | 416 | $headingParameters = array( |
405 | | - 'message' => 'attaching-type', |
406 | | - 'subject' => DataCenterUI::message( 'type', $path['type'] ) |
| 417 | + 'message' => 'attaching-type', 'type' => 'rack' |
407 | 418 | ); |
408 | 419 | } else { |
409 | 420 | // Gets asset from database |
— | — | @@ -423,8 +434,7 @@ |
424 | 435 | ), |
425 | 436 | ); |
426 | 437 | $headingParameters = array( |
427 | | - 'message' => 'configuring-type', |
428 | | - 'subject' => DataCenterUI::message( 'type', $path['type'] ) |
| 438 | + 'message' => 'configuring-type', 'type' => 'rack' |
429 | 439 | ); |
430 | 440 | } |
431 | 441 | // Gets parent asset from database |
Index: trunk/extensions/DataCenter/Views/Plans/Object.php |
— | — | @@ -44,13 +44,27 @@ |
45 | 45 | 'rows', |
46 | 46 | array( |
47 | 47 | DataCenterUI::renderWidget( |
48 | | - 'heading', |
| 48 | + 'heading', array( 'message' => 'configuration' ) |
| 49 | + ), |
| 50 | + DataCenterUI::renderWidget( |
| 51 | + 'details', |
49 | 52 | array( |
50 | | - 'message' => 'details-for', |
51 | | - 'subject' => $objectLink->get( 'name' ), |
| 53 | + 'row' => $objectLink, |
| 54 | + 'fields' => array( |
| 55 | + 'position' => array( |
| 56 | + 'field' => 'z' |
| 57 | + ), |
| 58 | + 'side' => array( |
| 59 | + 'field' => 'orientation', |
| 60 | + 'format' => 'side' |
| 61 | + ) |
| 62 | + ), |
52 | 63 | ) |
53 | 64 | ), |
54 | | - 'details' => DataCenterUI::renderWidget( |
| 65 | + DataCenterUI::renderWidget( |
| 66 | + 'heading', array( 'message' => 'asset' ) |
| 67 | + ), |
| 68 | + DataCenterUI::renderWidget( |
55 | 69 | 'details', |
56 | 70 | array( |
57 | 71 | 'row' => $object, |
— | — | @@ -174,7 +188,11 @@ |
175 | 189 | 'rows', |
176 | 190 | array( |
177 | 191 | DataCenterUI::renderWidget( |
178 | | - 'heading', array( 'message' => 'select-object' ) |
| 192 | + 'heading', |
| 193 | + array( |
| 194 | + 'message' => 'select-type', |
| 195 | + 'type' => 'object' |
| 196 | + ) |
179 | 197 | ), |
180 | 198 | DataCenterUI::renderLayout( 'tabs', $tabs ) |
181 | 199 | ) |
— | — | @@ -211,8 +229,8 @@ |
212 | 230 | DataCenterUI::renderWidget( |
213 | 231 | 'heading', |
214 | 232 | array( |
215 | | - 'message' => 'confirm-remove', |
216 | | - 'subject' => $objectLink->get( 'name' ), |
| 233 | + 'message' => 'remove-type', |
| 234 | + 'type' => 'object' |
217 | 235 | ) |
218 | 236 | ), |
219 | 237 | DataCenterUI::renderWidget( |
— | — | @@ -331,6 +349,14 @@ |
332 | 350 | 'id' => $path['parameter'][1], |
333 | 351 | ), |
334 | 352 | ); |
| 353 | + $headingParameters = array( |
| 354 | + 'message' => 'attaching-type', |
| 355 | + 'type' => 'object', |
| 356 | + ); |
| 357 | + } else { |
| 358 | + throw new MWException( |
| 359 | + 'Invalid parameters' |
| 360 | + ); |
335 | 361 | } |
336 | 362 | } else { |
337 | 363 | // Gets asset from database |
— | — | @@ -356,6 +382,10 @@ |
357 | 383 | 'id' => $path['id'], |
358 | 384 | ), |
359 | 385 | ); |
| 386 | + $headingParameters = array( |
| 387 | + 'message' => 'configuring-type', |
| 388 | + 'type' => 'object', |
| 389 | + ); |
360 | 390 | } |
361 | 391 | // Builds javascript that references the renderable asset |
362 | 392 | $target = array( |
— | — | @@ -434,11 +464,7 @@ |
435 | 465 | 'rows', |
436 | 466 | array( |
437 | 467 | DataCenterUI::renderWidget( |
438 | | - 'heading', |
439 | | - array( |
440 | | - 'message' => 'editing-details-for', |
441 | | - 'subject' => $objectLink->get( 'name' ), |
442 | | - ) |
| 468 | + 'heading', $headingParameters |
443 | 469 | ), |
444 | 470 | DataCenterUI::renderWidget( 'form', $formParameters ), |
445 | 471 | ) |
Index: trunk/extensions/DataCenter/DataCenter.i18n.php |
— | — | @@ -31,6 +31,8 @@ |
32 | 32 | 'datacenter-ui-type-object' => 'Object', |
33 | 33 | 'datacenter-ui-type-port' => 'Port', |
34 | 34 | 'datacenter-ui-type-meta' => 'Meta', |
| 35 | + 'datacenter-ui-type-model' => 'Model', |
| 36 | + 'datacenter-ui-type-attachment' => 'Attachment', |
35 | 37 | // Actions |
36 | 38 | 'datacenter-ui-action-configure' => 'Configure', |
37 | 39 | 'datacenter-ui-action-edit' => 'Edit', |
— | — | @@ -136,41 +138,45 @@ |
137 | 139 | 'datacenter-ui-label-add-type' => 'Add $1', |
138 | 140 | 'datacenter-ui-label-browse-by' => 'Browse by:', |
139 | 141 | 'datacenter-ui-label-num-spaces' => '$1 {{PLURAL:$1|Space|Spaces}}', |
140 | | - // Headings |
| 142 | + 'datacenter-ui-label-degrees-value' => '$1°', |
| 143 | + // List Headings |
| 144 | + 'datacenter-ui-heading-history' => 'History', |
141 | 145 | 'datacenter-ui-heading-plans' => 'Plans', |
142 | 146 | 'datacenter-ui-heading-locations' => 'Locations', |
143 | 147 | 'datacenter-ui-heading-spaces' => 'Spaces', |
144 | | - 'datacenter-ui-heading-spaces-in' => 'Spaces in $1', |
145 | | - 'datacenter-ui-heading-racks-in' => 'Racks in $1', |
146 | | - 'datacenter-ui-heading-objects-in' => 'Objects in $1', |
147 | | - 'datacenter-ui-heading-select-rack' => 'Select Rack to attach', |
148 | | - 'datacenter-ui-heading-select-object' => 'Select Object to attach', |
149 | | - 'datacenter-ui-heading-model-outline' => 'Model Outline', |
150 | | - 'datacenter-ui-heading-attach-object' => 'Select Object to Attach', |
151 | | - 'datacenter-ui-heading-attach-port' => 'Select Port to Attach', |
152 | | - 'datacenter-ui-heading-attach-quantity' => 'Select Quantity', |
153 | | - 'datacenter-ui-heading-deploy-type' => 'Select $1 to Deploy', |
154 | | - 'datacenter-ui-heading-details-for' => 'Details for $1', |
155 | | - 'datacenter-ui-heading-editing-details-for' => 'Editing Details for $1', |
| 148 | + 'datacenter-ui-heading-racks' => 'Racks', |
| 149 | + 'datacenter-ui-heading-objects' => 'Objects', |
| 150 | + // Information Headings |
| 151 | + 'datacenter-ui-heading-details' => 'Details', |
| 152 | + 'datacenter-ui-heading-model-attachments' => 'Model Attachments', |
| 153 | + 'datacenter-ui-heading-difference' => 'Difference', |
| 154 | + 'datacenter-ui-heading-asset' => 'Asset', |
| 155 | + 'datacenter-ui-heading-model' => 'Model', |
| 156 | + 'datacenter-ui-heading-facility' => 'Facility', |
| 157 | + 'datacenter-ui-heading-location' => 'Location', |
| 158 | + 'datacenter-ui-heading-space' => 'Space', |
| 159 | + 'datacenter-ui-heading-configuration' => 'Configuration', |
| 160 | + // Type-based Headings |
| 161 | + 'datacenter-ui-heading-history-type' => '$1 History', |
| 162 | + 'datacenter-ui-heading-remove-type' => 'Remove $1?', |
| 163 | + 'datacenter-ui-heading-asset-type' => '$1 Asset', |
156 | 164 | 'datacenter-ui-heading-editing-type' => 'Editing $1', |
157 | 165 | 'datacenter-ui-heading-adding-type' => 'Adding $1', |
158 | | - 'datacenter-ui-heading-plans-for' => 'Plans for $1', |
159 | | - 'datacenter-ui-heading-confirm-remove' => 'Remove $1?', |
| 166 | + 'datacenter-ui-heading-assets-type' => '$1 Assets', |
| 167 | + 'datacenter-ui-heading-models-type' => '$1 Assets', |
160 | 168 | 'datacenter-ui-heading-deploying-asset-type' => 'Deploying $1 Asset', |
161 | 169 | 'datacenter-ui-heading-managing-asset-type' => 'Managing $1 Asset', |
| 170 | + 'datacenter-ui-heading-model-type' => '$1 Model', |
162 | 171 | 'datacenter-ui-heading-creating-model-type' => 'Creating $1 Model', |
163 | 172 | 'datacenter-ui-heading-modifying-model-type' => 'Modifying $1 Model', |
164 | | - 'datacenter-ui-heading-asset-type' => '$1 Asset', |
165 | | - 'datacenter-ui-heading-assets-type' => '$1 Assets', |
166 | | - 'datacenter-ui-heading-model-type' => '$1 Asset', |
167 | | - 'datacenter-ui-heading-models-type' => '$1 Assets', |
| 173 | + 'datacenter-ui-heading-select-attach-type' => 'Select $1 to Attach', |
| 174 | + 'datacenter-ui-heading-select-deploy-type' => 'Select $1 to Deploy', |
168 | 175 | 'datacenter-ui-heading-attaching-type' => 'Attaching $1', |
169 | 176 | 'datacenter-ui-heading-configuring-type' => 'Configuring $1', |
170 | | - 'datacenter-ui-heading-difference' => 'Difference', |
171 | 177 | // Bodies |
172 | 178 | 'datacenter-ui-body-confirm-remove-type' => 'Removing this $1 will result in the removal of the following links and cannot be recovered from. Do you want to continue with the removal?', |
173 | 179 | 'datacenter-ui-body-invalid-request' => 'You have requested a page with an invalid path.', |
174 | | - 'datacenter-ui-body-welcome' => 'Welcome to the beta-testing of DataCenter. Please poke around and give feedback Trevor Parscal.', |
| 180 | + 'datacenter-ui-body-welcome' => 'Welcome to the beta-testing of DataCenter. Please poke around and give feedback Trevor Parscal. If you are going to help out, take a look at the media wiki extension page for DataCenter which has a list of feature priorities.', |
175 | 181 | // Tabs |
176 | 182 | 'datacenter-ui-tab-racks' => 'Racks', |
177 | 183 | 'datacenter-ui-tab-details' => 'Details', |