!if equalities iswordof $m_options or $laststep<1
  !exit
!endif

!readproc tabletheme
$table_header
<caption>$name_hist</caption>
$table_hdtr<th>$name_step</th>
!if $casecnt>1
  <th>$name_case</th>
!endif
<th>$name_result</th>
<th>$name_method</th>
<th>$name_remarks</th></tr>
!reset light1,light2
!set hstart=$[max(1,$currstep-10)]
!set hstop=$[min($laststep,$currstep+8)]
!for i=$hstart to $hstop
  !if $i=$currstep
    !distribute item <span style="color:#9090C0">,</span> into light1,light2
  !endif
  $table_tr<td class="wimscenter nowrap">$light1
  $i
  !if $status=waiting
    <small>
    !if $i<$currstep
      !href cmd=reply&opt=newstep&gotostep=$i $name_undo
    !else
      !href cmd=reply&opt=newstep&gotostep=$[$i+1] $name_redo
    !endif
    </small>
  !endif
  $light2</td>
  !if $casecnt>1
    !set c_=!item $i of $stepcases
    <td class="wimscenter">$light1 \($c_) $light2</td>
  !endif
  <td class="wimscenter">$light1
  !read deduc/putobject.phtml $i
  $light2</td><td>$light1
  !line $i of $methods
  $light2</td>
  <td>$light1
  !reset R_
  !if $objisgoal=yes
    $name_change.
  !endif
  !set t_=!char $i of $stepcounting
  !if $t_=0
    $name_noaccount.
    !set R_=1
  !endif
  !if $R_!=1
    &nbsp;
  !endif
  $light2</td>
  </tr>
!next i
$table_end<a id="last"></a>
