app/helpers/alchemy/admin/contents_helper.rb in alchemy_cms-5.1.10 vs app/helpers/alchemy/admin/contents_helper.rb in alchemy_cms-5.2.0.b1
- old
+ new
@@ -17,17 +17,12 @@
return
end
content_name = content.name_for_label
- if content.definition.blank?
- warning("Content #{content.name} is missing its definition")
-
- icon = hint_with_tooltip(
- Alchemy.t(:content_definition_missing),
- )
-
+ if content.has_warnings?
+ icon = hint_with_tooltip(content.warnings)
content_name = "#{icon} #{content_name}".html_safe
end
if content.has_validations?
"#{content_name}<span class='validation_indicator'>*</span>".html_safe
@@ -37,10 +32,10 @@
end
# Renders the label and a remove link for a content.
def content_label(content)
content_tag :label, for: content.form_field_id do
- [render_hint_for(content), render_content_name(content)].compact.join(" ").html_safe
+ [render_content_name(content), render_hint_for(content)].compact.join(" ").html_safe
end
end
end
end
end