Sha256: 64b9645b593b93b491c460fa6feffa41aa074fa9529f257b68f5d5e9c4261b71

Contents?: true

Size: 569 Bytes

Versions: 4

Compression:

Stored size: 569 Bytes

Contents

<%
  values = if @resource.const_defined?(attribute.upcase)
             @resource::const_get(attribute.upcase)
           else
             @resource.send(attribute)
           end

  if @resource.typus_field_options_for(:read_only).include?(attribute.to_sym)
    html_options = { :disabled => 'disabled' }
    message = Typus::I18n.t("Read only")
  end
%>

<li id="<%= attribute %>">
  <%= form.label attribute, "#{label_text} <small>#{message}</small>".html_safe %>
  <%= form.select attribute, values, options.merge!(:include_blank => false), html_options %>
</li>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
typus-3.1.0.rc4 app/views/admin/templates/_selector.html.erb
typus-3.1.0.rc3 app/views/admin/templates/_selector.html.erb
typus-3.1.0.rc2 app/views/admin/templates/_selector.html.erb
typus-3.1.0.rc1 app/views/admin/templates/_selector.html.erb