Index: trunk/extensions/PageSchemas/PageSchemas.classes.php |
— | — | @@ -56,29 +56,30 @@ |
57 | 57 | |
58 | 58 | static function parsePageSchemas($class_schema_xml) { |
59 | 59 | |
60 | | - global $wgTitle; |
61 | | - |
| 60 | + global $wgTitle; |
62 | 61 | if($wgTitle->getNamespace() == NS_CATEGORY){ |
63 | 62 | $text = "<p>Schema description:</p>\n"; |
64 | 63 | $text .= "<table class=\"pageSchema\">\n"; |
65 | 64 | $name = $class_schema_xml->attributes()->name; |
66 | | - $text = self::tableRowHTML('template_class', 'PageSchema', $name); |
67 | | - foreach ( $class_schema_xml->children() as $tag => $child ) { |
68 | | - if ($tag == 'Template') { |
69 | | - $text .= self::parseTemplate($child); |
70 | | - } else{ |
71 | | - echo "Code to be added by other extension\n"; |
| 65 | + $text .= self::tableRowHTML('paramGroup', 'PageSchema', $name); |
| 66 | + foreach ( $class_schema_xml->children() as $tag => $child ) { |
| 67 | + if ($tag == 'Template') { |
| 68 | + $text .= self::parseTemplate($child); |
| 69 | + } else{ |
| 70 | + echo "Code to be added by other extension\n"; |
| 71 | + } |
72 | 72 | } |
73 | | - } |
74 | 73 | $text .= "</table>\n"; |
75 | 74 | }else{ |
76 | 75 | $text = ""; |
77 | 76 | } |
| 77 | + wfDebugLog( 'myextension', 'Generate html is:: ' . $text ); |
78 | 78 | return $text; |
| 79 | + |
79 | 80 | } |
80 | | - static function parseTemplate ( $template_xml ) { |
| 81 | + static function parseTemplate ( $template_xml ) { |
81 | 82 | $name = $template_xml->attributes()->name; |
82 | | - $text = self::tableRowHTML('template_class', 'Template', $name); |
| 83 | + $text = self::tableRowHTML('param', 'Template', $name); |
83 | 84 | foreach ($template_xml->children() as $child) { |
84 | 85 | $text .= self::parseField($child); |
85 | 86 | } |
— | — | @@ -86,7 +87,7 @@ |
87 | 88 | } |
88 | 89 | static function parseField ( $field_xml ) { |
89 | 90 | $name = $field_xml->attributes()->name; |
90 | | - $text = self::tableMessageRowHTML('paramDataField', $name, $field_xml); |
| 91 | + $text = self::tableMessageRowHTML('paramAttr', $name, $field_xml); |
91 | 92 | return $text; |
92 | 93 | } |
93 | 94 | } |