Râu Cao 51f4556ede
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Refactor admin settings routes
This is much cleaner, and semantically more correct.
2024-03-02 14:22:08 +00:00

28 lines
806 B
Plaintext

<%= render HeaderComponent.new(title: "Settings") %>
<%= render MainWithSidenavComponent.new(sidenav_partial: 'shared/admin_sidenav_settings') do %>
<%= form_for(Setting.new, url: admin_settings_service_path(@service), method: :put) do |f| %>
<% if @errors && @errors.any? %>
<section>
<%= render partial: "admin/settings/errors", locals: { errors: @errors } %>
</section>
<% end %>
<section>
<%= render partial: @service, locals: { f: f } %>
</section>
<section>
<p class="pt-6 border-t border-gray-200 text-right">
<%= f.submit 'Save', class: "btn-md btn-blue w-full md:w-auto" %>
</p>
</section>
<% end %>
<% if content_for?(:documentation) %>
<section>
<%= yield :documentation %>
</section>
<% end %>
<% end %>