Restream/redmine_undev_git

View on GitHub
app/views/remote_repo_sites/index.html.erb

Summary

Maintainability
Test Coverage
<h1><%= l(:label_remote_repo_sites) %></h1>
<% if remote_repo_sites.any? %>
  <% remote_repo_sites.sort.each do |site| %>
    <h2>
      <%= link_to site.uri, site.uri, target: '_blank' %>
      <small>
        <%= link_to(l(:label_user_plural), remote_repo_site_committers_path(site), class: 'icon icon-user') %>
      </small>
    </h2>
    <table class="list">
      <thead>
      <tr>
        <th><%= l(:label_remote_repo) %></th>
        <th><%= l(:field_created_on) %></th>
        <th><%= l(:field_updated_on) %></th>
        <th></th>
      </tr>
      </thead>
      <tbody>
      <% site.repos.each do |repo| %>
        <tr class="<%= cycle 'odd', 'even' %>">
          <td>
            <%= link_to repo.uri, repo.uri, target: '_blank' %>
          </td>
          <td>
            <%= repo.created_at %>
          </td>
          <td>
            <%= repo.updated_at %>
          </td>
          <td class="buttons">
            <%= link_to(l(:label_refetch),
                refetch_remote_repo_site_repo_path(site, repo),
                method: :put,
                class:  'icon icon-reload') %>
          </td>
        </tr>
      <% end %>
      </tbody>
    </table>
  <% end %>
<% else %>
  <p class="nodata"><%= l(:label_no_data) %></p>
<% end %>