Sha256: dbed8b46f37609be0f6c5d13d2c1a3f46555cf45c95a62678c69802137bdc33c

Contents?: true

Size: 1.31 KB

Versions: 6

Compression:

Stored size: 1.31 KB

Contents

<%#
# New

This view is the template for the "new resource" page.
It displays a header, and then renders the `_form` partial
to do the heavy lifting.

## Local variables:

- `page`:
  An instance of [Administrate::Page::Form][1].
  Contains helper methods to help display a form,
  and knows which attributes should be displayed in the resource's form.

[1]: http://www.rubydoc.info/gems/administrate/Administrate/Page/Form
%>

<% content_for(:title) do %>
  <%= t(
    "administrate.actions.new_resource",
    name: display_resource_name(page.resource_name).titleize
  ) %>
<% end %>

<header class="bg-white shadow">
  <div class="mx-auto py-6 px-4 sm:px-6 lg:px-8">
    <div class="flex justify-between items-center">
      <h1 class="text-3xl font-bold leading-tight text-gray-900">
        <%= content_for(:title) %>
      </h1>
      <div>
        <%= link_to t("administrate.actions.back"), :back, class: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" %>
      </div>
    </div>
  </div>
</header>

<section class="mx-auto py-6 px-4 sm:px-6 lg:px-8">
  <div class="bg-white shadow overflow-hidden rounded-lg">
    <%= render "form", page: page %>
  </div>
</section>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
administrate_tailwind_theme-0.0.6 app/views/administrate/application/new.html.erb
administrate_tailwind_theme-0.0.5 app/views/administrate/application/new.html.erb
administrate_tailwind_theme-0.0.4 app/views/administrate/application/new.html.erb
administrate_tailwind_theme-0.0.3 app/views/administrate/application/new.html.erb
administrate_tailwind_theme-0.0.2 app/views/administrate/application/new.html.erb
administrate_tailwind_theme-0.0.1 app/views/administrate/application/new.html.erb