aboutsummaryrefslogtreecommitdiff
path: root/shardweb/lib/templates
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-11-02 11:22:28 +0100
committerAlex Auvolat <alex@adnab.me>2018-11-02 11:22:28 +0100
commit3baa53f1da7f581619b066832b8303efbe9a46ba (patch)
treed6b49bd09fa915b93e13f3a03febc7fb1b38e9a4 /shardweb/lib/templates
parent80200dc43f271938fb14ec4eb4712e8dd7375aeb (diff)
downloadshard-3baa53f1da7f581619b066832b8303efbe9a46ba.tar.gz
shard-3baa53f1da7f581619b066832b8303efbe9a46ba.zip
Remove friends list ; add some links
Diffstat (limited to 'shardweb/lib/templates')
-rw-r--r--shardweb/lib/templates/directory/view.html.eex9
-rw-r--r--shardweb/lib/templates/identity/view.html.eex12
-rw-r--r--shardweb/lib/templates/layout/app.html.eex4
-rw-r--r--shardweb/lib/templates/page/shard_entry.html.eex4
-rw-r--r--shardweb/lib/templates/page/shard_list.html.eex2
5 files changed, 13 insertions, 18 deletions
diff --git a/shardweb/lib/templates/directory/view.html.eex b/shardweb/lib/templates/directory/view.html.eex
index b981391..43ded97 100644
--- a/shardweb/lib/templates/directory/view.html.eex
+++ b/shardweb/lib/templates/directory/view.html.eex
@@ -7,6 +7,15 @@
</h1>
<ol class="breadcrumb">
+ <li>
+ <i class="fa fa-users"></i> Users
+ </li>
+ <li>
+ <i class="fa fa-user"></i> <%= @owner |> SApp.Identity.get_nick %>
+ <a href="<%= identity_path(@conn, :view, @owner |> Base.encode16) %>">
+ <small><%= @owner |> Shard.Keys.pk_display %></small>
+ </a>
+ </li>
<li class="active">
<i class="fa fa-folder"></i> <%= @name %>
</li>
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>
diff --git a/shardweb/lib/templates/layout/app.html.eex b/shardweb/lib/templates/layout/app.html.eex
index 71a08f9..1310131 100644
--- a/shardweb/lib/templates/layout/app.html.eex
+++ b/shardweb/lib/templates/layout/app.html.eex
@@ -150,10 +150,6 @@
</ul>
</li>
-
- <li class="<%= if @view_module == ShardWeb.DirectoryView and @view_template == "view.html" and not @public and @name == "friends" do "active" else "" end %>">
- <a href="<%= directory_path(@conn, :view_priv, @pk|>Base.encode16(), "friends") %>"><i class="fa fa-fw fa-heart"></i> Friends</a>
- </li>
<li class="<%= if (@view_module == ShardWeb.IdentityView and @view_template == "list.html") or (@view_module == ShardWeb.ChatView and @view_template == "chat.html" and not @public) do "active" else "" end %>">
<a href="<%= identity_path(@conn, :list) %>"><i class="fa fa-fw fa-users"></i> Everyone<i class="fa fa-fw fa-caret-down"></i></a>
diff --git a/shardweb/lib/templates/page/shard_entry.html.eex b/shardweb/lib/templates/page/shard_entry.html.eex
index 8a55b3a..d99fc34 100644
--- a/shardweb/lib/templates/page/shard_entry.html.eex
+++ b/shardweb/lib/templates/page/shard_entry.html.eex
@@ -18,9 +18,7 @@
<% %SApp.Directory.Manifest{owner: owner, public: public, name: name} -> %><i class="fa fa-folder"></i>
<%= SApp.Identity.get_nick(owner) %>
- <a href="<%= identity_path(@conn, :view, owner|>Base.encode16) %>">
- <small><%= Shard.Keys.pk_display owner %></small>
- </a>
+ <small><%= Shard.Keys.pk_display owner %></small>
/
<a href="<%= directory_path(@conn, (if public do :view_pub else :view_priv end), owner|>Base.encode16(), name) %>"><%= name %></a>
<%= if public do %><i class="fa fa-globe"></i><% else %><i class="fa fa-lock"></i><% end %>
diff --git a/shardweb/lib/templates/page/shard_list.html.eex b/shardweb/lib/templates/page/shard_list.html.eex
index 53f6264..dd846d8 100644
--- a/shardweb/lib/templates/page/shard_list.html.eex
+++ b/shardweb/lib/templates/page/shard_list.html.eex
@@ -35,7 +35,7 @@
<% end %>
</td>
<td>
- <%= render "shard_entry.html", conn: @conn, manifest: manifest %>
+ <%= render "shard_entry.html", conn: @conn, manifest: manifest, pk: @pk %>
</td>
<td><small><%= id |> Base.encode16 %></small></td>
</tr>