From fd9cb13eb1892400299e7cc8642e561dd56f1dde Mon Sep 17 00:00:00 2001 From: Nael Date: Mon, 17 Feb 2014 17:21:49 +0100 Subject: [PATCH] new nice statistics --- uVote/page/default_bulletin/bars_user.tpl | 6 +++--- uVote/page/default_bulletin/table_bt.tpl | 8 ++++---- uVote/page/default_bulletin/table_parties.tpl | 2 +- uVote/page/user_main/user_main.php | 5 +++-- uVote/page/user_main_uVote/uVote.tpl | 3 +-- uVote/page/user_main_uVote/user_main_uVote.php | 4 +++- uVote/page/user_main_uVote/votecountchoice.tpl | 4 ++-- uVote/page/user_main_urVote/urVote.tpl | 11 +++++++---- uVote/page/user_main_urVote/urvoteparties.tpl | 8 +++++--- uVote/page/user_main_urVote/user_main_urVote.php | 9 ++++++--- 10 files changed, 35 insertions(+), 25 deletions(-) diff --git a/uVote/page/default_bulletin/bars_user.tpl b/uVote/page/default_bulletin/bars_user.tpl index 09ee604..da1191f 100644 --- a/uVote/page/default_bulletin/bars_user.tpl +++ b/uVote/page/default_bulletin/bars_user.tpl @@ -1,6 +1,6 @@

${title}

-
Yes
-
No
-
Ent
+
${vote_yes_perc}%
+
${vote_no_perc}%
+
${vote_ent_perc}%
\ No newline at end of file diff --git a/uVote/page/default_bulletin/table_bt.tpl b/uVote/page/default_bulletin/table_bt.tpl index ae6cacb..d8b2f21 100644 --- a/uVote/page/default_bulletin/table_bt.tpl +++ b/uVote/page/default_bulletin/table_bt.tpl @@ -1,7 +1,7 @@ -
+
-
-
-

+
${bt_pro}%
+
${bt_con}%
+

${bt_ent}%

\ No newline at end of file diff --git a/uVote/page/default_bulletin/table_parties.tpl b/uVote/page/default_bulletin/table_parties.tpl index 940c8a1..0aa9c3d 100644 --- a/uVote/page/default_bulletin/table_parties.tpl +++ b/uVote/page/default_bulletin/table_parties.tpl @@ -1,5 +1,5 @@
-${party} +
diff --git a/uVote/page/user_main/user_main.php b/uVote/page/user_main/user_main.php index ecd2718..f85b31c 100644 --- a/uVote/page/user_main/user_main.php +++ b/uVote/page/user_main/user_main.php @@ -3,11 +3,12 @@ class user_main extends SYSTEM\PAGE\Page { public function html(){ $vars = array(); - + $uv = new user_main_uVote(); + $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id='; $vars['uVote'] = $uv->html(); - $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id='; + return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main/main_menu.tpl'),$vars); } diff --git a/uVote/page/user_main_uVote/uVote.tpl b/uVote/page/user_main_uVote/uVote.tpl index cafa9b9..ab0a69b 100644 --- a/uVote/page/user_main_uVote/uVote.tpl +++ b/uVote/page/user_main_uVote/uVote.tpl @@ -1,7 +1,6 @@ - - + ${votes_all}
ChoiceVote Count${uVote_overall_votes_title}
\ No newline at end of file diff --git a/uVote/page/user_main_uVote/user_main_uVote.php b/uVote/page/user_main_uVote/user_main_uVote.php index 3ec5a7a..467b3a4 100644 --- a/uVote/page/user_main_uVote/user_main_uVote.php +++ b/uVote/page/user_main_uVote/user_main_uVote.php @@ -24,7 +24,9 @@ class user_main_uVote extends SYSTEM\PAGE\Page { public function html(){ $vars = array(); - $vars['votes_all'] = $this->votes_all(); + $vars['votes_all'] = $this->votes_all(); + $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/votecountchoice.tpl b/uVote/page/user_main_uVote/votecountchoice.tpl index b882c15..0ffd93f 100644 --- a/uVote/page/user_main_uVote/votecountchoice.tpl +++ b/uVote/page/user_main_uVote/votecountchoice.tpl @@ -1,4 +1,4 @@ - ${choice} - ${count} + ${choice} + ${count} \ No newline at end of file diff --git a/uVote/page/user_main_urVote/urVote.tpl b/uVote/page/user_main_urVote/urVote.tpl index 41666ac..0aacf33 100644 --- a/uVote/page/user_main_urVote/urVote.tpl +++ b/uVote/page/user_main_urVote/urVote.tpl @@ -1,10 +1,13 @@
- + +
- - - +
${urVote_title}
+ +
${urVote_user_party_compare}
${choices_user_ID} +
PartyMatchMissmatch
\ No newline at end of file diff --git a/uVote/page/user_main_urVote/urvoteparties.tpl b/uVote/page/user_main_urVote/urvoteparties.tpl index 4e107fa..86df87a 100644 --- a/uVote/page/user_main_urVote/urvoteparties.tpl +++ b/uVote/page/user_main_urVote/urvoteparties.tpl @@ -1,5 +1,7 @@ - ${party} - ${class_MATCH} - ${class_MISSMATCH} + + + + ${class_MATCH} + ${class_MISSMATCH} \ No newline at end of file diff --git a/uVote/page/user_main_urVote/user_main_urVote.php b/uVote/page/user_main_urVote/user_main_urVote.php index ab81183..018abcc 100644 --- a/uVote/page/user_main_urVote/user_main_urVote.php +++ b/uVote/page/user_main_urVote/user_main_urVote.php @@ -12,15 +12,18 @@ class user_main_urVote extends SYSTEM\PAGE\Page { ON uvote_data.poll_ID = uvote_votes_per_party.poll_ID WHERE user_ID = ? GROUP BY party;', array(\SYSTEM\SECURITY\Security::getUser()->id)); - while($row = $res->next()){ + while($row = $res->next()){ $result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_urVote/urvoteparties.tpl'), $row);; } return $result; } public function html(){ - $vars = array(); - $vars['choices_user_ID'] = $this->user_per_party_overall(); + $vars = array(); + $vars['choices_user_ID'] = $this->user_per_party_overall(); + $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_urVote/urVote.tpl'),$vars); }