-count=0 -skip = params[:skip].to_i %div(data-role="page" data-add-back-btn="true") %div(data-role="header") %h1 Queue: &=@title=@database.name+" / #{channel_name_for(@queue.name)}" %div{:"data-role" => "navbar"} %ul %li %a(href="/queues/#{@queue.name}/failed" data-icon="alert") Failed %li %a(href="/queues/#{@queue.name}/stats" data-icon="grid") Stats %div(data-role="content") %h1 Pending Jobs ==(#{@messages.count}) -@messages.each do |document| -message = document["message"] -count+=1 %div(data-role="collapsible" data-collapsed=true) %h1 &= "[#{document["priority"]}] #{message.first}: #{humanize_messages(message.last)}" =haml :"shared/values", :layout => false, :locals => {:hash => document} %div(data-role="footer") -if skip > 0 %a(href="/queues/#{@queue.name}?skip=#{params[:skip].to_i-25}") Previous -if count >= 25 %a(href="/queues/#{@queue.name}?skip=#{params[:skip].to_i+25}") Next