diff --git a/uVote/api/votes/votes.php b/uVote/api/votes/votes.php index 2dfbc65..3b6c96a 100644 --- a/uVote/api/votes/votes.php +++ b/uVote/api/votes/votes.php @@ -12,6 +12,17 @@ class votes { } return $returnasjson ? SYSTEM\LOG\JsonResult::toString($result) : $result; } + + public static function get_graph_bt_to_user_overall_by_time ($timespan = 84600,$returnasjson = true){ + $result = array(); + $res = \DBD\UVOTE_DATA_GRAPH_BT_TO_USER_OVERALL_BY_TIME::QQ(array($timespan, \SYSTEM\SECURITY\Security::getUser()->id)); + while ($row = $res->next()){ + $result[] = array( 0 => $row['day'], + 'class_match' => $row['class_match'] / ($row['class_match']+$row['class_mismatch']+1), + 'class_mismatch' => $row['class_mismatch'] / ($row['class_match']+$row['class_mismatch']+1)); + } + return $returnasjson ? SYSTEM\LOG\JsonResult::toString($result) : $result; + } public static function getAllVotesOfGroup($groupid){ return \DBD\UVOTE_GENERATE_VOTELIST::QA(array($groupid));} diff --git a/uVote/dbd/qq/UVOTE_DATA_GRAPH_BT_TO_USER_OVERALL_BY_TIME.php b/uVote/dbd/qq/UVOTE_DATA_GRAPH_BT_TO_USER_OVERALL_BY_TIME.php new file mode 100644 index 0000000..70eea8b --- /dev/null +++ b/uVote/dbd/qq/UVOTE_DATA_GRAPH_BT_TO_USER_OVERALL_BY_TIME.php @@ -0,0 +1,19 @@ + +
${bulletin_bars_title}
+Ergebnis uVote +
${vote_yes_perc}%
${vote_no_perc}%
${vote_ent_perc}%
diff --git a/uVote/page/default_bulletin/bulletin.tpl b/uVote/page/default_bulletin/bulletin.tpl index fc2f245..645d12b 100644 --- a/uVote/page/default_bulletin/bulletin.tpl +++ b/uVote/page/default_bulletin/bulletin.tpl @@ -1,39 +1,34 @@ - -
-
- -
- ${voice_weight} -
- - Ergebnis uVote - ${bars_user} - - - - - Ergebnis Bundestag - ${bars_bt} - -
- - - - ${bars_party} - - - ${choice_party} - -
-
-
+ +
+
+ ${vote_buttons} +
-
- ${vote_buttons} +
+
+
+ ${voice_weight}
-
+
+ +
+ + ${bars_user} +
+
+ + ${bars_bt} +
+
+ +
+ ${icons_party} + ${choice_party} +
+ +