Hash :
cbfd3cf4
Author :
Thomas de Grivel
Date :
2022-01-09T11:17:50
<h3><%= gettext("Content") %></h3>
<%= if @git.content_html do %>
<div class="content_html">
<%= raw @git.content_html %>
</div>
<% else %>
<%= if String.match?(@git.content_type, ~r(^text/)) do %>
<pre><%= @git.content %></pre>
<% end %>
<% end %>
<%= if String.match?(@git.content_type, ~r(^image/)) do %>
<img src={"data:#{@git.content_type};base64,#{Base.encode64(@git.content)}"}/>
<% end %>
<%= link gettext("Download"), to: Routes.repository_path(@conn, :show, Repository.owner_slug(@repo), Repository.splat(@repo, ["_blob", @branch | String.split(@path, "/")])), class: "btn btn-primary" %>