Ejemplo n.º 1
0
        draw_votes_chart($id, $table, $entity_id, $chart_question, $feedback_support, $feedback_oppose, $feedback_total, $feedback_average);
        ?>
    </div>
</div>

</div>
<?php 
    }
}
if (!empty($legislation_ids)) {
    $feedback_average = Legislation::get_average_legislation_feedback();
    foreach ($legislation_ids as $id) {
        $legislation = new Legislation($id);
        $legislation_id = $id;
        $shorttitle = my_truncate($legislation->title(), 10, "...");
        $shortdescription = my_truncate($legislation->recommended_action(), 20, "...");
        $chart_question = $legislation->question();
        $feedback_support = $legislation->get_support();
        $feedback_oppose = $legislation->get_oppose();
        $feedback_total = $feedback_support + $feedback_oppose;
        ?>
    <div class='row_clickable' onclick="document.location.href='legislation_edit?id=<?php 
        echo $id;
        ?>
'">
    <div class='row_icon'></div>
    <h3><?php 
        echo $shorttitle;
        ?>
</h3>
    <p><?php 
Ejemplo n.º 2
0
$html->generate_header();
?>
<div class="row_clickable" onclick="document.location.href='announcement_edit'">
    <div class="row_icon"></div>
    <h3>Send a new announcement</h3>
    <p>My last announcement was 3 days ago.</p>
</div>
<?php 
if (!empty($announcement_ids)) {
    $feedback_average = Announcement::get_average_announcement_feedback();
    foreach ($announcement_ids as $id) {
        $announcement = new Announcement($id);
        $announcement_id = $id;
        $src = $announcement->get_image_src();
        $shorttitle = my_truncate($announcement->title(), 10, "...");
        $shortdescription = my_truncate($announcement->description(), 20, "...");
        $chart_question = $announcement->question();
        $feedback_support = $announcement->get_support();
        $feedback_oppose = $announcement->get_oppose();
        $feedback_total = $feedback_support + $feedback_oppose;
        ?>
<div class="row_clickable row_thumb" onclick="document.location.href='announcement_edit?id=<?php 
        echo $id;
        ?>
'">
    <img src="<?php 
        echo $src;
        ?>
" class="thumbnail">
    <div class='row_icon'></div>
    <h3><?php