Patch #1746 » add_project-custom-field_hide.patch
app/views/custom_fields/_form.rhtml (working copy) | ||
---|---|---|
104 | 104 | |
105 | 105 |
<% when "ProjectCustomField" %> |
106 | 106 |
<p><%= f.check_box :is_required %></p> |
107 |
<p><%= f.check_box :hide %></p> |
|
107 | 108 | |
108 | 109 |
<% when "TimeEntryCustomField" %> |
109 | 110 |
<p><%= f.check_box :is_required %></p> |
app/views/custom_fields/list.rhtml (working copy) | ||
---|---|---|
20 | 20 |
<th width="30%"><%=l(:field_name)%></th> |
21 | 21 |
<th><%=l(:field_field_format)%></th> |
22 | 22 |
<th><%=l(:field_is_required)%></th> |
23 |
<% if tab[:name] == 'ProjectCustomField' %> |
|
24 |
<th><%=l(:field_hide)%></th> |
|
25 |
<% end %> |
|
23 | 26 |
<% if tab[:name] == 'IssueCustomField' %> |
24 | 27 |
<th><%=l(:field_is_for_all)%></th> |
25 | 28 |
<th><%=l(:label_used_by)%></th> |
... | ... | |
33 | 36 |
<td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td> |
34 | 37 |
<td align="center"><%= l(CustomField::FIELD_FORMATS[custom_field.field_format][:name]) %></td> |
35 | 38 |
<td align="center"><%= image_tag 'true.png' if custom_field.is_required? %></td> |
39 |
<% if tab[:name] == 'ProjectCustomField' %> |
|
40 |
<td align="center"><%= image_tag 'true.png' if custom_field.hide? %></td> |
|
41 |
<% end %> |
|
36 | 42 |
<% if tab[:name] == 'IssueCustomField' %> |
37 | 43 |
<td align="center"><%= image_tag 'true.png' if custom_field.is_for_all? %></td> |
38 | 44 |
<td align="center"><%= custom_field.projects.count.to_s + ' ' + lwr(:label_project, custom_field.projects.count) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %></td> |
app/views/projects/show.rhtml (working copy) | ||
---|---|---|
11 | 11 |
<li><%=l(:field_parent)%>: <%= link_to h(@project.parent.name), :controller => 'projects', :action => 'show', :id => @project.parent %></li> |
12 | 12 |
<% end %> |
13 | 13 |
<% @project.custom_values.each do |custom_value| %> |
14 |
<% if !custom_value.value.empty? %> |
|
14 |
<% if !custom_value.value.empty? && !custom_value.custom_field.hide? %>
|
|
15 | 15 |
<li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li> |
16 | 16 |
<% end %> |
17 | 17 |
<% end %> |
db/migrate/096_add_custom_field_hide.rb (revision 0) | ||
---|---|---|
1 |
class AddCustomFieldHide < ActiveRecord::Migration |
|
2 |
def self.up |
|
3 |
add_column :custom_fields, :hide, :boolean, :null => false, :default => false |
|
4 |
end |
|
5 | ||
6 |
def self.down |
|
7 |
remove_column :custom_fields, :hide |
|
8 |
end |
|
9 |
end |
lang/en.yml (working copy) | ||
---|---|---|
183 | 183 |
field_default_value: Default value |
184 | 184 |
field_comments_sorting: Display comments |
185 | 185 |
field_parent_title: Parent page |
186 |
field_hide: Hide from Overview |
|
186 | 187 | |
187 | 188 |
setting_app_title: Application title |
188 | 189 |
setting_app_subtitle: Application subtitle |