annotate .svn/pristine/b2/b276250e954ac8b398b0737a04404d7c1ed1df94.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 <%= error_messages_for 'custom_field' %>
Chris@1295 2
Chris@1295 3 <div class="box tabular">
Chris@1295 4 <p><%= f.text_field :name, :required => true %></p>
Chris@1295 5 <p><%= f.select :field_format, custom_field_formats_for_select(@custom_field), {}, :disabled => !@custom_field.new_record? %></p>
Chris@1295 6
Chris@1295 7 <% if @custom_field.format_in? 'list', 'user', 'version' %>
Chris@1295 8 <p><%= f.check_box :multiple, :disabled => @custom_field.multiple && !@custom_field.new_record? %></p>
Chris@1295 9 <% end %>
Chris@1295 10
Chris@1295 11 <% unless @custom_field.format_in? 'list', 'bool', 'date', 'user', 'version' %>
Chris@1295 12 <p><label for="custom_field_min_length"><%=l(:label_min_max_length)%></label>
Chris@1295 13 <%= f.text_field :min_length, :size => 5, :no_label => true %> -
Chris@1295 14 <%= f.text_field :max_length, :size => 5, :no_label => true %><br />(<%=l(:text_min_max_length_info)%>)</p>
Chris@1295 15 <p><%= f.text_field :regexp, :size => 50 %><br />(<%=l(:text_regexp_info)%>)</p>
Chris@1295 16 <% end %>
Chris@1295 17
Chris@1295 18 <% if @custom_field.format_in? 'list' %>
Chris@1295 19 <p>
Chris@1295 20 <%= f.text_area :possible_values, :value => @custom_field.possible_values.to_a.join("\n"), :rows => 15 %>
Chris@1295 21 <em class="info"><%= l(:text_custom_field_possible_values_info) %></em>
Chris@1295 22 </p>
Chris@1295 23 <% end %>
Chris@1295 24
Chris@1295 25 <% unless @custom_field.format_in? 'user', 'version' %>
Chris@1295 26 <p><%= @custom_field.field_format == 'bool' ? f.check_box(:default_value) : f.text_field(:default_value) %></p>
Chris@1295 27 <% end %>
Chris@1295 28
Chris@1295 29 <%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %>
Chris@1295 30 </div>
Chris@1295 31
Chris@1295 32 <div class="box tabular">
Chris@1295 33 <% case @custom_field.class.name
Chris@1295 34 when "IssueCustomField" %>
Chris@1295 35
Chris@1295 36 <fieldset><legend><%=l(:label_tracker_plural)%></legend>
Chris@1295 37 <% Tracker.sorted.all.each do |tracker| %>
Chris@1295 38 <%= check_box_tag "custom_field[tracker_ids][]",
Chris@1295 39 tracker.id,
Chris@1295 40 (@custom_field.trackers.include? tracker),
Chris@1295 41 :id => "custom_field_tracker_ids_#{tracker.id}" %>
Chris@1295 42 <label class="no-css" for="custom_field_tracker_ids_<%=tracker.id%>">
Chris@1295 43 <%= h(tracker.name) %>
Chris@1295 44 </label>
Chris@1295 45 <% end %>
Chris@1295 46 <%= hidden_field_tag "custom_field[tracker_ids][]", '' %>
Chris@1295 47 </fieldset>
Chris@1295 48 &nbsp;
Chris@1295 49 <p><%= f.check_box :is_required %></p>
Chris@1295 50 <p><%= f.check_box :is_for_all %></p>
Chris@1295 51 <p><%= f.check_box :is_filter %></p>
Chris@1295 52 <p><%= f.check_box :searchable %></p>
Chris@1295 53
Chris@1295 54 <% when "UserCustomField" %>
Chris@1295 55 <p><%= f.check_box :is_required %></p>
Chris@1295 56 <p><%= f.check_box :visible %></p>
Chris@1295 57 <p><%= f.check_box :editable %></p>
Chris@1295 58 <p><%= f.check_box :is_filter %></p>
Chris@1295 59
Chris@1295 60 <% when "ProjectCustomField" %>
Chris@1295 61 <p><%= f.check_box :is_required %></p>
Chris@1295 62 <p><%= f.check_box :visible %></p>
Chris@1295 63 <p><%= f.check_box :searchable %></p>
Chris@1295 64 <p><%= f.check_box :is_filter %></p>
Chris@1295 65
Chris@1295 66 <% when "VersionCustomField" %>
Chris@1295 67 <p><%= f.check_box :is_required %></p>
Chris@1295 68 <p><%= f.check_box :is_filter %></p>
Chris@1295 69
Chris@1295 70 <% when "GroupCustomField" %>
Chris@1295 71 <p><%= f.check_box :is_required %></p>
Chris@1295 72 <p><%= f.check_box :is_filter %></p>
Chris@1295 73
Chris@1295 74 <% when "TimeEntryCustomField" %>
Chris@1295 75 <p><%= f.check_box :is_required %></p>
Chris@1295 76
Chris@1295 77 <% else %>
Chris@1295 78 <p><%= f.check_box :is_required %></p>
Chris@1295 79
Chris@1295 80 <% end %>
Chris@1295 81 <%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
Chris@1295 82 </div>