locomotivecms/engine

View on GitHub
app/views/locomotive/content_entries/edit.html.slim

Summary

Maintainability
Test Coverage
- title t('.title', type: @content_type.name.capitalize)

- help @content_type.description

- content_for :actions do
  - if @content_entry.with_authentication?
    = link_to content_entry_impersonation_path(current_site, @content_type.slug, @content_entry, default_location_params), class: 'btn btn-sm btn-primary', method: 'post', target: '_blank' do
      i.fas.fa-user-secret
      = t(:impersonate)

  - if @content_type.localized?
    = locale_picker_link { |locale| url_for({ content_locale: locale }.merge(default_location_params)) }
    |  

  = link_to t(:back, scope: 'locomotive.content_entries.shared').html_safe, content_entries_path(current_site, @content_type.slug, default_location_params), class: 'btn btn-sm btn-default'

= locomotive_form_for @content_entry, as: :content_entry, url: content_entry_path(current_site, @content_type.slug, @content_entry), html: { multipart: true, novalidate: true } do |f|

  = hidden_field_tag :content_locale, current_content_locale
  = hidden_field_tag :active_tab, ''
  = hidden_field_tag :page, params[:page]
  = hidden_field_tag :q, params[:q]
  = hidden_field_tag :_location, params[:_location]

  = f.action class: 'hide'

  = render 'locomotive/content_entries/form/tabs', f: f

  = render 'locomotive/content_entries/form/panes', f: f