diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-06 19:34:33 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-06 19:34:33 +0000 |
commit | 51e5d3ae2764c9b98505480a1f3ca0e7b0e5621d (patch) | |
tree | 9f21a8fb7e13026d8e2b40cc6aaac41d76bc9118 /themes | |
parent | 4fcae8068f4d843856dc75054115c0996189bbd2 (diff) | |
download | brdo-51e5d3ae2764c9b98505480a1f3ca0e7b0e5621d.tar.gz brdo-51e5d3ae2764c9b98505480a1f3ca0e7b0e5621d.tar.bz2 |
#819996 by amateescu, Jeff Burnz, tim.plunkett, Hoople, bleen18: Fix taxonomy term displays in Bartik.
Diffstat (limited to 'themes')
-rw-r--r-- | themes/bartik/css/style-rtl.css | 11 | ||||
-rw-r--r-- | themes/bartik/css/style.css | 36 | ||||
-rw-r--r-- | themes/bartik/template.php | 24 |
3 files changed, 51 insertions, 20 deletions
diff --git a/themes/bartik/css/style-rtl.css b/themes/bartik/css/style-rtl.css index 8b76d4b18..31798e54f 100644 --- a/themes/bartik/css/style-rtl.css +++ b/themes/bartik/css/style-rtl.css @@ -88,13 +88,14 @@ ul.tips { margin-left: 5px; margin-right: 0; } -.field-type-taxonomy-term-reference .field-label, -.field-type-taxonomy-term-reference .field-items, -.field-type-taxonomy-term-reference .field-item { - float: right; - padding-left: 10px; +.field-type-taxonomy-term-reference .field-label { + padding-left: 5px; padding-right: 0; } +.field-type-taxonomy-term-reference ul.links li { + padding: 0 0 0 1em; + float: right; +} .link-wrapper { margin-right: 236px; margin-left: 0; diff --git a/themes/bartik/css/style.css b/themes/bartik/css/style.css index 15edc6dde..520196786 100644 --- a/themes/bartik/css/style.css +++ b/themes/bartik/css/style.css @@ -558,25 +558,31 @@ h1#page-title { height: 20px; margin: 1px 5px 0 0; /* LTR */ } -.field-type-taxonomy-term-reference .field-label, -.field-type-taxonomy-term-reference .field-items, -.field-type-taxonomy-term-reference .field-item { - display: inline; - float: left; /* LTR */ - padding-right: 10px; /* LTR */ +.field-type-taxonomy-term-reference { + margin: 0 0 1.2em; +} +.field-type-taxonomy-term-reference .field-label { font-weight: normal; + margin: 0; + padding-right: 5px; /* LTR */ } -.field-type-taxonomy-term-reference div.field-label { - font-size: 0.857em; - color: #68696b; +.field-type-taxonomy-term-reference .field-label, +.field-type-taxonomy-term-reference ul.links { + font-size: 0.8em; } -.field-type-taxonomy-term-reference .field-items, -.field-type-taxonomy-term-reference .field-item { - font-size: 0.929em; +.node-teaser .field-type-taxonomy-term-reference .field-label, +.node-teaser .field-type-taxonomy-term-reference ul.links { + font-size: 0.821em; } -.field-type-taxonomy-term-reference a:hover, -.field-type-taxonomy-term-reference a:focus { - text-decoration: underline; +.field-type-taxonomy-term-reference ul.links { + padding: 0; + margin: 0; + list-style: none; +} +.field-type-taxonomy-term-reference ul.links li { + float: left; /* LTR */ + padding: 0 1em 0 0; /* LTR */ + white-space: nowrap; } .link-wrapper { text-align: right; diff --git a/themes/bartik/template.php b/themes/bartik/template.php index d60aeb6a5..f3bc93b27 100644 --- a/themes/bartik/template.php +++ b/themes/bartik/template.php @@ -128,3 +128,27 @@ function bartik_preprocess_block(&$variables) { function bartik_menu_tree($variables) { return '<ul class="menu clearfix">' . $variables['tree'] . '</ul>'; } + +/** + * Implements theme_field__field_type(). + */ +function bartik_field__taxonomy_term_reference($variables) { + $output = ''; + + // Render the label, if it's not hidden. + if (!$variables['label_hidden']) { + $output .= '<h3 class="field-label">' . $variables['label'] . ': </h3>'; + } + + // Render the items. + $output .= ($variables['element']['#label_display'] == 'inline') ? '<ul class="links inline">' : '<ul class="links">'; + foreach ($variables['items'] as $delta => $item) { + $output .= '<li class="taxonomy-term-reference-' . $delta . '">' . drupal_render($item) . '</li>'; + } + $output .= '</ul>'; + + // Render the top-level DIV. + $output = '<div class="' . $variables['classes'] . (!in_array('clearfix', $variables['classes_array']) ? ' clearfix' : '') . '">' . $output . '</div>'; + + return $output; +} |