app/helpers/alchemy/admin/contents_helper.rb in alchemy_cms-3.4.2 vs app/helpers/alchemy/admin/contents_helper.rb in alchemy_cms-3.5.0.rc1
- old
+ new
@@ -11,17 +11,24 @@
#
def render_content_name(content)
if content.blank?
warning('Content is nil')
return
- else
- content_name = content.name_for_label
end
+
+ content_name = content.name_for_label
+
if content.definition.blank?
warning("Content #{content.name} is missing its definition")
- title = Alchemy.t(:content_definition_missing)
- content_name = %(<span class="warning icon" title="#{title}"></span> #{content_name}).html_safe
+
+ icon = hint_with_tooltip(
+ Alchemy.t(:content_definition_missing),
+ class: 'inline warning icon'
+ )
+
+ content_name = "#{icon} #{content_name}".html_safe
end
+
if content.has_validations?
"#{content_name}<span class='validation_indicator'>*</span>".html_safe
else
content_name
end