summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/page_title/page_title-admin-settings-form.tpl.php
diff options
context:
space:
mode:
authorTorsten Grote <grote@kolabsys.com>2012-08-15 15:01:04 (GMT)
committerTorsten Grote <grote@kolabsys.com>2012-08-15 15:01:04 (GMT)
commitde878a90f9e1d7d37263f1391aeffc23138ec4c9 (patch)
treea6165318e65a2da04fbd2919aaf6ea01702a95c9 /kolab.org/www/drupal-7.15/sites/all/modules/page_title/page_title-admin-settings-form.tpl.php
parentbd3d35cc30c2f3fb730f2bdca82d8fb6d59a3369 (diff)
downloadkolab.org-www-de878a90f9e1d7d37263f1391aeffc23138ec4c9.tar.gz
added page_title module
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/page_title/page_title-admin-settings-form.tpl.php')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/page_title/page_title-admin-settings-form.tpl.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/page_title/page_title-admin-settings-form.tpl.php b/kolab.org/www/drupal-7.15/sites/all/modules/page_title/page_title-admin-settings-form.tpl.php
new file mode 100644
index 0000000..8584c6a
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/page_title/page_title-admin-settings-form.tpl.php
@@ -0,0 +1,42 @@
+<?php
+/**
+ * @file
+ * Template file for the admin settings form. Renders the settings form as a table.
+ */
+
+$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);