Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Commit

Permalink
Cleaner multivalue CCK field form element theming.
Browse files Browse the repository at this point in the history
  • Loading branch information
yhahn committed Sep 10, 2009
1 parent b4afc91 commit a49491f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sites/all/themes/ginkgo/forms.css
Expand Up @@ -103,6 +103,14 @@ form div.form div.buttons {
background:#f8f8f8;
}

/* CCK multiple values */
div.content-multiple-values { position:relative; }
div.content-multiple-values .content-add-more {
position:absolute;
top:5px;
right:5px;
}

/**
* FIELDSETS =========================================================
*/
Expand Down
14 changes: 14 additions & 0 deletions sites/all/themes/ginkgo/template.php
Expand Up @@ -373,6 +373,20 @@ function ginkgo_node_preview($node = NULL, $show = FALSE) {
return $show ? $output : '';
}

/**
* Override of theme_content_multiple_values().
* Adds a generic wrapper.
*/
function ginkgo_content_multiple_values($element) {
$output = theme_content_multiple_values($element);
$field_name = $element['#field_name'];
$field = content_fields($field_name);
if ($field['multiple'] >= 1) {
return "<div class='content-multiple-values'>{$output}</div>";
}
return $output;
}

/**
* Preprocessor for theme('views_view_fields').
*/
Expand Down

0 comments on commit a49491f

Please sign in to comment.