From 70283bdcb49b992cdddf29ee119e0b98b7423195 Mon Sep 17 00:00:00 2001 From: Nael Date: Fri, 7 Mar 2014 00:21:16 +0100 Subject: [PATCH] formatted open vote --- uVote/api/votes/votes.php | 11 ++++ ..._DATA_GRAPH_BT_TO_USER_OVERALL_BY_TIME.php | 19 ++++++ uVote/page/default_bulletin/bars_user.tpl | 5 +- uVote/page/default_bulletin/bulletin.tpl | 59 +++++++++---------- .../default_bulletin/default_bulletin.php | 35 +++++++---- .../default_bulletin/icons_table_parties.tpl | 7 +++ uVote/page/default_bulletin/js/vote.js | 0 uVote/page/default_bulletin/table_bt.tpl | 4 +- uVote/page/default_bulletin/table_parties.tpl | 10 ++-- uVote/page/default_bulletin/vote_bt.tpl | 8 ++- uVote/page/default_page/full_vote.tpl | 3 +- uVote/page/default_page/js/loadtexts.js | 28 +++++++++ 12 files changed, 134 insertions(+), 55 deletions(-) create mode 100644 uVote/dbd/qq/UVOTE_DATA_GRAPH_BT_TO_USER_OVERALL_BY_TIME.php create mode 100644 uVote/page/default_bulletin/icons_table_parties.tpl delete mode 100644 uVote/page/default_bulletin/js/vote.js 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} +
+ +