Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
page_title
Commits
019ecfab
Commit
019ecfab
authored
Jun 28, 2011
by
Nicholas Thompson
Browse files
Should have added that new admin theme template
parent
9f0335cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
page_title-admin-settings-form.tpl.php
0 → 100644
View file @
019ecfab
<?php
$form
=
&
$variables
[
'form'
];
$rows
=
array
();
foreach
(
element_children
(
$form
[
'pattern'
])
as
$key
)
{
$title
=
array
(
'#markup'
=>
$form
[
'pattern'
][
$key
][
'#title'
],
'#required'
=>
$form
[
'pattern'
][
$key
][
'#required'
],
);
unset
(
$form
[
'patterns'
][
'pattern'
][
$key
][
'#title'
]);
$row
=
array
(
array
(
'data'
=>
render
(
$title
),
'class'
=>
'page-type'
),
array
(
'data'
=>
render
(
$form
[
'scope'
][
$key
]),
'class'
=>
'scope'
),
);
if
(
isset
(
$form
[
'showfield'
][
$key
.
'_showfield'
]))
{
$row
[]
=
array
(
'data'
=>
render
(
$form
[
'pattern'
][
$key
]),
'class'
=>
'pattern'
);
$row
[]
=
array
(
'data'
=>
render
(
$form
[
'showfield'
][
$key
.
'_showfield'
]),
'class'
=>
'showfield'
);
}
else
{
$row
[]
=
array
(
'data'
=>
render
(
$form
[
'pattern'
][
$key
]),
'colspan'
=>
2
,
'class'
=>
'pattern'
);
}
$rows
[]
=
$row
;
}
$headers
=
array
(
array
(
'data'
=>
t
(
'Page Type'
),
'class'
=>
'page-type'
),
array
(
'data'
=>
t
(
'Token Scope'
),
'class'
=>
'scope'
),
array
(
'data'
=>
t
(
'Pattern'
),
'class'
=>
'pattern'
),
array
(
'data'
=>
t
(
'Show Field'
),
'class'
=>
'showfield'
),
);
drupal_add_css
(
drupal_get_path
(
'module'
,
'page_title'
)
.
'/page_title.admin.css'
,
array
(
'type'
=>
'file'
,
'preprocess'
=>
FALSE
));
print
theme
(
'table'
,
array
(
'header'
=>
$headers
,
'rows'
=>
$rows
,
'attributed'
=>
array
(
'id'
=>
'page-title-settings'
)));
//print drupal_render_children($form);
Write
Preview
Supports
Markdown
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