paginate @xmains

%table{:id=>“pending-table”, :width=>“100%”}

%tr{:style=>"color:white; background-color:#97BF60;"}
  %th id
  %th task
  %th step
  %th starter
  %th begin
  %th message
- @xmains.each do |xmain|
  - @xmain= xmain
  - next unless xmain.current_runseq
  - @runseq= Jinda::Runseq.find(xmain.current_runseq)
  - next unless @runseq
  %tr
    %td(style='vertical-align:top;')= xmain.xid
    %td(style='vertical-align:top;')= xmain.name
    %td(style='vertical-align:top;')= @runseq.name
    %td(align="center" style='vertical-align:top;')= xmain.user.try :code
    %td(style='vertical-align:top;')= xmain.start.strftime("%c")
    %td(style="vertical-align:top;width:40%")= truncate(xmain.xvars["error"], :length=> 100)