コード例 #1
0
 /**
  * Sets the different variables in charge of storing the different dynamic
  * fields to be rendered on the report builder page
  * @param string $name the report name
  */
 private function setWidgetsOptions($name)
 {
     // Get the list of dynamicaly rendered fields depending the report targeted
     $this->widgets = Reports::getRequiredFieldForReport($name);
     // Get the list of options for these dynamicaly rendered fields
     $this->widgets_options = Reports::getRequiredFieldForReportOptions($name);
     // Count the ones that are dedicated to be set on a second line
     $this->widgets_second_line_count = 0;
     foreach (array_keys($this->widgets) as $widget_name) {
         if (isset($this->widgets_options[$widget_name]) && !empty($this->widgets_options[$widget_name]['second_line']) && $this->widgets_options[$widget_name]['second_line']) {
             $this->widgets_second_line_count += 1;
         }
     }
 }
コード例 #2
0
        <th></th>
      </tr>
    </thead>
    <tbody>
    <?php 
    foreach ($reports as $report) {
        ?>
      <tr>
        <td><?php 
        echo Reports::getReportName($report->getName(), $sf_user->getCulture());
        ?>
        <?php 
        echo image_tag('info.png', 'class=more_trk');
        ?>
        <?php 
        $widget = Reports::getRequiredFieldForReport($report->getName());
        ?>
          <ul class="field_change">            
            <?php 
        foreach ($report->getDiffAsArray() as $field => $value) {
            ?>
              <li><strong><?php 
            echo __($widget[$field]);
            ?>
</strong> <?php 
            echo $value;
            ?>
</li>
          <?php 
        }
        ?>