summaryrefslogtreecommitdiff
path: root/views/collection.erb
diff options
context:
space:
mode:
Diffstat (limited to 'views/collection.erb')
-rw-r--r--views/collection.erb47
1 files changed, 0 insertions, 47 deletions
diff --git a/views/collection.erb b/views/collection.erb
deleted file mode 100644
index c169e0b..0000000
--- a/views/collection.erb
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-<html lang='en'>
- <head>
- <link rel='stylesheet' type='text/css' href='/style.css'>
- </head>
- <body>
- <h1><%= @box %>
- <% dirs = ['inbox','outbox']
- dirs.delete(@box)
- dirs.each do |d| %>
- <form action='/<%= d %>' method='get'>
- <button><%= d %></button>
- </form>
- <% end %>
- </h1>
- <% @idx = 0
- @threads.each do |object|
- @object = object %>
- <%= erb :object %>
- <% end %>
- <% unless @box == 'shared' %>
- <form action='/delete' method='post'>
- <input type='hidden' name='dir' value='<%= @box %>' />
- <input type='hidden' name='anchor' value='/<%= @box %>' />
- <button>Delete all</button>
- </form>
- <% end %>
- </body>
- <script>
- const reply_buttons = document.querySelectorAll(".reply");
- for (const button of reply_buttons) {
- button.addEventListener('click', function() {
- const form = document.getElementById('form' + button.getAttribute('data-index'));
- button.style.display = 'none';
- form.style.display = 'block';
- });
- };
- const cancel_buttons = document.querySelectorAll(".cancel");
- for (const button of cancel_buttons) {
- button.addEventListener('click', function() {
- const form = document.getElementById('form' + button.getAttribute('data-index'));
- button.style.display = 'block';
- form.style.display = 'none';
- });
- };
- </script>
-</html>