aboutsummaryrefslogtreecommitdiff
path: root/shardweb/lib/templates/identity
diff options
context:
space:
mode:
Diffstat (limited to 'shardweb/lib/templates/identity')
-rw-r--r--shardweb/lib/templates/identity/view.html.eex12
1 files changed, 2 insertions, 10 deletions
diff --git a/shardweb/lib/templates/identity/view.html.eex b/shardweb/lib/templates/identity/view.html.eex
index 6cb1bde..3fb5a3f 100644
--- a/shardweb/lib/templates/identity/view.html.eex
+++ b/shardweb/lib/templates/identity/view.html.eex
@@ -18,16 +18,8 @@
<%= render ShardWeb.LayoutView, "flashes.html", assigns %>
-<%= if is_friend(@conn, @view_pk) do %>
- <%= form_for @conn, identity_path(@conn, :view_post, @view_pk|>Base.encode16()), [class: "form-inline"], fn f -> %>
- <%= hidden_input f, :rm_friend, value: "true" %>
- <%= submit "Remove from friends", [class: "btn btn-sm btn-danger"] %>
- <% end %>
-<% else %>
- <%= form_for @conn, identity_path(@conn, :view_post, @view_pk|>Base.encode16()), [class: "form-inline"], fn f -> %>
- <%= hidden_input f, :add_friend, value: "true" %>
- <%= submit "Add to friends", [class: "btn btn-sm btn-success"] %>
- <% end %>
+<%= if @view_pk != @pk do %>
+ <a class="btn btn-s btn-primary" href="<%= chat_path(@conn, :privchat, @pk |> Base.encode16) %>"><i class="fa fa-comments"></i> PM</a>
<% end %>
<pre>