Ejemplo n.º 1
0
 /**
  * This method tests the getRowOffset function.
  *
  * @param   integer  $index       The row index
  * @param   integer  $limitstart  The offset of the item to start at.
  * @param   integer  $value       The expected rationalised offset for a row with a given index.
  *
  * @return  void
  *
  * @covers        JPagination::getRowOffset
  * @since         3.1
  */
 public function testGetRowOffset($index = 1, $limitstart = 50, $value = 52)
 {
     $pagination = new JPagination(100, $limitstart, 20, '', $this->app);
     $this->assertEquals($pagination->getRowOffset($index), $value);
     unset($pagination);
 }
Ejemplo n.º 2
0
          <th width="10">&nbsp;</th>
        </tr>
          <?php 
    $index = 0;
    if ($count > 0) {
        $k = 0;
        foreach ($field_values as $row) {
            $is_default = $row->default == 1 ? "checked=\"checked\"" : "";
            ?>
            <tr class="row<?php 
            echo $k;
            ?>
">
              <td>
                <?php 
            echo $pageNav->getRowOffset($index);
            ?>
              </td>
              <td align="center">
                <?php 
            echo JHTML::_('grid.id', $index, $row->id, null, 'val_id');
            ?>
              </td>
              <td>
                <input type="text" name="value_name[]" value="<?php 
            echo $row->name;
            ?>
"/>
              </td>
              <td>
                <input type="text" name="value_label[]" value="<?php