diff --git a/uvote/api/api_uvote.php b/uvote/api/api_uvote.php index abf29ff..00b0307 100644 --- a/uvote/api/api_uvote.php +++ b/uvote/api/api_uvote.php @@ -41,7 +41,9 @@ class api_uvote extends \SYSTEM\API\api_system { return graphs::graph_party_to_user_overall_by_time($party, $timespan);} public static function call_donut_party_to_user_overall(){ - return graphs::donut_party_to_user_overall();} + return graphs::donut_party_to_user_overall();} + public static function call_donut_party_to_community_overall(){ + return graphs::donut_party_to_community_overall();} //comments public static function call_vote_action_comment($poll_ID, $c_choice, $c_txt, $c_src) { return comments::write_comment($poll_ID, $c_choice, $c_txt, $c_src);} @@ -60,7 +62,12 @@ class api_uvote extends \SYSTEM\API\api_system { return stats_bilance_choice::basic_bilance_choice($cat); } } - + public static function call_load_list($filter, $time){ + return lists::generate_votelist($filter); + } + public static function call_load_list_text_search($text){ + return lists::text_search($text); + } } \ No newline at end of file diff --git a/uvote/api/votes/graphs.php b/uvote/api/votes/graphs.php index 0bd3b2b..02622c7 100644 --- a/uvote/api/votes/graphs.php +++ b/uvote/api/votes/graphs.php @@ -55,5 +55,14 @@ class graphs { } return $returnasjson ? SYSTEM\LOG\JsonResult::toString($result) : $result; } + public static function donut_party_to_community_overall ($returnasjson = true){ + $result = array(); + $res = \SQL\UVOTE_DATA_COMMUNITY_TO_PARTIES_OVERALL::QQ(array()); + while ($row = $res->next()){ + $result[] = array( 0 => $row['party'], + 'class_match' => $row['class_MATCH']); + } + return $returnasjson ? SYSTEM\LOG\JsonResult::toString($result) : $result; + } } diff --git a/uvote/api/votes/lists.php b/uvote/api/votes/lists.php index 3e09aa7..6c336c2 100644 --- a/uvote/api/votes/lists.php +++ b/uvote/api/votes/lists.php @@ -1,12 +1,20 @@ 0 ? 'Abstimmen' : 'Ansehen'; @@ -14,6 +22,43 @@ class lists{ $vote['uv_count'] = $vote_count['count'] > 4 ? $vote_count['count'] : '< 5'; $user_vote = votes::getUserPollData($vote['ID']); $vote['vote_class'] = switchers::tablerow_class($user_vote); + $vote['frontend_logos'] = './api.php?call=files&cat=frontend_logos&id='; + if($time_remain > 0){ + $vote['statusmarker'] = 'aktuell'; + $result[0] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_votelist/tpl/vote.tpl'), $vote); + } else { + $vote['statusmarker'] = 'vergangen'; + $result[1] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_votelist/tpl/vote.tpl'), $vote); + } + } + return $result[0].$result[1]; + } + public static function get_all_tags_of_vote($poll_ID){ + $result = ''; + $vars = \SQL\UVOTE_DATA_USER_TAGS_OF_VOTE::QA(array($poll_ID)); + foreach ($vars as $tag){ + $result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_votelist/tpl/tag.tpl'),$tag); + } + return $result; + } + + public static function text_search($text){ + $result = array('',''); + $votes = \SQL\UVOTE_DATA_TEXT_SEARCH::QA(array($text)); + foreach($votes as $vote){ + $time_remain = strtotime($vote['time_end'])- microtime(true); + $time_span = strtotime($vote['time_end']) - strtotime($vote['time_start']); + $vote_count = votes::get_count_user_votes_per_poll($vote['ID']); + $vote['votecount'] = $vote_count['count']; + $vote['tags'] = self::get_all_tags_of_vote($vote['ID']); + $vote['time_left'] = round($time_remain/($time_span+1)*100,0); + $vote['time_done'] = 100-$vote['time_left']; + $vote['full_vote_btn'] = $time_remain > 0 ? 'Abstimmen' : 'Ansehen'; + $vote['uv'] = $vote['bt'] = ''; + $vote['uv_count'] = $vote_count['count'] > 4 ? $vote_count['count'] : '< 5'; + $user_vote = votes::getUserPollData($vote['ID']); + $vote['vote_class'] = switchers::tablerow_class($user_vote); + $vote['frontend_logos'] = './api.php?call=files&cat=frontend_logos&id='; if($time_remain > 0){ $vote['statusmarker'] = 'aktuell'; $result[0] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_votelist/tpl/vote.tpl'), $vote); diff --git a/uvote/files/frontend_logos/logo.png b/uvote/files/frontend_logos/logo.png index 06604da..3130c90 100644 Binary files a/uvote/files/frontend_logos/logo.png and b/uvote/files/frontend_logos/logo.png differ diff --git a/uvote/files/frontend_logos/logo4.png b/uvote/files/frontend_logos/logo4.png new file mode 100644 index 0000000..6c9f6c8 Binary files /dev/null and b/uvote/files/frontend_logos/logo4.png differ diff --git a/uvote/files/frontend_logos/logo_new.psd b/uvote/files/frontend_logos/logo_new.psd new file mode 100644 index 0000000..cc4ac1b Binary files /dev/null and b/uvote/files/frontend_logos/logo_new.psd differ diff --git a/uvote/files/frontend_logos/logo_new_new.psd b/uvote/files/frontend_logos/logo_new_new.psd new file mode 100644 index 0000000..a4d8299 Binary files /dev/null and b/uvote/files/frontend_logos/logo_new_new.psd differ diff --git a/uvote/page/default_page/css/page.css b/uvote/page/default_page/css/page.css index 0a201ee..3879dd1 100644 --- a/uvote/page/default_page/css/page.css +++ b/uvote/page/default_page/css/page.css @@ -22,7 +22,6 @@ body { #site-content { padding: 0; margin: 0; - margin-left: 35px; } #user_main { diff --git a/uvote/page/default_page/css/vote.css b/uvote/page/default_page/css/vote.css index e0cdecf..aecc633 100644 --- a/uvote/page/default_page/css/vote.css +++ b/uvote/page/default_page/css/vote.css @@ -1,8 +1,4 @@ -#vote_main { - padding: 5px; - margin: 5px; - width: 100%; -} + #vote_sub1 { float: left; diff --git a/uvote/page/default_page/tpl/menu.tpl b/uvote/page/default_page/tpl/menu.tpl index e79f1e9..1389721 100644 --- a/uvote/page/default_page/tpl/menu.tpl +++ b/uvote/page/default_page/tpl/menu.tpl @@ -4,7 +4,7 @@