summaryrefslogtreecommitdiff
path: root/lib/lsg_web/templates/page/user.html.eex
blob: 8a043a09d04002a695b018deb66cfcd99b209bc2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<ul>
  <li><%= link("Help", to: "/-") %></li>
</ul>

<h2>channels</h2>
<ul>
  <%= for {net, channel} <- @memberships do %>
    <li>
      <% url = LSGWeb.Router.Helpers.irc_path(LSGWeb.Endpoint, :index, net, LSGWeb.format_chan(channel)) %>
      <%= link([net, ": ", content_tag(:strong, channel)], to: url) %>
    </li>
  <% end %>
</ul>

<h2>connections</h2>
<ul>
  <%= for user <- @users do %>
    <li>
      <strong><%= user.network %></strong>: <strong><%= user.nick %></strong>!<%= user.username %>@<%= user.host %> <i><%= user.realname %></i><br />
      <%= Enum.join(Enum.intersperse(Enum.map(user.privileges, fn({c, _}) -> c end), ", ")) %>
    </li>
  <% end %>
</ul>

<h2>account</h2>
<ul>
  <li>account-id: <%= @conn.assigns.account.id %></li>
  <%= for {k, v} <- @metas do %>
    <li><%= k %>: <%= to_string(v) %></li>
  <% end %>
</ul>

<strong>irc auths:</strong>
<ul>
  <%= for {net, {predicate, v}} <- @predicates do %>
    <li><%= net %>: <%= to_string(predicate) %>, <%= v %></li>
  <% end %>
</ul>