Sha256: 439cbc9e6168ab5a884edf76c2f15249da57e2ce26aa85795ec7d0e98492ce52

Contents?: true

Size: 611 Bytes

Versions: 5

Compression:

Stored size: 611 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 %>">
  <%= form.label attribute, raw(label_text) %>
  <%= form.text_field attribute, options %>
</li>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
typus-3.0.8 app/views/admin/templates/_string.html.erb
typus-3.0.7 app/views/admin/templates/_string.html.erb
typus-3.0.6 app/views/admin/templates/_string.html.erb
typus-3.0.5 app/views/admin/templates/_string.html.erb
typus-3.0.4 app/views/admin/templates/_string.html.erb