inventory setup
This commit is contained in:
10
app/views/inventory/inventory_definitions/_form.html.erb
Normal file
10
app/views/inventory/inventory_definitions/_form.html.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
<%= simple_form_for(@inventory_definition) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -0,0 +1,2 @@
|
||||
json.extract! inventory_definition, :id, :created_at, :updated_at
|
||||
json.url inventory_definition_url(inventory_definition, format: :json)
|
||||
6
app/views/inventory/inventory_definitions/edit.html.erb
Normal file
6
app/views/inventory/inventory_definitions/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing Inventory Definition</h1>
|
||||
|
||||
<%= render 'form', inventory_definition: @inventory_definition %>
|
||||
|
||||
<%= link_to 'Show', @inventory_definition %> |
|
||||
<%= link_to 'Back', inventory_definitions_path %>
|
||||
25
app/views/inventory/inventory_definitions/index.html.erb
Normal file
25
app/views/inventory/inventory_definitions/index.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<h1>Inventory Definitions</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @inventory_definitions.each do |inventory_definition| %>
|
||||
<tr>
|
||||
<td><%= link_to 'Show', inventory_definition %></td>
|
||||
<td><%= link_to 'Edit', edit_inventory_definition_path(inventory_definition) %></td>
|
||||
<td><%= link_to 'Destroy', inventory_definition, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<%= link_to 'New Inventory Definition', new_inventory_definition_path %>
|
||||
@@ -0,0 +1 @@
|
||||
json.array! @inventory_definitions, partial: 'inventory_definitions/inventory_definition', as: :inventory_definition
|
||||
5
app/views/inventory/inventory_definitions/new.html.erb
Normal file
5
app/views/inventory/inventory_definitions/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New Inventory Definition</h1>
|
||||
|
||||
<%= render 'form', inventory_definition: @inventory_definition %>
|
||||
|
||||
<%= link_to 'Back', inventory_definitions_path %>
|
||||
4
app/views/inventory/inventory_definitions/show.html.erb
Normal file
4
app/views/inventory/inventory_definitions/show.html.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<%= link_to 'Edit', edit_inventory_definition_path(@inventory_definition) %> |
|
||||
<%= link_to 'Back', inventory_definitions_path %>
|
||||
@@ -0,0 +1 @@
|
||||
json.partial! "inventory_definitions/inventory_definition", inventory_definition: @inventory_definition
|
||||
Reference in New Issue
Block a user