File size: 1,057 Bytes
5010ad7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5d27770
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<div class="mb-6 flex items-center justify-between">
  <div>
    <h1 class="text-2xl font-bold text-gray-900"><%= t("admin.posts.edit") %></h1>
    <p class="mt-1 text-sm text-gray-600"><%= t("admin.posts.edit_subtitle") %></p>
  </div>
  <%= link_to admin_posts_path, class: "inline-flex items-center text-sm text-gray-500 hover:text-gray-700" do %>
    <svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
      <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"/>
    </svg>
    <%= t("admin.back") %>
  <% end %>
</div>

<div class="bg-white shadow rounded-lg p-6">
  <%= form_with model: [:admin, @post], local: true, class: "space-y-6" do |f| %>
    <%= render "form", f: f, post: @post %>

    <div class="flex items-center justify-end gap-3 pt-6 border-t border-gray-200">
      <%= admin_cancel_button t("admin.back"), admin_posts_path %>
      <%= admin_submit_button f, t("admin.posts.update") %>
    </div>
  <% end %>
</div>

<%= render "slideshow", post: @post %>