Sha256: 6f6f37d75816d15f5306de3a716f2413e853fda4a2af4b8682fe42a862f9b6d6

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

<% title = t("admin.titles.edit", default: "Editing %{model_name}", model_name: admin.model_name.titleize, pluralized_model_name: admin.model_name.plural.titleize) %>

<% content_for(:title, title) %>
<% breadcrumb title %>

<% content_for(:primary_toolbar) do %>
  <%= button_tag t("admin.buttons.save", default: "Save %{model_name}", model_name: admin.model_name), class: "btn btn-success btn-lg" if admin.actions.include?(:update) %>
<% end %>

<% content_for(:secondary_toolbar) do %>
  <%= admin_link_to instance, action: :destroy, method: :delete, class: "btn btn-danger", data: { toggle: "confirm-delete", placement: "bottom" } do %>
    <%= icon("fa fa-trash") %> <%= t("admin.buttons.delete", default: "Delete %{model_name}", model_name: admin.model_name) %>
  <% end if admin.actions.include?(:destroy) %>
<% end %>

<%= trestle_form_for instance, url: admin.actions.include?(:update) ? admin.path(:update, id: admin.to_param(instance)) : "#", method: :patch do |f| %>
  <%= render partial: "form", layout: dialog_request? ? "dialog" : "layout" %>
<% end %>

Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
trestle-0.8.7 app/views/trestle/resource/edit.html.erb
trestle-0.8.7 app/views/trestle/resource/show.html.erb
trestle-0.8.6 app/views/trestle/resource/edit.html.erb
trestle-0.8.6 app/views/trestle/resource/show.html.erb