From 2c4647f8c6d23c999ae959a047104eef49d00993 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 9 Oct 2007 19:07:19 +0000 Subject: Added 'Bulk edit' functionality. This can be done by clicking on the edit link (little pen icon) at the upper-left corner of the issue list. Most properties can be set (priority, assignee, category, fixed version, start and due dates, done ratio) and a note can be entered. Only issues of the current project can be selected for bulk edit (subproject issues can't). git-svn-id: http://redmine.rubyforge.org/svn/trunk@817 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/_bulk_edit_form.rhtml | 30 ++++++++++++++++++++++++++++++ app/views/issues/_list.rhtml | 9 +++++++-- app/views/projects/list_issues.rhtml | 16 ++++++++++++---- 3 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 app/views/issues/_bulk_edit_form.rhtml (limited to 'app/views') diff --git a/app/views/issues/_bulk_edit_form.rhtml b/app/views/issues/_bulk_edit_form.rhtml new file mode 100644 index 000000000..fc0972fd6 --- /dev/null +++ b/app/views/issues/_bulk_edit_form.rhtml @@ -0,0 +1,30 @@ +
+
<%= l(:label_bulk_edit_selected_issues) %> + +

+ + + + +

+ +

+ + + +

+ +
+<%= text_area_tag 'notes', '', :cols => 80, :rows => 5 %> + +
+

<%= submit_tag l(:button_apply) %> +<%= link_to l(:button_cancel), {}, :onclick => 'Element.hide("bulk-edit-fields"); if ($("query_form")) {Element.show("query_form")}; return false;' %>

+
diff --git a/app/views/issues/_list.rhtml b/app/views/issues/_list.rhtml index 567ccba09..b81559c29 100644 --- a/app/views/issues/_list.rhtml +++ b/app/views/issues/_list.rhtml @@ -1,6 +1,11 @@ +
- + <%= sort_header_tag("#{Issue.table_name}.id", :caption => '#') %> <% query.columns.each do |column| %> <%= column_header(column) %> @@ -9,7 +14,7 @@ <% issues.each do |issue| %> - + <% query.columns.each do |column| %> <%= content_tag 'td', column_content(column, issue), :class => column.name %> diff --git a/app/views/projects/list_issues.rhtml b/app/views/projects/list_issues.rhtml index 60e8f7be2..9f2ff870d 100644 --- a/app/views/projects/list_issues.rhtml +++ b/app/views/projects/list_issues.rhtml @@ -4,7 +4,6 @@ <% form_tag({ :controller => 'queries', :action => 'new', :project_id => @project }, :id => 'query_form') do %> <%= render :partial => 'queries/filters', :locals => {:query => @query} %> - <% end %>
<%= link_to_remote l(:button_apply), { :url => { :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 }, @@ -22,6 +21,8 @@ <% end %>

+   + <% end %> <% else %>
<% if @query.editable_by?(User.current) %> @@ -31,6 +32,7 @@

<%= @query.name %>

+
<% set_html_title @query.name %> <% end %> <%= error_messages_for 'query' %> @@ -38,15 +40,14 @@ <% if @issues.empty? %>

<%= l(:label_no_data) %>

<% else %> -  -<% form_tag({:controller => 'projects', :action => 'move_issues', :id => @project}, :id => 'issues_form' ) do %> +<% form_tag({:controller => 'projects', :action => 'bulk_edit_issues', :id => @project}, :id => 'issues_form', :onsubmit => "if (!checkBulkEdit(this)) {alert('#{l(:notice_no_issue_selected)}'); return false;}" ) do %> <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
<%= l(:label_export_to) %> <%= link_to 'CSV', {:action => 'export_issues_csv', :id => @project}, :class => 'icon icon-csv' %>, <%= link_to 'PDF', {:action => 'export_issues_pdf', :id => @project}, :class => 'icon icon-pdf' %>
-

<%= submit_tag(l(:button_move), :class => "button-small") if authorize_for('projects', 'move_issues') %> +

<%= pagination_links_full @issue_pages %> [ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ]

@@ -57,3 +58,10 @@ <% content_for :sidebar do %> <%= render :partial => 'issues/sidebar' %> <% end %> + +<% content_for :header_tags do %> + <%= javascript_include_tag 'calendar/calendar' %> + <%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %> + <%= javascript_include_tag 'calendar/calendar-setup' %> + <%= stylesheet_link_tag 'calendar' %> +<% end %> -- cgit v1.2.3
<%= link_to_remote(image_tag('edit.png'), + {:url => { :controller => 'projects', :action => 'bulk_edit_issues', :id => @project }, + :method => :get}, + {:title => l(:label_bulk_edit_selected_issues)}) if @project && User.current.allowed_to?(:edit_issues, @project) %> +
<%= check_box_tag "issue_ids[]", issue.id, false, :id => "issue_#{issue.id}" %><%= check_box_tag("issue_ids[]", issue.id, false, :id => "issue_#{issue.id}", :disabled => (!@project || @project != issue.project)) %> <%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %>