Edit

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

Branch :

  • lib/kmxgit_web/templates/admin/organisation/show.html.heex
  • <div class="container-fluid">
      <h1><%= gettext("Organisation %{org}", org: @org.name || @org.slug_) %></h1>
    
      <table class="table properties">
        <tr>
          <th><%= gettext "Id" %></th>
          <td><%= @org.id %></td>
        </tr>
        <tr>
          <th><%= gettext "Name" %></th>
          <td><%= @org.name %></td>
        </tr>
        <tr>
          <th><%= gettext "Slug" %></th>
          <td><%= @org.slug_ %></td>
        </tr>
        <tr>
          <th><%= gettext "Description" %></th>
          <td>
            <%= if @org.description do %>
              <%= raw Markdown.to_html!(@org.description) %>
            <% end %>
          </td>
        </tr>
        <tr>
          <th><%= gettext "Users" %></th>
          <td>
            <%= for user <- @org.users do %>
              <%= link(User.login(user), to: Routes.admin_user_path(@conn, :show, user), class: "user") %>
            <% end %>
            <%= link "-",
                to: Routes.admin_organisation__path(@conn, :remove_user, @org),
                class: "btn btn-danger btn-sm" %>
            <%= link "+",
                to: Routes.admin_organisation__path(@conn, :add_user, @org),
                class: "btn btn-primary btn-sm" %>
          </td>
        </tr>
        <tr>
          <th><%= gettext "Repositories" %></th>
          <td>
            <ul>
              <%= for repo <- @org.owned_repositories 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 "Disk usage" %></th>
          <td><%= disk_usage(@org.disk_usage) %></td>
        </tr>
      </table>
    
      <%= link gettext("Delete organisation"),
          to: Routes.admin_organisation_path(@conn, :delete, @org),
          class: "btn btn-danger",
          data: [confirm: gettext("Are you sure you want to delete this org ?")],
          method: :delete %>
    
      <%= link gettext("Edit organisation"),
          to: Routes.admin_organisation_path(@conn, :edit, @org),
          class: "btn btn-primary" %>
    
      <%= link gettext("Show"),
          to: Routes.slug_path(@conn, :show, @org.slug_),
          class: "btn btn-primary" %>
    </div>