chore: generate resources for pastes

Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
sphericalkat committed 2021-08-12 03:28:28 +05:30
1 parent 5a7bece725
commit 99ad54cf68
13 files changed
+431

No files matched your search

@@ -0,0 +1,5 @@
<h1>Edit Paste</h1>
<%= render "form.html", Map.put(assigns, :action, Routes.paste_path(@conn, :update, @paste)) %>
<span><%= link "Back", to: Routes.paste_path(@conn, :index) %></span>
@@ -0,0 +1,19 @@
<%= form_for @changeset, @action, fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
</div>
<% end %>
<%= label f, :is_url %>
<%= checkbox f, :is_url %>
<%= error_tag f, :is_url %>
<%= label f, :content %>
<%= textarea f, :content %>
<%= error_tag f, :content %>
<div>
<%= submit "Save" %>
</div>
<% end %>
@@ -0,0 +1,28 @@
<h1>Listing Pastes</h1>
<table>
<thead>
<tr>
<th>Is url</th>
<th>Content</th>
<th></th>
</tr>
</thead>
<tbody>
<%= for paste <- @pastes do %>
<tr>
<td><%= paste.is_url %></td>
<td><%= paste.content %></td>
<td>
<span><%= link "Show", to: Routes.paste_path(@conn, :show, paste) %></span>
<span><%= link "Edit", to: Routes.paste_path(@conn, :edit, paste) %></span>
<span><%= link "Delete", to: Routes.paste_path(@conn, :delete, paste), method: :delete, data: [confirm: "Are you sure?"] %></span>
</td>
</tr>
<% end %>
</tbody>
</table>
<span><%= link "New Paste", to: Routes.paste_path(@conn, :new) %></span>
@@ -0,0 +1,5 @@
<h1>New Paste</h1>
<%= render "form.html", Map.put(assigns, :action, Routes.paste_path(@conn, :create)) %>
<span><%= link "Back", to: Routes.paste_path(@conn, :index) %></span>
@@ -0,0 +1,18 @@
<h1>Show Paste</h1>
<ul>
<li>
<strong>Is url:</strong>
<%= @paste.is_url %>
</li>
<li>
<strong>Content:</strong>
<%= @paste.content %>
</li>
</ul>
<span><%= link "Edit", to: Routes.paste_path(@conn, :edit, @paste) %></span>
<span><%= link "Back", to: Routes.paste_path(@conn, :index) %></span>