1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/web/views/scheduled.erb
2013-08-22 02:59:34 +04:00

48 lines
1.6 KiB
Text

<header class="row">
<div class="span5">
<h3><%= t('ScheduledJobs') %></h3>
</div>
<div class="span4">
<% if @scheduled.size > 0 %>
<%= erb :_paging, :locals => { :url => "#{root_path}scheduled" } %>
<% end %>
</div>
</header>
<% if @scheduled.size > 0 %>
<form action="<%= root_path %>scheduled" method="post">
<table class="table table-striped table-bordered table-white">
<thead>
<th width="20px">
<input type="checkbox" class="check_all" />
</th>
<th width="25%"><%= t('When') %></th>
<th width="10%"><%= t('Queue') %></th>
<th><%= t('Worker') %></th>
<th><%= t('Arguments') %></th>
</thead>
<% @scheduled.each do |msg, score| %>
<tr>
<td>
<input type='checkbox' name='key[]' value='<%= job_params(msg, score) %>' />
</td>
<td>
<a href="<%= root_path %>scheduled/<%= job_params(msg, score) %>"><%= relative_time(Time.at(score)) %></a>
</td>
<td>
<a href="<%= root_path %>queues/<%= msg['queue'] %>"><%= msg['queue'] %></a>
</td>
<td><%= msg['class'] %></td>
<td>
<div class="args"><%= display_args(msg['args']) %></div>
</td>
</tr>
<% end %>
</table>
<input class="btn btn-danger pull-right" type="submit" name="delete" value="<%= t('Delete') %>" />
<input class="btn btn-danger pull-right" type="submit" name="add_to_queue" value="<%= t('AddToQueue') %>" />
</form>
<% else %>
<div class="alert alert-success"><%= t('NoScheduledFound') %></div>
<% end %>