diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-11-07 14:15:01 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-11-07 14:15:01 +0000 |
commit | 475530e59f65f3e8d24623383512e092b2d02521 (patch) | |
tree | 76e9b403b548ee62b3f5b05fcf9a0c7554add13d /app/views | |
parent | 3b01ea9fa42cec01a17664a64de6f8157d363bec (diff) | |
download | redmine-475530e59f65f3e8d24623383512e092b2d02521.tar.gz redmine-475530e59f65f3e8d24623383512e092b2d02521.zip |
Adds a "visible" option on User and Project custom fields (#1738).
If set to false, the custom field won't be display on user profile/project overview.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4382 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/custom_fields/_form.rhtml | 2 | ||||
-rw-r--r-- | app/views/projects/index.xml.builder | 2 | ||||
-rw-r--r-- | app/views/projects/show.rhtml | 2 | ||||
-rw-r--r-- | app/views/projects/show.xml.builder | 2 | ||||
-rw-r--r-- | app/views/users/show.rhtml | 2 |
5 files changed, 6 insertions, 4 deletions
diff --git a/app/views/custom_fields/_form.rhtml b/app/views/custom_fields/_form.rhtml index 9871567f7..a71df87aa 100644 --- a/app/views/custom_fields/_form.rhtml +++ b/app/views/custom_fields/_form.rhtml @@ -86,10 +86,12 @@ when "IssueCustomField" %> <% when "UserCustomField" %> <p><%= f.check_box :is_required %></p> + <p><%= f.check_box :visible %></p> <p><%= f.check_box :editable %></p> <% when "ProjectCustomField" %> <p><%= f.check_box :is_required %></p> + <p><%= f.check_box :visible %></p> <p><%= f.check_box :searchable %></p> <% when "TimeEntryCustomField" %> diff --git a/app/views/projects/index.xml.builder b/app/views/projects/index.xml.builder index d5200f620..6ea2a3aa7 100644 --- a/app/views/projects/index.xml.builder +++ b/app/views/projects/index.xml.builder @@ -8,7 +8,7 @@ xml.projects :type => 'array' do xml.description project.description xml.parent(:id => project.parent_id, :name => project.parent.name) unless project.parent.nil? xml.custom_fields do - project.custom_field_values.each do |custom_value| + project.visible_custom_field_values.each do |custom_value| xml.custom_field custom_value.value, :id => custom_value.custom_field_id, :name => custom_value.custom_field.name end end unless project.custom_field_values.empty? diff --git a/app/views/projects/show.rhtml b/app/views/projects/show.rhtml index 9651651ac..414358aca 100644 --- a/app/views/projects/show.rhtml +++ b/app/views/projects/show.rhtml @@ -16,7 +16,7 @@ <li><%=l(:label_subproject_plural)%>: <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %></li> <% end %> - <% @project.custom_values.each do |custom_value| %> + <% @project.visible_custom_field_values.each do |custom_value| %> <% if !custom_value.value.blank? %> <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li> <% end %> diff --git a/app/views/projects/show.xml.builder b/app/views/projects/show.xml.builder index f49d7ee10..d99db8b56 100644 --- a/app/views/projects/show.xml.builder +++ b/app/views/projects/show.xml.builder @@ -7,7 +7,7 @@ xml.project do xml.homepage @project.homepage xml.custom_fields do - @project.custom_field_values.each do |custom_value| + @project.visible_custom_field_values.each do |custom_value| xml.custom_field custom_value.value, :id => custom_value.custom_field_id, :name => custom_value.custom_field.name end end unless @project.custom_field_values.empty? diff --git a/app/views/users/show.rhtml b/app/views/users/show.rhtml index afab71110..c100e6ebd 100644 --- a/app/views/users/show.rhtml +++ b/app/views/users/show.rhtml @@ -9,7 +9,7 @@ <% unless @user.pref.hide_mail %> <li><%=l(:field_mail)%>: <%= mail_to(h(@user.mail), nil, :encode => 'javascript') %></li> <% end %> - <% for custom_value in @custom_values %> + <% @user.visible_custom_field_values.each do |custom_value| %> <% if !custom_value.value.blank? %> <li><%=h custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li> <% end %> |