Sha256: e6310dbdd3d498eaf0f7d98a081535863661af4194d40b52f9ef7dafb7cb5a7d

Contents?: true

Size: 619 Bytes

Versions: 4

Compression:

Stored size: 619 Bytes

Contents

<%

  # Read only fields.
  if @resource.typus_field_options_for(:read_only).include?(attribute.to_sym)
    custom = { :readonly => 'readonly' }
    label_text << " <small>#{Typus::I18n.t("Read only")}</small>"
  end

  # Auto generated fields.
  if @resource.typus_field_options_for(:auto_generated).include?(attribute.to_sym)
    custom = { :auto_generated => true }
    label_text << " <small>#{Typus::I18n.t("Auto generated")}</small>"
  end

  options.merge!(custom) if custom

%>

<li id="<%= attribute_id %>">
  <%= form.label attribute, label_text.html_safe %>
  <%= form.text_field attribute, options %>
</li>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
typus-3.1.0.rc18 app/views/admin/templates/_string.html.erb
typus-3.1.0.rc17 app/views/admin/templates/_string.html.erb
typus-3.1.0.rc16 app/views/admin/templates/_string.html.erb
typus-3.1.0.rc15 app/views/admin/templates/_string.html.erb