index.rhtml
1.96 KB
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
<%= stylesheet_link_tag 'tasks' %>
<h1><%= _("%s's pending tasks") % profile.name %></h1>
<p>
<% if !@failed.blank? %>
<div id="errorExplanation">
<% @failed.each do |error, tasks_descriptions|%>
<h2> <%= error %></h2>
<p><%=_("This error happened with the following tasks: ")%></p>
<ul>
<% tasks_descriptions.each do |description| %>
<li> <%= description %> </li>
<% end %>
</ul>
<% end %>
</div>
<% end %>
<% if @tasks.empty? %>
<em><%= _('No pending tasks for %s') % profile.name %></em>
<% else %>
<% form_tag :action => 'close' do%>
<% button_bar do %>
<%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %>
<%# FIXME button('menu-mail', _('Send request'), :action => 'new') %>
<%= submit_button :save, _("Apply!") %>
<%= button(:edit, _('View processed tasks'), :action => 'processed') %>
<%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
<% end %>
<ul class='task-list'>
<p>
<%= labelled_select(_("Set all to: "), 'set-decisions', 'downcase', 'to_s', nil, ["","Accept", "Reject", "Skip"], :id => "up-set-all-tasks-to") %>
</p>
<% @tasks.each do |task| %>
<%= render :partial => 'task', :locals => { :task => task } %>
<% end %>
<p>
<%= labelled_select(_("Set all to: "), 'set-decisions', 'downcase', 'to_s', nil, ["","Accept", "Reject", "Skip"], :id => "down-set-all-tasks-to") %>
</p>
</ul>
<% button_bar do %>
<%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %>
<%# FIXME button('menu-mail', _('Send request'), :action => 'new') %>
<%= submit_button :save, _("Apply!") %>
<%= button(:edit, _('View processed tasks'), :action => 'processed') %>
<%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
<% end %>
<% end %>
<% end %>
</p>
<%= javascript_include_tag 'tasks' %>