annotate .svn/pristine/f7/f7fde042d4cd3f9ac874387e64273a9817227595.svn-base @ 1298:4f746d8966dd redmine_2.3_integration

Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author Chris Cannam
date Fri, 14 Jun 2013 09:28:30 +0100
parents 622f24f53b42
children
rev   line source
Chris@1295 1 <h2><%= @copy ? l(:button_copy) : l(:label_bulk_edit_selected_issues) %></h2>
Chris@1295 2
Chris@1295 3 <ul><%= @issues.collect {|i|
Chris@1295 4 content_tag('li',
Chris@1295 5 link_to(h("#{i.tracker} ##{i.id}"),
Chris@1295 6 { :action => 'show', :id => i }
Chris@1295 7 ) + h(": #{i.subject}"))
Chris@1295 8 }.join("\n").html_safe %></ul>
Chris@1295 9
Chris@1295 10 <%= form_tag({:action => 'bulk_update'}, :id => 'bulk_edit_form') do %>
Chris@1295 11 <%= @issues.collect {|i| hidden_field_tag('ids[]', i.id)}.join("\n").html_safe %>
Chris@1295 12 <div class="box tabular">
Chris@1295 13 <fieldset class="attributes">
Chris@1295 14 <legend><%= l(:label_change_properties) %></legend>
Chris@1295 15
Chris@1295 16 <div class="splitcontentleft">
Chris@1295 17 <% if @allowed_projects.present? %>
Chris@1295 18 <p>
Chris@1295 19 <label for="issue_project_id"><%= l(:field_project) %></label>
Chris@1295 20 <%= select_tag('issue[project_id]', content_tag('option', l(:label_no_change_option), :value => '') + project_tree_options_for_select(@allowed_projects, :selected => @target_project),
Chris@1295 21 :onchange => "updateBulkEditFrom('#{escape_javascript url_for(:action => 'bulk_edit', :format => 'js')}')") %>
Chris@1295 22 </p>
Chris@1295 23 <% end %>
Chris@1295 24 <p>
Chris@1295 25 <label for="issue_tracker_id"><%= l(:field_tracker) %></label>
Chris@1295 26 <%= select_tag('issue[tracker_id]', content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(@trackers, :id, :name)) %>
Chris@1295 27 </p>
Chris@1295 28 <% if @available_statuses.any? %>
Chris@1295 29 <p>
Chris@1295 30 <label for='issue_status_id'><%= l(:field_status) %></label>
Chris@1295 31 <%= select_tag('issue[status_id]',content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(@available_statuses, :id, :name)) %>
Chris@1295 32 </p>
Chris@1295 33 <% end %>
Chris@1295 34
Chris@1295 35 <% if @safe_attributes.include?('priority_id') -%>
Chris@1295 36 <p>
Chris@1295 37 <label for='issue_priority_id'><%= l(:field_priority) %></label>
Chris@1295 38 <%= select_tag('issue[priority_id]', content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(IssuePriority.active, :id, :name)) %>
Chris@1295 39 </p>
Chris@1295 40 <% end %>
Chris@1295 41
Chris@1295 42 <% if @safe_attributes.include?('assigned_to_id') -%>
Chris@1295 43 <p>
Chris@1295 44 <label for='issue_assigned_to_id'><%= l(:field_assigned_to) %></label>
Chris@1295 45 <%= select_tag('issue[assigned_to_id]', content_tag('option', l(:label_no_change_option), :value => '') +
Chris@1295 46 content_tag('option', l(:label_nobody), :value => 'none') +
Chris@1295 47 principals_options_for_select(@assignables)) %>
Chris@1295 48 </p>
Chris@1295 49 <% end %>
Chris@1295 50
Chris@1295 51 <% if @safe_attributes.include?('category_id') -%>
Chris@1295 52 <p>
Chris@1295 53 <label for='issue_category_id'><%= l(:field_category) %></label>
Chris@1295 54 <%= select_tag('issue[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
Chris@1295 55 content_tag('option', l(:label_none), :value => 'none') +
Chris@1295 56 options_from_collection_for_select(@categories, :id, :name)) %>
Chris@1295 57 </p>
Chris@1295 58 <% end %>
Chris@1295 59
Chris@1295 60 <% if @safe_attributes.include?('fixed_version_id') -%>
Chris@1295 61 <p>
Chris@1295 62 <label for='issue_fixed_version_id'><%= l(:field_fixed_version) %></label>
Chris@1295 63 <%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
Chris@1295 64 content_tag('option', l(:label_none), :value => 'none') +
Chris@1295 65 version_options_for_select(@versions.sort)) %>
Chris@1295 66 </p>
Chris@1295 67 <% end %>
Chris@1295 68
Chris@1295 69 <% @custom_fields.each do |custom_field| %>
Chris@1295 70 <p><label><%= h(custom_field.name) %></label> <%= custom_field_tag_for_bulk_edit('issue', custom_field, @projects) %></p>
Chris@1295 71 <% end %>
Chris@1295 72
Chris@1295 73 <% if @copy && @attachments_present %>
Chris@1295 74 <p>
Chris@1295 75 <label for='copy_attachments'><%= l(:label_copy_attachments) %></label>
Chris@1295 76 <%= check_box_tag 'copy_attachments', '1', true %>
Chris@1295 77 </p>
Chris@1295 78 <% end %>
Chris@1295 79
Chris@1295 80 <% if @copy && @subtasks_present %>
Chris@1295 81 <p>
Chris@1295 82 <label for='copy_subtasks'><%= l(:label_copy_subtasks) %></label>
Chris@1295 83 <%= check_box_tag 'copy_subtasks', '1', true %>
Chris@1295 84 </p>
Chris@1295 85 <% end %>
Chris@1295 86
Chris@1295 87 <%= call_hook(:view_issues_bulk_edit_details_bottom, { :issues => @issues }) %>
Chris@1295 88 </div>
Chris@1295 89
Chris@1295 90 <div class="splitcontentright">
Chris@1295 91 <% if @safe_attributes.include?('is_private') %>
Chris@1295 92 <p>
Chris@1295 93 <label for='issue_is_private'><%= l(:field_is_private) %></label>
Chris@1295 94 <%= select_tag('issue[is_private]', content_tag('option', l(:label_no_change_option), :value => '') +
Chris@1295 95 content_tag('option', l(:general_text_Yes), :value => '1') +
Chris@1295 96 content_tag('option', l(:general_text_No), :value => '0')) %>
Chris@1295 97 </p>
Chris@1295 98 <% end %>
Chris@1295 99
Chris@1295 100 <% if @safe_attributes.include?('parent_issue_id') && @project %>
Chris@1295 101 <p>
Chris@1295 102 <label for='issue_parent_issue_id'><%= l(:field_parent_issue) %></label>
Chris@1295 103 <%= text_field_tag 'issue[parent_issue_id]', '', :size => 10 %>
Chris@1295 104 </p>
Chris@1295 105 <%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @project)}')" %>
Chris@1295 106 <% end %>
Chris@1295 107
Chris@1295 108 <% if @safe_attributes.include?('start_date') %>
Chris@1295 109 <p>
Chris@1295 110 <label for='issue_start_date'><%= l(:field_start_date) %></label>
Chris@1295 111 <%= text_field_tag 'issue[start_date]', '', :size => 10 %><%= calendar_for('issue_start_date') %>
Chris@1295 112 </p>
Chris@1295 113 <% end %>
Chris@1295 114
Chris@1295 115 <% if @safe_attributes.include?('due_date') %>
Chris@1295 116 <p>
Chris@1295 117 <label for='issue_due_date'><%= l(:field_due_date) %></label>
Chris@1295 118 <%= text_field_tag 'issue[due_date]', '', :size => 10 %><%= calendar_for('issue_due_date') %>
Chris@1295 119 </p>
Chris@1295 120 <% end %>
Chris@1295 121
Chris@1295 122 <% if @safe_attributes.include?('done_ratio') && Issue.use_field_for_done_ratio? %>
Chris@1295 123 <p>
Chris@1295 124 <label for='issue_done_ratio'><%= l(:field_done_ratio) %></label>
Chris@1295 125 <%= select_tag 'issue[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %>
Chris@1295 126 </p>
Chris@1295 127 <% end %>
Chris@1295 128 </div>
Chris@1295 129
Chris@1295 130 </fieldset>
Chris@1295 131
Chris@1295 132 <fieldset><legend><%= l(:field_notes) %></legend>
Chris@1295 133 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
Chris@1295 134 <%= wikitoolbar_for 'notes' %>
Chris@1295 135 </fieldset>
Chris@1295 136 </div>
Chris@1295 137
Chris@1295 138 <p>
Chris@1295 139 <% if @copy %>
Chris@1295 140 <%= hidden_field_tag 'copy', '1' %>
Chris@1295 141 <%= submit_tag l(:button_copy) %>
Chris@1295 142 <%= submit_tag l(:button_copy_and_follow), :name => 'follow' %>
Chris@1295 143 <% elsif @target_project %>
Chris@1295 144 <%= submit_tag l(:button_move) %>
Chris@1295 145 <%= submit_tag l(:button_move_and_follow), :name => 'follow' %>
Chris@1295 146 <% else %>
Chris@1295 147 <%= submit_tag l(:button_submit) %>
Chris@1295 148 <% end %>
Chris@1295 149 </p>
Chris@1295 150
Chris@1295 151 <% end %>