Edit

kmx.io/kmxgit/lib/kmxgit_web/templates/repository/commit.html.heex

Branch :

  • lib/kmxgit_web/templates/repository/commit.html.heex
  • <div class="container-fluid">
      <div class="row">
        <div class="col col-12 col-md-7">
          <%= render("show_title.html", assigns) %>
        </div>
        <div class="col col-12 col-md-5">
          <%= link gettext("Browse"), to: Routes.repository_path(@conn, :show, Repository.owner_slug(@repo), Repository.splat(@repo, ["_tree", @commit.hash])), class: "btn btn-primary" %>
        </div>
      </div>
      <div class="row">
        <div class="col col-12">
          <hr/>
          <h2>
            <%= gettext("Commit") %>
            <%= @commit.hash %>
          </h2>
          <div>
            <%= render(KmxgitWeb.UserView, "avatar.html", conn: @conn, user: Map.get(@git.users_by_email, @commit.author_email), email: @commit.author_email, size: 48, title: @commit.author, class: "commit-avatar") %>
            <%= NaiveDateTime.add(~N[1970-01-01 00:00:00], @commit.date) %>
            <p>
              <%= @commit.message %>
            </p>
            <div class="clear"></div>
          </div>
          <%= if @diff do %>
            <div class="content_text">
              <div class="line_numbers">
                <pre><%= for ln <- @diff_line_numbers do %><%= link ln, id: ln, to: "##{ln}" %>
    <% end %></pre>
              </div>
              <pre><code class="language-diff"><%= @diff %></code></pre>
            </div>
            <hr/>
          <% end %>
        </div>
      </div>
    </div>