Commit 1127c4c6 authored by Dries's avatar Dries

- Patch #1315616 by amateescu: use a definition list for the poll results.

parent 73c878b0
......@@ -21,7 +21,9 @@
<?php if ($block): ?>
<h3 class="poll-title"><?php print $title; ?></h3>
<?php endif; ?>
<?php print $results; ?>
<dl>
<?php print $results; ?>
</dl>
<div class="total">
<?php print t('Total votes: @votes', array('@votes' => $votes)); ?>
</div>
......
......@@ -2,6 +2,10 @@
.poll {
overflow: hidden;
}
.poll dl,
.poll dd {
margin: 0;
}
.poll .bar {
height: 1em;
margin: 1px 0;
......
......@@ -823,7 +823,8 @@ function poll_view_results($node, $view_mode, $block = FALSE) {
$poll_results[] = array(
'#theme' => 'meter',
'#prefix' => '<div class="choice-title">' . check_plain($choice['chtext']) . '</div>',
'#prefix' => '<dt class="choice-title">' . check_plain($choice['chtext']) . '</dt>' . PHP_EOL . '<dd class="choice-result">',
'#suffix' => '</dd>' . PHP_EOL,
'#display_value' => t('!percentage%', array('!percentage' => $percentage)) . $display_votes,
'#min' => 0,
'#max' => $total_votes,
......
......@@ -228,7 +228,7 @@ class PollCreateTestCase extends PollTestCase {
$this->clickLink($title);
$this->assertText($new_option, 'New option found.');
$option = $this->xpath('//div[@id="node-1"]//article[@class="poll"]//div[@class="choice-title"]');
$option = $this->xpath('//div[@id="node-1"]//article[@class="poll"]//dt[@class="choice-title"]');
$this->assertEqual(end($option), $new_option, 'Last item is equal to new option.');
$votes = $this->xpath('//div[@id="node-1"]//article[@class="poll"]//div[@class="percent"]');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment