Created
August 16, 2012 09:42
-
-
Save jpustula/3368899 to your computer and use it in GitHub Desktop.
Changes in Tablefield 2.0 module (Drupal 7.15) for ap-serwis.pl. Remove table header styles and add colon to text in first column.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** tablefield.module 2012-01-13 13:28:18.000000000 -0800 | |
--- tablefield.module 2012-08-16 02:34:37.029457200 -0700 | |
*************** | |
*** 186,194 **** | |
--- 186,198 ---- | |
foreach ($tabledata as $row_key => $row) { | |
foreach ($row as $col_key => $cell) { | |
if (!empty($table['format'])) { | |
+ // Add colon after name in first table column | |
+ $cell = ($col_key == 0) ? $cell . ':' : $cell; | |
$tabledata[$row_key][$col_key] = array('data' => check_markup($cell, $table['format']), 'class' => array('row_' . $row_key, 'col_' . $col_key)); | |
} | |
else { | |
+ // Add colon after name in first table column | |
+ $cell = ($col_key == 0) ? $cell . ':' : $cell; | |
$tabledata[$row_key][$col_key] = array('data' => check_plain($cell), 'class' => array('row_' . $row_key, 'col_' . $col_key)); | |
} | |
} | |
*************** | |
*** 196,202 **** | |
} | |
// Pull the header for theming | |
! $header = array_shift($tabledata); | |
// Theme the table for display | |
$element[$delta]['#markup'] = theme('tablefield_view', array('header' => $header, 'rows' => $tabledata, 'delta' => $delta)); | |
--- 200,207 ---- | |
} | |
// Pull the header for theming | |
! //$header = array_shift($tabledata); | |
! $header = array(); | |
// Theme the table for display | |
$element[$delta]['#markup'] = theme('tablefield_view', array('header' => $header, 'rows' => $tabledata, 'delta' => $delta)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment