Sha256: 9cf8397af616a88d0ce69d31358154a5e8b0c6be35b4d74132efcae98dfe02f2

Contents?: true

Size: 557 Bytes

Versions: 8

Compression:

Stored size: 557 Bytes

Contents

<%

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

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

  options.merge!(custom) if custom

%>

<li>
  <%= form.label attribute, raw(label_text) %>
  <%= form.text_field attribute, options %>
</li>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
typus-3.0.2 app/views/admin/templates/_string.html.erb
typus-3.0.1 app/views/admin/templates/_string.html.erb
typus-3.0.0 app/views/admin/templates/_string.html.erb
typus-1.0.0.pre13 app/views/admin/templates/_string.html.erb
typus-1.0.0.pre12 app/views/admin/templates/_string.html.erb
typus-1.0.0.pre11 app/views/admin/templates/_string.html.erb
typus-1.0.0.pre10 app/views/admin/templates/_string.html.erb
typus-1.0.0.pre9 app/views/admin/templates/_string.html.erb