r46037 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46036‎ | r46037 | r46038 >
Date:22:16, 22 January 2009
Author:tparscal
Status:deferred
Tags:
Comment:
Improved UI when adding a field.
Modified paths:
  • /trunk/extensions/DataCenter/Views/Settings/Field.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DataCenter/Views/Settings/Field.php
@@ -201,6 +201,15 @@
202202 'type' => 'field'
203203 ),
204204 );
 205+ $rows = array(
 206+ DataCenterUI::renderWidget(
 207+ 'heading',
 208+ array(
 209+ 'message' => 'adding-type',
 210+ 'type' => 'field',
 211+ )
 212+ ),
 213+ );
205214 } else {
206215 // Gets component from database
207216 $field = DataCenterDB::getMetaField( $path['id'] );
@@ -215,6 +224,22 @@
216225 'id' => $path['id'],
217226 ),
218227 );
 228+ $rows = array(
 229+ DataCenterUI::renderWidget(
 230+ 'heading',
 231+ array(
 232+ 'message' => 'configuring-type',
 233+ 'type' => 'field',
 234+ )
 235+ ),
 236+ DataCenterUI::renderWidget(
 237+ 'body',
 238+ array(
 239+ 'message' => 'important-configuring-field',
 240+ 'style' => 'important',
 241+ )
 242+ ),
 243+ );
219244 }
220245 // Returns 2 columm layout with a form and a scene
221246 return DataCenterUI::renderLayout(
@@ -222,46 +247,38 @@
223248 array(
224249 DataCenterUI::renderLayout(
225250 'rows',
226 - array(
227 - DataCenterUI::renderWidget(
228 - 'heading',
229 - array(
230 - 'message' => 'configuring-type',
231 - 'type' => 'field',
232 - )
233 - ),
234 - DataCenterUI::renderWidget(
235 - 'body',
236 - array(
237 - 'message' => 'important-configuring-field',
238 - 'style' => 'important',
239 - )
240 - ),
241 - DataCenterUI::renderWidget(
242 - 'form',
243 - array_merge(
244 - $formParameters,
245 - array(
246 - 'do' => 'save',
247 - 'failure' => $path,
248 - 'action' => array(
249 - 'page' => 'settings', 'type' => 'field'
250 - ),
251 - 'row' => $field,
252 - 'fields' => array(
253 - 'name' => array( 'type' => 'string' ),
254 - 'format' => array(
255 - 'type' => 'list',
256 - 'enum' => array(
257 - 'category' => 'meta',
258 - 'type' => 'field',
259 - 'field' => 'format',
 251+ array_merge(
 252+ $rows,
 253+ array(
 254+ DataCenterUI::renderWidget(
 255+ 'form',
 256+ array_merge(
 257+ $formParameters,
 258+ array(
 259+ 'do' => 'save',
 260+ 'failure' => $path,
 261+ 'action' => array(
 262+ 'page' => 'settings',
 263+ 'type' => 'field'
 264+ ),
 265+ 'row' => $field,
 266+ 'fields' => array(
 267+ 'name' => array(
 268+ 'type' => 'string'
260269 ),
 270+ 'format' => array(
 271+ 'type' => 'list',
 272+ 'enum' => array(
 273+ 'category' => 'meta',
 274+ 'type' => 'field',
 275+ 'field' => 'format',
 276+ ),
 277+ ),
261278 ),
262 - ),
 279+ )
263280 )
264 - )
265 - ),
 281+ ),
 282+ )
266283 )
267284 ),
268285 ' '

Status & tagging log