예제 #1
0
    </tr>
    </thead>

    <tbody>

    <?php 
$i = 0;
foreach ($table_rows as $row) {
    echo "<tr>\n                    <td class='" . $cat_class . "' ><a href='/revenue/year/" . $req_year_id . "/fndsrc/" . $row['id'] . "'>" . $row['name'] . "</a></td>\n                    <td class='" . $cat_class . "' >" . custom_number_formatter_format($row['adopted_budget'], 2, '$') . "</td>\n                    <td class='" . $cat_class . "' >" . custom_number_formatter_format($row['current_modified_budget'], 2, '$') . "</td>";
    foreach ($years as $year) {
        $amount_link = "<a href='/revenue/transactions/fundsrc/" . $row['id'] . "/year/" . _getYearIDFromValue($year) . "'>" . custom_number_formatter_format($row['revenue_collected'][$year], 2, '$') . "</a>";
        echo "<td class='" . $amount_class . "' >" . $amount_link . "</td>";
    }
    //echo "<td class='" . $amount_class . "' >" . custom_number_formatter_format(array_sum($row['revenue_collected']),2,'$') ."</td>";
    $widgetNode = node_load(285);
    widget_set_uid($widgetNode, $i);
    $additionalParams = array();
    $additionalParams["funding.funding"] = $row['id'];
    widget_add_additional_parameters($widgetNode, $additionalParams);
    $widgetChart = node_build_content($widgetNode);
    $widgetChart = drupal_render($widgetNode->content);
    echo "<td class='" . $amount_class . "' ><table><tr><td><a href='/revenue/transactions/fundsrc/" . $row['id'] . "'>" . custom_number_formatter_format(array_sum($row['revenue_collected']), 2, '$') . "</a></td><td>" . $widgetChart . "</td></tr></table></td>";
    echo "</tr>";
    $i++;
}
?>
    </tbody>
</table>
    
<?php 
widget_data_tables_add_js($node);
예제 #2
0
}
echo "</tr>\n";
?>
  </thead>

  <tbody>

  <?php 
if (isset($node->data)) {
    $i = 0;
    foreach ($node->data as $datarow) {
        echo "<tr>";
        foreach ($node->widgetConfig->table_columns as $row) {
            if ($row->isWidget) {
                $widgetnode = node_load($row->widgetNid);
                widget_set_uid($widgetnode, $i);
                /*$additionalParams = array();
                  foreach($row->columnParams as $paramColumn){
                      $additionalParams[$paramColumn] = $row[str_replace(".", "_",$paramColumn)];
                  }
                  widget_add_additional_parameters($widgetnode,$additionalParams);*/
                $widgetChart = node_build_content($widgetnode);
                $widgetChart = drupal_render($widgetnode->content);
                echo '<td class="' . $datarow[$row->classColumn] . '">' . $widgetChart . '</td>';
            } else {
                echo '<td class="' . $datarow[$row->classColumn] . '">' . $datarow[$row->column] . '</td>';
            }
        }
        echo "</tr>";
        $i++;
    }