ciudadanointeligente/partidopublico

View on GitHub
app/views/partidos/sedes_partido.html.erb

Summary

Maintainability
Test Coverage
<ol class="breadcrumb"><li><%= @partido.nombre %></li><li>Presencia nacional</li><li>Domicilio y sedes de contacto</li></ol>
<h3>Domicilio y sedes de contacto</h3>
<div class="table-responsive">
  <table class="table">
    <thead>
      <tr>
        <th>Región</th>
        <th>Comuna</th>
        <th>Dirección</th>
        <th>Contacto</th>
      </tr>
    </thead>
    <tbody>
      <% @datos_sedes.each do |r| %>
        <% if r['sedes'].any? %>
          <% r['sedes'].each do |s| %>
          <tr>
            <td><%= r['region'] %></td>
            <td><%= s['comuna'] %></td>
            <td><%= s['direccion'] %></td>
            <td><%= s['contacto'] %></td>
          </tr>
          <% end %>
        <% end %>
      <% end %>
    </tbody>
  </table>
</div>