diff options
author | Alex Auvolat <alex@adnab.me> | 2018-10-15 17:29:05 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2018-10-15 17:29:05 +0200 |
commit | 07841bd2ec86cb667aea633de5dcb068751e64d3 (patch) | |
tree | 85fd1f47ea93e39614a84497d92cf4ad629cb3d1 /shardweb/lib/templates/identity | |
parent | 181baf7e0c26c51d7c605bc9797f77ced9188455 (diff) | |
download | shard-07841bd2ec86cb667aea633de5dcb068751e64d3.tar.gz shard-07841bd2ec86cb667aea633de5dcb068751e64d3.zip |
Friends list (beginning)
Diffstat (limited to 'shardweb/lib/templates/identity')
-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> |