Index: app/views/custom_fields/_form.rhtml
===================================================================
--- app/views/custom_fields/_form.rhtml (revision 2641)
+++ app/views/custom_fields/_form.rhtml (working copy)
@@ -90,6 +90,7 @@
<% when "ProjectCustomField" %>
<%= f.check_box :is_required %>
+ <%= f.check_box :hide %>
<% when "TimeEntryCustomField" %>
<%= f.check_box :is_required %>
Index: app/views/custom_fields/index.rhtml
===================================================================
--- app/views/custom_fields/index.rhtml (revision 2641)
+++ app/views/custom_fields/index.rhtml (working copy)
@@ -20,6 +20,9 @@
<%=l(:field_name)%> |
<%=l(:field_field_format)%> |
<%=l(:field_is_required)%> |
+ <% if tab[:name] == 'ProjectCustomField' %>
+ <%=l(:field_hide)%> |
+ <% end %>
<% if tab[:name] == 'IssueCustomField' %>
<%=l(:field_is_for_all)%> |
<%=l(:label_used_by)%> |
@@ -33,6 +36,9 @@
<%= link_to custom_field.name, :action => 'edit', :id => custom_field %> |
<%= l(CustomField::FIELD_FORMATS[custom_field.field_format][:name]) %> |
<%= image_tag 'true.png' if custom_field.is_required? %> |
+ <% if tab[:name] == 'ProjectCustomField' %>
+ <%= image_tag 'true.png' if custom_field.hide? %> |
+ <% end %>
<% if tab[:name] == 'IssueCustomField' %>
<%= image_tag 'true.png' if custom_field.is_for_all? %> |
<%= l(:label_x_projects, :count => custom_field.projects.count) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %> |
Index: app/views/projects/show.rhtml
===================================================================
--- app/views/projects/show.rhtml (revision 2641)
+++ app/views/projects/show.rhtml (working copy)
@@ -9,7 +9,7 @@
<%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %>
<% end %>
<% @project.custom_values.each do |custom_value| %>
- <% if !custom_value.value.empty? %>
+ <% if !custom_value.value.empty? && !custom_value.custom_field.hide? %>
<%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %>
<% end %>
<% end %>
Index: config/locales/en.yml
===================================================================
--- config/locales/en.yml (revision 2641)
+++ config/locales/en.yml (working copy)
@@ -242,6 +242,7 @@
field_watcher: Watcher
field_identity_url: OpenID URL
field_content: Content
+ field_hide: Hide from overview
setting_app_title: Application title
setting_app_subtitle: Application subtitle
Index: db/migrate/20090329181700_add_custom_field_hide.rb
===================================================================
--- db/migrate/20090329181700_add_custom_field_hide.rb (revision 0)
+++ db/migrate/20090329181700_add_custom_field_hide.rb (revision 0)
@@ -0,0 +1,9 @@
+class AddCustomFieldHide < ActiveRecord::Migration
+ def self.up
+ add_column :custom_fields, :hide, :boolean, :null => false, :default => false
+ end
+
+ def self.down
+ remove_column :custom_fields, :hide
+ end
+end