]> source.dussan.org Git - redmine.git/commitdiff
Include custom fields description in project settings and issue view (#19296).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 21 Mar 2015 10:24:18 +0000 (10:24 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 21 Mar 2015 10:24:18 +0000 (10:24 +0000)
Patch by Sebastian Paluch.

git-svn-id: http://svn.redmine.org/redmine/trunk@14154 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/custom_fields_helper.rb
app/helpers/issues_helper.rb
app/views/projects/_form.html.erb
public/stylesheets/application.css

index e0f3fa7d2d9cf6be54dcc1deb144c31c606fa316..988d6532f5555879f3976b1e73987bc65f4dd585 100644 (file)
@@ -77,11 +77,16 @@ module CustomFieldsHelper
       :class => "#{custom_value.custom_field.field_format}_cf"
   end
 
+  # Return custom field name tag
+  def custom_field_name_tag(custom_field)
+    title = custom_field.description.presence
+    content_tag 'span', custom_field.name, :title => title
+  end
+  
   # Return custom field label tag
   def custom_field_label_tag(name, custom_value, options={})
     required = options[:required] || custom_value.custom_field.is_required?
-    title = custom_value.custom_field.description.presence
-    content = content_tag 'span', custom_value.custom_field.name, :title => title
+    content = custom_field_name_tag custom_value.custom_field
 
     content_tag "label", content +
       (required ? " <span class=\"required\">*</span>".html_safe : ""),
index 8e951596cc105bddfb95fa63fdc5129ca82e22a1..da870b42955b90f528489eeb3eda8f1c8a8eca7c 100644 (file)
@@ -192,7 +192,7 @@ module IssuesHelper
     ordered_values.compact.each do |value|
       css = "cf_#{value.custom_field.id}"
       s << "</tr>\n<tr>\n" if n > 0 && (n % 2) == 0
-      s << "\t<th class=\"#{css}\">#{ h(value.custom_field.name) }:</th><td class=\"#{css}\">#{ h(show_value(value)) }</td>\n"
+      s << "\t<th class=\"#{css}\">#{ custom_field_name_tag(value.custom_field) }:</th><td class=\"#{css}\">#{ h(show_value(value)) }</td>\n"
       n += 1
     end
     s << "</tr>\n"
index e13604c36dcf49677d10bbd46cb5917dd0eb37b6..1d08acc4809ca7b6268c6bed741eb7146cb4cb68 100644 (file)
@@ -60,7 +60,7 @@
   <%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (@project.all_issue_custom_fields.include? custom_field),
         :disabled => (custom_field.is_for_all? ? "disabled" : nil),
         :id => nil %>
-  <%= custom_field.name %>
+  <%= custom_field_name_tag(custom_field) %>
   </label>
 <% end %>
 <%= hidden_field_tag 'project[issue_custom_field_ids][]', '' %>
index d8805ceaa2383c050b4a74fe0ea5802ac995c69d..df1be72efdf8d76d1319b07dd1675b1301682cf0 100644 (file)
@@ -327,7 +327,7 @@ legend {color: #484848;}
 hr { width: 100%; height: 1px; background: #ccc; border: 0;}
 blockquote { font-style: italic; border-left: 3px solid #e0e0e0; padding-left: 0.6em; margin-left: 2.4em;}
 blockquote blockquote { margin-left: 0;}
-abbr  { border-bottom: 1px dotted; cursor: help; }
+abbr, span[title] { border-bottom: 1px dotted #aaa; cursor: help; }
 textarea.wiki-edit {width:99%; resize:vertical;}
 li p {margin-top: 0;}
 div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;}
@@ -491,7 +491,6 @@ html>body .tabular p {overflow:hidden;}
 
 .tabular input, .tabular select {max-width:95%}
 .tabular textarea {width:95%; resize:vertical;}
-.tabular span[title] {border-bottom:1px dotted #aaa;}
 
 .tabular label{
   font-weight: bold;