summary refs log tree commit diff
path: root/views
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2023-06-21 18:56:21 +0200
committerpdp8 <pdp8@pdp8.info>2023-06-21 18:56:21 +0200
commit457a0bfdc74ed90b77d09d285281abca8a1396de (patch)
tree7a2391e1bf174eba780e1e989739aa5fb14526d2 /views
parenta501b19ae87592da8e55ec28525b487be1eba92f (diff)
reply form, server helpers moved to server.rb
Diffstat (limited to 'views')
-rw-r--r--views/item.erb15
1 files changed, 11 insertions, 4 deletions
diff --git a/views/item.erb b/views/item.erb
index aafc4cc..933fe71 100644
--- a/views/item.erb
+++ b/views/item.erb
@@ -5,15 +5,15 @@
   </form>
   &nbsp;
   <form action='/delete' method='post'>
-    <input type='hidden' name='file' id='file' value='<%= @item[:file] %>' />
-    <input type='hidden' name='redirect' id='redirect' value='/<%= @dir.sub('inbox','') %>#<%= @item[:nr] %>' />
+    <input type='hidden' name='file' value='<%= @item[:file] %>' />
+    <input type='hidden' name='redirect' value='/<%= @dir.sub('inbox','') %>#<%= @item[:nr] %>' />
     <button>Delete</button>
   </form>
   <% if @dir == 'inbox' %>
     &nbsp;
     <form action='/archive' method='post'>
-      <input type='hidden' name='file' id='file' value='<%= @item[:file] %>' />
-      <input type='hidden' name='redirect' id='redirect' value='/<%= @dir.sub('inbox','') %>#<%= @item[:nr] %>' />
+      <input type='hidden' name='file' value='<%= @item[:file] %>' />
+      <input type='hidden' name='redirect' value='/<%= @dir.sub('inbox','') %>#<%= @item[:nr] %>' />
       <button>Archive</button>
     </form>
   <% end %>
@@ -33,6 +33,13 @@
       <% end %>
     <% end %>
   <% end %>
+  <form action='/outbox' method='post'>
+    <input type='hidden' name='to' value='<%= @item[:actor_url] %>' />
+    <input type='hidden' name='inReplyTo' value='<%= @item[:id] %>' />
+    <input type='hidden' name='redirect' value='/<%= @dir.sub('inbox','') %>#<%= @item[:nr] %>' />
+    <textarea name="content"></textarea>
+    <input type="submit" value="Reply">
+  </form>
 </div>
 <% @item[:replies].each do |reply| %>
   <%= html reply %>