Projet

Général

Profil

Paste
Télécharger (1,11 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / views_pdf / views_pdf.admin.inc @ 87dbc3bf

1
<?php
2

    
3
/**
4
 * @file
5
 * Theme function for enhence the views admin interface vor PDF options.
6
 */
7

    
8

    
9
/**
10
 * Theme function to style the table UI in the Table Style Settings pages in the
11
 * view editing form.
12
 */
13
function theme_views_pdf_plugin_style_table($variables) {
14
  $form = $variables['form'];
15

    
16
  $output = drupal_render($form['description_markup']);
17

    
18
  $header = array(
19
    t('Field'),
20
    t('Header Style'),
21
    t('Body Style'),
22
    t('Position')
23
  );
24
  //$output .= print_r($variables, 1);
25

    
26
  $rows = array();
27
  foreach (element_children($form['info']) as $id) {
28
    $row = array();
29
    $row[] = array('data' => drupal_render($form['info'][$id]['name']), 'width' => '20%');
30
    $row[] = array('data' => drupal_render($form['info'][$id]['header_style']), 'width' => '30%');
31
    $row[] = array('data' => drupal_render($form['info'][$id]['body_style']), 'width' => '30%');
32
    $row[] = array('data' => drupal_render($form['info'][$id]['position']), 'width' => '20%');
33

    
34
    $rows[] = $row;
35
  }
36

    
37
  $output .= theme('table', array('header' => $header, 'rows' => $rows));
38
  $output .= drupal_render_children($form);
39
  return $output;
40

    
41
}