<NME> delayed.erb
<BEF> <h1>Delayed Jobs</h1>
<% size = resque.delayed_queue_schedule_size %>

<%= scheduler_view :search_form, layout: false %>

<p style="color: red; font-weight: bold;">
  <%= @error_message %>
</p>

<p class='intro'>
  This list below contains the timestamps for scheduled delayed jobs.
  Server local time: <%= Time.now %>
</p>

<p class='sub'>
  Showing <%= start = params[:start].to_i %> to <%= start + 20 %> of <b><%= size %></b> timestamps
</p>

<table>
  <tr>
    <th></th>
    <th>Timestamp</th>
    <th>Job count</th>
    <th>Class</th>
    <th>Args</th>
    <th>All schedules</th>
  </tr>
  <% resque.delayed_queue_peek(start, 20).each do |timestamp| %>
    <tr>
      <td>
        <form action="<%= u "/delayed/queue_now" %>" method="post">
          <input type="hidden" name="timestamp" value="<%= timestamp.to_i %>">
          <input type="submit" value="Queue now">
        </form>
      </td>
      <td><a href="<%= u "delayed/#{timestamp}" %>"><%= format_time(Time.at(timestamp)) %></a></td>
      <td><%= delayed_timestamp_size = resque.delayed_timestamp_size(timestamp) %></td>
      <% job = resque.delayed_timestamp_peek(timestamp, 0, 1).first %>
      <td>
        <% if job && delayed_timestamp_size == 1 %>
          <%= h(job['class']) %>
        <% else %>
          <a href="<%= u "delayed/#{timestamp}" %>">see details</a>
        <% end %>
      </td>
      <td><%= h(show_job_arguments(job['args'])) if job && delayed_timestamp_size == 1 %></td>
      <td>
        <% if job %>
          <a href="<%=u URI("/delayed/jobs/#{URI.escape(job['class'])}?args=" + URI.encode(job['args'].to_json)) %>">All schedules</a>
        <% end %>
      </td>
    </tr>
  <% end %>
</table>

<% if size > 0 %>
  <br>
  <form method="POST" action="<%= u 'delayed/clear' %>" class='clear-delayed'>
    <input type='submit' name='' value='Clear Delayed Jobs' />
  </form>
<% end %>

<%= partial :next_more, :start => start, :size => size %>

<MSG> fix URI.escape and URI.encode

<DFF> @@ -46,7 +46,7 @@
       <td><%= h(show_job_arguments(job['args'])) if job && delayed_timestamp_size == 1 %></td>
       <td>
         <% if job %>
-          <a href="<%=u URI("/delayed/jobs/#{URI.escape(job['class'])}?args=" + URI.encode(job['args'].to_json)) %>">All schedules</a>
+          <a href="<%=u URI("/delayed/jobs/#{CGI.escape(job['class'])}?args=" + URI.encode_www_form(job['args'])) %>">All schedules</a>
         <% end %>
       </td>
     </tr>

{'addition_count': 1, 'commit_subject': 'fix URI.escape and URI.encode', 'deletion_count': 1, 'file_extension': '.erb', 'lang': 'erb', 'license': 'mit', 'repo_name': 'resque/resque-scheduler'}