function get_list_result_td($data, $listid, $thesisid) { $vote = char_to_value($data['answers'][$listid][$thesisid]['selection']); $listclass = "list-" . string_to_css_classname($data['lists'][$listid]['name']); if ($vote === 'skip') { return "<td class='hidden-xs hidden-sm {$listclass}'><a class='btn btn-default btn-block disabled listanswer' >-</a></td>\n"; } if ($vote == 1) { return "<td class='hidden-xs hidden-sm {$listclass}'><a class='btn btn-success btn-block disabled listanswer' ><span class='glyphicon glyphicon-thumbs-up'></span></a></td>\n"; } if ($vote == 0) { return "<td class='hidden-xs hidden-sm {$listclass}'><a class='btn btn-warning btn-block disabled listanswer' ><span class='glyphicon glyphicon-tree-deciduous'></span></a></td>\n"; } if ($vote == -1) { return "<td class='hidden-xs hidden-sm {$listclass}'><a class='btn btn-danger btn-block disabled listanswer' ><span class='glyphicon glyphicon-thumbs-down'></i></a></td>\n"; } }
} ?> </table> </div> <?php if (!$bars_only) { ?> <div id="result-table"> <div class="panel panel-default"> <div class="panel-body"> Show/Hide parties: <?php for ($i = 0; $i < sizeof($data['lists']); $i = $i + 1) { $classname = string_to_css_classname($data['lists'][$i]['name']); echo "<button class='btn btn-default btn-primary listbtn-{$classname}' onclick='toggleColumn(\"{$classname}\")'>{$data['lists'][$i]['name_x']} </button> "; } ?> </div> </div> <p><small>Theses with a <span class="glyphicon glyphicon-star" title="star"></span> have been deemed exceptionally important to you.<br> If you click the button with the thesis on it, you can see an overview of the the parties statements.</small></p> <table class="table table-bordered" id="resulttable"> <tr id="tableheader"><th> </th><th>Your selection</th> <?php print_result_detail_table($answers, $data); ?> </table> </div>