Commit ac6b7e4e44476521f1fe2889d57ab8ca2e64af99

Authored by Victor Costa
1 parent bf8b5fe3

Add file removed by mistake

Showing 1 changed file with 68 additions and 0 deletions   Show diff stats
app/views/tasks/index.html.erb 0 → 100644
... ... @@ -0,0 +1,68 @@
  1 +<%= stylesheet_link_tag 'tasks' %>
  2 +
  3 +<h1><%= _("%s's pending tasks") % profile.name %></h1>
  4 +<p>
  5 +
  6 +<%
  7 + type_collection = [[nil, _('All')]] + @task_types
  8 +%>
  9 +
  10 +<% if !@failed.blank? %>
  11 + <div id="errorExplanation">
  12 + <% @failed.each do |error, tasks_descriptions|%>
  13 + <h2> <%= error %></h2>
  14 + <p><%=_("This error happened with the following tasks: ")%></p>
  15 + <ul>
  16 + <% tasks_descriptions.each do |description| %>
  17 + <li> <%= description %> </li>
  18 + <% end %>
  19 + </ul>
  20 + <% end %>
  21 + </div>
  22 +<% end %>
  23 +
  24 +<% if @tasks.empty? %>
  25 + <p>
  26 + <%= labelled_select(_('Filter')+': ', :filter_type, :first, :last, @filter, type_collection, :onchange => "document.location.href = '?filter_type='+this.value")%>
  27 + </p>
  28 + <em><%= _('No pending tasks for %s') % profile.name %></em>
  29 +<% else %>
  30 + <%= form_tag :action => 'close' do%>
  31 + <% button_bar do %>
  32 + <%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %>
  33 + <%# FIXME button('menu-mail', _('Send request'), :action => 'new') %>
  34 + <%= submit_button :save, _("Apply!") %>
  35 + <%= button(:edit, _('View processed tasks'), :action => 'processed') %>
  36 + <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
  37 + <% end %>
  38 +
  39 + <ul class='task-list'>
  40 + <p>
  41 + <%= labelled_select(_('Filter')+': ', :filter_type, :first, :last, @filter, type_collection, :onchange => "document.location.href = '?filter_type='+this.value") %>
  42 + </p>
  43 + <p>
  44 + <%= labelled_select(_("Set all to: "), 'set-decisions', 'first', 'last', nil, [['',""],['accept',_("Accept")],['reject',_("Reject")],['skip',_("Skip")]], :id => "up-set-all-tasks-to") %>
  45 + </p>
  46 + <% @tasks.each do |task| %>
  47 + <%= render :partial => 'task', :locals => { :task => task } %>
  48 + <% end %>
  49 + <p>
  50 + <%= labelled_select(_("Set all to: "), 'set-decisions', 'first', 'last', nil, [['',""],['accept',_("Accept")],['reject',_("Reject")],['skip',_("Skip")]], :id => "down-set-all-tasks-to") %>
  51 + </p>
  52 + </ul>
  53 +
  54 + <%= pagination_links(@tasks)%>
  55 +
  56 + <% button_bar do %>
  57 + <%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %>
  58 + <%# FIXME button('menu-mail', _('Send request'), :action => 'new') %>
  59 + <%= submit_button :save, _("Apply!") %>
  60 + <%= button(:edit, _('View processed tasks'), :action => 'processed') %>
  61 + <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
  62 + <% end %>
  63 + <% end %>
  64 +<% end %>
  65 +</p>
  66 +
  67 +
  68 +<%= javascript_include_tag 'tasks' %>
... ...