diff options
Diffstat (limited to 'views/item.erb')
-rw-r--r-- | views/item.erb | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/views/item.erb b/views/item.erb index 933fe71..287054e 100644 --- a/views/item.erb +++ b/views/item.erb @@ -1,21 +1,23 @@ <div style='margin-left:<%= @item[:indent] %>em' id='<%= @item[:nr] %>'> <b><a href='<%= @item[:actor_url] %>', target='_blank'><%= @item[:mention] %></a></b> - <form action='<%= File.join @item[:follow], @item[:mention] %>' method='post'> - <button><%= @item[:follow].capitalize %></button> - </form> - - <form action='/delete' method='post'> - <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' %> + <% if @item[:mention] != ACCOUNT %> + <form action='<%= File.join @item[:follow], @item[:mention] %>' method='post'> + <button><%= @item[:follow].capitalize %></button> + </form> - <form action='/archive' method='post'> + <form action='/delete' method='post'> <input type='hidden' name='file' value='<%= @item[:file] %>' /> <input type='hidden' name='redirect' value='/<%= @dir.sub('inbox','') %>#<%= @item[:nr] %>' /> - <button>Archive</button> + <button>Delete</button> </form> + <% if @dir == 'inbox' %> + + <form action='/archive' method='post'> + <input type='hidden' name='file' value='<%= @item[:file] %>' /> + <input type='hidden' name='redirect' value='/<%= @dir.sub('inbox','') %>#<%= @item[:nr] %>' /> + <button>Archive</button> + </form> + <% end %> <% end %> <%= @item[:content] %> <% if @item[:attachment] |