diff options
Diffstat (limited to 'views/collection.erb')
-rw-r--r-- | views/collection.erb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/views/collection.erb b/views/collection.erb index 8dd3878..4cc449f 100644 --- a/views/collection.erb +++ b/views/collection.erb @@ -5,7 +5,7 @@ </head> <body> <h1><%= @dir %> - <% dirs = ['inbox','outbox','archive'] + <% dirs = ['inbox','outbox','shared'] dirs.delete(@dir) dirs.each do |d| %> <form action='/<%= d %>' method='get'> @@ -13,13 +13,18 @@ </form> <% end %> </h1> - <% @threads.each do |object| + <% @idx = 0 + @threads.each do |object| @object = object %> <%= erb :object %> <% end %> + <% unless @dir == 'shared' %> <form action='/delete' method='post'> + <input type='hidden' name='dir' value='/<%= @dir %>' /> + <input type='hidden' name='anchor' value='/<%= @dir %>' /> <button>Delete all</button> </form> + <% end %> </body> <script> const reply_buttons = document.querySelectorAll(".reply"); |