Redmine 4.1.1
This commit is contained in:
parent
33e7b881a5
commit
3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions
|
@ -1,5 +1,6 @@
|
|||
<%= error_messages_for 'custom_field' %>
|
||||
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<div class="box tabular">
|
||||
<p><%= f.select :field_format, custom_field_formats_for_select(@custom_field), {}, :disabled => !@custom_field.new_record? %></p>
|
||||
|
@ -19,115 +20,49 @@
|
|||
|
||||
<%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %>
|
||||
</div>
|
||||
<p><%= submit_tag l(:button_save) %></p>
|
||||
<p>
|
||||
<% if @custom_field.new_record? %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
|
||||
<% else %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="splitcontentright">
|
||||
<div class="box tabular">
|
||||
<% case @custom_field.class.name
|
||||
when "IssueCustomField" %>
|
||||
<p><%= f.check_box :is_required %></p>
|
||||
<% if @custom_field.format.is_filter_supported %>
|
||||
<p><%= f.check_box :is_filter %></p>
|
||||
<% end %>
|
||||
<% if @custom_field.format.searchable_supported %>
|
||||
<p><%= f.check_box :searchable %></p>
|
||||
<% end %>
|
||||
|
||||
<% when "UserCustomField" %>
|
||||
<p><%= f.check_box :is_required %></p>
|
||||
<p><%= f.check_box :visible %></p>
|
||||
<p><%= f.check_box :editable %></p>
|
||||
<% if @custom_field.format.is_filter_supported %>
|
||||
<p><%= f.check_box :is_filter %></p>
|
||||
<% end %>
|
||||
|
||||
<% when "ProjectCustomField" %>
|
||||
<p><%= f.check_box :is_required %></p>
|
||||
<p><%= f.check_box :visible %></p>
|
||||
<% if @custom_field.format.searchable_supported %>
|
||||
<p><%= f.check_box :searchable %></p>
|
||||
<% end %>
|
||||
<% if @custom_field.format.is_filter_supported %>
|
||||
<p><%= f.check_box :is_filter %></p>
|
||||
<% end %>
|
||||
|
||||
<% when "VersionCustomField" %>
|
||||
<p><%= f.check_box :is_required %></p>
|
||||
<% if @custom_field.format.is_filter_supported %>
|
||||
<p><%= f.check_box :is_filter %></p>
|
||||
<% end %>
|
||||
|
||||
<% when "GroupCustomField" %>
|
||||
<p><%= f.check_box :is_required %></p>
|
||||
<% if @custom_field.format.is_filter_supported %>
|
||||
<p><%= f.check_box :is_filter %></p>
|
||||
<% end %>
|
||||
|
||||
<% when "TimeEntryCustomField" %>
|
||||
<p><%= f.check_box :is_required %></p>
|
||||
<% if @custom_field.format.is_filter_supported %>
|
||||
<p><%= f.check_box :is_filter %></p>
|
||||
<% end %>
|
||||
|
||||
<% else %>
|
||||
<div class="box tabular">
|
||||
<p><%= f.check_box :is_required %></p>
|
||||
|
||||
<% end %>
|
||||
<%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
|
||||
</div>
|
||||
|
||||
<% if @custom_field.is_a?(IssueCustomField) %>
|
||||
|
||||
<fieldset class="box tabular"><legend><%= l(:field_visible) %></legend>
|
||||
<label class="block">
|
||||
<%= radio_button_tag 'custom_field[visible]', 1, @custom_field.visible?, :id => 'custom_field_visible_on',
|
||||
:data => {:disables => '.custom_field_role input'} %>
|
||||
<%= l(:label_visibility_public) %>
|
||||
</label>
|
||||
<label class="block">
|
||||
<%= radio_button_tag 'custom_field[visible]', 0, !@custom_field.visible?, :id => 'custom_field_visible_off',
|
||||
:data => {:enables => '.custom_field_role input'} %>
|
||||
<%= l(:label_visibility_roles) %>:
|
||||
</label>
|
||||
<% role_ids = @custom_field.role_ids %>
|
||||
<% Role.givable.sorted.each do |role| %>
|
||||
<label class="block custom_field_role" style="padding-left:2em;">
|
||||
<%= check_box_tag 'custom_field[role_ids][]', role.id, role_ids.include?(role.id), :id => nil %>
|
||||
<%= role.name %>
|
||||
</label>
|
||||
<% if %w(UserCustomField).include?(@custom_field.class.name) %>
|
||||
<p><%= f.check_box :visible %></p>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'custom_field[role_ids][]', '' %>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="box" id="custom_field_tracker_ids"><legend><%=l(:label_tracker_plural)%></legend>
|
||||
<% tracker_ids = @custom_field.tracker_ids %>
|
||||
<% Tracker.sorted.each do |tracker| %>
|
||||
<%= check_box_tag "custom_field[tracker_ids][]",
|
||||
tracker.id,
|
||||
tracker_ids.include?(tracker.id),
|
||||
:id => "custom_field_tracker_ids_#{tracker.id}" %>
|
||||
<label class="no-css" for="custom_field_tracker_ids_<%=tracker.id%>">
|
||||
<%= tracker.name %>
|
||||
</label>
|
||||
<% if @custom_field.is_a?(UserCustomField) %>
|
||||
<p><%= f.check_box :editable %></p>
|
||||
<% end %>
|
||||
|
||||
<% if %w(IssueCustomField UserCustomField ProjectCustomField VersionCustomField GroupCustomField TimeEntryCustomField).include?(@custom_field.class.name) &&
|
||||
@custom_field.format.is_filter_supported %>
|
||||
<p><%= f.check_box :is_filter %></p>
|
||||
<% end %>
|
||||
|
||||
<% if %w(IssueCustomField ProjectCustomField).include?(@custom_field.class.name) && @custom_field.format.searchable_supported %>
|
||||
<p><%= f.check_box :searchable %></p>
|
||||
<% end %>
|
||||
<%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
|
||||
</div>
|
||||
|
||||
<% if %w(IssueCustomField TimeEntryCustomField ProjectCustomField VersionCustomField).include?(@custom_field.class.name) %>
|
||||
<%= render :partial => 'visibility_by_role_selector', :locals => { :f => f } %>
|
||||
<% end %>
|
||||
<%= hidden_field_tag "custom_field[tracker_ids][]", '' %>
|
||||
<p><%= check_all_links 'custom_field_tracker_ids' %></p>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="box"><legend><%= l(:label_project_plural) %></legend>
|
||||
<p><%= f.check_box :is_for_all, :data => {:disables => '#custom_field_project_ids input'} %></p>
|
||||
<% if @custom_field.is_a?(IssueCustomField) %>
|
||||
<%= render :partial => 'visibility_by_tracker_selector', :locals => { :f => f } %>
|
||||
|
||||
<div id="custom_field_project_ids">
|
||||
<% project_ids = @custom_field.project_ids.to_a %>
|
||||
<%= render_project_nested_lists(Project.all) do |p|
|
||||
content_tag('label', check_box_tag('custom_field[project_ids][]', p.id, project_ids.include?(p.id), :id => nil) + ' ' + p)
|
||||
end %>
|
||||
<%= hidden_field_tag('custom_field[project_ids][]', '', :id => nil) %>
|
||||
<p><%= check_all_links 'custom_field_project_ids' %></p>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
<%= render :partial => 'visibility_by_project_selector', :locals => { :f => f } %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% include_calendar_headers_tags %>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<fieldset class="box"><legend><%= toggle_checkboxes_link("#custom_field_project_ids input[type=checkbox]:enabled") %><%= l(:label_project_plural) %></legend>
|
||||
<p><%= f.check_box :is_for_all, :data => {:disables => '#custom_field_project_ids input'} %></p>
|
||||
|
||||
<div id="custom_field_project_ids">
|
||||
<% project_ids = @custom_field.project_ids.to_a %>
|
||||
<%= render_project_nested_lists(Project.all) do |p|
|
||||
content_tag('label', check_box_tag('custom_field[project_ids][]', p.id, project_ids.include?(p.id), :id => nil) + ' ' + p)
|
||||
end %>
|
||||
<%= hidden_field_tag('custom_field[project_ids][]', '', :id => nil) %>
|
||||
</div>
|
||||
</fieldset>
|
|
@ -0,0 +1,20 @@
|
|||
<fieldset class="box tabular"><legend><%= l(:field_visible) %></legend>
|
||||
<label class="block">
|
||||
<%= radio_button_tag 'custom_field[visible]', 1, @custom_field.visible?, :id => 'custom_field_visible_on',
|
||||
:data => {:disables => '.custom_field_role input'} %>
|
||||
<%= l(:label_visibility_public) %>
|
||||
</label>
|
||||
<label class="block">
|
||||
<%= radio_button_tag 'custom_field[visible]', 0, !@custom_field.visible?, :id => 'custom_field_visible_off',
|
||||
:data => {:enables => '.custom_field_role input'} %>
|
||||
<%= l(:label_visibility_roles) %>:
|
||||
</label>
|
||||
<% role_ids = @custom_field.role_ids %>
|
||||
<% Role.givable.sorted.each do |role| %>
|
||||
<label class="block custom_field_role" style="padding-left:2em;">
|
||||
<%= check_box_tag 'custom_field[role_ids][]', role.id, role_ids.include?(role.id), :id => nil %>
|
||||
<%= role.name %>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'custom_field[role_ids][]', '' %>
|
||||
</fieldset>
|
|
@ -0,0 +1,13 @@
|
|||
<fieldset class="box" id="custom_field_tracker_ids"><legend><%= toggle_checkboxes_link("#custom_field_tracker_ids input[type=checkbox]") %><%=l(:label_tracker_plural)%></legend>
|
||||
<% tracker_ids = @custom_field.tracker_ids %>
|
||||
<% Tracker.sorted.each do |tracker| %>
|
||||
<%= check_box_tag "custom_field[tracker_ids][]",
|
||||
tracker.id,
|
||||
tracker_ids.include?(tracker.id),
|
||||
:id => "custom_field_tracker_ids_#{tracker.id}" %>
|
||||
<label class="no-css" for="custom_field_tracker_ids_<%=tracker.id%>">
|
||||
<%= tracker.name %>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= hidden_field_tag "custom_field[tracker_ids][]", '' %>
|
||||
</fieldset>
|
|
@ -1,5 +1,5 @@
|
|||
<div class="contextual">
|
||||
<%= link_to l(:label_custom_field_new), new_custom_field_path, :class => 'icon icon-add' %>
|
||||
<%= link_to_function l(:label_custom_field_new), "location.href = '#{new_custom_field_path}?tab=' + encodeURIComponent(($('.tabs a.selected').attr('id')||'').split('tab-').pop())", :class => 'icon icon-add' %>
|
||||
</div>
|
||||
|
||||
<%= title l(:label_custom_field_plural) %>
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
<%= custom_field_title @custom_field %>
|
||||
|
||||
<% selected = 0 %>
|
||||
<%= form_tag new_custom_field_path, :method => 'get' do %>
|
||||
<div class="box">
|
||||
<p><%= l(:label_custom_field_select_type) %>:</p>
|
||||
<p>
|
||||
<% custom_field_type_options.each do |name, type| %>
|
||||
<label style="display:block;"><%= radio_button_tag 'type', type, 1==selected+=1 %> <%= name %></label>
|
||||
<% end %>
|
||||
<%= select_type_radio_buttons(params[:tab]) %>
|
||||
</p>
|
||||
</div>
|
||||
<p><%= submit_tag l(:label_next).html_safe + " »".html_safe, :name => nil %></p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue