Hash :
c30baa4e
        
        Author :
 Thomas de Grivel
 Thomas de Grivel
        
        Date :
2023-01-02T04:14:41
        
      
display lock on private repos
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 97 98 99 100
<div class="container-fluid">
  <div class="row">
    <div class="col col-12">
      <%= render("avatar.html", conn: @conn, email: @user.email, size: 256, title: User.login(@user), class: "avatar-lg") %>
      <h1><%= @user.name %> (<%= User.login(@user) %>)</h1>
      <div class="col col-12 col-md-8">
        <%= if @user.description do %>
          <%= raw Markdown.to_html!(@user.description) %>
        <% end %>
      </div>
      <%= if @current_user && @user.id == @current_user.id do %>
        <%= link gettext("New repository"),
            to: Routes.repository_path(@conn, :new, User.login(@user)),
            class: "btn btn-primary" %>
        <%= link gettext("Edit"),
            to: Routes.user_path(@conn, :edit, User.login(@user)),
            class: "btn btn-primary" %>
      <% end %>
    </div>
  </div>
  <div class="row">
    <div class="col col-12 col-md-7">
      <p>
        <ul class="list-group">
          <li class="list-group-item bg-h">
            <h2><%= gettext "Repositories" %></h2>
          </li>
          <%= for repo <- @repos do %>
            <li class="list-group-item">
              <%= link to: Routes.repository_path(@conn, :show, Repository.owner_slug(repo), Repository.splat(repo)) do %>
                <%= if repo.public_access do %>
                  <i class="fa fa-code-fork"></i>
                <% else %>
                  <i class="fa fa-lock"></i>
                <% end %>
                <%= Repository.full_slug(repo) %>
              <% end %>
            </li>
          <% end %>
        </ul>
      </p>
    </div>
    <div class="col col-12 col-md-4">
      <p>
        <ul class="list-group">
          <li class="list-group-item bg-h">
            <h2><%= gettext "Organisations" %></h2>
          </li>
          <%= for org <- Enum.sort_by(@user.organisations, & &1.slug_) do %>
            <li class="list-group-item">
              <%= link to: Routes.slug_path(@conn, :show, org.slug_), class: "org" do %>
                <i class="fa fa-circle"></i> 
                <%= org.name || org.slug_ %>
              <% end %>
            </li>
          <% end %>
          <%= if @current_user && @user.id == @current_user.id do %>
            <li class="list-group-item">
              <%= link gettext("+ Add organisation"), to: Routes.organisation_path(@conn, :new), class: "btn btn-primary btn-sm" %>
            </li>
          <% end %>
        </ul>
      </p>
      <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">
              <tr>
                <th><%= gettext "Name" %></th>
                <td><%= @user.name %></td>
              </tr>
              <tr>
                <th><%= gettext "Login" %></th>
                <td><%= User.login(@user) %></td>
              </tr>
              <tr>
                <th><%= gettext "Deploy only" %></th>
                <td><%= @user.deploy_only %></td>
              </tr>
              <tr>
                <th><%= gettext "SSH keys" %></th>
                <td>
                  <%= link gettext("Show"), to: Routes.user_path(@conn, :ssh_keys, User.login(@user)), class: "btn btn-primary btn-sm" %>
                </td>
              </tr>
            </table>
          </li>
        </ul>
      </p>
    </div>
  </div>
  <p>
  </p>
</div>