Edit

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

Branch :

  • lib/kmxgit_web/templates/admin/user/show.html.heex
  • <div class="container-fluid">
      <h1>User <%= User.login(@user) %></h1>
    
      <table class="table properties">
        <tr>
          <th><%= gettext "Id" %></th>
          <td><%= @user.id %></td>
        </tr>
        <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.login(@user) %></td>
        </tr>
        <tr>
          <th><%= gettext "Avatar" %></th>
          <td><%= render("avatar.html", conn: @conn, user: @user, email: @user.email, size: 256, title: User.login(@user), class: "avatar-lg") %></td>
        </tr>
        <tr>
          <th><%= gettext "Description" %></th>
          <td>
            <%= if @user.description do %>
            <%= raw Markdown.to_html!(@user.description) %>
            <% end %>
          </td>
        </tr>
        <tr>
          <th>
            <%= gettext "Organisations" %>
          </th>
          <td>
            <%= for org <- @user.organisations do %>
              <%= link(org.name || org.slug_, to: Routes.admin_organisation_path(@conn, :show, org), class: "org") %>
            <% end %>
          </td>
        </tr>
        <tr>
          <th><%= gettext "Repositories" %></th>
          <td>
            <ul>
              <%= for repo <- @repos do %>
                <li>
                  <%= link(Repository.full_slug(repo), to: Routes.admin_repository_path(@conn, :show, repo), class: "repo") %>
                </li>
              <% end %>
            </ul>
          </td>
        </tr>
        <tr>
          <th><%= gettext "2FA" %></th>
          <td><%= if @user.totp_last != 0, do: "TOTP", else: "none" %></td>
        </tr>
        <tr>
          <th><%= gettext "Admin" %></th>
          <td><%= @user.is_admin %></td>
        </tr>
        <tr>
          <th><%= gettext "Deploy only" %></th>
          <td><%= @user.deploy_only %></td>
        </tr>
        <tr>
          <th><%= gettext "SSH keys" %></th>
          <td><pre class="admin_ssh_keys"><%= @user.ssh_keys %></pre></td>
        </tr>
      </table>
    
      <%= link gettext("Delete user"),
          to: Routes.admin_user_path(@conn, :delete, @user),
          class: "btn btn-danger",
          data: [confirm: gettext("Are you sure you want to delete this user ?")],
          method: :delete %>
    
      <%= link gettext("Edit user"),
          to: Routes.admin_user_path(@conn, :edit, @user),
          class: "btn btn-primary" %>
    
      <%= link gettext("Edit password"),
          to: Routes.admin_user__path(@conn, :edit_password, @user),
          class: "btn btn-primary" %>
    
      <%= link gettext("Show"),
          to: Routes.slug_path(@conn, :show, User.login(@user) || ""),
          class: "btn btn-primary" %>
    </div>