Index: trunk/extensions/OpenStackManager/special/SpecialNovaProject.php |
— | — | @@ -216,7 +216,6 @@ |
217 | 217 | $this->pushRawResourceColumn( $roleRow, $this->createResourceList( $actions ) ); |
218 | 218 | array_push( $roleRows, $roleRow ); |
219 | 219 | } |
220 | | - // TODO: add back in Nova_cell class to this column |
221 | 220 | $this->pushRawResourceColumn( $projectRow, $this->createResourceTable( $headers, $roleRows ) ); |
222 | 221 | $actions = Array(); |
223 | 222 | array_push( $actions, $this->createActionLink( 'openstackmanager-deleteproject', array( 'action' => 'delete', 'projectname' => $projectName ) ) ); |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaKey.php |
— | — | @@ -175,8 +175,7 @@ |
176 | 176 | $keyRows = Array(); |
177 | 177 | foreach ( $keypairs as $hash => $key ) { |
178 | 178 | $keyRow = Array(); |
179 | | - # TODO: add Nova_col class back to this column |
180 | | - $this->pushResourceColumn( $keyRow, $key ); |
| 179 | + $this->pushResourceColumn( $keyRow, $key, array( 'class' => 'Nova_col' ) ); |
181 | 180 | $actions = Array(); |
182 | 181 | array_push( $actions, $this->createActionLink( 'openstackmanager-delete', array( 'action' => 'delete', 'hash' => $hash ) ) ); |
183 | 182 | $this->pushRawResourceColumn( $keyRow, $this->createResourceList( $actions) ); |
Index: trunk/extensions/OpenStackManager/special/SpecialNova.php |
— | — | @@ -181,12 +181,22 @@ |
182 | 182 | return Html::rawElement( 'ul', array(), $resourceList ); |
183 | 183 | } |
184 | 184 | |
185 | | - function pushResourceColumn( &$row, $value ) { |
186 | | - array_push( $row, Html::element( 'td', array(), $value ) ); |
| 185 | + function pushResourceColumn( &$row, $value, $attribs=array() ) { |
| 186 | + if ( array_key_exists( 'class', $attribs ) ) { |
| 187 | + $attribs['class'] = $attribs['class'] . ' Nova_cell'; |
| 188 | + } else { |
| 189 | + $attribs['class'] = 'Nova_cell'; |
| 190 | + } |
| 191 | + array_push( $row, Html::element( 'td', $attribs, $value ) ); |
187 | 192 | } |
188 | 193 | |
189 | | - function pushRawResourceColumn( &$row, $value ) { |
190 | | - array_push( $row, Html::rawElement( 'td', array(), $value ) ); |
| 194 | + function pushRawResourceColumn( &$row, $value, $attribs=array() ) { |
| 195 | + if ( array_key_exists( 'class', $attribs ) ) { |
| 196 | + $attribs['class'] = $attribs['class'] . ' Nova_cell'; |
| 197 | + } else { |
| 198 | + $attribs['class'] = 'Nova_cell'; |
| 199 | + } |
| 200 | + array_push( $row, Html::rawElement( 'td', $attribs, $value ) ); |
191 | 201 | } |
192 | 202 | |
193 | 203 | function createResourceTable( $headers, $rows ) { |
— | — | @@ -215,11 +225,12 @@ |
216 | 226 | } |
217 | 227 | if ( $actions ) { |
218 | 228 | $actions = implode( ',', $actions ); |
| 229 | + $actions = '<a class="mw-customtoggle-' . $projectName . ' osm-remotetoggle">' . wfMsgHtml( 'openstackmanager-toggleproject' ) . '</a>,' . $actions; |
219 | 230 | $actionOut = Html::rawElement( 'span', array( 'id' => 'novaaction' ), "[$actions]" ); |
220 | 231 | } else { |
221 | 232 | $actionOut = ''; |
222 | 233 | } |
223 | | - $projectNameOut = Html::rawElement( 'span', array( 'class' => 'mw-customtoggle-' . $projectName, 'id' => 'novaproject' ), $projectName ); |
| 234 | + $projectNameOut = $this->createResourceLink( $projectName ); |
224 | 235 | $out = Html::rawElement( 'h2', array(), "$projectNameOut $actionOut" ); |
225 | 236 | $out .= Html::rawElement( 'div', array( 'class' => 'mw-collapsible', 'id' => 'mw-customcollapsible-' . $projectName ), $data ); |
226 | 237 | |
Index: trunk/extensions/OpenStackManager/OpenStackManager.i18n.php |
— | — | @@ -427,6 +427,7 @@ |
428 | 428 | 'openstackmanager-projects' => 'A set of projects', |
429 | 429 | 'openstackmanager-setprojects' => 'A message informing the user that a project filter has been successfully assigned', |
430 | 430 | 'openstackmanager-setprojectfilter' => ' A message telling the user that a project filter should be applied to see any resources.', |
| 431 | + 'openstackmanager-toggleproject' => 'A message to tell the user they can toggle the collapsing and expanding of project sections.', |
431 | 432 | ); |
432 | 433 | |
433 | 434 | /** Afrikaans (Afrikaans) |