Hash :
5c46635e
Author :
Thomas de Grivel
Date :
2023-02-15T20:11:29
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
<div class="container-fluid">
<%= render("ci_title.html", assigns) %>
<%= inspect @ci %>
<%= if @ci.files do %>
<p>
<ul class="list-group">
<li class="list-group-item bg-h">
<h2><i class="fa fa-folder fixed-width"></i> <%= @path %></h2>
</li>
<%= Enum.map @ci.files, fn file -> %>
<li class="list-group-item">
<%= link to: Routes.repository_path(@conn, :show, Repository.owner_slug(@repo), Repository.splat(@repo, ["_ci" | String.split("#{@path}/#{file}", "/")])) do %>
<%= if String.match?(file, ~r(/$)) do %>
<i class="fas fa-folder"></i>
<% else %>
<i class="fas fa-file"></i>
<% end %>
<%= file %>
<% end %>
</li>
<% end %>
</ul>
</p>
<% end %>
<%= if @ci.content do %>
<%= if String.match?(@ci.content_type, ~r(^text/)) do %>
<%= if @ci.markdown_html do %>
<div class="content_html">
<%= raw @ci.markdown_html %>
</div>
<hr/>
<h3><%= gettext "Source" %></h3>
<% end %>
<p>
<ul class="list-group">
<li class="list-group-item bg-h">
<h2><i class="fa fa-file fixed-width"></i> <%= @path %></h2>
</li>
<li class="list-group-item">
<div class="file_content">
<div class="content_text">
<div class="line_numbers">
<pre><%= for ln <- @ci.line_numbers do %><%= link ln, id: ln, to: "##{ln}" %>
<% end %></pre>
</div>
<pre><code class={"language-#{@ci.content_lang}"}><%= @ci.content %></code></pre>
</div>
</div>
</li>
</ul>
</p>
<% end %>
<% end %>
</div>