Sha256: 882c07c9b94f4a62bacebeb0b265b5d6206995d5cb0122425a787f8b879a6442

Contents?: true

Size: 1.31 KB

Versions: 5

Compression:

Stored size: 1.31 KB

Contents

- return_to = params[:return_to].presence || request.referer || collection_path
- return_to = "#{return_to}##{dom_id(resource, 'list')}" if resource.persisted?
input type='hidden' name='return_to' value=return_to
.form-actions
  button.btn.btn-primary type="submit" name="_save" data-disable-with=t('admin.form.save')
    = icon('ok', true)
    = t('admin.form.save')
  span.extra_buttons
    - unless resource.new_record?
      span.next_prev_buttons
        button.btn.btn-info type="submit" name="_add_edit_prev" data-disable-with=t('admin.form.save_and_edit_prev')
          = icon('chevron-left', true)
          = t('admin.form.save_and_edit_prev')
        button.btn.btn-info type="submit" name="_add_edit_next" data-disable-with=t('admin.form.save_and_edit_next')
          = t('admin.form.save_and_edit_next')
          = icon('chevron-right', true)
    - if can? :create, resource_class
      button.btn.btn-info type="submit" name="_add_another" data-disable-with=t('admin.form.save_and_add_another')
        = t('admin.form.save_and_add_another')
    - if can? :edit, resource
      button.btn.btn-info type="submit" name="_add_edit" data-disable-with=t('admin.form.save_and_edit')
        = t('admin.form.save_and_edit')
    a.btn.form_cancel href=(return_to || collection_path)
      = icon('remove')
      = t('admin.form.cancel')

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ab_admin-0.9.0 app/views/admin/shared/_save_buttons.html.slim
ab_admin-0.8.3 app/views/admin/shared/_save_buttons.html.slim
ab_admin-0.8.2 app/views/admin/shared/_save_buttons.html.slim
ab_admin-0.8.1 app/views/admin/shared/_save_buttons.html.slim
ab_admin-0.8.0 app/views/admin/shared/_save_buttons.html.slim