Sha256: 124bfa939f0f849aef2466ebcd3aa88520cfc8feb2567dda2cca67060abc3afc

Contents?: true

Size: 1.34 KB

Versions: 15

Compression:

Stored size: 1.34 KB

Contents

<%= render Spina::UserInterface::HeaderComponent.new do |header| %>
  <% header.actions do %>
    <% if Spina::Current.theme.layout_parts.any? %>
      <%= button_tag type: :submit, form: dom_id(@account), class: 'btn btn-primary', data: {controller: "button hotkeys", hotkeys: "command+s, ctrl+s", hotkeys_target: "button", action: "button#loading", loading_message: t('spina.ui.saving')} do %>
        <%= heroicon('check', style: :solid, class: 'w-5 h-5 mr-1 -ml-2') %>
        <%=t 'spina.layout.save' %>
      <% end %>
    <% end %>
  <% end %>
<% end %>
  
<%= form_with model: @account, url: spina.admin_layout_path, id: dom_id(@account) do |f| %>
  <%= hidden_field_tag :locale, @locale %>
  
  <div class="py-4 p-8">
    <% if Spina::Current.theme.layout_parts.any? %>
      
      <div class="max-w-5xl">
        <%= f.fields_for "#{@locale}_content".to_sym, build_parts(f.object, Spina::Current.theme.layout_parts) do |ff| %>
          <%= ff.hidden_field :type, value: ff.object.class %>
          <%= ff.hidden_field :name %>
          <%= ff.hidden_field :title %>
  
          <%= render "spina/admin/parts/#{parts_partial_namespace(ff.object.class.to_s)}/form", f: ff %>
        <% end %>
      </div>
    <% else %>
      <div class="text-gray-500 italic">
        <%=t 'spina.layout.no_layout_parts' %>
      </div>
    <% end %>
  </div>

<% end %>

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
spina-2.7.0 app/views/spina/admin/layout/edit.html.erb
spina-2.6.2 app/views/spina/admin/layout/edit.html.erb
spina-2.6.1 app/views/spina/admin/layout/edit.html.erb
spina-2.6.0 app/views/spina/admin/layout/edit.html.erb
spina-2.5.0 app/views/spina/admin/layout/edit.html.erb
spina-2.4.0 app/views/spina/admin/layout/edit.html.erb
spina-2.3.5 app/views/spina/admin/layout/edit.html.erb
spina-2.3.4 app/views/spina/admin/layout/edit.html.erb
spina-2.3.3 app/views/spina/admin/layout/edit.html.erb
spina-2.3.2 app/views/spina/admin/layout/edit.html.erb
spina-2.3.1 app/views/spina/admin/layout/edit.html.erb
spina-2.3.0 app/views/spina/admin/layout/edit.html.erb
spina-2.2.0 app/views/spina/admin/layout/edit.html.erb
spina-2.1.1 app/views/spina/admin/layout/edit.html.erb
spina-2.1.0 app/views/spina/admin/layout/edit.html.erb