Skip to content

Commit

Permalink
v1.3.3 Ausgabe Options-Details im Modul-Output
Browse files Browse the repository at this point in the history
  • Loading branch information
thielpeter committed May 18, 2018
1 parent 98697c3 commit 9537933
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

Last Changes
-------
### Version 1.3.3 // 18.05.2018

* Ausgabe Options-Details im Modul-Output

### Version 1.3.2 // 18.05.2018

* Bugfix
Expand Down
31 changes: 27 additions & 4 deletions module/module_output.inc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,34 @@ if ($poll_id > 0) {
foreach ($poll->getOptions() as $option) {
$hits = $option->getHits();
$percent = (int)($hits / $hits_all * 100);
$results .= '<li><span class="poll-vote-value"><span>' . $percent . ' %</span > [' . $option->getHits() . ']</span >' . $option->title . '</li> ';

$description = '';
if(rex_media::get($option->media)){
$description = '<div class="poll-description">' . $option->description . '</div>';
}

$picture = '';
if(rex_media::get($option->media)){
$picture = '<div class="poll-picture"><img src="/media/'.$option->media.'"/></div>';
}

$link = '';
if(rex_media::get($option->media)){
$link = '<div class="poll-link"><a href="'.rex_getUrl($option->link).'">mehr Informationen</a></div>';
}

$results .= '
<div class="progress bb-progress-thin">
<div class="progress-bar bb-blue-bg" role="progressbar" aria-valuenow="' . $percent . '" aria-valuemin="0" aria-valuemax="100" style="width: ' . $percent . '%;"></div>
</div>
<li>
<div class="poll-title">' . $option->title . '</div>
'.$description.'
'.$picture.'
'.$link.'
<div class="progress bb-progress-thin">
<div class="progress-bar bb-blue-bg" role="progressbar" aria-valuenow="' . $percent . '" aria-valuemin="0" aria-valuemax="100" style="width: ' . $percent . '%;">
<span class="poll-vote-value"><span>' . $percent . ' %</span > [' . $option->getHits() . ']</span>
</div>
</div>
</li>
';
}

Expand Down
2 changes: 1 addition & 1 deletion package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: poll
version: '1.3.2'
version: '1.3.3'
author: Friends Of REDAXO
supportpage: www.github.org/friendsofredaxo/poll

Expand Down

0 comments on commit 9537933

Please sign in to comment.