Edit

kmx.io/kmxgit/lib/kmxgit_web/templates/user/show.html.heex

Branch :

  • lib/kmxgit_web/templates/user/show.html.heex
  • <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.slug.slug %>)</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.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">
          <h2><%= gettext "Repositories" %></h2>
          <ul>
            <%= for repo <- @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">
          <h2><%= gettext "Properties" %></h2>
          <table class="table admin-properties">
            <tr>
              <th><%= gettext "Name" %></th>
              <td><%= @user.name %></td>
            </tr>
            <tr>
              <th><%= gettext "Login" %></th>
              <td><%= @user.slug.slug %></td>
            </tr>
            <tr>
              <th><%= gettext "Deploy only" %></th>
              <td><%= @user.deploy_only %></td>
            </tr>
            <tr>
              <th>
                <%= gettext "Organisations" %><br/>
                <%= if @current_user && @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, & &1.slug.slug) 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>
            <tr>
              <th><%= gettext "Disk usage" %></th>
              <td><%= disk_usage(@disk_usage) %></td>
            </tr>
            <tr>
              <th><%= gettext "Accessible" %></th>
              <td><%= disk_usage(@disk_usage_all) %></td>
            </tr>
          </table>
        </div>
      </div>
      <p>
      </p>
    
    </div>