-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
Copy pathscheduled.erb
60 lines (59 loc) · 2.02 KB
/
scheduled.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<section>
<header>
<h1><%= t('ScheduledJobs') %></h1>
<% if @scheduled.size > 0 && @total_size > @count %>
<%= erb :_paging, locals: { url: "#{root_path}scheduled" } %>
<% end %>
<%= filtering('scheduled') %>
</header>
<% if @scheduled.size > 0 %>
<form action="<%= root_path %>scheduled" method="post">
<%= csrf_tag %>
<div class="table_container">
<table>
<thead>
<tr>
<th>
<label>
<input type="checkbox" class="check_all" />
</label>
</th>
<th><%= t('When') %></th>
<th><%= t('Queue') %></th>
<th><%= t('Job') %></th>
<th><%= t('Arguments') %></th>
</tr>
</thead>
<% @scheduled.each do |entry| %>
<tr>
<td>
<label>
<input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' class='shift_clickable' />
</label>
</td>
<td>
<a href="<%= root_path %>scheduled/<%= job_params(entry.item, entry.score) %>"><%= relative_time(entry.at) %></a>
</td>
<td>
<a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
</td>
<td>
<%= entry.display_class %>
<%= display_tags(entry, "scheduled") %>
</td>
<td>
<code>
<div class="args"><%= display_args(entry.display_args) %></div>
</code>
</td>
</tr>
<% end %>
</table>
</div>
<input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>" />
<input class="btn btn-danger" type="submit" name="add_to_queue" value="<%= t('AddToQueue') %>" />
</form>
<% else %>
<div class="alert alert-success"><%= t('NoScheduledFound') %></div>
<% end %>
</div>