Sha256: a77814f20b4d47375873ae6daa2e92dcbc7c6791431f7cc3d2e2ae6faa3d0324

Contents?: true

Size: 906 Bytes

Versions: 12

Compression:

Stored size: 906 Bytes

Contents

- read_only = !%w[new create edit update].include?(action_name)
= simple_form_for(@resource) do |f|
  .card.card-primary
    .card-header
      %h3.card-title= @resource.to_s.blank? ? @resource.model_name.human : @resource
      .card-tools
        = resource_form_actions(@context.route_builder, @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

12 entries across 12 versions & 1 rubygems

Version Path
five-two-nw-olivander-0.2.0.0 app/views/application/_form.html.haml
five-two-nw-olivander-0.1.2.60 app/views/application/_form.html.haml
five-two-nw-olivander-0.1.2.59 app/views/application/_form.html.haml
five-two-nw-olivander-0.1.2.58 app/views/application/_form.html.haml
five-two-nw-olivander-0.1.2.57 app/views/application/_form.html.haml
five-two-nw-olivander-0.1.2.56 app/views/application/_form.html.haml
five-two-nw-olivander-0.1.2.55 app/views/application/_form.html.haml
five-two-nw-olivander-0.1.2.54 app/views/application/_form.html.haml
five-two-nw-olivander-0.1.2.53 app/views/application/_form.html.haml
five-two-nw-olivander-0.1.2.52 app/views/application/_form.html.haml
five-two-nw-olivander-0.1.2.51 app/views/application/_form.html.haml
five-two-nw-olivander-0.1.2.50 app/views/application/_form.html.haml