styles
This commit is contained in:
parent
97a3a80150
commit
a2c88132fd
@ -40,7 +40,11 @@ class default_bulletin extends SYSTEM\PAGE\Page {
|
||||
|
||||
private function voice_weight(){
|
||||
$vars = votes::get_count_user_votes_per_poll($this->poll_ID);
|
||||
$vars['voteweight'] = 1/$vars['count']*100;
|
||||
if (!$vars['count']){
|
||||
$vars['voteweight'] = 100;
|
||||
}
|
||||
else {$vars['voteweight'] = 1/$vars['count']*100;
|
||||
}
|
||||
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/voteweight.tpl'), $vars);;
|
||||
}
|
||||
|
||||
|
||||
@ -59,14 +59,16 @@ class default_page extends SYSTEM\PAGE\Page {
|
||||
$vote['choice_class_linke'] = $this->tablerow_class($linke['choice']);
|
||||
|
||||
$uvote = votes::get_users_choice_per_poll($vote['ID']);
|
||||
$vo = votes::get_count_user_votes_per_poll($vote['ID']);
|
||||
$vote['uv_vote_class'] = count($uvote) > 0 ? $this->tablerow_class($uvote[0]['choice']) : '';
|
||||
|
||||
$vote['uv_pro'] = $vote['uv_con'] = $vote['uv_ent'] = '<2';
|
||||
$vote['uv_pro'] = $vote['uv_con'] = $vote['uv_ent'] = '0';
|
||||
|
||||
foreach($uvote as $v){
|
||||
switch($v['choice']){
|
||||
case 1: $vote['uv_pro'] = $v['count'] > 1 ? $v['count'] : '<2'; break;
|
||||
case 2: $vote['uv_con'] = $v['count'] > 1 ? $v['count'] : '<2'; break;
|
||||
case 3: $vote['uv_ent'] = $v['count'] > 1 ? $v['count'] : '<2'; break;
|
||||
case 1: $vote['uv_pro'] = $v['count'] > 0 ? $v['count']/$vo['count']*100 : '0'; break;
|
||||
case 2: $vote['uv_con'] = $v['count'] > 0 ? $v['count']/$vo['count']*100 : '0'; break;
|
||||
case 3: $vote['uv_ent'] = $v['count'] > 0 ? $v['count']/$vo['count']*100 : '0'; break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,11 +14,15 @@
|
||||
<img src="${frontend_logos}icon_gruene.png" width="30"/><span class="badge ${choice_class_gruene}" style="float:right;">${gruene}</span><br/>
|
||||
<img src="${frontend_logos}icon_linke.png" width="30"/><span class="badge ${choice_class_linke}" style="float:right;">${linke}</span>
|
||||
</td>
|
||||
<td class="${uv_vote_class}" style="width: 35px; height: 100%; border-left: 1px solid lightgray;">
|
||||
<img src="${frontend_logos}icon_urn.png" width="25"/>
|
||||
<span class="badge badge-success" style="">${uv_pro}</span>
|
||||
<span class="badge badge-important" style="">${uv_con}</span>
|
||||
<span class="badge" style="">${uv_ent}</span>
|
||||
<td class="${uv_vote_class}" style="width: 50px; height: 100%; border-left: 1px solid lightgray;">
|
||||
<img src="${frontend_logos}icon_urn.png" width="15"/>
|
||||
<div style="float: right"><font size=1>uVote</font></div>
|
||||
<span class="badge badge-success" style="">${uv_pro}%</span>
|
||||
<span class="badge badge-important" style="">${uv_con}%</span>
|
||||
<span class="badge" style="">${uv_ent}%</span>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
</div>
|
||||
<div style="width: 50%; float: right;">
|
||||
<h5>Entscheidungsverhalten des Bundestags</h5>
|
||||
<br>
|
||||
<span style="float: left">
|
||||
${votes_all_bt}
|
||||
</span>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<h5>Deine Abstimmungsquote</h5>
|
||||
<br>
|
||||
<div style="">
|
||||
<div style="float: left">Abgestimmt/</div>
|
||||
<div style="margin-left: 90px;">Offen</div>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<div style="margin-left: 40px; float: left;">
|
||||
${user_temp_votes}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user