NARKOZ/ginatra

View on GitHub
views/index.erb

Summary

Maintainability
Test Coverage
<% title 'Repositories' %>

<div class="page-header">
  <h1>Repositories</h1>
  <% if Ginatra.config.git_clone_enabled? && @repositories.any? %>
    <div class="text-muted clone-hint">
      To clone one of these repositories, install git, and run:
      git clone <%= url %><strong>repo-name</strong>
    </div>
  <% end %>
</div>

<% if @repositories.size > 10 %>
  <div class="row filter">
    <div class="col-md-12">
      <input type="text" class="form-control js-filter-query" placeholder="Filter...">
    </div>
  </div>
<% end %>

<div class="list-group repo-list js-repolist">
  <% @repositories.each do |repo| %>
    <a href="<%= prefix_url(repo.param) %>" class="list-group-item">
      <h2>
        <%= empty_description_hint_for(repo) %>
        <%= repo.name %> <small><%= h repo.description %></small>
      </h2>
    </a>
  <% end %>
</div>