Hash :
a38cce03
Author :
Thomas de Grivel
Date :
2024-05-14T15:04:20
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
<p>
<ul class="list-group">
<li class="list-group-item bg-h">
<h2><%= gettext "Properties" %></h2>
</li>
<li class="list-group-item">
<table class="table properties">
<%= if @public_access do %>
<tr>
<th><%= gettext "Git HTTP" %></th>
<td><%= Repository.http_url(@repo) %></td>
</tr>
<% end %>
<tr>
<th><%= gettext "Git SSH" %></th>
<td><%= Repository.ssh_url(@repo) %></td>
</tr>
<tr>
<th><%= gettext "Public access ?" %></th>
<td>
<%= if @public_access do %>
<%= gettext "public" %>
<% else %>
<%= gettext "private" %>
<% end %>
</td>
</tr>
<tr>
<th><%= gettext "Description" %></th>
<td>
<%= if @repo.description do %>
<%= raw Markdown.to_html!(@repo.description) %>
<% end %>
</td>
</tr>
<tr>
<th>
<%= gettext "Users" %><br/>
<%= if Repository.owner?(@repo, @current_user) do %>
<%= link "-",
to: Routes.repository_path(@conn, :remove_user, @owner.slug_, Repository.splat(@repo)),
class: "btn btn-danger btn-sm" %>
<%= link "+",
to: Routes.repository_path(@conn, :add_user, @owner.slug_, Repository.splat(@repo)),
class: "btn btn-primary btn-sm" %>
<% end %>
</th>
<td>
<%= for user <- @members do %>
<%= render(KmxgitWeb.UserView, "avatar.html", conn: @conn, user: user, email: user.email, size: 48, title: User.login(user), class: "") %>
<% end %>
</td>
</tr>
<%= if @git.release do %>
<tr>
<th><%= gettext("Release") %></th>
<td>
<ul>
<%= for file <- @git.release |> Enum.sort() do %>
<li>
<%= link to: file.url do %>
<%= file.name %>
<% end %>
</li>
<% end %>
</ul>
</td>
</tr>
<% end %>
<%= if @git.tags do %>
<tr>
<th><%= gettext("Tags") %></th>
<td>
<ul>
<%= for tag <- @git.tags |> Enum.reverse() do %>
<li>
<%= link tag, to: Routes.repository_path(@conn, :show, Repository.owner_slug(@repo), Repository.splat(@repo, ["_tag", tag])) %>
</li>
<% end %>
</ul>
</td>
</tr>
<% end %>
</table>
</li>
</ul>
</p>