%= stylesheet_link_tag 'tasks' %>
<%= _("%s's pending tasks") % profile.name %>
<% if !@failed.blank? %>
<% @failed.each do |error, tasks_descriptions|%>
<%= error %>
<%=_("This error happened with the following tasks: ")%>
<% tasks_descriptions.each do |description| %>
- <%= description %>
<% end %>
<% end %>
<% end %>
<% if @tasks.empty? %>
<%= _('No pending tasks for %s') % profile.name %>
<% 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 %>
<%= labelled_select(_("Set all to: "), 'set-decisions', 'downcase', 'to_s', nil, ["","Accept", "Reject", "Skip"], :id => "up-set-all-tasks-to") %>
<% @tasks.each do |task| %>
<%= render :partial => 'task', :locals => { :task => task } %>
<% end %>
<%= labelled_select(_("Set all to: "), 'set-decisions', 'downcase', 'to_s', nil, ["","Accept", "Reject", "Skip"], :id => "down-set-all-tasks-to") %>
<% 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 %>
<%= javascript_include_tag 'tasks' %>