Sha256: 6d055f7b65c5453cd09d9213ecd8bddf840d80b044fa7528eb02f145a46f2542

Contents?: true

Size: 910 Bytes

Versions: 29

Compression:

Stored size: 910 Bytes

Contents

- read_only = !%w[new create edit update].include?(action_name)
= simple_form_for(@resource, builder: CustomFormBuilder) do |f|
  .card.card-primary
    .card-header
      %h3.card-title= @resource.to_s.blank? ? @resource.model_name.human : @resource
      .card-tools
        = resource_form_actions(@resource, for_action: action_name.to_sym)
    .card-body
      =f.error_notification
      =f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present?
      = render_optional_partial 'form_inside_before', locals: {f: f}
      = render Olivander::Components::ResourceFormComponent.new(@resource, f)
      = render_optional_partial 'form_inside_after', locals: {f: f}
    .card-footer.text-right
      = link_to 'Cancel', @_effective_resource.action_path(:index), class: 'btn btn-secondary'
      - unless read_only
        = f.button :submit, class: 'btn btn-primary'

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
five-two-nw-olivander-0.2.0.32 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.31 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.30 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.29 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.28 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.27 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.26 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.25 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.24 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.23 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.22 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.19 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.18 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.17 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.16 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.15 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.14 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.13 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.12 app/views/application/_form.html.haml
five-two-nw-olivander-0.2.0.11 app/views/application/_form.html.haml