started cleanup
basic stats loadable now
This commit is contained in:
parent
eb4d6ede4f
commit
bd3a7434d2
@ -47,4 +47,11 @@ class api_uvote extends \SYSTEM\API\api_system {
|
||||
|
||||
public static function call_vote_action_commentrate($c_ID, $val) {
|
||||
return comments::write_commentrate($c_ID, $val);}
|
||||
|
||||
public static function call_load_tab($set, $cat){
|
||||
return stats_basic::basic($cat);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
41
uvote/api/votes/stats_basic.php
Normal file
41
uvote/api/votes/stats_basic.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
class stats_basic {
|
||||
public static function basic($cat){
|
||||
if($cat == 'user'){
|
||||
return self::user_basic();
|
||||
}
|
||||
if($cat == 'community'){
|
||||
return self::community_basic();
|
||||
}
|
||||
if($cat == 'bt'){
|
||||
return self::bt_basic();
|
||||
}
|
||||
else {return 'error';}
|
||||
}
|
||||
public static function user_basic(){
|
||||
$vars['basic_stats'] = bars::get_user_choice_overall(\SYSTEM\SECURITY\Security::getUser()->id);
|
||||
$vars['user_temp_votes'] = votes::get_user_temp_votes();
|
||||
$vars['user_overall_votes'] = votes::get_user_overall_votes();
|
||||
$vars['analysis_help_basic_stats'] = \SYSTEM\PAGE\text::get('analysis_help_basic_stats');
|
||||
$vars['analysis_math_basic_stats'] = \SYSTEM\PAGE\text::get('analysis_math_basic_stats');
|
||||
$vars['analysis_help_basic_votes'] = \SYSTEM\PAGE\text::get('analysis_help_basic_votes');
|
||||
$vars['analysis_math_basic_votes'] = \SYSTEM\PAGE\text::get('analysis_math_basic_votes');
|
||||
$vars['frontend_logos'] = './api.php?call=files&cat=frontend_logos&id=';
|
||||
return \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_analysis/tpl/tab_basic/tab_basic_user.tpl'),$vars);
|
||||
}
|
||||
public static function community_basic(){
|
||||
$vars['basic_stats_community'] = bars::get_uvote_choice_overall();
|
||||
$vars['analysis_help_community'] = \SYSTEM\PAGE\text::get('analysis_help_community');
|
||||
$vars['analysis_math_community'] = \SYSTEM\PAGE\text::get('analysis_math_community');
|
||||
$vars['frontend_logos'] = './api.php?call=files&cat=frontend_logos&id=';
|
||||
return \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_analysis/tpl/tab_basic/tab_basic_community.tpl'),$vars);
|
||||
}
|
||||
|
||||
public static function bt_basic(){
|
||||
$vars['basic_stats_bt'] = bars::get_bt_choice_overall();
|
||||
$vars['analysis_help_bt_basic'] = \SYSTEM\PAGE\text::get('analysis_help_bt_basic');
|
||||
$vars['analysis_math_bt_basic'] = \SYSTEM\PAGE\text::get('analysis_math_bt_basic');
|
||||
$vars['frontend_logos'] = './api.php?call=files&cat=frontend_logos&id=';
|
||||
return \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_analysis/tpl/tab_basic/tab_basic_bt.tpl'),$vars);
|
||||
}
|
||||
}
|
||||
@ -3,13 +3,13 @@ class switchers{
|
||||
public static function get_party_per_poll($choice){
|
||||
switch($choice){
|
||||
case 1:
|
||||
return 'PRO';
|
||||
return 'pro';
|
||||
case 2:
|
||||
return 'CON';
|
||||
return 'con';
|
||||
case 3:
|
||||
return 'ENT';
|
||||
return 'ent';
|
||||
default:
|
||||
return 'NONE';
|
||||
return 'none';
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,6 +25,18 @@ class switchers{
|
||||
return 'open';
|
||||
}
|
||||
}
|
||||
public static function tablerow_class_full($choice){
|
||||
switch($choice){
|
||||
case 1:
|
||||
return 'pro';
|
||||
case 2:
|
||||
return 'contra';
|
||||
case 3:
|
||||
return 'enthaltung';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
public static function badge_class($choice){
|
||||
switch($choice){
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<ul class="nav nav-pills" id="tabs_user_main" style=" text-align: center;">
|
||||
<li class="active"><a href="#!start(user_main(start))"><span class="glyphicon glyphicon-home"></span> Start</a></li>
|
||||
<li><a href="#!start(user_main(news))"><span class="glyphicon glyphicon-bullhorn"></span> News</a></li>
|
||||
<li><a href="#!start(user_main(imp))"><span class="glyphicon glyphicon-tags"></span> Impressum</a></li>
|
||||
<li><a href="#!start(user_main(imp))"><span class="glyphicon glyphicon-tags"></span> Impressum</a></li>
|
||||
<li style="float: right">${loginform}</li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -1,10 +1,13 @@
|
||||
function init_default_register(){
|
||||
register_registerform();
|
||||
}
|
||||
|
||||
function register_registerform(){
|
||||
function register_registerform(){
|
||||
//console.log("wegwegwegwegwegweg");
|
||||
|
||||
$("#register_user_form input").not("[type=submit]").jqBootstrapValidation(
|
||||
{
|
||||
preventSubmit: true,
|
||||
submitError: function($form, event, errors) {},
|
||||
submitSuccess: function($form, event){
|
||||
$.get('./api.php?call=account&action=create&username=' + $('#register_username').val() + '&password_sha=' + $.sha1($('#user_register_password1').val()) + '&email=' + $('#register_email').val() + '&locale=deDE', function (data) {
|
||||
if(data == 1){
|
||||
window.location.reload();
|
||||
@ -12,4 +15,8 @@ function register_registerform(){
|
||||
$('#help-block-user-password-combi-wrong').attr('style', 'display: block;');
|
||||
}
|
||||
});
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
Willkommen auf uvote.eu!
|
||||
<i class="glyphicon glyphicon-bookmark"></i> Willkommen auf uvote.eu!
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body row">
|
||||
@ -13,7 +13,7 @@
|
||||
<div class="col-md-6">
|
||||
<form class="textbox" id="register_user_form">
|
||||
<div class="control-group" id="register_username_control_group">
|
||||
<h4>Accounterstellung</h4>
|
||||
<h4><i class=""></i>Accounterstellung</h4>
|
||||
<table id="userRegisterTable" class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -21,7 +21,6 @@
|
||||
<td>
|
||||
<div class="control-group controls">
|
||||
<input type="text"
|
||||
size="30"
|
||||
id="register_username"
|
||||
placeholder="${ari_name}"
|
||||
minlength="3" data-validation-minlength-message="${register_user_name_too_short}"
|
||||
@ -36,7 +35,6 @@
|
||||
<td>
|
||||
<div class="control-group controls">
|
||||
<input type="email"
|
||||
size="30"
|
||||
id="register_email"
|
||||
placeholder="${ari_mail}"
|
||||
data-validation-email-message="${mail_format_wrong}"
|
||||
@ -52,7 +50,6 @@
|
||||
<div class="control-group" id="change_user_password">
|
||||
<div class="control-group controls" id="change_user_password_sub">
|
||||
<input type="password"
|
||||
size="30"
|
||||
id="user_register_password1"
|
||||
name="user_register_password1"
|
||||
placeholder="${ari_pass}"
|
||||
@ -63,7 +60,6 @@
|
||||
</div>
|
||||
<div class="control-group controls" style="clear: both">
|
||||
<input type="password"
|
||||
size="30"
|
||||
id="user_register_password2"
|
||||
name="user_register_password2"
|
||||
placeholder="${ari_pass}"
|
||||
@ -88,7 +84,7 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button class="btn btn-primary" type="submit"><i class="icon-ok icon-white"></i> ${register}</button>
|
||||
<button class="btn btn-primary" type="submit"><i class="glyphicon glyphicon-play-circle"></i> ${register}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
function init_user_main_analysis(){
|
||||
|
||||
$('.acc_toggle').click(function(){
|
||||
$(this).find('i').toggleClass('glyphicon-circle-arrow-down').toggleClass('glyphicon-circle-arrow-up');
|
||||
});
|
||||
load_visualisation_urvote('graph_user_to_party_overall_bt', 84600);
|
||||
load_visualisation_user_to_party_overall('graph_user_to_party_overall_cdu', 'cdu', 84600);
|
||||
load_visualisation_user_to_party_overall('graph_user_to_party_overall_csu', 'csu', 84600);
|
||||
@ -8,7 +10,32 @@ load_visualisation_user_to_party_overall('graph_user_to_party_overall_gruene', '
|
||||
load_visualisation_user_to_party_overall('graph_user_to_party_overall_linke', 'linke', 84600);
|
||||
load_visualisation_user_to_parties_overall('donut_user_to_party_overall', 84600);
|
||||
|
||||
$('#a_acc_2').click(function () {
|
||||
var set = 'basic';
|
||||
var cat = 'user';
|
||||
var body = '#acc_2_body';
|
||||
load_tab(set, cat, body);
|
||||
});
|
||||
$('#a_acc_8').click(function () {
|
||||
var set = 'basic';
|
||||
var cat = 'community';
|
||||
var body = '#acc_8_body';
|
||||
load_tab(set, cat, body);
|
||||
});
|
||||
$('#a_acc_10').click(function () {
|
||||
var set = 'basic';
|
||||
var cat = 'bt';
|
||||
var body = '#acc_10_body';
|
||||
load_tab(set, cat, body);
|
||||
});
|
||||
}
|
||||
|
||||
function load_tab(set, cat, body){
|
||||
$(body).load('./api.php?call=load_tab&set=' + set + '&cat=' + cat, function(e){
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
function load_visualisation(id, timespan){
|
||||
$('img#loader').show();
|
||||
$.getJSON('./api.php?call=graph_bt_to_uvote_overall_by_time',function(json){
|
||||
|
||||
12
uvote/page/user_main_analysis/tpl/tab_basic/tab_basic_bt.tpl
Normal file
12
uvote/page/user_main_analysis/tpl/tab_basic/tab_basic_bt.tpl
Normal file
@ -0,0 +1,12 @@
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<h4></h4>
|
||||
${basic_stats_bt}
|
||||
</div>
|
||||
<div class="col-md-4" style="font-size: 10pt; border-left: #d9edf7 solid 2px">
|
||||
<h4><span class="glyphicon glyphicon-info-sign"></span></h4>
|
||||
${analysis_help_bt_basic}
|
||||
<h4><span class="glyphicon glyphicon-certificate"></span></h4>
|
||||
${analysis_math_bt_basic}
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,12 @@
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<h4>Entscheidungsverhalten der uVote Community</h4>
|
||||
${basic_stats_community}
|
||||
</div>
|
||||
<div class="col-md-4" style="font-size: 10pt; border-left: #d9edf7 solid 2px">
|
||||
<h4><span class="glyphicon glyphicon-info-sign"></span></h4>
|
||||
${analysis_help_community}
|
||||
<h4><span class="glyphicon glyphicon-certificate"></span></h4>
|
||||
${analysis_math_community}
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,28 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
${basic_stats}
|
||||
</div>
|
||||
<div class="col-md-4" style="font-size: 10pt; border-left:#d9edf7 solid 2px">
|
||||
<h4><span class="glyphicon glyphicon-info-sign"></span></h4>
|
||||
${analysis_help_basic_stats}
|
||||
<h4><span class="glyphicon glyphicon-certificate"></span></h4>
|
||||
${analysis_math_basic_stats}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row" style="padding-top: 20px;">
|
||||
<div class="col-md-8">
|
||||
<div>${user_temp_votes}</div>
|
||||
<br>
|
||||
<div>${user_overall_votes}</div>
|
||||
</div>
|
||||
<div class="col-md-4" style="font-size: 10pt; border-left: #d9edf7 solid 2px">
|
||||
<h4><span class="glyphicon glyphicon-info-sign"></span></h4>
|
||||
${analysis_help_basic_votes}
|
||||
<h4><span class="glyphicon glyphicon-certificate"></span></h4>
|
||||
${analysis_math_basic votes}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,79 +1,60 @@
|
||||
|
||||
<div class="panel-group row" id="acc_1">
|
||||
<div class="panel panel-default panel-info">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
${urVote_title}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body" id="acc_1_body">
|
||||
<div class="col-md-8">
|
||||
${urvote_body_text}
|
||||
</div>
|
||||
<div class="col-md-4" style="border-left: #d9edf7 solid 2px">
|
||||
${urvote_info_info_1}
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
${urvote_info_info_2}
|
||||
<span class="glyphicon glyphicon-certificate"></span>
|
||||
${urvote_info_info_3}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-group row" id="acc_1">
|
||||
<div class="panel panel-default panel-info">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<i class="glyphicon glyphicon-cd"></i> ${urVote_title}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body" id="acc_1_body">
|
||||
<div class="col-md-8">
|
||||
${urvote_body_text}
|
||||
</div>
|
||||
<div class="col-md-4" style="border-left: #d9edf7 solid 2px">
|
||||
${urvote_info_info_1}
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
${urvote_info_info_2}
|
||||
<span class="glyphicon glyphicon-certificate"></span>
|
||||
${urvote_info_info_3}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-group row" id="acc_2" style="padding-top: 30px;">
|
||||
</div>
|
||||
<div class="row">
|
||||
<h3>Deine Statistik</h3>
|
||||
</div>
|
||||
<div class="panel-group row" id="acc_2" style="">
|
||||
<div class="panel panel-default panel-success">
|
||||
<div class="panel-heading" style="padding: 0" >
|
||||
<a data-toggle="collapse" data-parent="#acc_2" href="#acc_2_body">
|
||||
<a id="a_acc_2" class="acc_toggle" data-toggle="collapse" data-parent="#acc_2" href="#acc_2_body">
|
||||
<div style="width: 100%; height: 100%; padding: 10px;">
|
||||
<h4 class="panel-title">
|
||||
<span class="glyphicon glyphicon-user"></span> Deine Daten
|
||||
<i style="float: right" class="glyphicon glyphicon-circle-arrow-down"></i>
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div id="acc_2_body" class="row panel-body panel-collapse collapse">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
${basic_stats}
|
||||
</div>
|
||||
<div class="col-md-4" style="font-size: 10pt; border-left:#d9edf7 solid 2px">
|
||||
<h4><span class="glyphicon glyphicon-info-sign"></span></h4>
|
||||
${analysis_help_basic_stats}
|
||||
<h4><span class="glyphicon glyphicon-certificate"></span></h4>
|
||||
${analysis_math_basic_stats}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row" style="padding-top: 20px;">
|
||||
<div class="col-md-8">
|
||||
<div>${user_temp_votes}</div>
|
||||
<br>
|
||||
<div>${user_overall_votes}</div>
|
||||
</div>
|
||||
<div class="col-md-4" style="font-size: 10pt; border-left: #d9edf7 solid 2px">
|
||||
<h4><span class="glyphicon glyphicon-info-sign"></span></h4>
|
||||
${analysis_help_basic_votes}
|
||||
<h4><span class="glyphicon glyphicon-certificate"></span></h4>
|
||||
${analysis_math_basic votes}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-group row" id="acc_4" style="padding-top: 10px;">
|
||||
<div class="panel-group row" id="acc_3" style="padding-top: 10px;">
|
||||
<div class="panel panel-default panel-warning">
|
||||
<div class="panel-heading" style="padding: 0">
|
||||
<a data-toggle="collapse" data-parent="#acc_4" href="#acc_4_body">
|
||||
<a class="acc_toggle" data-toggle="collapse" data-parent="#acc_3" href="#acc_3_body">
|
||||
<div style="width: 100%; height: 100%; padding: 10px;">
|
||||
<h4 class="panel-title">
|
||||
<span class="glyphicon glyphicon-th-large"></span> Bilanz: Fraktionen
|
||||
<i style="float: right" class="glyphicon glyphicon-circle-arrow-down"></i>
|
||||
</h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div id="acc_4_body" class="row panel-body panel-collapse collapse">
|
||||
<div id="acc_3_body" class="row panel-body panel-collapse collapse">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<h4>Absolute Übereinstimmungsrate</h4>
|
||||
@ -107,18 +88,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-group row" id="acc_5" style="padding-top: 10px;">
|
||||
<div class="panel-group row" id="acc_4" style="padding-top: 10px;">
|
||||
<div class="panel panel-default panel-warning">
|
||||
<div class="panel-heading" style="padding: 0">
|
||||
<a data-toggle="collapse" data-parent="#acc_5" href="#acc_5_body">
|
||||
<a class="acc_toggle" data-toggle="collapse" data-parent="#acc_4" href="#acc_4_body">
|
||||
<div style="width: 100%; height: 100%; padding: 10px;">
|
||||
<h4 class="panel-title">
|
||||
<span class="glyphicon glyphicon-th"></span> Bilanz: Fraktionen nach Stimmverhalten
|
||||
<i style="float: right" class="glyphicon glyphicon-circle-arrow-down"></i>
|
||||
</h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div id="acc_5_body" class="row panel-collapse collapse panel-body" style="padding-top: 20px;">
|
||||
<div id="acc_4_body" class="row panel-collapse collapse panel-body" style="padding-top: 20px;">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<img class="img-responsive" src="${frontend_logos}icon_urn_pro.png"/>
|
||||
@ -159,18 +141,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row panel-group" id="acc_6" style="padding-top: 10px;">
|
||||
<div class="row panel-group" id="acc_5" style="padding-top: 10px;">
|
||||
<div class="panel panel-default panel-danger">
|
||||
<div class="panel-heading" style="padding: 0">
|
||||
<a data-toggle="collapse" data-parent="#acc_6" href="#acc_6_body">
|
||||
<a class="acc_toggle" data-toggle="collapse" data-parent="#acc_5" href="#acc_5_body">
|
||||
<div style="width: 100%; height: 100%; padding: 10px;">
|
||||
<h4 class="panel-title">
|
||||
<span class="glyphicon glyphicon-random"></span> Entwicklung: Fraktionen
|
||||
<i style="float: right" class="glyphicon glyphicon-circle-arrow-down"></i>
|
||||
</h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div id="acc_6_body" class="panel-body panel-collapse collapse">
|
||||
<div id="acc_5_body" class="panel-body panel-collapse collapse">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="row">
|
||||
@ -208,18 +191,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-group row" id="acc_7" style="padding-top: 10px;">
|
||||
<div class="panel-group row" id="acc_6" style="padding-top: 10px;">
|
||||
<div class="panel panel-default panel-warning">
|
||||
<div class="panel-heading" style="padding: 0">
|
||||
<a data-toggle="collapse" data-parent="#acc_7" href="#acc_7_body">
|
||||
<a class="acc_toggle" data-toggle="collapse" data-parent="#acc_6" href="#acc_6_body">
|
||||
<div style="width: 100%; height: 100%; padding: 10px;">
|
||||
<h4 class="panel-title">
|
||||
<span class="glyphicon glyphicon-th-large"></span> Bilanz: Bundestag
|
||||
<i style="float: right" class="glyphicon glyphicon-circle-arrow-down"></i>
|
||||
</h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div id="acc_7_body" class="row panel-body panel-collapse collapse">
|
||||
<div id="acc_6_body" class="row panel-body panel-collapse collapse">
|
||||
<div class="row" style="padding-bottom: 20px; padding-top: 20px;">
|
||||
<div class="col-md-8">
|
||||
Bundestag gesamt
|
||||
@ -254,18 +238,19 @@
|
||||
|
||||
|
||||
|
||||
<div class="row panel-group" id="acc_8" style="padding-top: 10px;">
|
||||
<div class="row panel-group" id="acc_7" style="padding-top: 10px;">
|
||||
<div class="panel panel-default panel-danger">
|
||||
<div class="panel-heading" style="padding: 0">
|
||||
<a data-toggle="collapse" data-parent="#acc_8" href="#acc_8_body">
|
||||
<a class="acc_toggle" data-toggle="collapse" data-parent="#acc_7" href="#acc_7_body">
|
||||
<div style="width: 100%; height: 100%; padding: 10px;">
|
||||
<h4 class="panel-title">
|
||||
<span class="glyphicon glyphicon-random"></span> Entwicklung: Bundestag
|
||||
<i style="float: right" class="glyphicon glyphicon-circle-arrow-down"></i>
|
||||
</h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div id="acc_8_body" class="panel-body panel-collapse collapse">
|
||||
<div id="acc_7_body" class="panel-body panel-collapse collapse">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="row">
|
||||
@ -283,41 +268,35 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row panel-group" id="acc_3" style="padding-top: 10px;">
|
||||
</div>
|
||||
<div class="row">
|
||||
<h3>community Statistik</h3>
|
||||
</div>
|
||||
<div class="row panel-group" id="acc_8" style="padding-top: 10px;">
|
||||
<div class="panel panel-default panel-success">
|
||||
<div class="panel-heading" style="padding: 0">
|
||||
<a data-toggle="collapse" data-parent="#acc_3" href="#acc_3_body">
|
||||
<a id="a_acc_8" class="acc_toggle" data-toggle="collapse" data-parent="#acc_8" href="#acc_8_body">
|
||||
<div style="width: 100%; height: 100%; padding: 10px;">
|
||||
<h4 class="panel-title" style="">
|
||||
<span class="glyphicon glyphicon-globe"></span> community Daten
|
||||
<i style="float: right" class="glyphicon glyphicon-circle-arrow-down"></i>
|
||||
</h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div id="acc_3_body" class="panel-body panel-collapse collapse">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<h4>Entscheidungsverhalten der uVote Community</h4>
|
||||
${votes_all}
|
||||
</div>
|
||||
<div class="col-md-4" style="font-size: 10pt; border-left: #d9edf7 solid 2px">
|
||||
<h4><span class="glyphicon glyphicon-info-sign"></span></h4>
|
||||
${analysis_help_community}
|
||||
<h4><span class="glyphicon glyphicon-certificate"></span></h4>
|
||||
${analysis_math_community}
|
||||
</div>
|
||||
</div>
|
||||
<div id="acc_8_body" class="panel-body panel-collapse collapse">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row panel-group" id="acc_9" style="padding-top: 10px;">
|
||||
<div class="panel panel-default panel-warning">
|
||||
<div class="panel-heading" style="padding: 0">
|
||||
<a data-toggle="collapse" data-parent="#acc_9" href="#acc_9_body">
|
||||
<a class="acc_toggle" data-toggle="collapse" data-parent="#acc_9" href="#acc_9_body">
|
||||
<div style="width: 100%; height: 100%; padding: 10px;">
|
||||
<h4 class="panel-title" style="">
|
||||
<span class="glyphicon glyphicon-th-large"></span> Bilanz: community & Fraktionen
|
||||
<span class="glyphicon glyphicon-th-large"></span> community-Bilanz: Fraktionen
|
||||
<i style="float: right" class="glyphicon glyphicon-circle-arrow-down"></i>
|
||||
</h4>
|
||||
</div>
|
||||
</a>
|
||||
@ -340,30 +319,23 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h3>Bundestag Statistik</h3>
|
||||
</div>
|
||||
<div class="row panel-group" id="acc_10" style="padding-top: 10px;">
|
||||
<div class="panel panel-default panel-success">
|
||||
<div class="panel-heading" style="padding: 0">
|
||||
<a data-toggle="collapse" data-parent="#acc_10" href="#acc_10_body">
|
||||
<a id="a_acc_10" class="acc_toggle" data-toggle="collapse" data-parent="#acc_10" href="#acc_10_body">
|
||||
<div style="width: 100%; height: 100%; padding: 10px;">
|
||||
<h4 class="panel-title" style="">
|
||||
<span class="glyphicon glyphicon-tasks"></span> Bundestag Daten
|
||||
<i style="float: right" class="glyphicon glyphicon-circle-arrow-down"></i>
|
||||
</h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div id="acc_10_body" class="panel-body panel-collapse collapse">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<h4></h4>
|
||||
${bt_basic_stats}
|
||||
</div>
|
||||
<div class="col-md-4" style="font-size: 10pt; border-left: #d9edf7 solid 2px">
|
||||
<h4><span class="glyphicon glyphicon-info-sign"></span></h4>
|
||||
${analysis_help_bt_basic}
|
||||
<h4><span class="glyphicon glyphicon-certificate"></span></h4>
|
||||
${analysis_math_bt_basic}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -371,10 +343,11 @@
|
||||
<div class="row panel-group" id="acc_11" style="padding-top: 10px;">
|
||||
<div class="panel panel-default panel-warning">
|
||||
<div class="panel-heading" style="padding: 0">
|
||||
<a data-toggle="collapse" data-parent="#acc_11" href="#acc_11_body">
|
||||
<a class="acc_toggle" data-toggle="collapse" data-parent="#acc_11" href="#acc_11_body">
|
||||
<div style="width: 100%; height: 100%; padding: 10px;">
|
||||
<h4 class="panel-title" style="">
|
||||
<span class="glyphicon glyphicon-th-large"></span> Bilanz: Bundestag & Fraktionen
|
||||
<span class="glyphicon glyphicon-th-large"></span> Bundestag-Bilanz: Fraktionen
|
||||
<i style="float: right" class="glyphicon glyphicon-circle-arrow-down"></i>
|
||||
</h4>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
@ -3,13 +3,7 @@ class user_main_analysis extends SYSTEM\PAGE\Page {
|
||||
public static function js(){
|
||||
return array(\SYSTEM\WEBPATH(new \PPAGE(),'user_main_analysis/js/user_main_analysis.js'));}
|
||||
public function html(){
|
||||
$vars = array();
|
||||
|
||||
//second panel
|
||||
$vars['basic_stats'] = bars::get_user_choice_overall(\SYSTEM\SECURITY\Security::getUser()->id);
|
||||
$vars['user_temp_votes'] = votes::get_user_temp_votes();
|
||||
$vars['user_overall_votes'] = votes::get_user_overall_votes();
|
||||
|
||||
$vars = array();
|
||||
//third panel
|
||||
$vars['choices_user_ID'] = bars::user_per_party_overall();
|
||||
|
||||
@ -23,13 +17,7 @@ class user_main_analysis extends SYSTEM\PAGE\Page {
|
||||
$vars['choices_user_ID_per_bt_pro'] = bars::user_per_bt_by_choicetype('1');
|
||||
$vars['choices_user_ID_per_bt_con'] = bars::user_per_bt_by_choicetype('2');
|
||||
$vars['choices_user_ID_per_bt_ent'] = bars::user_per_bt_by_choicetype('3');
|
||||
|
||||
|
||||
$vars['votes_all'] = bars::get_uvote_choice_overall();
|
||||
$vars['votes_all_to_bt'] = bars::get_uvote_choice_overall_to_bt();
|
||||
|
||||
$vars['bt_basic_stats'] = bars::get_bt_choice_overall();
|
||||
|
||||
$vars['choices_bt'] = bars::get_bt_choice_overall_to_bt();
|
||||
$vars['frontend_logos'] = './api.php?call=files&cat=frontend_logos&id=';
|
||||
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote'));
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="panel panel-default panel-info">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
Impressum
|
||||
<i class="glyphicon glyphicon-asterisk"></i> Impressum
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body" id="acc_1_body">
|
||||
|
||||
@ -8,6 +8,8 @@ function init_user_main_poll(){
|
||||
$('#btnvote_off').click(function () {
|
||||
vote_click($(this).attr('poll_ID'),3);
|
||||
});
|
||||
|
||||
$('#user_main').resize(function(){
|
||||
$('#pollframe').height($('#user_main').height());
|
||||
});
|
||||
|
||||
}
|
||||
@ -1,5 +1,4 @@
|
||||
<h5>${bulletin_bars_title}</h5>
|
||||
${urvote_bars_user}
|
||||
<h4>uvote community</h4>
|
||||
<div class="progress" id="progress_bars_user">
|
||||
<div class="progress-bar progress-bar-success" style="width: ${vote_yes_perc}%;">${vote_yes_perc}%</div>
|
||||
<div class="progress-bar progress-bar-danger" style="width: ${vote_no_perc}%;">${vote_no_perc}%</div>
|
||||
|
||||
@ -5,11 +5,11 @@
|
||||
<div class="panel panel-default panel-info">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#poll_3" href="#poll_3_body">Info</a>
|
||||
<a data-toggle="collapse" data-parent="#poll_3" href="#poll_3_body"><i class="glyphicon glyphicon-info-sign"></i> Info</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body" id="poll_3_body">
|
||||
<div class="row">
|
||||
<div class="panel-body row" id="poll_3_body">
|
||||
|
||||
<div class="col-md-12">
|
||||
<h4 style="word-break: break-all;">${title}</h4>
|
||||
|
||||
@ -19,23 +19,22 @@
|
||||
<hr>
|
||||
${voice_weight}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="panel-group" id="poll_6">
|
||||
<div class="panel panel-default panel-warning">
|
||||
<div class="panel panel-default panel-info">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#poll_6" href="#poll_6_body">Statistik</a>
|
||||
<a data-toggle="collapse" data-parent="#poll_6" href="#poll_6_body"><i class="glyphicon glyphicon-stats"></i> Statistik</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body panel-collapse" id="poll_6_body">
|
||||
|
||||
<div class="row">
|
||||
<div class="panel-group" id="poll_1">
|
||||
<div class="panel-body panel-collapse" id="poll_6_body" style="padding: 0;">
|
||||
<div class="row" style="padding: 0; margin: 0;">
|
||||
<div class="panel-group" id="poll_1" style="padding: 0; margin: 0;">
|
||||
<div class="panel panel-default panel-warning">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
@ -49,8 +48,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="panel-group" id="poll_2">
|
||||
<div class="row" style="padding: 0; margin: 0;">
|
||||
<div class="panel-group" id="poll_2" style="padding: 0; margin: 0;">
|
||||
<div class="panel panel-default panel-warning">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
@ -69,13 +68,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-8" style="height: 100%">
|
||||
<div class="row">
|
||||
<div class="panel-group" id="poll_4">
|
||||
<div class="panel panel-default panel-info">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#poll_4" href="#poll_4_body">Abstimmen</a>
|
||||
<a data-toggle="collapse" data-parent="#poll_4" href="#poll_4_body"><i class="glyphicon glyphicon-check"></i> Abstimmen</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body" id="poll_4_body">
|
||||
@ -90,8 +89,8 @@
|
||||
<div class="row" style="text-align: center;">
|
||||
Quelle: <a href="${iframe_link}">${iframe_link} </a>
|
||||
</div>
|
||||
<div class="row" style="text-align: center;" id="iframe_">
|
||||
<iframe class="col-md-12" height="700" style="padding: 0; overflow-y: scroll;" src="${iframe_link}"></iframe>
|
||||
<div class="row" style="text-align: center;">
|
||||
<iframe id="poll_frame" class="col-md-12" height="700" style="padding: 0; overflow-y: scroll;" src="${iframe_link}"></iframe>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
Ergebnis Bundestag
|
||||
${choice_show}
|
||||
Stimmverteilung Bundestag
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" style="width: ${bt_pro}%;">${bt_pro}%</div>
|
||||
<div class="progress-bar progress-bar-danger" style="width: ${bt_con}%;">${bt_con}%</div>
|
||||
|
||||
3
uvote/page/user_main_poll/tpl/table_bt_choice.tpl
Normal file
3
uvote/page/user_main_poll/tpl/table_bt_choice.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
<img class="img-responsive" src="${frontend_logos}icon_bt.png"/>
|
||||
Der Bundestag hat "${choice_full}" <img class="img-responsive" style="float: right;" src="${frontend_logos}icon_urn_${choice}.png"/> abgestimmt.<br><br>
|
||||
${disclaimer}
|
||||
@ -4,41 +4,14 @@ class user_main_poll extends SYSTEM\PAGE\Page {
|
||||
public function __construct($poll_ID){
|
||||
$this->poll_ID = $poll_ID;
|
||||
}
|
||||
private static function tablerow_class($choice){
|
||||
switch($choice){
|
||||
case 1:
|
||||
return 'pro';
|
||||
case 2:
|
||||
return 'con';
|
||||
case 3:
|
||||
return 'ent';
|
||||
default:
|
||||
return 'open';
|
||||
}
|
||||
}
|
||||
|
||||
private function get_party_per_poll($choice){
|
||||
switch($choice){
|
||||
case 1:
|
||||
return 'pro';
|
||||
case 2:
|
||||
return 'con';
|
||||
case 3:
|
||||
return 'ent';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
private function choice_party (){
|
||||
$result = '';
|
||||
$party_votes = votes::get_barsperparty($this->poll_ID);
|
||||
|
||||
// $vote['bt_vote_class'] = $this->tablerow_class($vote['bt_choice']);
|
||||
foreach($party_votes as $pv){
|
||||
$vote = array( 'party' => $pv['party'],
|
||||
'choice' => $this->get_party_per_poll($pv['choice']),
|
||||
'choice_class' => $this->tablerow_class($pv['choice']),
|
||||
'choice' => switchers::get_party_per_poll($pv['choice']),
|
||||
'choice_class' => switchers::tablerow_class($pv['choice']),
|
||||
'party_yes' => $pv['votes_pro'] > 0 ? round($pv['votes_pro']/$pv['total']*100,0) : ($pv['choice'] == 1 ? '100' : '0'),
|
||||
'party_no' => $pv['votes_contra'] > 0 ? round($pv['votes_contra']/$pv['total']*100,0) : ($pv['choice'] == 2 ? '100' : '0'),
|
||||
'party_off' => $pv['total'] > 0 ? round(($pv['total'] - $pv['nr_attending'])/$pv['total']*100,0) : '0',
|
||||
@ -59,9 +32,8 @@ class user_main_poll extends SYSTEM\PAGE\Page {
|
||||
}
|
||||
|
||||
private function bars_party(){
|
||||
$partyvotes = votes::get_barsperparty($this->poll_ID);
|
||||
|
||||
$result = "";
|
||||
$partyvotes = votes::get_barsperparty($this->poll_ID);
|
||||
foreach($partyvotes as $vote){
|
||||
$vote['party_yes'] = $vote['votes_pro'] > 0 ? round($vote['votes_pro']/$vote['total']*100,0) : $vote['votes_pro'];
|
||||
$vote['party_no'] = $vote['votes_contra'] > 0 ? round($vote['votes_contra']/$vote['total']*100,0) : $vote['votes_contra'];
|
||||
@ -72,18 +44,27 @@ class user_main_poll extends SYSTEM\PAGE\Page {
|
||||
return $result;
|
||||
}
|
||||
|
||||
private function icons_party(){
|
||||
$vars = votes::get_bar_bt_per_poll($this->poll_ID);
|
||||
if (!$vars['bt_total']){
|
||||
return '';}
|
||||
$info = array();
|
||||
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_poll/tpl/icons_table_parties.tpl'), $info);
|
||||
}
|
||||
|
||||
private function bars_bt(){
|
||||
$vars = votes::get_bar_bt_per_poll($this->poll_ID);
|
||||
$info = votes::get_voteinfo($this->poll_ID);
|
||||
if (!$vars['bt_total']){
|
||||
return 'Keine differenzierten Ergebnisse für den Bundestag verfügbar.';}
|
||||
|
||||
$var['disclaimer'] = 'Keine differenzierten Ergebnisse für den Bundestag verfügbar';
|
||||
$var['choice'] = switchers::tablerow_class($info['bt_choice']);
|
||||
$var['choice_full'] = switchers::tablerow_class($info['bt_choice']);
|
||||
if ($var['choice_full'] == ''){
|
||||
$var['choice_full'] = 'noch nicht';
|
||||
}
|
||||
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_poll/tpl/table_bt_choice.tpl'), $var);
|
||||
}
|
||||
|
||||
$vars['disclaimer'] = '';
|
||||
$vars['choice'] = switchers::tablerow_class($info['bt_choice']);
|
||||
$vars['choice_full'] = switchers::tablerow_class($info['bt_choice']);
|
||||
if ($vars['choice_full'] == 'open'){
|
||||
$vars['choice_full'] = 'noch nicht';
|
||||
}
|
||||
$vars['choice_show'] = SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_poll/tpl/table_bt_choice.tpl'), $vars);
|
||||
$vars['bt_ent'] = round(($vars['bt_attending'] - $vars['bt_pro'] - $vars['bt_con'])/$vars['bt_total']*100,0);
|
||||
$vars['bt_pro'] = round($vars['bt_pro']/$vars['bt_total']*100,0);
|
||||
$vars['bt_con'] = round($vars['bt_con']/$vars['bt_total']*100,0);
|
||||
@ -96,19 +77,6 @@ class user_main_poll extends SYSTEM\PAGE\Page {
|
||||
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_poll/tpl/voteweight.tpl'), $vars);
|
||||
}
|
||||
|
||||
private function p_fields (){
|
||||
$result = "";
|
||||
|
||||
$list = array (array(1, 'Aussenpolitik'),
|
||||
array(2, 'Aussenpolitik'),
|
||||
array(4, 'Aussenpolitik'),
|
||||
array(8, 'Aussenpolitik'));
|
||||
foreach($list as $l){
|
||||
if($p_fields & $l[0]) $result .= $l[1];
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
private function vote_buttons($poll_expired,$user_poll){
|
||||
if($poll_expired){
|
||||
if(!$user_poll){
|
||||
@ -146,7 +114,6 @@ class user_main_poll extends SYSTEM\PAGE\Page {
|
||||
$vars = array_merge($vars,votes::get_voteinfo($this->poll_ID));
|
||||
//$vars['comments_pro'] = $this->get_pro_comments();
|
||||
//$vars['comments_con'] = $this->get_con_comments();
|
||||
$vars['icons_party'] = $this->icons_party();
|
||||
$vars['choice_party'] = $this->choice_party();
|
||||
$vars['bars_party'] = $this->bars_party();
|
||||
$vars['bars_user'] = $this->bars_user();
|
||||
|
||||
@ -1 +0,0 @@
|
||||
{$text}
|
||||
@ -1 +0,0 @@
|
||||
${news}
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="panel panel-default panel-info">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
Willkommen auf uvote.eu!
|
||||
<i class="glyphicon glyphicon-share-alt"></i> Willkommen auf uvote.eu!
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
@ -34,7 +34,7 @@
|
||||
<div class="panel panel-default panel-info">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
News
|
||||
<i class="glyphicon glyphicon-bullhorn"></i> News
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body" style="padding-left: 50px; padding-right: 50px;">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user