<% i = 0 %>
-<% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %>
+<% split_on = (@issue.editable_custom_field_values.size / 2.0).ceil - 1 %>
<% @issue.editable_custom_field_values.each do |value| %>
<%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %>
<% if i == split_on -%>
Index: app/views/issues/_history.html.erb
===================================================================
--- app/views/issues/_history.html.erb (revision 10764)
+++ app/views/issues/_history.html.erb (working copy)
@@ -1,11 +1,12 @@
<% reply_links = authorize_for('issues', 'edit') -%>
<% for journal in journals %>
+ <% if details_to_strings(journal.details).any? || journal.notes.blank? == false %>
<%= link_to "##{journal.indice}", {:anchor => "note-#{journal.indice}"}, :class => "journal-link" %>
<%= avatar(journal.user, :size => "24") %>
<%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %>
-
+
<% if journal.details.any? %>
<% details_to_strings(journal.details).each do |string| %>
@@ -17,6 +18,7 @@
<%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %>
+ <% end %>
<% end %>
<% heads_for_wiki_formatter if User.current.allowed_to?(:edit_issue_notes, issue.project) || User.current.allowed_to?(:edit_own_issue_notes, issue.project) %>
Index: app/views/issues/show.html.erb
===================================================================
--- app/views/issues/show.html.erb (revision 10764)
+++ app/views/issues/show.html.erb (working copy)
@@ -33,29 +33,33 @@
<%= issue_fields_rows do |rows|
+ unless @issue.hidden_attribute?('status')
rows.left l(:field_status), h(@issue.status.name), :class => 'status'
+ end
+ unless @issue.hidden_attribute?('priority')
rows.left l(:field_priority), h(@issue.priority.name), :class => 'priority'
+ end
- unless @issue.disabled_core_fields.include?('assigned_to_id')
+ unless @issue.disabled_core_fields.include?('assigned_to_id') || @issue.hidden_attribute?('assigned_to_id')
rows.left l(:field_assigned_to), avatar(@issue.assigned_to, :size => "14").to_s.html_safe + (@issue.assigned_to ? link_to_user(@issue.assigned_to) : "-"), :class => 'assigned-to'
end
- unless @issue.disabled_core_fields.include?('category_id')
+ unless @issue.disabled_core_fields.include?('category_id') || @issue.hidden_attribute?('category_id')
rows.left l(:field_category), h(@issue.category ? @issue.category.name : "-"), :class => 'category'
end
- unless @issue.disabled_core_fields.include?('fixed_version_id')
+ unless @issue.disabled_core_fields.include?('fixed_version_id') || @issue.hidden_attribute?('fixed_version_id')
rows.left l(:field_fixed_version), (@issue.fixed_version ? link_to_version(@issue.fixed_version) : "-"), :class => 'fixed-version'
end
- unless @issue.disabled_core_fields.include?('start_date')
+ unless @issue.disabled_core_fields.include?('start_date') || @issue.hidden_attribute?('start_date')
rows.right l(:field_start_date), format_date(@issue.start_date), :class => 'start-date'
end
- unless @issue.disabled_core_fields.include?('due_date')
+ unless @issue.disabled_core_fields.include?('due_date') || @issue.hidden_attribute?('due_date')
rows.right l(:field_due_date), format_date(@issue.due_date), :class => 'due-date'
end
- unless @issue.disabled_core_fields.include?('done_ratio')
+ unless @issue.disabled_core_fields.include?('done_ratio') || @issue.hidden_attribute?('done_ratio')
rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%"), :class => 'progress'
end
- unless @issue.disabled_core_fields.include?('estimated_hours')
+ unless @issue.disabled_core_fields.include?('estimated_hours') || @issue.hidden_attribute?('estimated_hours')
unless @issue.estimated_hours.nil?
rows.right l(:field_estimated_hours), l_hours(@issue.estimated_hours), :class => 'estimated-hours'
end
Index: config/locales/en.yml
===================================================================
--- config/locales/en.yml (revision 10764)
+++ config/locales/en.yml (working copy)
@@ -879,6 +879,7 @@
label_fields_permissions: Fields permissions
label_readonly: Read-only
label_required: Required
+ label_hidden: " Hidden "
label_attribute_of_project: "Project's %{name}"
label_attribute_of_author: "Author's %{name}"
label_attribute_of_assigned_to: "Assignee's %{name}"
Index: lib/redmine/export/pdf.rb
===================================================================
--- lib/redmine/export/pdf.rb (revision 10764)
+++ lib/redmine/export/pdf.rb (working copy)
@@ -520,17 +520,17 @@
pdf.Ln
left = []
- left << [l(:field_status), issue.status]
- left << [l(:field_priority), issue.priority]
- left << [l(:field_assigned_to), issue.assigned_to] unless issue.disabled_core_fields.include?('assigned_to_id')
- left << [l(:field_category), issue.category] unless issue.disabled_core_fields.include?('category_id')
- left << [l(:field_fixed_version), issue.fixed_version] unless issue.disabled_core_fields.include?('fixed_version_id')
+ left << [l(:field_status), issue.status] unless issue.hidden_attribute?('status')
+ left << [l(:field_priority), issue.priority] unless issue.hidden_attribute?('priority')
+ left << [l(:field_assigned_to), issue.assigned_to] unless issue.disabled_core_fields.include?('assigned_to_id') or issue.hidden_attribute?('assigned_to_id')
+ left << [l(:field_category), issue.category] unless issue.disabled_core_fields.include?('category_id') or issue.hidden_attribute?('category_id')
+ left << [l(:field_fixed_version), issue.fixed_version] unless issue.disabled_core_fields.include?('fixed_version_id') or issue.hidden_attribute?('fixed_version_id')
right = []
- right << [l(:field_start_date), format_date(issue.start_date)] unless issue.disabled_core_fields.include?('start_date')
- right << [l(:field_due_date), format_date(issue.due_date)] unless issue.disabled_core_fields.include?('due_date')
- right << [l(:field_done_ratio), "#{issue.done_ratio}%"] unless issue.disabled_core_fields.include?('done_ratio')
- right << [l(:field_estimated_hours), l_hours(issue.estimated_hours)] unless issue.disabled_core_fields.include?('estimated_hours')
+ right << [l(:field_start_date), format_date(issue.start_date)] unless issue.disabled_core_fields.include?('start_date') or issue.hidden_attribute?('start_date')
+ right << [l(:field_due_date), format_date(issue.due_date)] unless issue.disabled_core_fields.include?('due_date') or issue.hidden_attribute?('due_date')
+ right << [l(:field_done_ratio), "#{issue.done_ratio}%"] unless issue.disabled_core_fields.include?('done_ratio') or issue.hidden_attribute?('done_ratio')
+ right << [l(:field_estimated_hours), l_hours(issue.estimated_hours)] unless issue.disabled_core_fields.include?('estimated_hours') or issue.hidden_attribute?('estimated_hours')
right << [l(:label_spent_time), l_hours(issue.total_spent_hours)] if User.current.allowed_to?(:view_time_entries, issue.project)
rows = left.size > right.size ? left.size : right.size
@@ -541,9 +541,9 @@
right << nil
end
- half = (issue.custom_field_values.size / 2.0).ceil
- issue.custom_field_values.each_with_index do |custom_value, i|
- (i < half ? left : right) << [custom_value.custom_field.name, show_value(custom_value)]
+ half = (issue.viewable_custom_field_values.size / 2.0).ceil
+ issue.viewable_custom_field_values.each_with_index do |custom_value, i|
+ (i < half ? left : right) << [custom_value.custom_field.name, show_value(custom_value)] unless issue.hidden_attribute?(custom_value.custom_field.name)
end
rows = left.size > right.size ? left.size : right.size