Project

General

Profile

Patch #1746 » add_project-custom-field_hide-r2641.patch

Patch based on trunk @ r2641 - Mischa The Evil, 2009-03-29 21:48

View differences:

app/views/custom_fields/_form.rhtml (working copy)
<% when "ProjectCustomField" %>
<p><%= f.check_box :is_required %></p>
<p><%= f.check_box :hide %></p>
<% when "TimeEntryCustomField" %>
<p><%= f.check_box :is_required %></p>
app/views/custom_fields/index.rhtml (working copy)
<th width="30%"><%=l(:field_name)%></th>
<th><%=l(:field_field_format)%></th>
<th><%=l(:field_is_required)%></th>
<% if tab[:name] == 'ProjectCustomField' %>
<th><%=l(:field_hide)%></th>
<% end %>
<% if tab[:name] == 'IssueCustomField' %>
<th><%=l(:field_is_for_all)%></th>
<th><%=l(:label_used_by)%></th>
......
<td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td>
<td align="center"><%= l(CustomField::FIELD_FORMATS[custom_field.field_format][:name]) %></td>
<td align="center"><%= image_tag 'true.png' if custom_field.is_required? %></td>
<% if tab[:name] == 'ProjectCustomField' %>
<td align="center"><%= image_tag 'true.png' if custom_field.hide? %></td>
<% end %>
<% if tab[:name] == 'IssueCustomField' %>
<td align="center"><%= image_tag 'true.png' if custom_field.is_for_all? %></td>
<td align="center"><%= l(:label_x_projects, :count => custom_field.projects.count) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %></td>
app/views/projects/show.rhtml (working copy)
<%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %></li>
<% end %>
<% @project.custom_values.each do |custom_value| %>
<% if !custom_value.value.empty? %>
<% if !custom_value.value.empty? && !custom_value.custom_field.hide? %>
<li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
<% end %>
<% end %>
config/locales/en.yml (working copy)
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
db/migrate/20090329181700_add_custom_field_hide.rb (revision 0)
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
(2-2/2)