migrate from turbolinks to turbo

This commit is contained in:
2021-06-21 20:54:17 +02:00
parent 62464846a3
commit 87c1c67b5c
19 changed files with 367 additions and 40 deletions

View File

@@ -0,0 +1,15 @@
<%= form_with(model: rp_world) do |form| %>
<div class="field">
<%= form.label :name %>
<%= form.text_field :name %>
</div>
<div class="field">
<%= form.label :description %>
<%= form.text_field :description %>
</div>
<div class="actions">
<%= form.submit %>
</div>
<% end %>

View File

@@ -0,0 +1,6 @@
<h1>Editing Rp World</h1>
<%= render 'form', rp_world: @rp_world %>
<%= link_to 'Show', @rp_world %> |
<%= link_to 'Back', rp_worlds_path %>

View File

@@ -1,18 +1,27 @@
<h2>Characters list</h2>
<p id="notice"><%= notice %></p>
<table class="table table-hover table-dark table-image">
<h1>Rp Worlds</h1>
<table>
<thead>
<tr>
<th scope="col"><%= t('rp_worlds.world_list.name') %></th>
<th scope="col"><%= t('rp_worlds.world_list.description') %></th>
<th><%= t('rp_worlds.world_list.name') %></th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @rp_worlds.each do |world| %>
<tr>
<td><%= link_to world.name, world %></td>
<td><%= world.description %></td>
</tr>
<% @rp_worlds.each do |rp_world| %>
<tr>
<td><%= rp_world.name %></td>
<td><%= link_to 'Show', rp_world %></td>
<td><%= link_to 'Edit', edit_rp_world_path(rp_world) %></td>
<td><%= link_to 'Destroy', rp_world, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Rp World', new_rp_world_path %>

View File

@@ -0,0 +1,5 @@
<h1>New Rp World</h1>
<%= render 'form', rp_world: @rp_world %>
<%= link_to 'Back', rp_worlds_path %>

View File

@@ -1,3 +1,5 @@
<p id="notice"><%= notice %></p>
<div class="row">
<div class="col-5">
<div class="card">
@@ -15,3 +17,6 @@
<h1>Suite...</h1>
</div>
</div>
<%= link_to 'Edit', edit_rp_world_path(@rp_world) %> |
<%= link_to 'Back', rp_worlds_path %>