lib/alchemy/resources_helper.rb in alchemy_cms-3.1.0.beta1 vs lib/alchemy/resources_helper.rb in alchemy_cms-3.1.0.beta2
- old
+ new
@@ -93,19 +93,21 @@
options.merge as: 'string',
input_html: {
type: 'date',
value: l(resource_instance_variable.send(attribute[:name]) || Time.now, format: :datepicker)
}
+ when 'time'
+ options.merge(as: 'time')
when 'text'
options.merge(as: 'text', input_html: {rows: 4})
else
options.merge(as: 'string')
end
end
# Renders the human model name with a count as h1 header
def resources_header
- content_tag :h1, "#{resources_instance_variable.total_count} #{resource_model.model_name.human(:count => resources_instance_variable.total_count)}"
+ content_tag :h1, "#{resources_instance_variable.total_count} #{resource_model.model_name.human(count: resources_instance_variable.total_count)}", class: 'resources-header'
end
# Returns true if the resource contains any relations
def contains_relations?
resource_handler.resource_relations.present?