Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Info page completed

  • Loading branch information...
commit 5087b2d8b43936631df5a7ae10c6d465cde773ee 1 parent 0b509a5
@shakty authored
Showing with 29 additions and 8 deletions.
  1. +4 −0 CHANGELOG
  2. +24 −7 includes/forms/info.inc
  3. +1 −1  patterns.info
View
4 CHANGELOG
@@ -1,3 +1,7 @@
+7054:
+
+ - Info page completed
+
7053:
- patterns_io_load_components uses drupal_static now and returns an
View
31 includes/forms/info.inc
@@ -14,9 +14,9 @@ function patterns_info_page() {
$title = 'Patterns Info';
patterns_forms_add_page_header($form, $title, $text);
- $form = patterns_info_directories($form);
- $form = patterns_info_components($form);
$form = patterns_info_parsers($form);
+ $form = patterns_info_components($form);
+ $form = patterns_info_directories($form);
return drupal_render($form);
}
@@ -25,6 +25,11 @@ function patterns_info_directories($form = array()) {
$dirs = patterns_path_get_patterns_dirs();
$dirs = patterns_array_to_rows($dirs);
+ $header = array (
+ t('N.'),
+ t('Directory'),
+ );
+
$form['pd'] = array(
'#type' => 'fieldset',
'#title' => t('Patterns Directories'),
@@ -34,7 +39,9 @@ function patterns_info_directories($form = array()) {
);
$form['pd']['dirs'] = array(
- '#markup' => theme('table', array('rows' => $dirs, 'attributes' => array('class' => 'patterns-list'))),
+ '#markup' => theme('table', array('header' => $header,
+ 'rows' => $dirs,
+ )),
);
return $form;
@@ -43,7 +50,17 @@ function patterns_info_directories($form = array()) {
function patterns_info_components($form = array()) {
$components = patterns_components_list();
- $components = patterns_array_to_rows($components);
+
+ foreach ($components as $key => $value) {
+ $name = basename($value);
+ $components[$key] = array($name, $value);
+ }
+
+ $header = array (
+ t('Name'),
+ t('Path'),
+ );
+
$form['cd'] = array (
'#type' => 'fieldset',
@@ -56,7 +73,9 @@ function patterns_info_components($form = array()) {
$form['cd']['components'] = array (
- '#markup' => theme('table', array('rows' => $components, 'attributes' => array('class' => 'patterns-list'))),
+ '#markup' => theme('table', array('header' => $header,
+ 'rows' => $components,
+ )),
);
return $form;
@@ -64,8 +83,6 @@ function patterns_info_components($form = array()) {
function patterns_info_parsers($form = array()) {
-
-
$parsers = patterns_parser_build_formats_index();
foreach ($parsers as $key => $value) {
View
2  patterns.info
@@ -5,7 +5,7 @@ dependencies[] = libraries
core = 7.x
version = 7.x-1.x-dev
-build = 7053
+build = 7054
package = Patterns
php = 5.2
Please sign in to comment.
Something went wrong with that request. Please try again.