Skip to content
Snippets Groups Projects
Commit 28933bf1 authored by Alex Barth's avatar Alex Barth
Browse files

Update overview page's theme.

parent 8211ca8c
No related branches found
No related tags found
No related merge requests found
...@@ -50,7 +50,6 @@ function feeds_ui_mapping_help() { ...@@ -50,7 +50,6 @@ function feeds_ui_mapping_help() {
* Build overview of available configurations. * Build overview of available configurations.
*/ */
function feeds_ui_overview_form(&$form_status) { function feeds_ui_overview_form(&$form_status) {
$form = $form['enabled'] = $form['disabled'] = array(); $form = $form['enabled'] = $form['disabled'] = array();
$form['#header'] = array( $form['#header'] = array(
...@@ -111,7 +110,7 @@ function feeds_ui_overview_form(&$form_status) { ...@@ -111,7 +110,7 @@ function feeds_ui_overview_form(&$form_status) {
$importer_form[$importer->id] = array( $importer_form[$importer->id] = array(
'#type' => 'checkbox', '#type' => 'checkbox',
'#default_value' => !$importer->disabled, '#default_value' => !$importer->disabled,
'#attributes' => array('class' => 'feeds-ui-trigger-submit'), '#attributes' => array('class' => array('feeds-ui-trigger-submit')),
); );
if ($importer->disabled) { if ($importer->disabled) {
...@@ -124,7 +123,7 @@ function feeds_ui_overview_form(&$form_status) { ...@@ -124,7 +123,7 @@ function feeds_ui_overview_form(&$form_status) {
$form['submit'] = array( $form['submit'] = array(
'#type' => 'submit', '#type' => 'submit',
'#value' => t('Save'), '#value' => t('Save'),
'#attributes' => array('class' => 'feeds-ui-hidden-submit'), '#attributes' => array('class' => array('feeds-ui-hidden-submit')),
); );
return $form; return $form;
} }
...@@ -645,7 +644,8 @@ function _feeds_ui_format_options($options) { ...@@ -645,7 +644,8 @@ function _feeds_ui_format_options($options) {
/** /**
* Theme feeds_ui_overview_form(). * Theme feeds_ui_overview_form().
*/ */
function theme_feeds_ui_overview_form($form) { function theme_feeds_ui_overview_form($variables) {
$form = $variables['form'];
drupal_add_js(drupal_get_path('module', 'feeds_ui') .'/feeds_ui.js'); drupal_add_js(drupal_get_path('module', 'feeds_ui') .'/feeds_ui.js');
drupal_add_css(drupal_get_path('module', 'feeds_ui') .'/feeds_ui.css'); drupal_add_css(drupal_get_path('module', 'feeds_ui') .'/feeds_ui.css');
// Iterate through all importers and build a table. // Iterate through all importers and build a table.
...@@ -657,21 +657,21 @@ function theme_feeds_ui_overview_form($form) { ...@@ -657,21 +657,21 @@ function theme_feeds_ui_overview_form($form) {
foreach (element_children($form[$type][$id]) as $col) { foreach (element_children($form[$type][$id]) as $col) {
$row[$col] = array( $row[$col] = array(
'data' => drupal_render($form[$type][$id][$col]), 'data' => drupal_render($form[$type][$id][$col]),
'class' => $type, 'class' => array($type),
); );
} }
$rows[] = array( $rows[] = array(
'data' => $row, 'data' => $row,
'class' => $type, 'class' => array($type),
); );
} }
} }
} }
$output = ''; $output = '';
if (count($rows)) { if (count($rows)) {
$output .= theme('table', $form['#header'], $rows, array('class' => 'feeds-admin-importers')); $output .= theme('table', array('header' => $form['#header'], 'rows' => $rows, 'attributes' => array('class' => array('feeds-admin-importers'))));
} }
$output .= drupal_render($form); $output .= drupal_render_children($form);
return $output; return $output;
} }
......
...@@ -88,6 +88,7 @@ function feeds_ui_menu() { ...@@ -88,6 +88,7 @@ function feeds_ui_menu() {
function feeds_ui_theme() { function feeds_ui_theme() {
return array( return array(
'feeds_ui_overview_form' => array( 'feeds_ui_overview_form' => array(
'render element' => 'form',
'file' => 'feeds_ui.admin.inc', 'file' => 'feeds_ui.admin.inc',
), ),
'feeds_ui_mapping_form' => array( 'feeds_ui_mapping_form' => array(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment