Project

General

Profile

Patch #19296 » 4637.patch

Tested on trunk@14045 - Sebastian Paluch, 2015-03-06 15:43

View differences:

app/helpers/custom_fields_helper.rb (working copy)
77 77
      :class => "#{custom_value.custom_field.field_format}_cf"
78 78
  end
79 79

  
80
  # Return custom field name tag
81
  def custom_field_name_tag(custom_field)
82
    title = custom_field.description.presence
83
    content = content_tag 'span', custom_field.name, :title => title
84
  end
85
  
80 86
  # Return custom field label tag
81 87
  def custom_field_label_tag(name, custom_value, options={})
82 88
    required = options[:required] || custom_value.custom_field.is_required?
83
    title = custom_value.custom_field.description.presence
84
    content = content_tag 'span', custom_value.custom_field.name, :title => title
89
	content = custom_field_name_tag custom_value.custom_field
85 90

  
86 91
    content_tag "label", content +
87 92
      (required ? " <span class=\"required\">*</span>".html_safe : ""),
app/helpers/issues_helper.rb (working copy)
192 192
    ordered_values.compact.each do |value|
193 193
      css = "cf_#{value.custom_field.id}"
194 194
      s << "</tr>\n<tr>\n" if n > 0 && (n % 2) == 0
195
      s << "\t<th class=\"#{css}\">#{ h(value.custom_field.name) }:</th><td class=\"#{css}\">#{ h(show_value(value)) }</td>\n"
195
      s << "\t<th class=\"#{css}\">#{ custom_field_name_tag(value.custom_field) }:</th><td class=\"#{css}\">#{ h(show_value(value)) }</td>\n"
196 196
      n += 1
197 197
    end
198 198
    s << "</tr>\n"
app/views/projects/_form.html.erb (working copy)
60 60
  <%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (@project.all_issue_custom_fields.include? custom_field),
61 61
        :disabled => (custom_field.is_for_all? ? "disabled" : nil),
62 62
        :id => nil %>
63
  <%= custom_field.name %>
63
  <%= custom_field_name_tag(custom_field) %>
64 64
  </label>
65 65
<% end %>
66 66
<%= hidden_field_tag 'project[issue_custom_field_ids][]', '' %>
public/stylesheets/application.css (working copy)
252 252
table.attributes { width: 100% }
253 253
table.attributes th { vertical-align: top; text-align: left; }
254 254
table.attributes td { vertical-align: top; }
255
table.attributes span[title] {border-bottom:1px dotted #aaa;}
255 256

  
256 257
table.boards a.board, h3.comments { background: url(../images/comment.png) no-repeat 0% 50%; padding-left: 20px; }
257 258
table.boards td.last-message {text-align:left;font-size:80%;}
(1-1/2)