Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tablefield-3199886
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
tablefield-3199886
Commits
be09f99a
Commit
be09f99a
authored
14 years ago
by
Kevin Hankens
Browse files
Options
Downloads
Patches
Plain Diff
Update to table header output
parent
369396fb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tablefield.module
+11
-3
11 additions, 3 deletions
tablefield.module
with
11 additions
and
3 deletions
tablefield.module
+
11
−
3
View file @
be09f99a
...
...
@@ -121,11 +121,19 @@ function tablefield_field($op, &$node, $field, &$items, $teaser, $page) {
// Multivalue fields will have one row in the db, so make sure that it isn't empty
if
(
isset
(
$tabledata
))
{
// Pull the header for theming
$header
=
$tabledata
[
0
];
// Run the table head through input filters
foreach
(
$tabledata
[
0
]
as
$header_key
=>
$header_data
)
{
if
(
!
empty
(
$field
[
'cell_processing'
]))
{
$header
[
$header_key
]
=
array
(
'data'
=>
check_markup
(
$header_data
,
$table
[
'format'
]),
'class'
=>
'row_0'
.
' col_'
.
$header_key
);
}
else
{
$header
[
$header_key
]
=
array
(
'data'
=>
check_plain
(
$header_data
),
'class'
=>
'row_0'
.
' col_'
.
$header_key
);
}
}
unset
(
$tabledata
[
0
]);
// Run
i
t through input filters
// Run t
he table body
through input filters
if
(
!
empty
(
$tabledata
))
{
foreach
(
$tabledata
as
$row_key
=>
$row
)
{
foreach
(
$row
as
$col_key
=>
$cell
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment