diff --git a/controllers/myprofile/proposals_discussion_plugin_tasks_controller.rb b/controllers/myprofile/proposals_discussion_plugin_tasks_controller.rb index e6cd639..22b4a90 100644 --- a/controllers/myprofile/proposals_discussion_plugin_tasks_controller.rb +++ b/controllers/myprofile/proposals_discussion_plugin_tasks_controller.rb @@ -29,7 +29,7 @@ class ProposalsDiscussionPluginTasksController < TasksController @responsible_candidates = profile.members.by_role(profile.roles.reject {|r| !r.has_permission?('perform_task')}) if profile.organization? - + render :action => 'proposals_discussion_plugin_tasks/index' end end diff --git a/views/proposals_discussion_plugin_tasks/index.html.erb b/views/proposals_discussion_plugin_tasks/index.html.erb new file mode 100644 index 0000000..e46b2f0 --- /dev/null +++ b/views/proposals_discussion_plugin_tasks/index.html.erb @@ -0,0 +1,164 @@ +<%= stylesheet_link_tag 'tasks' %> + +
+ +<% + type_collection = [[nil, _('All')]] + @task_types +%> + +<% if !@failed.blank? %> +
<%=_("This error happened with the following tasks: ")%>
++ <%= labelled_select(_('Type of task')+': ', :filter_type, :first, :last, @filter_type, type_collection, {:id => 'filter-type'}) %> +
++ <%= labelled_text_field(_("Text filter")+': ', :filter_text, nil, {:id => 'filter-text',:value => @filter_text}) %> +
+ <% if profile.organization? %> ++ <%= labelled_select(_('Assigned to')+': ', :filter_responsible, :id, :name, @filter_responsible, [OpenStruct.new(:name => _('All'), :id => nil), OpenStruct.new(:name => _('Unassigned'), :id => -1)] + @responsible_candidates, :class => 'filter_responsible') %> +
+ <% end %> ++ <%= labelled_select(_('Tags')+': ', :filter_tags, :id, :name, @filter_tags, @task_tags, {:id => 'filter-add-tag'}) %> + <%= text_field_tag( :filter_tags, @filter_tags, :size => 36, :class => 'filter-tags' ) %> +
+ ++ <%= submit_button(:search, _('Search')) %> +
+ <% end %> + <% end %> +<% end %> +<% if @tasks.empty? %> ++ <%= _('No pending tasks for %s') % profile.name %> +
+<% else %> + <%= form_tag :action => 'close' do%> + <% button_bar(:class => 'task-actions') 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 unless @view_only %> + ++ <%= labelled_select(_("Set all to: "), 'set-decisions', 'first', 'last', nil, [['',""],['accept',_("Accept")],['reject',_("Reject")],['skip',_("Skip")]], :id => "up-set-all-tasks-to") %> +
+ <% end %> + ++ <%= labelled_select(_("Set all to: "), 'set-decisions', 'first', 'last', nil, [['',""],['accept',_("Accept")],['reject',_("Reject")],['skip',_("Skip")]], :id => "down-set-all-tasks-to") %> +
+ <% end %> +- -<% - type_collection = [[nil, _('All')]] + @task_types -%> - -<% if !@failed.blank? %> -
<%=_("This error happened with the following tasks: ")%>
-- <%= labelled_select(_('Type of task')+': ', :filter_type, :first, :last, @filter_type, type_collection, {:id => 'filter-type'}) %> -
-- <%= labelled_text_field(_("Text filter")+': ', :filter_text, nil, {:id => 'filter-text',:value => @filter_text}) %> -
- <% if profile.organization? %> -- <%= labelled_select(_('Assigned to')+': ', :filter_responsible, :id, :name, @filter_responsible, [OpenStruct.new(:name => _('All'), :id => nil), OpenStruct.new(:name => _('Unassigned'), :id => -1)] + @responsible_candidates, :class => 'filter_responsible') %> -
- <% end %> -- <%= labelled_select(_('Tags')+': ', :filter_tags, :id, :name, @filter_tags, @task_tags, {:id => 'filter-add-tag'}) %> - <%= text_field_tag( :filter_tags, @filter_tags, :size => 36, :class => 'filter-tags' ) %> -
- -- <%= submit_button(:search, _('Search')) %> -
- <% end %> - <% end %> -<% end %> -<% if @tasks.empty? %> -- <%= _('No pending tasks for %s') % profile.name %> -
-<% else %> - <%= form_tag :action => 'close' do%> - <% button_bar(:class => 'task-actions') 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 unless @view_only %> - -- <%= labelled_select(_("Set all to: "), 'set-decisions', 'first', 'last', nil, [['',""],['accept',_("Accept")],['reject',_("Reject")],['skip',_("Skip")]], :id => "up-set-all-tasks-to") %> -
- <% end %> - -- <%= labelled_select(_("Set all to: "), 'set-decisions', 'first', 'last', nil, [['',""],['accept',_("Accept")],['reject',_("Reject")],['skip',_("Skip")]], :id => "down-set-all-tasks-to") %> -
- <% end %> -