diff options
Diffstat (limited to 'shardweb/lib/templates/identity/view.html.eex')
-rw-r--r-- | shardweb/lib/templates/identity/view.html.eex | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/shardweb/lib/templates/identity/view.html.eex b/shardweb/lib/templates/identity/view.html.eex index 58be7e7..6cb1bde 100644 --- a/shardweb/lib/templates/identity/view.html.eex +++ b/shardweb/lib/templates/identity/view.html.eex @@ -18,6 +18,18 @@ <%= 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 %> +<% end %> + <pre> <%= inspect(SApp.Identity.get_info(@pid), pretty: true, width: 40) %> </pre> |