index.html.erb
2.7 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<%= stylesheet_link_tag 'tasks' %>
<h1><%= _("%s's pending tasks") % profile.name %></h1>
<p>
<%
type_collection = [[nil, _('All')]] + @task_types
%>
<% 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? %>
<p>
<%= labelled_select(_('Filter')+': ', :filter_type, :first, :last, @filter, type_collection, :onchange => "document.location.href = '?filter_type='+this.value")%>
</p>
<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(_('Filter')+': ', :filter_type, :first, :last, @filter, type_collection, :onchange => "document.location.href = '?filter_type='+this.value") %>
</p>
<p>
<%= labelled_select(_("Set all to: "), 'set-decisions', 'first', 'last', nil, [['',""],['accept',_("Accept")],['reject',_("Reject")],['skip',_("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', 'first', 'last', nil, [['',""],['accept',_("Accept")],['reject',_("Reject")],['skip',_("Skip")]], :id => "down-set-all-tasks-to") %>
</p>
</ul>
<script>
jQuery('.tag-list').inputosaurus({
autoCompleteSource: <%= "'/myprofile/#{profile.identifier}/cms/search_tags'," %>
activateFinalResult : true
})
</script>
<%= pagination_links(@tasks)%>
<% 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' %>