new data
This commit is contained in:
parent
41068ea7b0
commit
4993da10e9
@ -72,6 +72,11 @@ class votes {
|
||||
return $res;
|
||||
}
|
||||
|
||||
public static function get_all_votes_bt(){
|
||||
$res = \DBD\UVOTE_DATA_CHOICE_BT_OVERALL::QA();
|
||||
return $res;
|
||||
}
|
||||
|
||||
public static function get_bar_bt_per_poll($poll_ID){
|
||||
return \DBD\UVOTE_DATA_BT_PER_POLL::Q1(array($poll_ID));}
|
||||
|
||||
|
||||
11
uVote/dbd/qq/UVOTE_DATA_CHOICE_BT_OVERALL.php
Normal file
11
uVote/dbd/qq/UVOTE_DATA_CHOICE_BT_OVERALL.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace DBD;
|
||||
|
||||
class UVOTE_DATA_CHOICE_BT_OVERALL extends \SYSTEM\DB\QQ {
|
||||
protected static function query(){
|
||||
return new \SYSTEM\DB\QQuery(get_class(),
|
||||
//pg
|
||||
'',
|
||||
//mys
|
||||
'SELECT COUNT(*) as "count", bt_choice FROM uvote_votes GROUP BY bt_choice;'
|
||||
);}}
|
||||
@ -1,22 +1,21 @@
|
||||
<div>
|
||||
${bars_user}
|
||||
<div style="width: 50%; float: left;">
|
||||
<div>
|
||||
${bars_user}
|
||||
</div>
|
||||
<div>
|
||||
<h4>Ergebnis Bundestag</h4>
|
||||
${bars_bt}
|
||||
</div>
|
||||
<div>
|
||||
${bars_party}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4>Ergebnis Bundestag</h4>
|
||||
${bars_bt}
|
||||
</div>
|
||||
<img src="${frontend_logos}logo2.png" style="margin-left: 40px;" width="35%"/>
|
||||
|
||||
<div style="margin-right: 10px;">
|
||||
<img src="${frontend_logos}logo2.png" style="float: left; margin-right: 70px;" width="200px"/>
|
||||
<div style="float: left;">
|
||||
${vote_buttons}
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
|
||||
<div>
|
||||
${bars_party}
|
||||
</div>
|
||||
|
||||
<div style="clear: both"></div>
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="site-content" style="padding: 0; margin: 0; margin-left: 40px;">
|
||||
<div id="user_main" style="padding: 0px; width: 50%; float: left;"></div>
|
||||
<div id="user_main" style="position: absolute; padding: 0px; width: 50%;"></div>
|
||||
<div id="list" style="padding: 0px; width: 50%; float: right;">
|
||||
${votelist}
|
||||
</div>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div class="tabbable">
|
||||
<div class="tabbable" style="">
|
||||
<ul class="nav nav-tabs" id="tabs_user_main">
|
||||
<li class="active"><a href="#tab_uVote" action="user_main_uVote">uVote</a></li>
|
||||
<li><a href="#tab_urVote" action="user_main_urVote">urVote</a></li>
|
||||
@ -10,10 +10,10 @@
|
||||
<div class="tab-pane" id="tab_myVote"></div>
|
||||
</div>
|
||||
</div>
|
||||
<form>
|
||||
<br /><img src="${frontend_logos}logo2.png" width="180"/>
|
||||
<h4>uVote BETA Feedback</h4>
|
||||
<textarea id="feedback_text">Sag uns was dich stört!</textarea>
|
||||
<br />
|
||||
<input type="submit" id="feedback_submit" />
|
||||
</form>
|
||||
<form>
|
||||
<br /><img src="${frontend_logos}logo2.png" width="180"/>
|
||||
<h4>uVote BETA Feedback</h4>
|
||||
<textarea id="feedback_text">Sag uns was dich stört!</textarea>
|
||||
<br />
|
||||
<input type="submit" id="feedback_submit" />
|
||||
</form>
|
||||
|
||||
@ -1,6 +1,19 @@
|
||||
<table>
|
||||
<tr>
|
||||
<th>${uVote_overall_votes_title}</th>
|
||||
</tr>
|
||||
<div style="float: left;">
|
||||
|
||||
<h5>Entscheidungsverhalten der uVote Community</h5>
|
||||
<span style="float: left">
|
||||
${votes_all}
|
||||
</table>
|
||||
</span>
|
||||
<span style=""> Wie oft die uVote Community
|
||||
<br> insgesamt Dafür, Dagegen oder
|
||||
<br> Enthaltung gestimmt hat.</span>
|
||||
</div>
|
||||
<div style="float: right; margin-right: 50px;">
|
||||
<h5>Entscheidungsverhalten des Bundestags</h5>
|
||||
<span style="float: left">
|
||||
${votes_all_bt}
|
||||
</span>
|
||||
<span style=""> Wie oft der Bundestag
|
||||
<br> Dafür, Dagegen oder
|
||||
<br> Enthaltung gestimmt hat.</span>
|
||||
</div>
|
||||
@ -22,10 +22,34 @@ class user_main_uVote extends SYSTEM\PAGE\Page {
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
private function votes_all_bt(){
|
||||
$votes = votes::get_all_votes_bt();
|
||||
$result = '';
|
||||
foreach($votes as $vote){
|
||||
switch($vote['bt_choice']){
|
||||
case 1:
|
||||
$vote['bt_choice'] = 'PRO';
|
||||
break;
|
||||
case 2:
|
||||
$vote['bt_choice'] = 'CONTRA';
|
||||
break;
|
||||
case 3:
|
||||
$vote['bt_choice'] = 'ENTH';
|
||||
break;
|
||||
case 0:
|
||||
$vote['bt_choice'] = 'OPEN';
|
||||
}
|
||||
//$vote['count'];
|
||||
//$vote['choice'];
|
||||
$result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_uVote/votecountchoicebt.tpl'),$vote);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function html(){
|
||||
$vars = array();
|
||||
$vars['votes_all'] = $this->votes_all();
|
||||
$vars['votes_all_bt'] = $this->votes_all_bt();
|
||||
$vars = array_merge($vars, \SYSTEM\locale::getStrings(DBD\locale_string::VALUE_CATEGORY_MAINPAGE));
|
||||
$vars = array_merge($vars, \SYSTEM\locale::getStrings(150));
|
||||
return \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_uVote/uVote.tpl'),$vars);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<tr>
|
||||
<td><span class="badge badge-info">${choice}</span></td>
|
||||
<td><span class="badge badge-success">${count}</span></td>
|
||||
</tr>
|
||||
<div>
|
||||
<span class="badge badge-info" style="width: 50px;">${choice}</span>
|
||||
<span class="badge badge-success" style="width: 20px; margin-left: 10px;">${count}</span>
|
||||
|
||||
</div>
|
||||
|
||||
4
uVote/page/user_main_uVote/votecountchoicebt.tpl
Normal file
4
uVote/page/user_main_uVote/votecountchoicebt.tpl
Normal file
@ -0,0 +1,4 @@
|
||||
<div>
|
||||
<span class="badge badge-info" style="width: 50px;">${bt_choice}</span>
|
||||
<span class="badge badge-success" style="width: 20px;">${count}</span>
|
||||
</div>
|
||||
@ -14,6 +14,5 @@
|
||||
<tr>
|
||||
${choices_bt_to_user}
|
||||
</tr>
|
||||
</table>
|
||||
${poll_compare}
|
||||
</table>
|
||||
</div>
|
||||
@ -21,12 +21,16 @@ class user_main_urVote extends SYSTEM\PAGE\Page {
|
||||
array(\SYSTEM\SECURITY\Security::getUser()->id));
|
||||
while($row = $res->next()){
|
||||
$row['match_percentage'] = round($row['class_MATCH']/($row['class_MATCH']+$row['class_MISSMATCH']+1)*100,2);
|
||||
|
||||
$result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_urVote/bt_to_user_overall.tpl'), $row);;
|
||||
}
|
||||
return $result;
|
||||
return $result;
|
||||
$row['votes_cast'] = round(($row['class_MATCH']+$row['class_MISSMATCH']),2);
|
||||
}
|
||||
|
||||
private function user_per_party_overall(){
|
||||
|
||||
|
||||
private function user_per_party_overall(){
|
||||
//$vars = votes::get_user_per_party_overall(array(\SYSTEM\SECURITY\Security::getUser()->id));
|
||||
$result = '';
|
||||
$con = new \SYSTEM\DB\Connection();
|
||||
@ -46,7 +50,7 @@ class user_main_urVote extends SYSTEM\PAGE\Page {
|
||||
|
||||
public function html(){
|
||||
$vars = array();
|
||||
$vars['poll_compare'] = $this->count_all_polls();
|
||||
// $vars['poll_compare'] = $this->count_all_polls();
|
||||
$vars['choices_user_ID'] = $this->user_per_party_overall();
|
||||
$vars['choices_bt_to_user'] = $this->user_to_bt();
|
||||
$vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id=';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user