Edit

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

Branch :

  • lib/kmxgit_web/templates/admin/repository/show.html.heex
  • <div class="container-fluid">
      <h1><%= gettext("Repository %{repo}", repo: Repository.full_slug(@repo)) %></h1>
    
      <table class="table properties">
        <tr>
          <th><%= gettext "Id" %></th>
          <td><%= @repo.id %></td>
        </tr>
        <tr>
          <th><%= gettext "Owner" %></th>
          <td>
            <%= case owner = Repository.owner(@repo) do %>
              <% %Organisation{} -> %>
                <%= gettext "Organisation" %>
                <%= link owner.name || owner.slug_, to: Routes.admin_organisation_path(@conn, :show, owner) %>
              <% %User{} -> %>
                <%= gettext "User" %>
                <%= link User.login(owner), to: Routes.admin_user_path(@conn, :show, owner) %>
            <% end %>
          </td>
        </tr>
        <tr>
          <th><%= gettext "Slug" %></th>
          <td><%= link Repository.full_slug(@repo), to: Routes.repository_path(@conn, :show, Repository.owner_slug(@repo), Repository.splat(@repo)) %></td>
        </tr>
        <%= 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 "Members" %></th>
          <td>
            <%= for user <- @members do %>
              <%= link(User.login(user), to: Routes.admin_user_path(@conn, :show, user), class: "user") %>
            <% end %>
            <%= link "-",
                to: Routes.admin_repository__path(@conn, :remove_user, @repo),
                class: "btn btn-danger btn-sm" %>
            <%= link "+",
                to: Routes.admin_repository__path(@conn, :add_user, @repo),
                class: "btn btn-primary btn-sm" %>
          </td>
        </tr>
        <tr>
          <th><%= gettext "Deploy keys (read-only)" %></th>
          <td><pre class="admin_ssh_keys"><%= @repo.deploy_keys %></pre></td>
        </tr>
      </table>
    
      <%= link gettext("Delete repo"),
          to: Routes.admin_repository_path(@conn, :delete, @repo),
          class: "btn btn-danger",
          data: [confirm: gettext("Are you sure you want to delete this repo ?")],
          method: :delete %>
    
      <%= link gettext("Edit repo"),
          to: Routes.admin_repository_path(@conn, :edit, @repo),
          class: "btn btn-primary" %>
    
      <%= link gettext("Show"),
          to: Routes.repository_path(@conn, :show, Repository.owner_slug(@repo), Repository.splat(@repo)),
          class: "btn btn-primary" %>
    </div>