excluded some stylesheets and implemented tooltip (popover) for the according laws,
but the query is still not correct
This commit is contained in:
parent
d6b5c6bd21
commit
45b83e1f99
3
main_menu.css
Normal file
3
main_menu.css
Normal file
@ -0,0 +1,3 @@
|
||||
.tabbable#tabbable_main_menu {
|
||||
padding-right: 50px;
|
||||
}
|
||||
@ -145,7 +145,7 @@ class votes {
|
||||
if (!\SYSTEM\SECURITY\Security::isloggedin()){
|
||||
throw new ERROR("U need to be logged in....sry bro / sis");}
|
||||
$user = \SYSTEM\SECURITY\Security::getUser()->id;
|
||||
$data = \DBD\UVOTE_ACCORD_WITH_FRACTION::QA(array('spd',$user));
|
||||
$data = \DBD\UVOTE_ACCORD_WITH_FRACTION::QA(array($party,$user));
|
||||
//$data_escaped = array_walk_recursive($data, 'mysql_real_escape_string');
|
||||
return \SYSTEM\LOG\JsonResult::toString($data);
|
||||
}
|
||||
|
||||
@ -30,6 +30,6 @@ body {
|
||||
|
||||
#user_list {
|
||||
padding: 0px;
|
||||
width: 50%;
|
||||
width: 49%;
|
||||
float: right;
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
<div class="tabbable" style="padding-right: 50px;">
|
||||
<div class="tabbable" id="tabbable_main_menu">
|
||||
<ul class="nav nav-tabs" id="tabs_user_main">
|
||||
<li class="active"><a href="#tab_uVote" action="user_main_uVote">uVote</a></li>
|
||||
<li><a href="#tab_urVote" action="user_main_urVote">urVote</a></li>
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
class user_main extends SYSTEM\PAGE\Page {
|
||||
|
||||
private function css(){
|
||||
return '<link href="'.SYSTEM\WEBPATH(new PPAGE(),'user_main/css/main_menu.css').'" rel="stylesheet">';}
|
||||
public function html(){
|
||||
$vars = array();
|
||||
|
||||
|
||||
12
uVote/page/user_main_myVote/css/myVote.css
Normal file
12
uVote/page/user_main_myVote/css/myVote.css
Normal file
@ -0,0 +1,12 @@
|
||||
#myVote_main {
|
||||
width: 100%;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#myVote_sub1 {
|
||||
float: left;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
#myVote_sub2 {
|
||||
float: right;
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
<div style="width: 100%; padding-top: 10px;">
|
||||
<div id="myVote_main">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
@ -6,8 +6,8 @@
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div style="float: left; margin-top: 30px;">${myvote_bodytext}</div>
|
||||
<div style="float: right">
|
||||
<div id="myVote_sub1">${myvote_bodytext}</div>
|
||||
<div id="myVote_sub2">
|
||||
<form action="" name="someform">
|
||||
${location}<br>
|
||||
<select id="location" name="location">
|
||||
|
||||
@ -13,6 +13,9 @@ class user_main_myVote extends SYSTEM\PAGE\Page {
|
||||
|
||||
}
|
||||
|
||||
private function css(){
|
||||
return '<link href="'.SYSTEM\WEBPATH(new PPAGE(),'user_main_myVote/css/myVote.css').'" rel="stylesheet">';}
|
||||
|
||||
public function html(){
|
||||
$vars = array();
|
||||
$vars = $this->get_add_data();
|
||||
|
||||
@ -1,15 +1,18 @@
|
||||
<div id="urvoteparties_{party}">
|
||||
<tr>
|
||||
<td>
|
||||
<img src="${frontend_logos}icon_${party}.png"/>
|
||||
</td>
|
||||
<td><span class="badge badge-success">${class_MATCH}</span></td>
|
||||
<td><span class="badge badge-important">${class_MISSMATCH}</span></td>
|
||||
<td><span class="badge"><a class="uvote_test" data-toggle="popover" title="Popover title" data-content="The last tip!">
|
||||
|
||||
${match_percentage}%</a></span></td>
|
||||
<td><span class="badge">
|
||||
<a class="urvoteparties_uvote_popover" data-content="${according_laws}">${match_percentage}%</a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<script>
|
||||
</div>
|
||||
<script>
|
||||
$(function ()
|
||||
{ $(".uvote_test").popover();
|
||||
{ $(".urvoteparties_uvote_popover").popover({html: true});
|
||||
});
|
||||
</script>
|
||||
@ -59,13 +59,26 @@ 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));
|
||||
$i = 0;
|
||||
while($row = $res->next()){
|
||||
|
||||
$res2 = votes::vote_accord_with_party($row['party']);
|
||||
$row['according_laws'] = $this->build_according_law_html($res2, $row['party']);
|
||||
$row['match_percentage'] = round($row['class_MATCH']/($row['class_MATCH']+$row['class_MISSMATCH'])*100,2);
|
||||
$result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_urVote/urvoteparties.tpl'), $row);;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function build_according_law_html($part, $party){
|
||||
$part = json_decode($part, true);
|
||||
$result = "<div><font color='black'><h6><i>Bei folgenden Gesetzen hast du genauso abgestimmt wie die '".$party."':</i></h6><hr>";
|
||||
foreach ($part['result'] as $p){
|
||||
$result .= $p['title']."<hr>";
|
||||
}
|
||||
$result .= "</font></div>";
|
||||
new INFO($result);
|
||||
return $result;
|
||||
}
|
||||
public function html(){
|
||||
$vars = array();
|
||||
// $vars['poll_compare'] = $this->count_all_polls();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user