Hash :
04b5f55d
Author :
Thomas de Grivel
Date :
2021-11-28T14:21:53
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
<div class="container-fluid">
<div class="row">
<div class="col col-12 col-sm-7">
<h1><%= @user.slug.slug %></h1>
</div>
<div class="col col-12 col-sm-4">
<%= if @user.id == @current_user.id do %>
<%= link gettext("New repository"),
to: Routes.repository_path(@conn, :new, @user.slug.slug),
class: "btn btn-primary" %>
<%= link gettext("Edit"),
to: Routes.user_path(@conn, :edit, @user.slug.slug),
class: "btn btn-primary" %>
<% end %>
</div>
</div>
<div class="row">
<div class="col col-12 col-md-7">
<hr/>
<h2><%= gettext "Repositories" %></h2>
<ul>
<%= for repo <- @owned_repos do %>
<li>
<%= link Repository.full_slug(repo), to: Routes.repository_path(@conn, :show, Repository.owner_slug(repo), Repository.splat(repo)) %>
</li>
<% end %>
<%= for repo <- @contributor_repos do %>
<li>
<%= link Repository.full_slug(repo), to: Routes.repository_path(@conn, :show, Repository.owner_slug(repo), Repository.splat(repo)) %>
</li>
<% end %>
</ul>
</div>
<div class="col col-12 col-md-4">
<hr/>
<h2><%= gettext "Properties" %></h2>
<table class="table admin-properties">
<tr>
<th><%= gettext "Name" %></th>
<td><%= @user.name %></td>
</tr>
<tr>
<th><%= gettext "Email" %></th>
<td><%= link @user.email, to: "mailto:#{@user.email}" %></td>
</tr>
<tr>
<th><%= gettext "Login" %></th>
<td><%= @user.slug.slug %></td>
</tr>
<tr>
<th><%= gettext "Description" %></th>
<td>
<%= if @user.description do %>
<%= raw Earmark.as_html!(@user.description) %>
<% end %>
</td>
</tr>
<tr>
<th><%= gettext "Deploy only" %></th>
<td><%= @user.deploy_only %></td>
</tr>
<tr>
<th>
<%= gettext "Organisations" %><br/>
<%= if @user.id == @current_user.id do %>
<%= link("+", to: Routes.organisation_path(@conn, :new), class: "btn btn-primary btn-sm") %>
<% end %>
</th>
<td>
<ul>
<%= for org <- Enum.sort_by(@user.organisations, fn o -> o.slug.slug end) do %>
<li>
<%= link(org.name || org.slug.slug,
to: Routes.slug_path(@conn, :show, org.slug.slug),
class: "org") %>
</li>
<% end %>
</ul>
</td>
</tr>
<tr>
<th><%= gettext "SSH keys" %></th>
<td class="scroll-x">
<pre class="ssh_keys">
<%= @user.ssh_keys %>
</pre>
</td>
</tr>
</table>
</div>
</div>
<p>
</p>
</div>