You are here

function theme_responsive_share_buttons_settings in Responsive Share Buttons 7

Theme function for slideshow_manage().

1 theme call to theme_responsive_share_buttons_settings()
responsive_share_buttons_settings in ./responsive_share_buttons.admin.inc
Settings form as implemented by hook_menu.

File

./responsive_share_buttons.module, line 122
Module to enable CSS responsive share buttons.

Code

function theme_responsive_share_buttons_settings($variables) {
  $form = $variables['form'];
  $rows = array();
  foreach (element_children($form['networks']) as $network) {
    $form['networks'][$network]['weight']['#attributes']['class'] = array(
      'share-networks-order-weight',
    );
    $rows[] = array(
      'data' => array(
        array(
          'class' => array(
            'slide-cross',
          ),
        ),
        drupal_render($form['networks'][$network]['active']),
        drupal_render($form['networks'][$network]['weight']),
      ),
      'class' => array(
        'draggable',
      ),
    );
  }
  $header = array(
    t('Order'),
    t('Active'),
    t('Weight'),
  );
  $output = theme('table', array(
    'header' => $header,
    'rows' => $rows,
    'attributes' => array(
      'id' => 'share-networks-order',
    ),
  ));
  $output .= drupal_render_children($form);
  drupal_add_tabledrag('share-networks-order', 'order', 'sibling', 'share-networks-order-weight');
  return $output;
}