summaryrefslogtreecommitdiffstats
path: root/app/views/imports/_fields_mapping.html.erb
blob: f593501161475b786ac63a4c8d2951c7829d1e99 (plain)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<p>
  <label for="import_mapping_project_id"><%= l(:label_project) %></label>
  <%= select_tag 'import_settings[mapping][project_id]',
        options_for_select(project_tree_options_for_select(@import.allowed_target_projects, :selected => @import.project)),
        :id => 'import_mapping_project_id' %>
</p>
<p>
  <label for="import_mapping_tracker"><%= l(:label_tracker) %></label>
  <%= mapping_select_tag @import, 'tracker', :required => true,
        :values => @import.allowed_target_trackers.sorted.map {|t| [t.name, t.id]} %>
</p>
<p>
  <label for="import_mapping_status"><%= l(:field_status) %></label>
  <%= mapping_select_tag @import, 'status' %>
</p>

<div class="splitcontent">
<div class="splitcontentleft">
<p>
  <label for="import_mapping_subject"><%= l(:field_subject) %></label>
  <%= mapping_select_tag @import, 'subject', :required => true %>
</p>
<p>
  <label for="import_mapping_description"><%= l(:field_description) %></label>
  <%= mapping_select_tag @import, 'description' %>
</p>
<p>
  <label for="import_mapping_priority"><%= l(:field_priority) %></label>
  <%= mapping_select_tag @import, 'priority' %>
</p>
<p>
  <label for="import_mapping_category"><%= l(:field_category) %></label>
  <%= mapping_select_tag @import, 'category' %>
  <% if User.current.allowed_to?(:manage_categories, @import.project) %>
    <label class="block">
      <%= check_box_tag 'import_settings[mapping][create_categories]', '1', @import.create_categories? %>
      <%= l(:label_create_missing_values) %>
    </label>
  <% end %>
</p>
<p>
  <label for="import_mapping_assigned_to"><%= l(:field_assigned_to) %></label>
  <%= mapping_select_tag @import, 'assigned_to' %>
</p>
<p>
  <label for="import_mapping_fixed_version"><%= l(:field_fixed_version) %></label>
  <%= mapping_select_tag @import, 'fixed_version' %>
  <% if User.current.allowed_to?(:manage_versions, @import.project) %>
    <label class="block">
      <%= check_box_tag 'import_settings[mapping][create_versions]', '1', @import.create_versions? %>
      <%= l(:label_create_missing_values) %>
    </label>
  <% end %>
</p>
<% @custom_fields.each do |field| %>
  <p>
    <label for="import_mapping_cf_<% field.id %>"><%= field.name %></label>
    <%= mapping_select_tag @import, "cf_#{field.id}" %>
  </p>
<% end %>
</div>

<div class="splitcontentright">
<p>
  <label for="import_mapping_is_private"><%= l(:field_is_private) %></label>
  <%= mapping_select_tag @import, 'is_private' %>
</p>
<p>
  <label for="import_mapping_parent_issue_id"><%= l(:field_parent_issue) %></label>
  <%= mapping_select_tag @import, 'parent_issue_id' %>
</p>
<p>
  <label for="import_mapping_start_date"><%= l(:field_start_date) %></label>
  <%= mapping_select_tag @import, 'start_date' %>
</p>
<p>
  <label for="import_mapping_due_date"><%= l(:field_due_date) %></label>
  <%= mapping_select_tag @import, 'due_date' %>
</p>
<p>
  <label for="import_mapping_estimated_hours"><%= l(:field_estimated_hours) %></label>
  <%= mapping_select_tag @import, 'estimated_hours' %>
</p>
<p>
  <label for="import_mapping_done_ratio"><%= l(:field_done_ratio) %></label>
  <%= mapping_select_tag @import, 'done_ratio' %>
</p>
</div>
</div>