From d18596c322928c8d0145f37c7e52cc8b89f7b61f Mon Sep 17 00:00:00 2001 From: Nael Date: Tue, 4 Mar 2014 01:50:38 +0100 Subject: [PATCH] uvote to bt overall now working --- uVote/dbd/qq/UVOTE_DATA_UVOTE_TO_PARTY_OVERALL.php | 7 +++---- uVote/page/user_main_uVote/uVote.tpl | 14 +++++++++++--- uVote/page/user_main_uVote/user_main_uVote.php | 13 ++++++++++++- uVote/page/user_main_uVote/uvoteparties.tpl | 8 ++++++++ 4 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 uVote/page/user_main_uVote/uvoteparties.tpl diff --git a/uVote/dbd/qq/UVOTE_DATA_UVOTE_TO_PARTY_OVERALL.php b/uVote/dbd/qq/UVOTE_DATA_UVOTE_TO_PARTY_OVERALL.php index 64c9dde..8ad7f59 100644 --- a/uVote/dbd/qq/UVOTE_DATA_UVOTE_TO_PARTY_OVERALL.php +++ b/uVote/dbd/qq/UVOTE_DATA_UVOTE_TO_PARTY_OVERALL.php @@ -8,8 +8,7 @@ class UVOTE_DATA_UVOTE_TO_PARTY_OVERALL extends \SYSTEM\DB\QQ { '', //mys 'SELECT party, sum(case when uvote_data.choice = uvote_votes_per_party.choice then 1 else 0 end) class_MATCH, - sum(case when uvote_data.choice != uvote_votes_per_party.choice then 1 else 0 end) class_MISSMATCH -FROM uvote_data INNER JOIN uvote_votes_per_party -ON uvote_data.poll_ID = uvote_votes_per_party.poll_ID - GROUP BY party;' + sum(case when uvote_data.choice != uvote_votes_per_party.choice then 1 else 0 end) class_MISSMATCH + FROM uvote_data INNER JOIN uvote_votes_per_party + ON uvote_data.poll_ID = uvote_votes_per_party.poll_ID GROUP BY party;' );}} \ No newline at end of file diff --git a/uVote/page/user_main_uVote/uVote.tpl b/uVote/page/user_main_uVote/uVote.tpl index dfb4d23..3e3a63a 100644 --- a/uVote/page/user_main_uVote/uVote.tpl +++ b/uVote/page/user_main_uVote/uVote.tpl @@ -1,5 +1,13 @@ -
- +
+ + +
Übereinstimmung von uVote & Politik
+ ${uvote_to_bt} + +
+
+
Entscheidungsverhalten der uVote Community
${votes_all} @@ -8,7 +16,7 @@
insgesamt Dafür, Dagegen oder
Enthaltung gestimmt hat.
-
+
Entscheidungsverhalten des Bundestags
${votes_all_bt} diff --git a/uVote/page/user_main_uVote/user_main_uVote.php b/uVote/page/user_main_uVote/user_main_uVote.php index 1b52897..df71c74 100644 --- a/uVote/page/user_main_uVote/user_main_uVote.php +++ b/uVote/page/user_main_uVote/user_main_uVote.php @@ -1,7 +1,16 @@ uvote_to_parties(); $vars['votes_all'] = $this->votes_all(); $vars['votes_all_bt'] = $this->votes_all_bt(); $vars['user_count'] = $this->user_count(); + $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id='; $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); diff --git a/uVote/page/user_main_uVote/uvoteparties.tpl b/uVote/page/user_main_uVote/uvoteparties.tpl new file mode 100644 index 0000000..8c30031 --- /dev/null +++ b/uVote/page/user_main_uVote/uvoteparties.tpl @@ -0,0 +1,8 @@ + + + + + ${class_MATCH} + ${class_MISSMATCH} + ${match_percentage}% + \ No newline at end of file