Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
forena
Commits
3a2e692c
Commit
3a2e692c
authored
Feb 27, 2014
by
metzlerd
Browse files
Fixing columns.
parent
5a557d84
Changes
1
Hide whitespace changes
Inline
Side-by-side
renderers/FrxFieldTable.inc
View file @
3a2e692c
...
...
@@ -57,6 +57,35 @@ class FrxFieldTable extends FrxRenderer {
$th
=
$this
->
addNode
(
$tr
,
10
,
'th'
,
$col
[
'label'
]);
$td
=
$this
->
addNode
(
$tr
,
10
,
'td'
,
$col
[
'contents'
]);
}
// Decide to inlcude columns
$found_columns
=
$this
->
columns
(
$xml
);
if
(
!
$found_columns
)
{
$found_columns
=
$this
->
columns
(
$xml
,
'/*'
);
$attrs
=
array
();
}
$include_column
=
0
;
$weight
=
0
;
if
(
!@
$config
[
'columns'
])
{
$include_column
=
1
;
}
else
{
$weight
=
count
(
$config
[
'columns'
]);
}
foreach
(
$found_columns
as
$column
=>
$label
)
{
$token
=
'{'
.
$column
.
'}'
;
if
(
!
isset
(
$config
[
'columns'
][
$column
]))
{
$weight
++
;
$config
[
'columns'
][
$column
]
=
array
(
'contents'
=>
$token
,
'include'
=>
$include_column
,
'label'
=>
$label
,
'weight'
=>
$weight
,
);
}
}
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment